Class TiffDelegateReader

All Implemented Interfaces:
Closeable, AutoCloseable, ICompressedTileReader, IFormatHandler, IFormatReader, IMetadataConfigurable, IPyramidHandler

public class TiffDelegateReader extends DelegateReader
TiffDelegateReader is a file format reader for TIFF files. It does not read files directly, but chooses which TIFF reader is more appropriate.
See Also:
  • Constructor Details

    • TiffDelegateReader

      public TiffDelegateReader()
      Constructs a new TIFF reader.
  • Method Details

    • openBytes

      public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException
      Description copied from interface: IFormatReader
      Obtains a sub-image of the specified image plane into a pre-allocated byte array.
      Specified by:
      openBytes in interface IFormatReader
      Overrides:
      openBytes in class DelegateReader
      Parameters:
      no - the plane index within the current series.
      buf - a pre-allocated buffer.
      x - X coordinate of the upper-left corner of the sub-image
      y - Y coordinate of the upper-left corner of the sub-image
      w - width of the sub-image
      h - height of the sub-image
      Returns:
      the pre-allocated buffer buf for convenience.
      Throws:
      FormatException - if there was a problem parsing the metadata of the file.
      IOException - if there was a problem reading the file.
    • setId

      public void setId(String id) throws FormatException, IOException
      Description copied from class: FormatReader
      Initialize a reader from the input file name. Call FormatReader.initFile(String id) to initialize the input file, read all of the metadata and set the reader up for reading planes. The performance of this method depends on the format and can be up to several minutes for large file sets.
      Specified by:
      setId in interface IFormatHandler
      Overrides:
      setId in class DelegateReader
      Parameters:
      id - a String specifying the path to the file
      Throws:
      FormatException
      IOException