public interface ILcdTile
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 interface represents a regular matrix of integer values.
A tile is defined over a rectangle in a discrete coordinate system. The tile width, height, and coordinates are expressed as integers. The x and y axes are pointing to the right and down, respectively. Tile coordinates (0, 0) correspond to the upper-left corner of the tile.
The interface defines methods for retrieving the tile contents as images or as individual values.
A tile can optionally have a color model that specifies how the tile values can be displayed.
Modifier and Type | Field and Description |
---|---|
static int |
BYTE |
static int |
INT |
static int |
SHORT |
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 |
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.
|
static final int BYTE
static final int SHORT
static final int INT
int getWidth()
int getHeight()
int getType()
BYTE
, SHORT
, or INT
.int getPixelSize()
ColorModel getColorModel()
null
if the raster doesn't have
an explicit color model.boolean isAllDefault()
int retrieveValue(int aX, int aY)
aX
- the x ordinate of the value, expressed in tile coordinates.aY
- the y ordinate of the value, expressed in tile coordinates.Image createImage()
Image createImage(ColorModel aColorModel)
aColorModel
- the color model to be used for the image. The color
model should be compatible with the pixel values of
the tile.Image createImage(int aX, int aY, int aWidth, int aHeight)
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.Image createImage(int aX, int aY, int aWidth, int aHeight, ColorModel aColorModel)
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.