public class TLcdShortArrayTile extends Object implements ILcdSubtiledTile
com.luciad.imaging
presents a new API
for the modeling of raster data. For new projects, it is recommended to use
this API instead of ILcdRaster
et al.
This basic implementation of ILcdTile
retrieves its pixel
values from a given array of shorts. The pixel values are stored row by
row, starting from the top-left, with one pixel value per array element.Constructor and Description |
---|
TLcdShortArrayTile(short[] aPixels,
int aWidth,
int aHeight)
Creates a new TLcdShortArrayTile with the given array and size.
|
TLcdShortArrayTile(short[] aPixels,
int aWidth,
int aHeight,
ColorModel aColorModel)
Creates a new TLcdShortArrayTile with the given array, size, and color
model.
|
TLcdShortArrayTile(short[] aPixels,
int aWidth,
int aHeight,
int aSubTileWidth,
int aSubTileHeight)
Creates a new TLcdShortArrayTile with the given array, size, and subtile
size.
|
TLcdShortArrayTile(short[] aPixels,
int aWidth,
int aHeight,
int aSubTileWidth,
int aSubTileHeight,
ColorModel aColorModel)
Creates a new TLcdShortArrayTile with the given array, size, subtile size,
and color model.
|
Modifier and Type | Method and Description |
---|---|
Image |
createImage()
Creates an image of the entire tile, using the tile's own color model.
|
Image |
createImage(ColorModel aColorModel)
Creates an image of the entire tile, using the given color model.
|
Image |
createImage(int aX,
int aY,
int aWidth,
int aHeight)
Creates an image of the specified rectangular area of the tile, using the
tile's own color model.
|
Image |
createImage(int aX,
int aY,
int aWidth,
int aHeight,
ColorModel aColorModel)
Creates an image of the specified rectangular area of the tile, using the
given color model.
|
ColorModel |
getColorModel()
Returns the optional color model of the tile.
|
int |
getHeight()
Returns the height of the tile, expressed in pixels.
|
int |
getPixelSize()
Returns the pixel size of the tile values, expressed in bits.
|
int |
getSubTileHeight()
Returns the height of a subtile in pixels.
|
int |
getSubTileWidth()
Returns the width of a subtile in pixels.
|
int |
getType()
Returns the internal storage type of the tile values.
|
int |
getWidth()
Returns the width of the tile, expressed in pixels.
|
boolean |
isAllDefault()
Returns whether all values in the tile are equal to a default value.
|
int |
retrieveValue(int aX,
int aY)
Retrieves the tile value at the specified location.
|
public TLcdShortArrayTile(short[] aPixels, int aWidth, int aHeight)
null
.aPixels
- the pixel values.aWidth
- the tile width.aHeight
- the tile height.public TLcdShortArrayTile(short[] aPixels, int aWidth, int aHeight, ColorModel aColorModel)
aPixels
- the pixel values.aWidth
- the tile width.aHeight
- the tile height.aColorModel
- the color model.public TLcdShortArrayTile(short[] aPixels, int aWidth, int aHeight, int aSubTileWidth, int aSubTileHeight)
null
.aPixels
- the pixel values.aWidth
- the tile width.aHeight
- the tile height.aSubTileWidth
- the subtile width.aSubTileHeight
- the subtile width.public TLcdShortArrayTile(short[] aPixels, int aWidth, int aHeight, int aSubTileWidth, int aSubTileHeight, ColorModel aColorModel)
aPixels
- the pixel values.aWidth
- the tile width.aHeight
- the tile height.aSubTileWidth
- the subtile width.aSubTileHeight
- the subtile width.aColorModel
- the color model.public int getType()
ILcdTile
public int getPixelSize()
ILcdTile
getPixelSize
in interface ILcdTile
public int getWidth()
ILcdTile
public int getHeight()
ILcdTile
public int getSubTileWidth()
ILcdSubtiledTile
getSubTileWidth
in interface ILcdSubtiledTile
public int getSubTileHeight()
ILcdSubtiledTile
getSubTileHeight
in interface ILcdSubtiledTile
public ColorModel getColorModel()
ILcdTile
getColorModel
in interface ILcdTile
null
if the raster doesn't have
an explicit color model.public boolean isAllDefault()
ILcdTile
isAllDefault
in interface ILcdTile
public int retrieveValue(int aX, int aY)
ILcdTile
retrieveValue
in interface ILcdTile
aX
- the x ordinate of the value, expressed in tile coordinates.aY
- the y ordinate of the value, expressed in tile coordinates.public Image createImage()
ILcdTile
createImage
in interface ILcdTile
public Image createImage(ColorModel aColorModel)
ILcdTile
createImage
in interface ILcdTile
aColorModel
- the color model to be used for the image. The color
model should be compatible with the pixel values of
the tile.public Image createImage(int aX, int aY, int aWidth, int aHeight)
ILcdTile
createImage
in interface ILcdTile
aX
- the x ordinate of the area, expressed in tile coordinates.aY
- the y ordinate of the area, expressed in tile coordinates.aWidth
- the width of the area, expressed in tile coordinates.aHeight
- the height of the area, expressed in tile coordinates.public Image createImage(int aX, int aY, int aWidth, int aHeight, ColorModel aColorModel)
ILcdTile
createImage
in interface ILcdTile
aX
- the x ordinate of the area, expressed in tile coordinates.aY
- the y ordinate of the area, expressed in tile coordinates.aWidth
- the width of the area, expressed in tile coordinates.aHeight
- the height of the area, expressed in tile coordinates.aColorModel
- the color model to be used for the image. The color
model should be compatible with the pixel values of
the tile.