loci.formats.in

## Class BaseZeissReader

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

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, ICompressedTileReader, IFormatHandler, IFormatReader, IMetadataConfigurable, IPyramidHandler
  Direct Known Subclasses:
    ZeissTIFFReader, ZeissZVIReader

      public abstract class BaseZeissReader
      extends FormatReader

  BaseZeissReader contains common functionality required by readers for Zeiss AxioVision formats.
  Author:
    Melissa Linkert melissa at glencoesoftware.com

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `(package private) static class` | `BaseZeissReader.Charset`
    `static class` | `BaseZeissReader.Context`
    `(package private) static class` | `BaseZeissReader.DrawStyle` Line drawing styles.
    `(package private) static class` | `BaseZeissReader.FeatureType` Feature types.
    `(package private) static class` | `BaseZeissReader.FillStyle` Fill styles.
    `(package private) class` | `BaseZeissReader.Layer` Layer class representing an AxioVision layer; used to contain a collection of shapes.
    `(package private) static class` | `BaseZeissReader.LineEndPositions`
    `(package private) static class` | `BaseZeissReader.LineEndStyle` Line ending styles.
    `(package private) static class` | `BaseZeissReader.PointStyle` Point styles.
    `(package private) class` | `BaseZeissReader.Shape` Shape class representing the metadata within an AxioVision Shape ROI
    `class` | `BaseZeissReader.Tag` Content of a single tag from a Tags block.
    `(package private) static class` | `BaseZeissReader.TextAlignment`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ome.xml.model.primitives.Timestamp` | `acquisitionDate`
    `protected int` | `bpp` Number of bytes per pixel.
    `protected int[]` | `channelColors`
    `protected java.util.Set<java.lang.Integer>` | `channelIndices`
    `protected java.util.Map<java.lang.Integer,java.lang.String>` | `channelName`
    `protected int` | `cIndex`
    `protected int` | `colCount`
    `protected int[][]` | `coordinates`
    `protected java.util.Map<java.lang.Integer,java.lang.Double>` | `detectorGain`
    `protected java.util.Map<java.lang.Integer,java.lang.Double>` | `detectorOffset`
    `protected java.util.Map<java.lang.Integer,ome.units.quantity.Length>` | `emWavelength`
    `protected java.util.Map<java.lang.Integer,java.lang.String>` | `exposureTime`
    `protected java.util.Map<java.lang.Integer,ome.units.quantity.Length>` | `exWavelength`
    `protected java.lang.String` | `imageDescription`
    `protected java.lang.String[]` | `imageFiles`
    `protected boolean` | `isJPEG`
    `protected boolean` | `isZlib`
    `protected int` | `lastPlane`
    `java.util.ArrayList<BaseZeissReader.Layer>` | `layers`
    `protected int` | `nextChName`
    `protected int` | `nextEmWave`
    `protected int` | `nextExWave`
    `protected int[]` | `offsets`
    `protected java.lang.Double` | `physicalSizeX`
    `protected java.lang.Double` | `physicalSizeY`
    `protected java.lang.Double` | `physicalSizeZ`
    `protected int` | `rawCount`
    `protected int` | `realHeight`
    `protected int` | `realWidth`
    `protected java.util.List<java.lang.String>` | `roiIDs`
    `protected int` | `rowCount`
    `protected java.util.Map<java.lang.Integer,ome.units.quantity.Length>` | `stageX`
    `protected java.util.Map<java.lang.Integer,ome.units.quantity.Length>` | `stageY`
    `protected java.util.List<java.lang.String>` | `tagsToParse`
    `protected java.util.Set<java.lang.Integer>` | `tileIndices`
    `protected java.util.Map<java.lang.Integer,java.lang.Integer>` | `tiles`
    `protected int` | `timepoint`
    `protected java.util.Set<java.lang.Integer>` | `timepointIndices`
    `protected java.util.Map<java.lang.Integer,java.lang.String>` | `timestamps`
    `protected java.util.Set<java.lang.Integer>` | `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
    `BaseZeissReader(java.lang.String name, java.lang.String suffix)` Constructs a new ZeissZVI reader.
    `BaseZeissReader(java.lang.String name, java.lang.String[] suffixes)` Constructs a new ZeissZVI reader.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close(boolean fileOnly)` Closes the currently open file.
    `protected void` | `countImages()`
    `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` | `fillMetadataPass3(MetadataStore store)` Read and store basic dimensions in model
    `protected void` | `fillMetadataPass4(MetadataStore store)` Read and store basic dimensions in model
    `protected void` | `fillMetadataPass5(MetadataStore store)` Read and store basic dimensions in model
    `protected void` | `fillMetadataPass6(MetadataStore store)` Read and store basic dimensions in model
    `protected void` | `fillMetadataPass7(MetadataStore store)` Store basic dimensions in model
    `short[][]` | `get16BitLookupTable()` Gets the 16-bit color lookup table associated with the most recently opened image.
    `byte[][]` | `get8BitLookupTable()` Gets the 8-bit color lookup table associated with the most recently opened image.
    `int` | `getOptimalTileHeight()` Returns the optimal sub-image height for use with openBytes.
    `protected void` | `initFileMain(java.lang.String id)`
    `protected void` | `initVars(java.lang.String id)`
    `protected static int` | `parseColor(byte r, byte g, byte b)`
    `protected static int` | `parseInt(java.lang.String number)` Parse an Integer from a String.
    `protected static int` | `parseInt(java.lang.String number, int defaultnum)` Parse an Integer from a String.
    `(package private) void` | `parseMainTags(int image, MetadataStore store, java.util.ArrayList<BaseZeissReader.Tag> tags)`
    `private long` | `parseTimestamp(java.lang.String s)` Parse timestamp from string.
    `protected void` | `storeROIs(MetadataStore store)` Store basic dimensions in model

    - ### 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, fileGroupOption, 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, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getThumbSizeX, getThumbSizeY, getTileColumns, getTileRows, getUnderlyingReaders, getUsedFiles, getUsedFiles, getZCTCoords, getZCTModuloCoords, hasCompanionFiles, hasFlattenedResolutions, initFile, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isSingleFile, isThisType, isThisType, isThisType, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, 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

    - #### bpp

          protected int bpp

      Number of bytes per pixel.

    - #### imageFiles

          protected java.lang.String[] imageFiles

    - #### offsets

          protected int[] offsets

    - #### coordinates

          protected int[][] coordinates

    - #### acquisitionDate

          protected transient ome.xml.model.primitives.Timestamp acquisitionDate

    - #### timestamps

          protected java.util.Map<java.lang.Integer,java.lang.String> timestamps

    - #### exposureTime

          protected java.util.Map<java.lang.Integer,java.lang.String> exposureTime

    - #### cIndex

          protected int cIndex

    - #### isJPEG

          protected boolean isJPEG

    - #### isZlib

          protected boolean isZlib

    - #### realWidth

          protected int realWidth

    - #### realHeight

          protected int realHeight

    - #### tagsToParse

          protected java.util.List<java.lang.String> tagsToParse

    - #### nextEmWave

          protected int nextEmWave

    - #### nextExWave

          protected int nextExWave

    - #### nextChName

          protected int nextChName

    - #### stageX

          protected final java.util.Map<java.lang.Integer,ome.units.quantity.Length> stageX

    - #### stageY

          protected final java.util.Map<java.lang.Integer,ome.units.quantity.Length> stageY

    - #### timepoint

          protected int timepoint

    - #### channelColors

          protected int[] channelColors

    - #### lastPlane

          protected int lastPlane

    - #### tiles

          protected final java.util.Map<java.lang.Integer,java.lang.Integer> tiles

    - #### detectorGain

          protected final java.util.Map<java.lang.Integer,java.lang.Double> detectorGain

    - #### detectorOffset

          protected final java.util.Map<java.lang.Integer,java.lang.Double> detectorOffset

    - #### emWavelength

          protected final java.util.Map<java.lang.Integer,ome.units.quantity.Length> emWavelength

    - #### exWavelength

          protected final java.util.Map<java.lang.Integer,ome.units.quantity.Length> exWavelength

    - #### channelName

          protected final java.util.Map<java.lang.Integer,java.lang.String> channelName

    - #### physicalSizeX

          protected java.lang.Double physicalSizeX

    - #### physicalSizeY

          protected java.lang.Double physicalSizeY

    - #### physicalSizeZ

          protected java.lang.Double physicalSizeZ

    - #### rowCount

          protected int rowCount

    - #### colCount

          protected int colCount

    - #### rawCount

          protected int rawCount

    - #### imageDescription

          protected java.lang.String imageDescription

    - #### channelIndices

          protected java.util.Set<java.lang.Integer> channelIndices

    - #### zIndices

          protected java.util.Set<java.lang.Integer> zIndices

    - #### timepointIndices

          protected java.util.Set<java.lang.Integer> timepointIndices

    - #### tileIndices

          protected java.util.Set<java.lang.Integer> tileIndices

    - #### roiIDs

          protected java.util.List<java.lang.String> roiIDs

    - #### layers

          public java.util.ArrayList<BaseZeissReader.Layer> layers

  - ### Constructor Detail

    - #### BaseZeissReader

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

      Constructs a new ZeissZVI reader.

    - #### BaseZeissReader

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

      Constructs a new ZeissZVI reader.

  - ### Method Detail

    - #### initFileMain

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

      Throws:
        `FormatException`
        `java.io.IOException`

    - #### initVars

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

      Throws:
        `FormatException`
        `java.io.IOException`

    - #### countImages

          protected void countImages()

    - #### fillMetadataPass1

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

      Read and store basic dimensions in model
      Parameters:
        `store` -
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### fillMetadataPass2

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

      Read and store basic dimensions in model
      Parameters:
        `store` -
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### fillMetadataPass3

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

      Read and store basic dimensions in model
      Parameters:
        `store` -
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### fillMetadataPass4

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

      Read and store basic dimensions in model
      Parameters:
        `store` -
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### fillMetadataPass5

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

      Read and store basic dimensions in model
      Parameters:
        `store` -
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### fillMetadataPass6

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

      Read and store basic dimensions in model
      Parameters:
        `store` -
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### fillMetadataPass7

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

      Store basic dimensions in model
      Parameters:
        `store` -
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### getOptimalTileHeight

          public int getOptimalTileHeight()

      Description copied from interface: `IFormatReader`
      Returns the optimal sub-image height for use with openBytes.
      Specified by:
        `getOptimalTileHeight` in interface `IFormatReader`
      Overrides:
        `getOptimalTileHeight` in class `FormatReader`

    - #### storeROIs

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

      Store basic dimensions in model
      Parameters:
        `store` -
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### get8BitLookupTable

          public byte[][] get8BitLookupTable()
                                      throws FormatException,
                                             java.io.IOException

      Description copied from interface: `IFormatReader`
      Gets the 8-bit color lookup table associated with the most recently opened image. If no image planes have been opened, or if `IFormatReader.isIndexed()` returns false, then this may return null. Also, if `IFormatReader.getPixelType()` returns anything other than `FormatTools.INT8` or `FormatTools.UINT8`, this method will return null.
      Specified by:
        `get8BitLookupTable` in interface `IFormatReader`
      Overrides:
        `get8BitLookupTable` in class `FormatReader`
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### get16BitLookupTable

          public short[][] get16BitLookupTable()
                                        throws FormatException,
                                               java.io.IOException

      Description copied from interface: `IFormatReader`
      Gets the 16-bit color lookup table associated with the most recently opened image. If no image planes have been opened, or if `IFormatReader.isIndexed()` returns false, then this may return null. Also, if `IFormatReader.getPixelType()` returns anything other than `FormatTools.INT16` or `FormatTools.UINT16`, this method will return null.
      Specified by:
        `get16BitLookupTable` in interface `IFormatReader`
      Overrides:
        `get16BitLookupTable` in class `FormatReader`
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### 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 `FormatReader`
      Throws:
        `java.io.IOException`

    - #### parseMainTags

          void parseMainTags(int image,
                             MetadataStore store,
                             java.util.ArrayList<BaseZeissReader.Tag> tags)
                      throws FormatException,
                             java.io.IOException

      Throws:
        `FormatException`
        `java.io.IOException`

    - #### parseInt

          protected static int parseInt(java.lang.String number)

      Parse an Integer from a String.
      Parameters:
        `number` - the number to parse
      Returns:
        an Integer. 0 if number was null.

    - #### parseInt

          protected static int parseInt(java.lang.String number,
                                        int defaultnum)

      Parse an Integer from a String.
      Parameters:
        `number` - the number to parse
        `defaultnum` - the number to return if number is null or empty
      Returns:
        an Integer. 0 if number was null.

    - #### parseTimestamp

          private long parseTimestamp(java.lang.String s)

      Parse timestamp from string. Note this may be ZVI-specific due to the use of locale-specific date formats in the TIFF XML.
      Parameters:
        `s` -
      Returns:
        a timestamp

    - #### parseColor

          protected static int parseColor(byte r,
                                          byte g,
                                          byte b)

Copyright © 2026 Open Microscopy Environment