Class RawImageReader
- java.lang.Object
-
- javax.imageio.ImageReader
-
- com.sun.media.imageioimpl.plugins.raw.RawImageReader
-
public class RawImageReader extends ImageReader
This class is the Java Image IO plugin reader for Raw 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 providedPNMImageReadParam
.
-
-
Field Summary
-
Fields inherited from class javax.imageio.ImageReader
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales
-
-
Constructor Summary
Constructors Constructor Description RawImageReader(ImageReaderSpi originator)
ConstructsRawImageReader
from the providedImageReaderSpi
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canReadRaster()
static void
computeRegionsWrapper(ImageReadParam param, int srcWidth, int srcHeight, BufferedImage image, Rectangle srcRegion, Rectangle destRegion)
Wrapper for the protected methodcomputeRegions
.boolean
getAbortRequest()
This method wraps the protected methodabortRequested
to allow the abortions be monitored byJ2KReadState
.ImageReadParam
getDefaultReadParam()
int
getHeight(int imageIndex)
IIOMetadata
getImageMetadata(int imageIndex)
Iterator
getImageTypes(int imageIndex)
int
getNumImages(boolean allowSearch)
Overrides the method defined in the superclass.IIOMetadata
getStreamMetadata()
int
getTileHeight(int imageIndex)
int
getTileWidth(int imageIndex)
int
getWidth(int imageIndex)
boolean
isRandomAccessEasy(int imageIndex)
void
processImageProgressWrapper(float percentageDone)
Wrapper for the protected methodprocessImageProgress
So it can be access from the classes which are not inImageReader
hierachy.void
processImageUpdateWrapper(BufferedImage theImage, int minX, int minY, int width, int height, int periodX, int periodY, int[] bands)
Wrapper for the protected methodprocessImageUpdate
So it can be access from the classes which are not inImageReader
hierachy.BufferedImage
read(int imageIndex, ImageReadParam param)
RenderedImage
readAsRenderedImage(int imageIndex, ImageReadParam param)
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 javax.imageio.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, hasThumbnails, isIgnoringMetadata, isImageTiled, 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 Detail
-
RawImageReader
public RawImageReader(ImageReaderSpi originator)
ConstructsRawImageReader
from the providedImageReaderSpi
.
-
-
Method Detail
-
computeRegionsWrapper
public static void computeRegionsWrapper(ImageReadParam param, 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 inImageReader
hierachy.
-
setInput
public void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)
Overrides the method defined in the superclass.- Overrides:
setInput
in classImageReader
- Throws:
ClassCastException
- If the providedinput
is not an instance ofRawImageInputImage
-
getNumImages
public int getNumImages(boolean allowSearch) throws IOException
Overrides the method defined in the superclass.- Specified by:
getNumImages
in classImageReader
- Throws:
IOException
-
getWidth
public int getWidth(int imageIndex) throws IOException
- Specified by:
getWidth
in classImageReader
- Throws:
IOException
-
getHeight
public int getHeight(int imageIndex) throws IOException
- Specified by:
getHeight
in classImageReader
- Throws:
IOException
-
getTileWidth
public int getTileWidth(int imageIndex) throws IOException
- Overrides:
getTileWidth
in classImageReader
- Throws:
IOException
-
getTileHeight
public int getTileHeight(int imageIndex) throws IOException
- Overrides:
getTileHeight
in classImageReader
- Throws:
IOException
-
getImageTypes
public Iterator getImageTypes(int imageIndex) throws IOException
- Specified by:
getImageTypes
in classImageReader
- Throws:
IOException
-
getDefaultReadParam
public ImageReadParam getDefaultReadParam()
- Overrides:
getDefaultReadParam
in classImageReader
-
getImageMetadata
public IIOMetadata getImageMetadata(int imageIndex) throws IOException
- Specified by:
getImageMetadata
in classImageReader
- Throws:
IOException
-
getStreamMetadata
public IIOMetadata getStreamMetadata() throws IOException
- Specified by:
getStreamMetadata
in classImageReader
- Throws:
IOException
-
isRandomAccessEasy
public boolean isRandomAccessEasy(int imageIndex) throws IOException
- Overrides:
isRandomAccessEasy
in classImageReader
- Throws:
IOException
-
read
public BufferedImage read(int imageIndex, ImageReadParam param) throws IOException
- Specified by:
read
in classImageReader
- Throws:
IOException
-
readAsRenderedImage
public RenderedImage readAsRenderedImage(int imageIndex, ImageReadParam param) throws IOException
- Overrides:
readAsRenderedImage
in classImageReader
- Throws:
IOException
-
readRaster
public Raster readRaster(int imageIndex, ImageReadParam param) throws IOException
- Overrides:
readRaster
in classImageReader
- Throws:
IOException
-
canReadRaster
public boolean canReadRaster()
- Overrides:
canReadRaster
in classImageReader
-
reset
public void reset()
- Overrides:
reset
in classImageReader
-
processImageUpdateWrapper
public void processImageUpdateWrapper(BufferedImage theImage, int minX, int minY, int width, int height, int periodX, int periodY, int[] bands)
Wrapper for the protected methodprocessImageUpdate
So it can be access from the classes which are not inImageReader
hierachy.
-
processImageProgressWrapper
public void processImageProgressWrapper(float percentageDone)
Wrapper for the protected methodprocessImageProgress
So it can be access from the classes which are not inImageReader
hierachy.
-
getAbortRequest
public boolean getAbortRequest()
This method wraps the protected methodabortRequested
to allow the abortions be monitored byJ2KReadState
.
-
-