Class RawImageReader
- java.lang.Object
-
- javax.imageio.ImageReader
-
- com.github.jaiimageio.impl.plugins.raw.RawImageReader
-
public class RawImageReader extends javax.imageio.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 Modifier and Type Field Description private RawImageInputStream
iis
The input stream where reads from
-
Constructor Summary
Constructors Constructor Description RawImageReader(javax.imageio.spi.ImageReaderSpi originator)
ConstructsRawImageReader
from the providedImageReaderSpi
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canReadRaster()
private void
checkIndex(int imageIndex)
static void
computeRegionsWrapper(javax.imageio.ImageReadParam param, int srcWidth, int srcHeight, java.awt.image.BufferedImage image, java.awt.Rectangle srcRegion, java.awt.Rectangle destRegion)
Wrapper for the protected methodcomputeRegions
.boolean
getAbortRequest()
This method wraps the protected methodabortRequested
to allow the abortions be monitored byJ2KReadState
.javax.imageio.ImageReadParam
getDefaultReadParam()
int
getHeight(int imageIndex)
javax.imageio.metadata.IIOMetadata
getImageMetadata(int imageIndex)
java.util.Iterator
getImageTypes(int imageIndex)
int
getNumImages(boolean allowSearch)
Overrides the method defined in the superclass.javax.imageio.metadata.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(java.awt.image.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.java.awt.image.BufferedImage
read(int imageIndex, javax.imageio.ImageReadParam param)
java.awt.image.RenderedImage
readAsRenderedImage(int imageIndex, javax.imageio.ImageReadParam param)
java.awt.image.Raster
readRaster(int imageIndex, javax.imageio.ImageReadParam param)
void
reset()
void
setInput(java.lang.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
-
-
-
-
Field Detail
-
iis
private RawImageInputStream iis
The input stream where reads from
-
-
Method Detail
-
computeRegionsWrapper
public static void computeRegionsWrapper(javax.imageio.ImageReadParam param, int srcWidth, int srcHeight, java.awt.image.BufferedImage image, java.awt.Rectangle srcRegion, java.awt.Rectangle destRegion)
Wrapper for the protected methodcomputeRegions
. So it can be access from the classes which are not inImageReader
hierachy.
-
setInput
public void setInput(java.lang.Object input, boolean seekForwardOnly, boolean ignoreMetadata)
Overrides the method defined in the superclass.- Overrides:
setInput
in classjavax.imageio.ImageReader
- Throws:
java.lang.ClassCastException
- If the providedinput
is not an instance ofRawImageInputImage
-
getNumImages
public int getNumImages(boolean allowSearch) throws java.io.IOException
Overrides the method defined in the superclass.- Specified by:
getNumImages
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
getWidth
public int getWidth(int imageIndex) throws java.io.IOException
- Specified by:
getWidth
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
getHeight
public int getHeight(int imageIndex) throws java.io.IOException
- Specified by:
getHeight
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
getTileWidth
public int getTileWidth(int imageIndex) throws java.io.IOException
- Overrides:
getTileWidth
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
getTileHeight
public int getTileHeight(int imageIndex) throws java.io.IOException
- Overrides:
getTileHeight
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
checkIndex
private void checkIndex(int imageIndex) throws java.io.IOException
- Throws:
java.io.IOException
-
getImageTypes
public java.util.Iterator getImageTypes(int imageIndex) throws java.io.IOException
- Specified by:
getImageTypes
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
getDefaultReadParam
public javax.imageio.ImageReadParam getDefaultReadParam()
- Overrides:
getDefaultReadParam
in classjavax.imageio.ImageReader
-
getImageMetadata
public javax.imageio.metadata.IIOMetadata getImageMetadata(int imageIndex) throws java.io.IOException
- Specified by:
getImageMetadata
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
getStreamMetadata
public javax.imageio.metadata.IIOMetadata getStreamMetadata() throws java.io.IOException
- Specified by:
getStreamMetadata
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
isRandomAccessEasy
public boolean isRandomAccessEasy(int imageIndex) throws java.io.IOException
- Overrides:
isRandomAccessEasy
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
read
public java.awt.image.BufferedImage read(int imageIndex, javax.imageio.ImageReadParam param) throws java.io.IOException
- Specified by:
read
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
readAsRenderedImage
public java.awt.image.RenderedImage readAsRenderedImage(int imageIndex, javax.imageio.ImageReadParam param) throws java.io.IOException
- Overrides:
readAsRenderedImage
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
readRaster
public java.awt.image.Raster readRaster(int imageIndex, javax.imageio.ImageReadParam param) throws java.io.IOException
- Overrides:
readRaster
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
canReadRaster
public boolean canReadRaster()
- Overrides:
canReadRaster
in classjavax.imageio.ImageReader
-
reset
public void reset()
- Overrides:
reset
in classjavax.imageio.ImageReader
-
processImageUpdateWrapper
public void processImageUpdateWrapper(java.awt.image.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
.
-
-