Package com.luciad.format.raster
Class TLcdTileDecoder
java.lang.Object
com.luciad.format.raster.ALcdTileDecoder
com.luciad.format.raster.TLcdTileDecoder
- All Implemented Interfaces:
ILcdTileDecoder,ILcdInputStreamFactoryCapable
This
ILcdTileDecoder decodes uncompressed tiles of bytes,
shorts, or integers.
Since the tiles don't have a header, their size and type have to be
specified explicitly to the decoder. The values are read in traditional
scanline order: row by row, left-to-right, top-to-bottom.
This decoder is a limited version of TLcdBILTileDecoder.
This class is thread-safe.
-
Constructor Summary
ConstructorsConstructorDescriptionTLcdTileDecoder(int aHeight, int aWidth, int aType) Creates a newTLcdTileDecoderfor tiles with the given specifications. -
Method Summary
Modifier and TypeMethodDescriptionprotected ILcdTileInforeadTileFromStream(InputStream is, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aRowIndex, int aColumnIndex, ILcdBuffer aBuffer) Reads a sub-tile from an input stream.Methods inherited from class com.luciad.format.raster.ALcdTileDecoder
getInputStreamFactory, isTraceOn, readTile, readTile, setClassTraceOn, setInputStreamFactory, setTraceOnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.format.raster.ILcdTileDecoder
readTile, readTile
-
Constructor Details
-
TLcdTileDecoder
public TLcdTileDecoder(int aHeight, int aWidth, int aType) Creates a newTLcdTileDecoderfor tiles with the given specifications. Note that the width and height are not in the most conventional order.- Parameters:
aHeight- the tile height.aWidth- the tile width.aType- the tile type:ILcdTile.BYTE,ILcdTile.SHORT, orILcdTile.INT.
-
-
Method Details
-
readTileFromStream
protected ILcdTileInfo readTileFromStream(InputStream is, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aRowIndex, int aColumnIndex, ILcdBuffer aBuffer) throws TLcdCodecException Description copied from class:ALcdTileDecoderReads a sub-tile from an input stream.- Specified by:
readTileFromStreamin classALcdTileDecoder- Parameters:
is- the input stream from which the tile data can be read.aImageIndex- the index of the tile in the given input stream (if applicable).aSubTileWidth- the width of the sub-tiles, expressed in pixels.aSubTileHeight- the height of the sub-tiles, expressed in pixels.aRowIndex- the row number of the sub-tile to be decoded.aColumnIndex- the column number of the sub-tile to be decoded.aBuffer- the buffer in which the decoded bytes will be stored.- Returns:
ILcdTileInfoinformation about the decoded tile.- Throws:
TLcdCodecException- in case of decoding problems.
-