Class TiffReader

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

public class TiffReader extends BaseTiffReader
TiffReader is the file format reader for regular TIFF files, not of any specific TIFF variant.
Author:
Curtis Rueden ctrueden at wisc.edu, Melissa Linkert melissa at glencoesoftware.com
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
      Logger for this class.
    • TIFF_SUFFIXES

      public static final String[] TIFF_SUFFIXES
    • COMPANION_SUFFIXES

      public static final String[] COMPANION_SUFFIXES
    • IMAGEJ_TAG

      public static final int IMAGEJ_TAG
      See Also:
    • companionFile

      private String companionFile
    • description

      private String description
    • calibrationUnit

      private String calibrationUnit
    • physicalSizeZ

      private Double physicalSizeZ
    • timeIncrement

      private ome.units.quantity.Time timeIncrement
    • xOrigin

      private Integer xOrigin
    • yOrigin

      private Integer yOrigin
  • Constructor Details

    • TiffReader

      public TiffReader()
      Constructs a new Tiff reader.
  • Method Details

    • getSeriesUsedFiles

      public String[] getSeriesUsedFiles(boolean noPixels)
      Description copied from interface: IFormatReader
      Returns an array of filenames needed to open the current series. If the 'noPixels' flag is set, then only files that do not contain pixel data will be returned. The first element in the array is expected to be the path passed to IFormatHandler.setId(String), if appropriate based upon 'noPixels'. The remaining elements are expected to be in a consistent order; if a directory listing is necessary to build the list then it should be sorted first.
      Specified by:
      getSeriesUsedFiles in interface IFormatReader
      Overrides:
      getSeriesUsedFiles in class FormatReader
    • close

      public void close(boolean fileOnly) throws IOException
      Description copied from interface: IFormatReader
      Closes the currently open file. If the flag is set, this is all that happens; if unset, it is equivalent to calling Closeable.close().
      Specified by:
      close in interface IFormatReader
      Overrides:
      close in class MinimalTiffReader
      Throws:
      IOException
    • initStandardMetadata

      protected void initStandardMetadata() throws FormatException, IOException
      Description copied from class: BaseTiffReader
      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.
      Overrides:
      initStandardMetadata in class BaseTiffReader
      Throws:
      FormatException
      IOException
    • initMetadataStore

      protected void initMetadataStore() throws FormatException
      Description copied from class: BaseTiffReader
      Populates the metadata store using the data parsed in BaseTiffReader.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.
      Overrides:
      initMetadataStore in class BaseTiffReader
      Throws:
      FormatException
    • checkCommentImageJ

      private boolean checkCommentImageJ(String comment)
    • checkCommentMetamorph

      private boolean checkCommentMetamorph(String comment)
    • parseCommentImageJ

      private void parseCommentImageJ(String comment) throws FormatException, IOException
      Throws:
      FormatException
      IOException
    • populateMetadataStoreImageJ

      private void populateMetadataStoreImageJ(MetadataStore store)
      Checks the original metadata table for ImageJ-specific information to propagate into the metadata store.
    • parseCommentMetamorph

      private void parseCommentMetamorph(String comment)
    • parseCommentGeneric

      private void parseCommentGeneric(String comment)
    • parseInt

      private int parseInt(String s)
    • parseDouble

      private double parseDouble(String s)