Package com.luciad.format.cadrg
Class TLcdCADRGRaster
java.lang.Object
com.luciad.imaging.ALcdImage
com.luciad.imaging.ALcdImageMosaic
com.luciad.format.cadrg.TLcdCADRGRaster
- All Implemented Interfaces:
ILcdRaster,com.luciad.internal.format.raster.ILinOptimizableRaster,ILcdBounded,ILcdCache
public class TLcdCADRGRaster
extends ALcdImageMosaic
implements ILcdRaster, com.luciad.internal.format.raster.ILinOptimizableRaster
This
ILcdRaster contains additional information about the
CADRG/CIB Boundary Rectangle that it represents.-
Nested Class Summary
Nested classes/interfaces inherited from class com.luciad.imaging.ALcdImageMosaic
ALcdImageMosaic.Configuration -
Field Summary
Fields inherited from class com.luciad.imaging.ALcdImage
IMAGE_DATA_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionTLcdCADRGRaster(ILcdBounds aBounds, double aTileWidth, double aTileHeight, ILcdTile[][] aTiles, double aPixelDensity, TLcdCADRGBoundaryRectangleDescriptor aCADRGBoundaryRectangleDescriptor) -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the cache.Returns the bounds of the image.getCachedObject(Object aKey) Looks up and returns the cached Object corresponding to the given key.Returns the descriptor containing additional information about the CADRG/CIB Boundary Rectangle.Returns the optional color model of the raster.Returns an image configuration object describing the properties of this image mosaic's data.intReturns the pixel value that is returned for points outside the bounds of the raster.doubleReturns the average number of pixels per unit of area in raster coordinates.intReturns the pixel size of the tiles in this raster, expressed in bits.getTile(long aTileX, long aTileY) Returns a single tile from this image.intReturns the number of the tile columns in the raster.doubleReturns the height of a single tile, expressed in raster coordinates.intReturns the number of the tile rows in the raster.doubleReturns the width of a single tile, expressed in raster coordinates.intgetType()Returns the internal storage type of the raster values.voidinsertIntoCache(Object aKey, Object aObject) Inserts a cache Object corresponding to the given key Object.removeCachedObject(Object aKey) Looks up and removes the cached Object corresponding to the given key.retrieveTile(int aRow, int aColumn) Retrieves the specified tile.intretrieveValue(double aX, double aY) Retrieves the raster value at the specified location.voidsetColorModel(ColorModel aColorModel) Sets theColorModelof the raster.voidsetDefaultValue(int aValue) Sets the pixel value that is returned for points outside the bounds of the raster.Methods inherited from class com.luciad.imaging.ALcdImage
asMultilevelMosaic, fromDomainObject
-
Constructor Details
-
TLcdCADRGRaster
public TLcdCADRGRaster(ILcdBounds aBounds, double aTileWidth, double aTileHeight, ILcdTile[][] aTiles, double aPixelDensity, TLcdCADRGBoundaryRectangleDescriptor aCADRGBoundaryRectangleDescriptor)
-
-
Method Details
-
getCADRGBoundaryRectangleDescriptor
Returns the descriptor containing additional information about the CADRG/CIB Boundary Rectangle. -
getTileWidth
public double getTileWidth()Description copied from interface:ILcdRasterReturns the width of a single tile, expressed in raster coordinates. Note that the tiles in the last (right-most) column can be smaller then other columns. The width of the last column is:getBounds().getWidth() - getTileWidth() * (getTileColumnCount() - 1)- Specified by:
getTileWidthin interfaceILcdRaster
-
getTileHeight
public double getTileHeight()Description copied from interface:ILcdRasterReturns the height of a single tile, expressed in raster coordinates. Note that the tiles in the last (bottom) row can be smaller then other rows. The height of the last row is:getBounds().getHeight() - getTileHeight() * (getTileRowCount() - 1)- Specified by:
getTileHeightin interfaceILcdRaster
-
getTileRowCount
public int getTileRowCount()Description copied from interface:ILcdRasterReturns the number of the tile rows in the raster.- Specified by:
getTileRowCountin interfaceILcdRaster
-
getTileColumnCount
public int getTileColumnCount()Description copied from interface:ILcdRasterReturns the number of the tile columns in the raster.- Specified by:
getTileColumnCountin interfaceILcdRaster
-
getPixelDensity
public double getPixelDensity()Description copied from interface:ILcdRasterReturns the average number of pixels per unit of area in raster coordinates.- Specified by:
getPixelDensityin interfaceILcdRaster
-
getType
public int getType()Description copied from interface:ILcdRasterReturns the internal storage type of the raster values.- Specified by:
getTypein interfaceILcdRaster- Returns:
- one of
ILcdTile.BYTE,ILcdTile.SHORT, orILcdTile.INT.
-
getPixelSize
public int getPixelSize()Description copied from interface:ILcdRasterReturns the pixel size of the tiles in this raster, expressed in bits.- Specified by:
getPixelSizein interfaceILcdRaster
-
getDefaultValue
public int getDefaultValue()Description copied from interface:ILcdRasterReturns the pixel value that is returned for points outside the bounds of the raster.- Specified by:
getDefaultValuein interfaceILcdRaster- See Also:
-
setDefaultValue
public void setDefaultValue(int aValue) Description copied from interface:ILcdRasterSets the pixel value that is returned for points outside the bounds of the raster.- Specified by:
setDefaultValuein interfaceILcdRaster- Parameters:
aValue- the default pixel value.
-
retrieveTile
Description copied from interface:ILcdRasterRetrieves the specified tile.- Specified by:
retrieveTilein interfaceILcdRaster- Parameters:
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.- Returns:
- the specified tile.
-
retrieveValue
public int retrieveValue(double aX, double aY) Description copied from interface:ILcdRasterRetrieves the raster value at the specified location.- Specified by:
retrieveValuein interfaceILcdRaster- Parameters:
aX- the x ordinate of the value, expressed in raster coordinates.aY- the y ordinate of the value, expressed in raster coordinates.- Returns:
- the integer raster value at the specified location.
-
getColorModel
Description copied from interface:ILcdRasterReturns the optional color model of the raster.- Specified by:
getColorModelin interfaceILcdRaster- Returns:
- the color model, or
nullif the raster doesn't have an explicit color model.
-
setColorModel
Description copied from interface:ILcdRasterSets theColorModelof the raster.- Specified by:
setColorModelin interfaceILcdRaster- Parameters:
aColorModel- the color model.
-
getBounds
Description copied from class:ALcdImageReturns the bounds of the image. This method returns the same bounds that are also available in the image's configuration.- Specified by:
getBoundsin interfaceILcdBounded- Overrides:
getBoundsin classALcdImage- Returns:
- the image's bounds
-
insertIntoCache
Description copied from interface:ILcdCacheInserts a cache Object corresponding to the given key Object.- Specified by:
insertIntoCachein interfaceILcdCache- Parameters:
aKey- the key Object that will be used to identify the Object. The key must therefore be a unique identifier, typically the caller itself:insertIntoCache(this, ...).aObject- the Object to be cached.
-
getCachedObject
Description copied from interface:ILcdCacheLooks up and returns the cached Object corresponding to the given key.- Specified by:
getCachedObjectin interfaceILcdCache- Parameters:
aKey- the key Object that was used for storing the cache Object.- Returns:
- the cached Object, or null if there is no Object corresponding to the given key.
-
removeCachedObject
Description copied from interface:ILcdCacheLooks up and removes the cached Object corresponding to the given key.- Specified by:
removeCachedObjectin interfaceILcdCache- Parameters:
aKey- the key Object that was used for storing the cache Object.- Returns:
- the cached Object, or null if there was no Object corresponding to the given key.
-
clearCache
public void clearCache()Description copied from interface:ILcdCacheClears the cache.- Specified by:
clearCachein interfaceILcdCache
-
getTile
Description copied from class:ALcdImageMosaicReturns a single tile from this image. May returnnullif no data is available. If the supplied sampling parameters allow it, however, the image may also create a new tile by extrapolating data from other levels of detail. Note that this method may require costly IO. Even if data is loaded lazily then some IO may still be required to determine if the tile exists or not. So typically this method should not be invoked from the paint thread. Also note that a mosaic may contain many tiles (ex. millions) so iterating over all tiles may take a very long time.- Specified by:
getTilein classALcdImageMosaic- Parameters:
aTileX- the tile x coordinate in[0, getConfiguration().getColumnCount()[aTileY- the tile y coordinate in[0, getConfiguration().getRowCount()[- Returns:
- the tile or
null
-
getConfiguration
Description copied from class:ALcdImageMosaicReturns an image configuration object describing the properties of this image mosaic's data.- Specified by:
getConfigurationin classALcdImageMosaic- Returns:
- the image's configuration
-