public class JP2KKakaduImageReader extends ImageReader
JP2KakaduImageReader
is a ImageReader
able to
create RenderedImage
from JP2 files, leveraging on Kdu_jni bindings.availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales
Modifier | Constructor and Description |
---|---|
protected |
JP2KKakaduImageReader(ImageReaderSpi originatingProvider) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkImageIndex(int imageIndex)
Checks if the specified ImageIndex is valid.
|
void |
dispose()
Disposes all the resources, native and non, used by this
ImageReader subclass. |
ImageReadParam |
getDefaultReadParam()
Build a default
JP2KKakaduImageReadParam |
int |
getHeight(int imageIndex)
Returns the height in pixel of the image
|
IIOMetadata |
getImageMetadata(int imageIndex)
Returns an
IIOMetadata object containing metadata
associated with the given image. |
Iterator<ImageTypeSpecifier> |
getImageTypes(int imageIndex)
Returns an
Iterator containing possible image types to
which the given image may be decoded, in the form of
ImageTypeSpecifiers s. |
int |
getNumImages(boolean allowSearch)
Returns the number of images contained in the source.
|
int |
getSourceDWTLevels(int imageIndex)
returns the number of source DWT levels for the specified image.
|
IIOMetadata |
getStreamMetadata()
Returns an
IIOMetadata object representing the
metadata associated with the input source as a whole. |
int |
getTileHeight(int imageIndex)
Returns the height of a tile
|
int |
getTileWidth(int imageIndex)
Returns the width of a tile
|
int |
getWidth(int imageIndex)
Returns the width in pixel of the image
|
BufferedImage |
read(int imageIndex,
ImageReadParam param)
Read the image and returns it as a complete
BufferedImage ,
using a supplied ImageReadParam . |
void |
reset()
Reset main values
|
void |
setInput(Object input,
boolean seekForwardOnly,
boolean ignoreMetadata) |
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, canReadRaster, checkReadParamBandSettings, clearAbortRequest, computeRegions, getAspectRatio, getAvailableLocales, getDestination, getFormatName, getImageMetadata, getInput, getLocale, getMinIndex, getNumThumbnails, getOriginatingProvider, getRawImageType, getSourceRegion, getStreamMetadata, getThumbnailHeight, getThumbnailWidth, getTileGridXOffset, getTileGridYOffset, 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, setInput, setInput, setLocale
protected JP2KKakaduImageReader(ImageReaderSpi originatingProvider)
protected void checkImageIndex(int imageIndex)
imageIndex
- the specified imageIndexIndexOutOfBoundsException
- if imageIndex is lower than 0 or if is greater than the
max number (-1) of images available within the data
source contained within the sourcepublic int getHeight(int imageIndex) throws IOException
getHeight
in class ImageReader
the
- index of the selected imageIOException
public int getWidth(int imageIndex) throws IOException
getWidth
in class ImageReader
the
- index of the selected imageIOException
public IIOMetadata getImageMetadata(int imageIndex) throws IOException
IIOMetadata
object containing metadata
associated with the given image.getImageMetadata
in class ImageReader
imageIndex
- the index of the image whose metadata is to
be retrieved.IIOMetadata
object.IOException
ImageReader.getImageMetadata(int)
public IIOMetadata getStreamMetadata() throws IOException
IIOMetadata
object representing the
metadata associated with the input source as a whole.getStreamMetadata
in class ImageReader
IIOMetadata
object.IOException
ImageReader.getStreamMetadata()
public Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex) throws IOException
Iterator
containing possible image types to
which the given image may be decoded, in the form of
ImageTypeSpecifiers
s. At least one legal image type will
be returned. This implementation simply returns an
ImageTypeSpecifier
set in compliance with the property of
the dataset contained within the underlying data source.getImageTypes
in class ImageReader
imageIndex
- the index of the image to be retrieved.Iterator
containing possible image types to
which the given image may be decoded, in the form of
ImageTypeSpecifiers
sIOException
ImageReader.getImageTypes(int)
public int getNumImages(boolean allowSearch) throws IOException
getNumImages
in class ImageReader
IOException
public BufferedImage read(int imageIndex, ImageReadParam param) throws IOException
BufferedImage
,
using a supplied ImageReadParam
.read
in class ImageReader
imageIndex
- the index of the desired image.IOException
public void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)
setInput
in class ImageReader
public void dispose()
ImageReader
subclass.dispose
in class ImageReader
public int getTileHeight(int imageIndex) throws IOException
getTileHeight
in class ImageReader
the
- index of the selected imageIOException
public int getTileWidth(int imageIndex) throws IOException
getTileWidth
in class ImageReader
the
- index of the selected imageIOException
public ImageReadParam getDefaultReadParam()
JP2KKakaduImageReadParam
getDefaultReadParam
in class ImageReader
public int getSourceDWTLevels(int imageIndex)
public void reset()
reset
in class ImageReader
Copyright © 2006–2014 GeoSolutions. All rights reserved.