public class GrassBinaryImageReader extends ImageReader
The reader extends imageio's ImageReader
to support the reading of GRASS raster data.
ImageReader
,
GrassBinaryRasterReadHandler
,
GrassBinaryImageMetadata
Modifier and Type | Field and Description |
---|---|
ColorModel |
ccmdl
the
ColorModel to be used for the read raster. |
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales
Constructor and Description |
---|
GrassBinaryImageReader(GrassBinaryImageReaderSpi originatingProvider)
constructs an
ImageReader able to read grass raster maps. |
Modifier and Type | Method and Description |
---|---|
void |
abort()
Request to abort any current read operation.
|
protected boolean |
abortRequested()
Checks if a request to abort the current read operation has been made.
|
void |
dispose()
Cleans this
GrassBinaryImageReader up. |
int |
getHeight(int imageIndex) |
IIOMetadata |
getImageMetadata(int imageIndex) |
Iterator<ImageTypeSpecifier> |
getImageTypes(int imageIndex) |
int |
getNumImages(boolean allowSearch) |
GrassBinaryRasterReadHandler |
getRasterReader()
A simple method which returns the proper
GrassBinaryRasterReadHandler used to perform
reading operations |
IIOMetadata |
getStreamMetadata() |
int |
getWidth(int imageIndex) |
BufferedImage |
read(int imageIndex) |
BufferedImage |
read(int imageIndex,
ImageReadParam param) |
BufferedImage |
read(int imageIndex,
ImageReadParam param,
boolean useSubSamplingAsRequestedRowcols,
boolean castDoubleToFloating,
ProgressListener monitor)
Performs the read method adding the possibility to override subsampling.
|
Raster |
readRaster(int imageIndex,
ImageReadParam param) |
void |
reset()
Resets this
GrassBinaryImageReader . |
void |
setCastDoubleToFloating(boolean castDoubleToFloating) |
void |
setInput(Object input,
boolean seekForwardOnly,
boolean ignoreMetadata)
This method set the input only if the input object is a File.
|
void |
setMonitor(ProgressListener monitor) |
void |
setUseSubSamplingAsRequestedRowcols(boolean useSubSamplingAsRequestedRowcols) |
addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, canReadRaster, checkReadParamBandSettings, clearAbortRequest, computeRegions, getAspectRatio, getAvailableLocales, getDefaultReadParam, getDestination, getFormatName, getImageMetadata, getInput, getLocale, getMinIndex, getNumThumbnails, getOriginatingProvider, getRawImageType, 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, readAll, readAll, readAsRenderedImage, readerSupportsThumbnails, readThumbnail, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, setInput, setInput, setLocale
public ColorModel ccmdl
ColorModel
to be used for the read raster.public GrassBinaryImageReader(GrassBinaryImageReaderSpi originatingProvider)
ImageReader
able to read grass raster maps.originatingProvider
- the service provider interface for the reader.public void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)
setInput
in class ImageReader
public void setUseSubSamplingAsRequestedRowcols(boolean useSubSamplingAsRequestedRowcols)
public void setCastDoubleToFloating(boolean castDoubleToFloating)
public int getHeight(int imageIndex) throws IOException
getHeight
in class ImageReader
IOException
public int getWidth(int imageIndex) throws IOException
getWidth
in class ImageReader
IOException
public int getNumImages(boolean allowSearch) throws IOException
getNumImages
in class ImageReader
IOException
public Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex) throws IOException
getImageTypes
in class ImageReader
IOException
public IIOMetadata getStreamMetadata() throws IOException
getStreamMetadata
in class ImageReader
IOException
public IIOMetadata getImageMetadata(int imageIndex) throws IOException
getImageMetadata
in class ImageReader
IOException
public void setMonitor(ProgressListener monitor)
public BufferedImage read(int imageIndex, ImageReadParam param, boolean useSubSamplingAsRequestedRowcols, boolean castDoubleToFloating, ProgressListener monitor) throws IOException
imageIndex
- same as read(int, ImageReadParam)
param
- same as read(int, ImageReadParam)
useSubSamplingAsRequestedRowcols
- a flag that gives the possibility to bypass the
imageio subsampling mechanism. With GRASS maps this is often more performant in some
boundary situations. In the case this flag is set to true, the subsampling values will be
handled as the requested columns and rows.castDoubleToFloating
- a flag that gives the possibility to force the reading of a map
as a floating point map. This is necessary right now because of a imageio bug:
https://jai-imageio-core.dev.java.net/issues/show_bug.cgi?id=180read(int, ImageReadParam)
IOException
- same as read(int, ImageReadParam)
public BufferedImage read(int imageIndex, ImageReadParam param) throws IOException
read
in class ImageReader
IOException
public BufferedImage read(int imageIndex) throws IOException
read
in class ImageReader
IOException
public Raster readRaster(int imageIndex, ImageReadParam param) throws IOException
readRaster
in class ImageReader
IOException
public GrassBinaryRasterReadHandler getRasterReader()
GrassBinaryRasterReadHandler
used to perform
reading operationspublic void dispose()
GrassBinaryImageReader
up.dispose
in class ImageReader
public void reset()
GrassBinaryImageReader
.reset
in class ImageReader
public void abort()
abort
in class ImageReader
protected boolean abortRequested()
abortRequested
in class ImageReader
Copyright © 1996–2019 Geotools. All rights reserved.