Class BaseTiffReader

All Implemented Interfaces:
Closeable, AutoCloseable, ICompressedTileReader, IFormatHandler, IFormatReader, IMetadataConfigurable, IPyramidHandler
Direct Known Subclasses:
DNGReader, FEITiffReader, FluoviewReader, GelReader, ImaconReader, ImarisTiffReader, ImprovisionTiffReader, IonpathMIBITiffReader, JPKReader, LeicaSCNReader, LEOReader, MetamorphReader, MetamorphTiffReader, NDPIReader, NikonElementsTiffReader, NikonReader, NikonTiffReader, PhotoshopTiffReader, PyramidTiffReader, SEQReader, SimplePCITiffReader, SISReader, SlidebookTiffReader, SVSReader, TiffReader, TrestleReader, VectraReader, VentanaReader

public abstract class BaseTiffReader extends MinimalTiffReader
BaseTiffReader is the superclass for file format readers compatible with or derived from the TIFF 6.0 file format.
Author:
Curtis Rueden ctrueden at wisc.edu, Melissa Linkert melissa at glencoesoftware.com
  • Field Details

    • LOGGER

      protected static final org.slf4j.Logger LOGGER
      Logger for this class.
    • DATE_FORMATS

      public static final String[] DATE_FORMATS
  • Constructor Details

    • BaseTiffReader

      public BaseTiffReader(String name, String suffix)
      Constructs a new BaseTiffReader.
    • BaseTiffReader

      public BaseTiffReader(String name, String[] suffixes)
      Constructs a new BaseTiffReader.
  • Method Details

    • initMetadata

      protected void initMetadata() throws FormatException, IOException
      Populates the metadata hashtable and metadata store.
      Throws:
      FormatException
      IOException
    • initStandardMetadata

      protected void initStandardMetadata() throws FormatException, IOException
      Parses standard metadata. NOTE: Absolutely no calls to the metadata store should be made in this method or methods that override this method. Data will be overwritten if you do so.
      Throws:
      FormatException
      IOException
    • initMetadataStore

      protected void initMetadataStore() throws FormatException
      Populates the metadata store using the data parsed in initStandardMetadata() along with some further parsing done in the method itself. All calls to the active MetadataStore should be made in this method and only in this method. This is especially important for sub-classes that override the getters for pixel set array size, etc.
      Throws:
      FormatException
    • getResolutionUnitFromComment

      private String getResolutionUnitFromComment(IFD ifd)
      Extracts the resolution unit symbol from the comment field
      Parameters:
      ifd - The IFD
      Returns:
      The unit symbol or null if the information is not available
    • getImageCreationDate

      protected String getImageCreationDate()
      Retrieves the image creation date.
      Returns:
      the image creation date.
    • put

      protected void put(String key, Object value)
    • put

      protected void put(String key, int value)
    • put

      protected void put(String key, boolean value)
    • put

      protected void put(String key, byte value)
    • put

      protected void put(String key, char value)
    • put

      protected void put(String key, double value)
    • put

      protected void put(String key, float value)
    • put

      protected void put(String key, long value)
    • put

      protected void put(String key, short value)
    • put

      protected void put(String key, IFD ifd, int tag)
    • putInt

      protected void putInt(String key, IFD ifd, int tag)
    • putString

      protected void putString(String key, IFD ifd, int tag)
    • putDouble

      protected void putDouble(String key, IFD ifd, int tag)
    • initFile

      protected void initFile(String id) throws FormatException, IOException
      Description copied from class: SubResolutionFormatReader
      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 MinimalTiffReader
      Throws:
      FormatException - if a parsing error occurs processing the file.
      IOException - if an I/O error occurs processing the file
    • getExifTagName

      public static String getExifTagName(int tag)