Class DataReaderStrips
- java.lang.Object
-
- org.apache.commons.imaging.formats.tiff.datareaders.ImageDataReader
-
- org.apache.commons.imaging.formats.tiff.datareaders.DataReaderStrips
-
public final class DataReaderStrips extends ImageDataReader
Provides a data reader for TIFF file images organized by tiles.
-
-
Field Summary
Fields Modifier and Type Field Description private intbitsPerPixelprivate java.nio.ByteOrderbyteOrderprivate intcompressionprivate TiffImageData.StripsimageDataprivate introwsPerStripprivate intxprivate inty-
Fields inherited from class org.apache.commons.imaging.formats.tiff.datareaders.ImageDataReader
bitsPerSampleLength, directory, height, photometricInterpreter, predictor, sampleFormat, samplesPerPixel, width
-
-
Constructor Summary
Constructors Constructor Description DataReaderStrips(TiffDirectory directory, PhotometricInterpreter photometricInterpreter, int bitsPerPixel, int[] bitsPerSample, int predictor, int samplesPerPixel, int sampleFormat, int width, int height, int compression, java.nio.ByteOrder byteOrder, int rowsPerStrip, TiffImageData.Strips imageData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidinterpretStrip(ImageBuilder imageBuilder, byte[] bytes, int pixelsPerStrip, int yLimit)java.awt.image.BufferedImagereadImageData(java.awt.Rectangle subImage)voidreadImageData(ImageBuilder imageBuilder)TiffRasterDatareadRasterData(java.awt.Rectangle subImage)Defines a method for accessing the floating-point raster data in a TIFF image.-
Methods inherited from class org.apache.commons.imaging.formats.tiff.datareaders.ImageDataReader
applyPredictor, decompress, getSamplesAsBytes, isHomogenous, resetPredictor, transferBlockToRaster, unpackFloatingPointSamples
-
-
-
-
Field Detail
-
bitsPerPixel
private final int bitsPerPixel
-
compression
private final int compression
-
rowsPerStrip
private final int rowsPerStrip
-
byteOrder
private final java.nio.ByteOrder byteOrder
-
x
private int x
-
y
private int y
-
imageData
private final TiffImageData.Strips imageData
-
-
Constructor Detail
-
DataReaderStrips
public DataReaderStrips(TiffDirectory directory, PhotometricInterpreter photometricInterpreter, int bitsPerPixel, int[] bitsPerSample, int predictor, int samplesPerPixel, int sampleFormat, int width, int height, int compression, java.nio.ByteOrder byteOrder, int rowsPerStrip, TiffImageData.Strips imageData)
-
-
Method Detail
-
interpretStrip
private void interpretStrip(ImageBuilder imageBuilder, byte[] bytes, int pixelsPerStrip, int yLimit) throws ImageReadException, java.io.IOException
- Throws:
ImageReadExceptionjava.io.IOException
-
readImageData
public void readImageData(ImageBuilder imageBuilder) throws ImageReadException, java.io.IOException
- Specified by:
readImageDatain classImageDataReader- Throws:
ImageReadExceptionjava.io.IOException
-
readImageData
public java.awt.image.BufferedImage readImageData(java.awt.Rectangle subImage) throws ImageReadException, java.io.IOException- Specified by:
readImageDatain classImageDataReader- Throws:
ImageReadExceptionjava.io.IOException
-
readRasterData
public TiffRasterData readRasterData(java.awt.Rectangle subImage) throws ImageReadException, java.io.IOException
Description copied from class:ImageDataReaderDefines a method for accessing the floating-point raster data in a TIFF image. These implementations of this method in DataReaderStrips and DataReaderTiled assume that this instance is of a compatible data type (floating-point) and that all access checks have already been performed.- Specified by:
readRasterDatain classImageDataReader- Parameters:
subImage- if non-null, instructs the access method to retrieve only a sub-section of the image data.- Returns:
- a valid instance
- Throws:
ImageReadException- in the event of an incompatible data form.java.io.IOException- in the event of I/O error.
-
-