Class TiffJAIReader

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

public class TiffJAIReader extends BIFormatReader
TiffJAIReader is a file format reader for TIFF images. It uses the Java Advanced Imaging library (javax.media.jai) to read the data. Much of this code was adapted from this example.
Author:
Curtis Rueden ctrueden at wisc.edu
  • Field Details

    • NO_JAI_MSG

      private static final String NO_JAI_MSG
      See Also:
    • r

      protected loci.common.ReflectedUniverse r
      Reflection tool for JAI calls.
  • Constructor Details

    • TiffJAIReader

      public TiffJAIReader()
      Constructs a new TIFF reader that uses Java Image I/O.
  • Method Details

    • openPlane

      public Object openPlane(int no, int x, int y, int w, int h) throws FormatException, IOException
      Description copied from interface: IFormatReader
      Obtains the specified image plane (or sub-image thereof) in the reader's native data structure. For most readers this is a byte array; however, some readers call external APIs that work with other types such as BufferedImage. The openPlane method exists to maintain generality and efficiency while avoiding pollution of the API with AWT-specific logic. See also loci.formats.gui.BufferedImageReader (in formats-bsd).
      Specified by:
      openPlane in interface IFormatReader
      Overrides:
      openPlane in class FormatReader
      Throws:
      FormatException
      IOException
      See Also:
    • initFile

      protected void initFile(String id) throws FormatException, IOException
      Description copied from class: FormatReader
      Initializes the given file (parsing header information, etc.). Most subclasses should override this method to perform initialization operations such as parsing metadata.
      Overrides:
      initFile in class FormatReader
      Throws:
      FormatException - if a parsing error occurs processing the file.
      IOException - if an I/O error occurs processing the file
    • openBufferedImage

      protected BufferedImage openBufferedImage(int no) throws FormatException
      Obtains a BufferedImage from the given data source using JAI.
      Throws:
      FormatException