it.geosolutions.imageio.plugins.pnm
Class PNMImageReader

Object
  extended by ImageReader
      extended by PNMImageReader

public class PNMImageReader
extends ImageReader

This class is the Java Image IO plugin reader for PNM images. It may subsample the image, clip the image, select sub-bands, and shift the decoded image origin if the proper decoding parameter are set in the provided PNMImageReadParam.


Field Summary
 
Fields inherited from class ImageReader
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales
 
Constructor Summary
PNMImageReader(ImageReaderSpi originator)
          Constructs PNMImageReader from the provided ImageReaderSpi.
 
Method Summary
 boolean canReadRaster()
           
 ImageReadParam getDefaultReadParam()
           
 int getHeight(int imageIndex)
           
 IIOMetadata getImageMetadata(int imageIndex)
           
 Iterator getImageTypes(int imageIndex)
           
 int getMaxValue()
           
 int getNumImages(boolean allowSearch)
          Overrides the method defined in the superclass.
 IIOMetadata getStreamMetadata()
           
 int getVariant()
           
 int getWidth(int imageIndex)
           
 boolean isRandomAccessEasy(int imageIndex)
           
 BufferedImage read(int imageIndex, ImageReadParam param)
           
 void readHeader()
           
 Raster readRaster(int imageIndex, ImageReadParam param)
           
 void reset()
           
 void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)
          Overrides the method defined in the superclass.
 
Methods inherited from class ImageReader
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, checkReadParamBandSettings, clearAbortRequest, computeRegions, dispose, getAspectRatio, getAvailableLocales, getDestination, getFormatName, getImageMetadata, getInput, getLocale, getMinIndex, getNumThumbnails, getOriginatingProvider, getRawImageType, getSourceRegion, getStreamMetadata, getThumbnailHeight, getThumbnailWidth, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, hasThumbnails, isIgnoringMetadata, isImageTiled, isSeekForwardOnly, processImageComplete, processImageProgress, processImageStarted, processImageUpdate, processPassComplete, processPassStarted, processReadAborted, processSequenceComplete, processSequenceStarted, processThumbnailComplete, processThumbnailPassComplete, processThumbnailPassStarted, processThumbnailProgress, processThumbnailStarted, processThumbnailUpdate, processWarningOccurred, processWarningOccurred, read, readAll, readAll, readAsRenderedImage, readerSupportsThumbnails, readThumbnail, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, setInput, setInput, setLocale
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PNMImageReader

public PNMImageReader(ImageReaderSpi originator)
Constructs PNMImageReader from the provided ImageReaderSpi.

Method Detail

setInput

public void setInput(Object input,
                     boolean seekForwardOnly,
                     boolean ignoreMetadata)
Overrides the method defined in the superclass.

Overrides:
setInput in class ImageReader

getNumImages

public int getNumImages(boolean allowSearch)
                 throws IOException
Overrides the method defined in the superclass.

Specified by:
getNumImages in class ImageReader
Throws:
IOException

getWidth

public int getWidth(int imageIndex)
             throws IOException
Specified by:
getWidth in class ImageReader
Throws:
IOException

getHeight

public int getHeight(int imageIndex)
              throws IOException
Specified by:
getHeight in class ImageReader
Throws:
IOException

getVariant

public int getVariant()

getMaxValue

public int getMaxValue()

readHeader

public void readHeader()
                throws IOException
Throws:
IOException

getImageTypes

public Iterator getImageTypes(int imageIndex)
                       throws IOException
Specified by:
getImageTypes in class ImageReader
Throws:
IOException

getDefaultReadParam

public ImageReadParam getDefaultReadParam()
Overrides:
getDefaultReadParam in class ImageReader

getImageMetadata

public IIOMetadata getImageMetadata(int imageIndex)
                             throws IOException
Specified by:
getImageMetadata in class ImageReader
Throws:
IOException

getStreamMetadata

public IIOMetadata getStreamMetadata()
                              throws IOException
Specified by:
getStreamMetadata in class ImageReader
Throws:
IOException

isRandomAccessEasy

public boolean isRandomAccessEasy(int imageIndex)
                           throws IOException
Overrides:
isRandomAccessEasy in class ImageReader
Throws:
IOException

read

public BufferedImage read(int imageIndex,
                          ImageReadParam param)
                   throws IOException
Specified by:
read in class ImageReader
Throws:
IOException

canReadRaster

public boolean canReadRaster()
Overrides:
canReadRaster in class ImageReader

readRaster

public Raster readRaster(int imageIndex,
                         ImageReadParam param)
                  throws IOException
Overrides:
readRaster in class ImageReader
Throws:
IOException

reset

public void reset()
Overrides:
reset in class ImageReader


Copyright © 2006-2010 GeoSolutions. All Rights Reserved.