Package com.luciad.format.raster
Class TLcdPNMImageDecoder
java.lang.Object
com.luciad.format.raster.ALcdTileDecoder
com.luciad.format.raster.TLcdPNMImageDecoder
- All Implemented Interfaces:
ILcdTileDecoder
,ILcdInputStreamFactoryCapable
This class is an
ILcdTileDecoder
for PNM (Portable aNyMap)
images, being PBM (Portable BitMap), PGM (Portable GrayMap), and PPM
(Portable PixMap).
This class is thread-safe.
Note: the current implementation doesn't support PBM yet, nor the plain ASCII formats of PGM and PPM.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ILcdTileInfo
readTileFromStream
(InputStream aInputStream, 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, setTraceOn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.format.raster.ILcdTileDecoder
readTile, readTile
-
Constructor Details
-
TLcdPNMImageDecoder
public TLcdPNMImageDecoder()
-
-
Method Details
-
readTileFromStream
protected ILcdTileInfo readTileFromStream(InputStream aInputStream, 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 classALcdTileDecoder
- Parameters:
aInputStream
- 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.
-