Package de.pco.imageio
Class RawImageReader
java.lang.Object
javax.imageio.ImageReader
de.pco.imageio.RawImageReader
public class RawImageReader extends ImageReader
Class for reading the BufferedImage from a
RawImageInputStream built upon an ImageData.
Will be used when needed to display the recorded images or the images that were loaded
from a PCO-supported file by means of the wrapper functions of the C library (classes Recorder, Sdk).- Author:
- PCO
-
Field Summary
Fields inherited from class javax.imageio.ImageReader
availableLocales, ignoreMetadata, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales -
Constructor Summary
Constructors Constructor Description RawImageReader()Standard constructor. -
Method Summary
Modifier and Type Method Description intgetHeight(int imageIndex)Returns the height of the images in the input.IIOMetadatagetImageMetadata(int imageIndex)Returns metadata of a particular image in the input.Iterator<ImageTypeSpecifier>getImageTypes(int imageIndex)Type grayscale unsigned short (when the input wraps ImageData) or unsigned byte (when the input wraps ImageDataCompressed).intgetNumImages(boolean allowSearch)Gets the number of images in the input.IIOMetadatagetStreamMetadata()Returns null.intgetWidth(int imageIndex)Returns the width of the images in the input.BufferedImageread(int imageIndex, ImageReadParam param)Method for reading the particular image from the inputRawImageInputStreaminto BufferedImage.voidsetInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)RawImageInputStreamexpected as the input.Methods inherited from class javax.imageio.ImageReader
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, canReadRaster, checkReadParamBandSettings, clearAbortRequest, computeRegions, dispose, 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, read, readAll, readAll, readAsRenderedImage, readerSupportsThumbnails, readRaster, readThumbnail, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, reset, setInput, setInput, setLocale
-
Constructor Details
-
RawImageReader
public RawImageReader()Standard constructor.
-
-
Method Details
-
setInput
RawImageInputStreamexpected as the input.- Overrides:
setInputin classImageReader
-
getNumImages
public int getNumImages(boolean allowSearch)Gets the number of images in the input.- Specified by:
getNumImagesin classImageReader
-
getWidth
Returns the width of the images in the input.- Specified by:
getWidthin classImageReader- Throws:
IOException
-
getHeight
Returns the height of the images in the input.- Specified by:
getHeightin classImageReader- Throws:
IOException
-
getImageTypes
Type grayscale unsigned short (when the input wraps ImageData) or unsigned byte (when the input wraps ImageDataCompressed).- Specified by:
getImageTypesin classImageReader- Throws:
IOException
-
getStreamMetadata
Returns null. No metadata common for the whole stream except for height, width and isCompressed- all this contained in each metadata retrieved bygetImageMetadata(int)- Specified by:
getStreamMetadatain classImageReader- Throws:
IOException
-
getImageMetadata
Returns metadata of a particular image in the input.- Specified by:
getImageMetadatain classImageReader- Throws:
IOException
-
read
Method for reading the particular image from the inputRawImageInputStreaminto BufferedImage.- Specified by:
readin classImageReader- Throws:
IOException
-