Class J2KImageReader
java.lang.Object
javax.imageio.ImageReader
com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReader
- All Implemented Interfaces:
MsgLogger
This class is the Java Image IO plugin reader for JPEG 2000 JP2 image file
format. It has the capability to load the compressed bilevel images,
color-indexed byte images, or multi-band images in byte/ushort/short/int
data type. It may subsample the image, select bands, clip the image,
and shift the decoded image origin if the proper decoding parameter
are set in the provided
J2KImageReadParam.-
Field Summary
Fields inherited from class javax.imageio.ImageReader
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales -
Constructor Summary
ConstructorsConstructorDescriptionJ2KImageReader(ImageReaderSpi originator) ConstructsJ2KImageReaderfrom the providedImageReaderSpi. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic voidcheckReadParamBandSettingsWrapper(ImageReadParam param, int numSrcBands, int numDstBands) Wrapper for the protected methodcheckReadParamBandSettings.static voidcomputeRegionsWrapper(ImageReadParam param, boolean allowZeroDestOffset, int srcWidth, int srcHeight, BufferedImage image, Rectangle srcRegion, Rectangle destRegion) Wrapper for the protected methodcomputeRegions.voiddispose()voidflush()Writes any buffered data from the println() method to the device.booleanThis method wraps the protected methodabortRequestedto allow the abortions be monitored byJ2KReadState.intgetHeight(int imageIndex) getImageMetadata(int imageIndex) getImageTypes(int imageIndex) intgetNumImages(boolean allowSearch) Overrides the method defined in the superclass.intgetTileGridXOffset(int imageIndex) intgetTileGridYOffset(int imageIndex) intgetTileHeight(int imageIndex) intgetTileWidth(int imageIndex) intgetWidth(int imageIndex) booleanisImageTiled(int imageIndex) booleanisRandomAccessEasy(int imageIndex) voidPrints the string 'str' to the output device, appending a line return.voidPrints the message 'msg' to the output device, appending a newline, with severity 'sev'.voidprocessImageProgressWrapper(float percentageDone) Wrapper for the protected methodprocessImageProgressSo it can be access from the classes which are not inImageReaderhierarchy.voidprocessImageUpdateWrapper(BufferedImage theImage, int minX, int minY, int width, int height, int periodX, int periodY, int[] bands) Wrapper for the protected methodprocessImageUpdateSo it can be access from the classes which are not inImageReaderhierarchy.read(int imageIndex, ImageReadParam param) readAsRenderedImage(int imageIndex, ImageReadParam param) voidreadRaster(int imageIndex, ImageReadParam param) voidreset()voidOverrides the method defined in the superclass.Methods inherited from class javax.imageio.ImageReader
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, checkReadParamBandSettings, clearAbortRequest, computeRegions, getAspectRatio, getAvailableLocales, getDestination, getFormatName, getImageMetadata, getInput, getLocale, getMinIndex, getNumThumbnails, getOriginatingProvider, getRawImageType, getSourceRegion, getStreamMetadata, getThumbnailHeight, getThumbnailWidth, hasThumbnails, isIgnoringMetadata, isSeekForwardOnly, processImageComplete, processImageProgress, processImageStarted, processImageUpdate, processPassComplete, processPassStarted, processReadAborted, processSequenceComplete, processSequenceStarted, processThumbnailComplete, processThumbnailPassComplete, processThumbnailPassStarted, processThumbnailProgress, processThumbnailStarted, processThumbnailUpdate, processWarningOccurred, processWarningOccurred, read, readAll, readAll, readerSupportsThumbnails, readThumbnail, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, setInput, setInput, setLocale
-
Constructor Details
-
J2KImageReader
ConstructsJ2KImageReaderfrom the providedImageReaderSpi.
-
-
Method Details
-
computeRegionsWrapper
public static void computeRegionsWrapper(ImageReadParam param, boolean allowZeroDestOffset, int srcWidth, int srcHeight, BufferedImage image, Rectangle srcRegion, Rectangle destRegion) Wrapper for the protected methodcomputeRegions. So it can be access from the classes which are not inImageReaderhierarchy. -
checkReadParamBandSettingsWrapper
public static void checkReadParamBandSettingsWrapper(ImageReadParam param, int numSrcBands, int numDstBands) Wrapper for the protected methodcheckReadParamBandSettings. So it can be access from the classes which are not inImageReaderhierarchy. -
processImageUpdateWrapper
public void processImageUpdateWrapper(BufferedImage theImage, int minX, int minY, int width, int height, int periodX, int periodY, int[] bands) Wrapper for the protected methodprocessImageUpdateSo it can be access from the classes which are not inImageReaderhierarchy. -
processImageProgressWrapper
public void processImageProgressWrapper(float percentageDone) Wrapper for the protected methodprocessImageProgressSo it can be access from the classes which are not inImageReaderhierarchy. -
setInput
Overrides the method defined in the superclass.- Overrides:
setInputin classImageReader
-
getNumImages
Overrides the method defined in the superclass.- Specified by:
getNumImagesin classImageReader- Throws:
IOException
-
getWidth
- Specified by:
getWidthin classImageReader- Throws:
IOException
-
getHeight
- Specified by:
getHeightin classImageReader- Throws:
IOException
-
getTileGridXOffset
- Overrides:
getTileGridXOffsetin classImageReader- Throws:
IOException
-
getTileGridYOffset
- Overrides:
getTileGridYOffsetin classImageReader- Throws:
IOException
-
getTileWidth
- Overrides:
getTileWidthin classImageReader- Throws:
IOException
-
getTileHeight
- Overrides:
getTileHeightin classImageReader- Throws:
IOException
-
readHeader
public void readHeader() -
getImageTypes
- Specified by:
getImageTypesin classImageReader- Throws:
IOException
-
getDefaultReadParam
- Overrides:
getDefaultReadParamin classImageReader
-
getImageMetadata
- Specified by:
getImageMetadatain classImageReader- Throws:
IOException
-
getStreamMetadata
- Specified by:
getStreamMetadatain classImageReader- Throws:
IOException
-
read
- Specified by:
readin classImageReader- Throws:
IOException
-
readAsRenderedImage
- Overrides:
readAsRenderedImagein classImageReader- Throws:
IOException
-
canReadRaster
public boolean canReadRaster()- Overrides:
canReadRasterin classImageReader
-
isRandomAccessEasy
- Overrides:
isRandomAccessEasyin classImageReader- Throws:
IOException
-
readRaster
- Overrides:
readRasterin classImageReader- Throws:
IOException
-
isImageTiled
public boolean isImageTiled(int imageIndex) - Overrides:
isImageTiledin classImageReader
-
reset
public void reset()- Overrides:
resetin classImageReader
-
getAbortRequest
public boolean getAbortRequest()This method wraps the protected methodabortRequestedto allow the abortions be monitored byJ2KReadState. -
dispose
public void dispose()- Overrides:
disposein classImageReader
-
flush
public void flush()Description copied from interface:MsgLoggerWrites any buffered data from the println() method to the device. -
println
Description copied from interface:MsgLoggerPrints the string 'str' to the output device, appending a line return. The message is reformatted as appropriate to the particular diplaying device, where 'flind' and 'ind' are used as hints for performing that operation. However, any newlines appearing in 'str' are respected. The output device may not display the string until flush() is called. Some implementations may automatically flush when this method is called. This method just prints the string, the string does not make part of a "message" in the sense that no severity is associated to it. -
printmsg
Description copied from interface:MsgLoggerPrints the message 'msg' to the output device, appending a newline, with severity 'sev'. Some implementations where the appended newline is irrelevant may not append the newline. Depending on the implementation the severity of the message may be added to it. The message is reformatted as appropriate for the output devic, but any newline characters are respected.
-