loci.formats.in

## Class BaseTiffReader

- java.lang.Object
- - loci.formats.FormatHandler
  - - loci.formats.FormatReader
    - - loci.formats.SubResolutionFormatReader
      - - loci.formats.in.MinimalTiffReader
        - - loci.formats.in.BaseTiffReader

- All Implemented Interfaces:
    java.io.Closeable, java.lang.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 Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String[]` | `DATE_FORMATS`
    `protected static org.slf4j.Logger` | `LOGGER` Logger for this class.

    - ### Fields inherited from class loci.formats.in.MinimalTiffReader

      `canSeparateSeries, equalStrips, ifds, lastPlane, mergeSubIFDs, noSubresolutions, seriesToIFD, subResolutionIFDs, thumbnailIFDs, tiffParser, use64Bit`

    - ### Fields inherited from class loci.formats.SubResolutionFormatReader

      `core`

    - ### Fields inherited from class loci.formats.FormatReader

      `coreIndex, datasetDescription, domains, fillColor, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSION`

    - ### Fields inherited from class loci.formats.FormatHandler

      `COMPRESSION_SUFFIXES, currentId, format, metadataOptions, suffixes`

    - ### Fields inherited from interface loci.formats.IFormatReader

      `CAN_GROUP, CANNOT_GROUP, MUST_GROUP`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseTiffReader(java.lang.String name, java.lang.String suffix)` Constructs a new BaseTiffReader.
    `BaseTiffReader(java.lang.String name, java.lang.String[] suffixes)` Constructs a new BaseTiffReader.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `getExifTagName(int tag)`
    `protected java.lang.String` | `getImageCreationDate()` Retrieves the image creation date.
    `private java.lang.String` | `getResolutionUnitFromComment(IFD ifd)` Extracts the resolution unit symbol from the comment field
    `protected void` | `initFile(java.lang.String id)` Initializes the given file (parsing header information, etc.).
    `protected void` | `initMetadata()` Populates the metadata hashtable and metadata store.
    `protected void` | `initMetadataStore()` Populates the metadata store using the data parsed in `initStandardMetadata()` along with some further parsing done in the method itself.
    `protected void` | `initStandardMetadata()` Parses standard metadata.
    `protected void` | `put(java.lang.String key, boolean value)`
    `protected void` | `put(java.lang.String key, byte value)`
    `protected void` | `put(java.lang.String key, char value)`
    `protected void` | `put(java.lang.String key, double value)`
    `protected void` | `put(java.lang.String key, float value)`
    `protected void` | `put(java.lang.String key, IFD ifd, int tag)`
    `protected void` | `put(java.lang.String key, int value)`
    `protected void` | `put(java.lang.String key, long value)`
    `protected void` | `put(java.lang.String key, java.lang.Object value)`
    `protected void` | `put(java.lang.String key, short value)`
    `protected void` | `putDouble(java.lang.String key, IFD ifd, int tag)`
    `protected void` | `putInt(java.lang.String key, IFD ifd, int tag)`
    `protected void` | `putString(java.lang.String key, IFD ifd, int tag)`

    - ### Methods inherited from class loci.formats.in.MinimalTiffReader

      `close, copyTile, get16BitLookupTable, get8BitLookupTable, getCompressedByteCount, getIFDs, getOptimalTileHeight, getOptimalTileWidth, getThumbnailIFDs, getThumbSizeX, getThumbSizeY, getTileIndex, initTiffParser, isThisType, openBytes, openThumbBytes, reopenFile, setResolutionLevel`

    - ### Methods inherited from class loci.formats.SubResolutionFormatReader

      `coreIndexToSeries, flattenHashtables, getCoreIndex, getCoreMetadataList, getCurrentCore, getResolution, getResolutionCount, getSeries, getSeriesCount, seriesToCoreIndex, setCoreIndex, setResolution, setSeries`

    - ### Methods inherited from class loci.formats.FormatReader

      `addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addMetaList, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMetaList, close, fileGroupOption, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getAvailableOptions, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCorrection, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, getDomains, getEffectiveSizeC, getExperimentType, getFilamentType, getFillColor, getFillRule, getFilterType, getFontFamily, getFontStyle, getGlobalMeta, getGlobalMetadata, getIlluminationType, getImageCount, getImmersion, getIndex, getIndex, getLaserMedium, getLaserType, getMarker, getMedium, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getMicrobeamManipulationType, getMicroscopeType, getModuloC, getModuloT, getModuloZ, getNamingConvention, getPixelType, getPixelType, getPossibleDomains, getPulse, getRequiredDirectories, getRGBChannelCount, getRotationTransform, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getTileColumns, getTileRows, getUnderlyingReaders, getUsedFiles, getUsedFiles, getZCTCoords, getZCTModuloCoords, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isSingleFile, isThisType, isThisType, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, readPlane, readPlane, readPlane, setFillColor, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, updateMetadataLists`

    - ### Methods inherited from class loci.formats.FormatHandler

      `checkSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptions`

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

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

    - ### Methods inherited from interface loci.formats.IFormatHandler

      `getFormat, getNativeDataType, getSuffixes`

    - ### Methods inherited from interface loci.formats.IMetadataConfigurable

      `getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions`

    - ### Methods inherited from interface loci.formats.ICompressedTileReader

      `getTileCodec, getTileCodecOptions, openCompressedBytes, openCompressedBytes`

