loci.formats.in

## Class ZeissTIFFReader

- java.lang.Object
- - loci.formats.FormatHandler
  - - loci.formats.FormatReader
    - - loci.formats.in.BaseZeissReader
      - - loci.formats.in.ZeissTIFFReader

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, ICompressedTileReader, IFormatHandler, IFormatReader, IMetadataConfigurable, IPyramidHandler

      public class ZeissTIFFReader
      extends BaseZeissReader

  ZeissTIFFReader is the file format reader for Zeiss AxioVision TIFF files and their companion XML file.
  Author:
    Melissa Linkert melissa at glencoesoftware.com and Roger Leigh r.leigh at dundee.ac.uk

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `(package private) class` | `ZeissTIFFReader.Plane`
    `(package private) class` | `ZeissTIFFReader.TIFFInfo`

    - ### Nested classes/interfaces inherited from class loci.formats.in.BaseZeissReader

      `BaseZeissReader.Charset, BaseZeissReader.Context, BaseZeissReader.DrawStyle, BaseZeissReader.FeatureType, BaseZeissReader.FillStyle, BaseZeissReader.Layer, BaseZeissReader.LineEndPositions, BaseZeissReader.LineEndStyle, BaseZeissReader.PointStyle, BaseZeissReader.Shape, BaseZeissReader.Tag, BaseZeissReader.TextAlignment`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.util.HashMap<java.lang.String,java.lang.String[]>` | `directoryCache`
    `(package private) java.util.ArrayList<ZeissTIFFReader.Plane>` | `planes` Image planes
    `static java.lang.String[]` | `TIFF_SUFFIXES`
    `(package private) ZeissTIFFReader.TIFFInfo` | `tiffInfo`
    `private MinimalTiffReader` | `tiffReader` Helper reader for TIFF files.
    `static java.lang.String` | `XML_NAME`

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

      `acquisitionDate, bpp, channelColors, channelIndices, channelName, cIndex, colCount, coordinates, detectorGain, detectorOffset, emWavelength, exposureTime, exWavelength, imageDescription, imageFiles, isJPEG, isZlib, lastPlane, layers, nextChName, nextEmWave, nextExWave, offsets, physicalSizeX, physicalSizeY, physicalSizeZ, rawCount, realHeight, realWidth, roiIDs, rowCount, stageX, stageY, tagsToParse, tileIndices, tiles, timepoint, timepointIndices, timestamps, zIndices`

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

      `core, 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, LOGGER, metadataOptions, suffixes`

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

      `CAN_GROUP, CANNOT_GROUP, MUST_GROUP`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ZeissTIFFReader()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close(boolean fileOnly)` Closes the currently open file.
    `protected void` | `countImages()`
    `protected ZeissTIFFReader.TIFFInfo` | `evalFile(java.lang.String id)` Evaluate the metadata of a TIFF/XML file collection, and return this to the user.
    `int` | `fileGroupOption(java.lang.String id)` Returns an indication of whether the files in a multi-file dataset can be handled individually.
    `protected void` | `fillMetadataPass1(MetadataStore store)` Read and store basic dimensions in model
    `protected void` | `fillMetadataPass2(MetadataStore store)` Read and store basic dimensions in model
    `protected void` | `fillMetadataPass5(MetadataStore store)` Read and store basic dimensions in model
    `protected java.lang.String` | `getPrefix(java.lang.String name)`
    `java.lang.String[]` | `getSeriesUsedFiles(boolean noPixels)` Returns an array of filenames needed to open the current series.
    `protected void` | `initFile(java.lang.String id)` Initializes the given file (parsing header information, etc.).
    `protected void` | `initVars(java.lang.String id)`
    `boolean` | `isSingleFile(java.lang.String id)` Returns true if the named file is expected to be the only file in the dataset.
    `boolean` | `isThisType(java.lang.String name, boolean open)` Checks if a file matches the type of this format reader.
    `private java.lang.String` | `lookup(java.lang.String src)` Translate a file path from the XML file to an actual path on disk.
    `byte[]` | `openBytes(int no, byte[] buf, int x, int y, int w, int h)` Obtains a sub-image of the specified image plane into a pre-allocated byte array.

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

      `fillMetadataPass3, fillMetadataPass4, fillMetadataPass6, fillMetadataPass7, get16BitLookupTable, get8BitLookupTable, getOptimalTileHeight, initFileMain, parseColor, parseInt, parseInt, parseMainTags, storeROIs`

    - ### 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, coreIndexToSeries, flattenHashtables, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getAvailableOptions, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCoreIndex, getCoreMetadataList, getCorrection, getCurrentCore, 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, getOptimalTileWidth, getPixelType, getPixelType, getPossibleDomains, getPulse, getRequiredDirectories, getResolution, getResolutionCount, getRGBChannelCount, getRotationTransform, getSeries, getSeriesCount, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getThumbSizeX, getThumbSizeY, getTileColumns, getTileRows, getUnderlyingReaders, getUsedFiles, getUsedFiles, getZCTCoords, getZCTModuloCoords, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isThisType, isThisType, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, openThumbBytes, readPlane, readPlane, readPlane, reopenFile, seriesToCoreIndex, setCoreIndex, setFillColor, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries, 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

    - #### TIFF_SUFFIXES

          public static final java.lang.String[] TIFF_SUFFIXES

    - #### XML_NAME

          public static final java.lang.String XML_NAME

      See Also:
        Constant Field Values

    - #### tiffInfo

          ZeissTIFFReader.TIFFInfo tiffInfo

    - #### planes

          java.util.ArrayList<ZeissTIFFReader.Plane> planes

      Image planes

    - #### tiffReader

          private MinimalTiffReader tiffReader

      Helper reader for TIFF files.

    - #### directoryCache

          private transient java.util.HashMap<java.lang.String,java.lang.String[]> directoryCache

  - ### Constructor Detail

    - #### ZeissTIFFReader

          public ZeissTIFFReader()

  - ### Method Detail

    - #### isSingleFile

          public boolean isSingleFile(java.lang.String id)
                               throws FormatException,
                                      java.io.IOException

      Description copied from interface: `IFormatReader`
      Returns true if the named file is expected to be the only file in the dataset. For single-file formats, always returns true.
      Specified by:
        `isSingleFile` in interface `IFormatReader`
      Overrides:
        `isSingleFile` in class `FormatReader`
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### getPrefix

          protected java.lang.String getPrefix(java.lang.String name)

    - #### isThisType

          public boolean isThisType(java.lang.String name,
                                    boolean open)

      Description copied from class: `FormatReader`
      Checks if a file matches the type of this format reader. Checks filename suffixes against those known for this format. If the suffix check is inconclusive and the open parameter is true, the file is opened and tested with `FormatReader.isThisType(RandomAccessInputStream)`.
      Specified by:
        `isThisType` in interface `IFormatReader`
      Overrides:
        `isThisType` in class `FormatReader`
        `open` - If true, and the file extension is insufficient to determine the file type, the (existing) file is opened for further analysis.

    - #### fileGroupOption

          public int fileGroupOption(java.lang.String id)
                              throws FormatException,
                                     java.io.IOException

      Description copied from interface: `IFormatReader`
      Returns an indication of whether the files in a multi-file dataset can be handled individually. This method is only useful for formats and datasets which contain multiple files.
      Specified by:
        `fileGroupOption` in interface `IFormatReader`
      Overrides:
        `fileGroupOption` in class `FormatReader`
      Parameters:
        `id` - a file in the multi-file dataset
      Returns:
        an int indicating that we cannot, must, or might group the files. A return value of `FormatTools.MUST_GROUP` indicates that the files cannot be handled separately; the reader will always detect and read all files in the dataset. `FormatTools.CAN_GROUP` indicates that the files may be handled separately, but file grouping must then be disabled via `IFormatReader.setGroupFiles(boolean)`. `FormatTools.CANNOT_GROUP` indicates that the files must be handled separately; the reader will not attempt to read all files in the dataset (this is rare).
      Throws:
        `FormatException`
        `java.io.IOException`
      See Also:
        `FormatTools.MUST_GROUP`, `FormatTools.CAN_GROUP`, `FormatTools.CANNOT_GROUP`

    - #### openBytes

          public byte[] openBytes(int no,
                                  byte[] buf,
                                  int x,
                                  int y,
                                  int w,
                                  int h)
                           throws FormatException,
                                  java.io.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`
      Specified by:
        `openBytes` in class `FormatReader`
      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.
        `java.io.IOException` - if there was a problem reading the file.
      See Also:
        `IFormatReader.openBytes(int, byte[], int, int, int, int)`

    - #### getSeriesUsedFiles

          public java.lang.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 java.io.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 `BaseZeissReader`
      Throws:
        `java.io.IOException`

    - #### evalFile

          protected ZeissTIFFReader.TIFFInfo evalFile(java.lang.String id)
                                               throws FormatException,
                                                      java.io.IOException

      Evaluate the metadata of a TIFF/XML file collection, and return this to the user. This is done by filling a TIFFInfo object containing all of the file and directory paths, plus the parsed metadata.
      Parameters:
        `id` - the filename to evaluate. This may be the top-level or per-plane TIFF, or the XML metadata.
      Returns:
        an TIFFInfo object.
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### initFile

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

    - #### initVars

          protected void initVars(java.lang.String id)
                           throws FormatException,
                                  java.io.IOException

      Overrides:
        `initVars` in class `BaseZeissReader`
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### fillMetadataPass1

          protected void fillMetadataPass1(MetadataStore store)
                                    throws FormatException,
                                           java.io.IOException

      Description copied from class: `BaseZeissReader`
      Read and store basic dimensions in model
      Overrides:
        `fillMetadataPass1` in class `BaseZeissReader`
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### fillMetadataPass2

          protected void fillMetadataPass2(MetadataStore store)
                                    throws FormatException,
                                           java.io.IOException

      Description copied from class: `BaseZeissReader`
      Read and store basic dimensions in model
      Overrides:
        `fillMetadataPass2` in class `BaseZeissReader`
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### fillMetadataPass5

          protected void fillMetadataPass5(MetadataStore store)
                                    throws FormatException,
                                           java.io.IOException

      Description copied from class: `BaseZeissReader`
      Read and store basic dimensions in model
      Overrides:
        `fillMetadataPass5` in class `BaseZeissReader`
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### countImages

          protected void countImages()

      Overrides:
        `countImages` in class `BaseZeissReader`

    - #### lookup

          private java.lang.String lookup(java.lang.String src)

      Translate a file path from the XML file to an actual path on disk. The path stored in the XML file may not have the same case as the path on disk (typically all lower case on disk and possibly mixed case in XML). If a matching file cannot be found, then the path from the XML file is returned. Uses `directoryCache` so that any given directory is only listed once per initialization, not once per lookup.

Copyright © 2026 Open Microscopy Environment