org.geotoolkit.image.io.plugin
Class TextMatrixImageReader
Object
ImageReader
SpatialImageReader
StreamImageReader
TextImageReader
TextMatrixImageReader
- All Implemented Interfaces:
- WarningProducer, Disposable, Localized
public class TextMatrixImageReader
- extends TextImageReader
An image decoder for matrix of floating-point numbers. The default implementation creates
rasters of DataBuffer.TYPE_FLOAT. An easy way to change this type is to overwrite
the SpatialImageReader.getRawDataType(int) method.
- Since:
- 3.08 (derived from 1.2)
- Version:
- 3.08
- Author:
- Martin Desruisseaux (IRD, Geomatys)
- See Also:
TextMatrixImageWriter
- Module:
| Fields inherited from class ImageReader |
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales |
|
Method Summary |
protected void |
close()
Closes the input stream and disposes the resources that was specific to that stream. |
protected SpatialMetadata |
createMetadata(int imageIndex)
Returns metadata associated with the given image. |
int |
getHeight(int imageIndex)
Returns the height in pixels of the given image within the input source. |
int |
getWidth(int imageIndex)
Returns the width in pixels of the given image within the input source. |
BufferedImage |
read(int imageIndex,
ImageReadParam param)
Reads the image indexed by imageIndex. |
| Methods inherited from class SpatialImageReader |
checkBandIndex, checkImageIndex, collapseNoDataValues, dispose, flipVertically, getDefaultReadParam, getDestination, getDimension, getGridEnvelope, getImageMetadata, getImageType, getImageTypes, getNumBands, getNumImages, getRawDataType, getRawImageType, getStreamMetadata, hasColors, warningOccurred |
| Methods inherited from class ImageReader |
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, canReadRaster, checkReadParamBandSettings, clearAbortRequest, computeRegions, getAspectRatio, getAvailableLocales, getDestination, getFormatName, getImageMetadata, getInput, getLocale, getMinIndex, getNumThumbnails, getOriginatingProvider, getSourceRegion, getStreamMetadata, getThumbnailHeight, getThumbnailWidth, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, hasThumbnails, isIgnoringMetadata, isImageTiled, isRandomAccessEasy, isSeekForwardOnly, processImageComplete, processImageProgress, processImageStarted, processImageUpdate, processPassComplete, processPassStarted, processReadAborted, processSequenceComplete, processSequenceStarted, processThumbnailComplete, processThumbnailPassComplete, processThumbnailPassStarted, processThumbnailProgress, processThumbnailStarted, processThumbnailUpdate, processWarningOccurred, processWarningOccurred, read, readAll, readAll, readAsRenderedImage, readerSupportsThumbnails, readRaster, readThumbnail, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, reset, setInput, setInput, setLocale |
TextMatrixImageReader
protected TextMatrixImageReader(TextMatrixImageReader.Spi provider)
- Constructs a new image reader.
- Parameters:
provider - The ImageReaderSpi that is constructing this object, or null.
getWidth
public int getWidth(int imageIndex)
throws IOException
- Returns the width in pixels of the given image within the input source.
- Specified by:
getWidth in class ImageReader
- Parameters:
imageIndex - the index of the image to be queried.
- Returns:
- Image width.
- Throws:
IOException - If an error occurs reading the width information
from the input source.
getHeight
public int getHeight(int imageIndex)
throws IOException
- Returns the height in pixels of the given image within the input source.
Calling this method may force loading of full image.
- Specified by:
getHeight in class ImageReader
- Parameters:
imageIndex - the index of the image to be queried.
- Returns:
- Image height.
- Throws:
IOException - If an error occurs reading the height information
from the input source.
createMetadata
protected SpatialMetadata createMetadata(int imageIndex)
throws IOException
- Returns metadata associated with the given image.
Calling this method may force loading of full image.
- Overrides:
createMetadata in class SpatialImageReader
- Parameters:
imageIndex - The image index.
- Returns:
- The metadata, or
null if none.
- Throws:
IOException - If an error occurs reading the data information from the input source.
read
public BufferedImage read(int imageIndex,
ImageReadParam param)
throws IOException
- Reads the image indexed by
imageIndex.
- Specified by:
read in class ImageReader
- Parameters:
imageIndex - The index of the image to be retrieved.param - Parameters used to control the reading process, or null.
- Returns:
- The desired portion of the image.
- Throws:
IOException - if an input operation failed.
close
protected void close()
throws IOException
- Closes the input stream and disposes the resources that was specific to that stream.
- Overrides:
close in class TextImageReader
- Throws:
IOException - If an error occurred while closing the reader.- See Also:
StreamImageReader.closeOnReset
Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.