Class TLcdTileDecoder

java.lang.Object
com.luciad.format.raster.ALcdTileDecoder
com.luciad.format.raster.TLcdTileDecoder
All Implemented Interfaces:
ILcdTileDecoder, ILcdInputStreamFactoryCapable

public class TLcdTileDecoder extends ALcdTileDecoder implements ILcdTileDecoder
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 Details

    • TLcdTileDecoder

      public TLcdTileDecoder(int aHeight, int aWidth, int aType)
      Creates a new TLcdTileDecoder for 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, or ILcdTile.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: ALcdTileDecoder
      Reads a sub-tile from an input stream.
      Specified by:
      readTileFromStream in class ALcdTileDecoder
      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:
      ILcdTileInfo information about the decoded tile.
      Throws:
      TLcdCodecException - in case of decoding problems.