public class TLcdRaster extends ALcdRaster
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 class provides a straightforward implementation of ILcdRaster
.
This class is thread-safe for concurrent read-only access of its contents.
Constructor and Description |
---|
TLcdRaster()
Creates a new empty TLcdRaster.
|
TLcdRaster(ILcdBounds aBounds,
double aTileWidth,
double aTileHeight,
ILcdTile[][] aTiles,
double aPixelDensity,
int aDefaultValue,
ColorModel aColorModel)
Creates a new TLcdRaster.
|
TLcdRaster(ILcdBounds aBounds,
ILcdTile[][] aTiles,
double aPixelDensity,
int aDefaultValue,
ColorModel aColorModel)
Creates a new TLcdRaster with a regular tiling.
|
Modifier and Type | Method and Description |
---|---|
int |
getTileColumnCount()
Returns the number of the tile columns in the raster.
|
int |
getTileRowCount()
Returns the number of the tile rows in the raster.
|
ILcdTile |
retrieveTile(int aRow,
int aColumn)
Retrieves the specified tile.
|
clearCache, dispose, getBounds, getCachedObject, getColorModel, getDefaultValue, getPixelDensity, getPixelSize, getTileHeight, getTileWidth, getType, insertIntoCache, removeCachedObject, retrieveValue, setColorModel, setDefaultValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public TLcdRaster()
public TLcdRaster(ILcdBounds aBounds, ILcdTile[][] aTiles, double aPixelDensity, int aDefaultValue, ColorModel aColorModel)
aBounds
- the bounds of the raster in model coordinates.aTiles
- the array of tiles of the raster.aPixelDensity
- an estimate of the number of pixels per unit area in
model coordinates.aDefaultValue
- a default value in case the raster cannot resolve
a point.aColorModel
- an optional ColorModel that overrides the ColorModel
of the raster's tiles.public TLcdRaster(ILcdBounds aBounds, double aTileWidth, double aTileHeight, ILcdTile[][] aTiles, double aPixelDensity, int aDefaultValue, ColorModel aColorModel)
For a raster with a uniform pixel density, the tile width (and similarly the tile height) in model coordinates can be computed as follows:
<tile width> = <tile width in pixels> / <raster width in pixels> * <raster width>
aBounds
- the bounds of the raster in model coordinates.aTileWidth
- the width of the tiles in model coordinates.aTileHeight
- the height of the tiles in model coordinates.aTiles
- the array of tiles of the raster.aPixelDensity
- an estimate of the number of pixels per unit area in
model coordinates.aDefaultValue
- a default value in case the raster cannot resolve
a point.aColorModel
- an optional ColorModel that overrides the ColorModel
of the raster's tiles.public int getTileRowCount()
ILcdRaster
public int getTileColumnCount()
ILcdRaster
public ILcdTile retrieveTile(int aRow, int aColumn)
ILcdRaster
aRow
- the row number of the tile in the grid of tiles,
ranging between 0 and the number of rows minus 1.aColumn
- the column number of the tile in the grid of tiles,
ranging between 0 and the number of columns minus 1.