Package org.apache.commons.imaging.formats.tiff.datareaders

## Class DataReaderTiled

- java.lang.Object
- - org.apache.commons.imaging.formats.tiff.datareaders.ImageDataReader
  - - org.apache.commons.imaging.formats.tiff.datareaders.DataReaderTiled

-     public final class DataReaderTiled
      extends ImageDataReader

  Provides a data reader for TIFF file images organized by tiles.

- - ### Field Summary

    - ### Fields inherited from class org.apache.commons.imaging.formats.tiff.datareaders.ImageDataReader

      `bitsPerSampleLength, directory, height, photometricInterpreter, planarConfiguration, predictor, sampleFormat, samplesPerPixel, width`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DataReaderTiled​(TiffDirectory directory, PhotometricInterpreter photometricInterpreter, int tileWidth, int tileLength, int bitsPerPixel, int[] bitsPerSample, int predictor, int samplesPerPixel, int sampleFormat, int width, int height, int compression, TiffPlanarConfiguration planarConfiguration, ByteOrder byteOrder, TiffImageData.Tiles imageData)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ImageBuilder` | `readImageData​(Rectangle subImageSpecification, boolean hasAlpha, boolean isAlphaPreMultiplied)` | Read the image data from the IFD associated with this instance of ImageDataReader using the optional sub-image specification if desired.
    `TiffRasterData` | `readRasterData​(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, applyPredictorToBlock, decompress, isHomogenous, resetPredictor, unpackFloatingPointSamples, unpackIntSamples`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DataReaderTiled

          public DataReaderTiled​(TiffDirectory directory,
                                 PhotometricInterpreter photometricInterpreter,
                                 int tileWidth,
                                 int tileLength,
                                 int bitsPerPixel,
                                 int[] bitsPerSample,
                                 int predictor,
                                 int samplesPerPixel,
                                 int sampleFormat,
                                 int width,
                                 int height,
                                 int compression,
                                 TiffPlanarConfiguration planarConfiguration,
                                 ByteOrder byteOrder,
                                 TiffImageData.Tiles imageData)

  - ### Method Detail

    - #### readImageData

          public ImageBuilder readImageData​(Rectangle subImageSpecification,
                                            boolean hasAlpha,
                                            boolean isAlphaPreMultiplied)
                                     throws ImageReadException,
                                            IOException

      Description copied from class: `ImageDataReader`
      Read the image data from the IFD associated with this instance of ImageDataReader using the optional sub-image specification if desired.
      Specified by:
        `readImageData` in class `ImageDataReader`
      Parameters:
        `subImageSpecification` - a rectangle describing a sub-region of the image for reading, or a null if the whole image is to be read.
        `hasAlpha` - indicates that the image has an alpha (transparency) channel (RGB color model only).
        `isAlphaPreMultiplied` - indicates that the image uses the associated alpha channel format (pre-multiplied alpha).
      Returns:
        a valid instance containing the pixel data from the image.
      Throws:
        `ImageReadException` - in the event of a data format error or other TIFF-specific failure.
        `IOException` - in the event of an unrecoverable I/O error.

    - #### readRasterData

          public TiffRasterData readRasterData​(Rectangle subImage)
                                        throws ImageReadException,
                                               IOException

      Description copied from class: `ImageDataReader`
      Defines 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:
        `readRasterData` in class `ImageDataReader`
      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.
        `IOException` - in the event of I/O error.