- - ### Field Detail

    - #### LOGGER

          protected static final org.slf4j.Logger LOGGER

      Logger for this class.

    - #### DATE_FORMATS

          public static final java.lang.String[] DATE_FORMATS

  - ### Constructor Detail

    - #### BaseTiffReader

          public BaseTiffReader(java.lang.String name,
                                java.lang.String suffix)

      Constructs a new BaseTiffReader.

    - #### BaseTiffReader

          public BaseTiffReader(java.lang.String name,
                                java.lang.String[] suffixes)

      Constructs a new BaseTiffReader.

  - ### Method Detail

    - #### initMetadata

          protected void initMetadata()
                               throws FormatException,
                                      java.io.IOException

      Populates the metadata hashtable and metadata store.
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### initStandardMetadata

          protected void initStandardMetadata()
                                       throws FormatException,
                                              java.io.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`
        `java.io.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 java.lang.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 java.lang.String getImageCreationDate()

      Retrieves the image creation date.
      Returns:
        the image creation date.

    - #### put

          protected void put(java.lang.String key,
                             java.lang.Object value)

    - #### put

          protected void put(java.lang.String key,
                             int value)

    - #### put

          protected void put(java.lang.String key,
                             boolean value)

    - #### put

          protected void put(java.lang.String key,
                             byte value)

    - #### put

          protected void put(java.lang.String key,
                             char value)

    - #### put

          protected void put(java.lang.String key,
                             double value)

    - #### put

          protected void put(java.lang.String key,
                             float value)

    - #### put

          protected void put(java.lang.String key,
                             long value)

    - #### put

          protected void put(java.lang.String key,
                             short value)

    - #### put

          protected void put(java.lang.String key,
                             IFD ifd,
                             int tag)

    - #### putInt

          protected void putInt(java.lang.String key,
                                IFD ifd,
                                int tag)

    - #### putString

          protected void putString(java.lang.String key,
                                   IFD ifd,
                                   int tag)

    - #### putDouble

          protected void putDouble(java.lang.String key,
                                   IFD ifd,
                                   int tag)

    - #### initFile

          protected void initFile(java.lang.String id)
                           throws FormatException,
                                  java.io.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.
        `java.io.IOException` - if an I/O error occurs processing the file

    - #### getExifTagName

          public static java.lang.String getExifTagName(int tag)

Copyright © 2026 Open Microscopy Environment