loci.formats.in

## Class MetamorphReader

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

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

      public class MetamorphReader
      extends BaseTiffReader

  Reader is the file format reader for Metamorph STK files.
  Author:
    Eric Kjellman egkjellman at wisc.edu, Melissa Linkert melissa at glencoesoftware.com, Curtis Rueden ctrueden at wisc.edu, Sebastien Huart Sebastien dot Huart at curie.fr

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.lang.String` | `binning`
    `private boolean` | `bizarreMultichannelAcquisition`
    `private boolean` | `canLookForND`
    `private long[]` | `emWavelength` The TIFF's emWavelength
    `private java.lang.Double` | `exposureTime`
    `private boolean[]` | `firstSeriesChannels`
    `private java.lang.Double` | `gain`
    `private boolean` | `hasAbsoluteZ`
    `private boolean` | `hasAbsoluteZValid`
    `private boolean` | `hasChipOffsets`
    `private boolean` | `hasStagePositions`
    `private java.lang.String` | `imageCreationDate` The TIFF's creation date
    `private java.lang.String` | `imageName` The TIFF's name
    `private long[]` | `internalStamps`
    `private boolean` | `isHCS`
    `private static org.slf4j.Logger` | `LOGGER` Logger for this class.
    `static java.lang.String` | `LONG_DATE_FORMAT`
    `private static int` | `METAMORPH_ID`
    `private int` | `mmPlanes`
    `private static java.lang.String` | `ND_ENCODING`
    `static java.lang.String[]` | `ND_SUFFIX`
    `private java.lang.String` | `ndFilename`
    `private static java.lang.String` | `NDINFOFILE_VER1`
    `private static java.lang.String` | `NDINFOFILE_VER2`
    `private int` | `openFiles`
    `static java.lang.String` | `SHORT_DATE_FORMAT`
    `private java.lang.Double` | `sizeX`
    `private java.lang.Double` | `sizeY`
    `private java.lang.String[]` | `stageLabels`
    `private java.util.List<java.lang.String>` | `stageNames`
    `private ome.units.quantity.Length[]` | `stageX`
    `private ome.units.quantity.Length[]` | `stageY`
    `private double` | `stepSize`
    `static java.lang.String[]` | `STK_SUFFIX`
    `private MetamorphReader[][]` | `stkReaders`
    `private java.lang.String[][]` | `stks` List of STK files in the dataset.
    `private double` | `tempZ`
    `private static int` | `UIC1TAG`
    `private static int` | `UIC2TAG`
    `private static int` | `UIC3TAG`
    `private static int` | `UIC4TAG`
    `private boolean` | `validZ`
    `private double[]` | `wave`
    `private java.util.List<java.lang.String>` | `waveNames`
    `static java.util.regex.Pattern` | `WELL_COORDS`
    `private double[]` | `zDistances`
    `private double` | `zoom`
    `private double` | `zStart`

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

      `DATE_FORMATS`

    - ### 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
    `MetamorphReader()` Constructs a new Metamorph 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.
    `static java.lang.String` | `decodeDate(int julian)` Converts a Julian date value into a human-readable string.
    `static java.lang.String` | `decodeTime(int millis)` Converts a time value in milliseconds into a human-readable string.
    `int` | `fileGroupOption(java.lang.String id)` Returns an indication of whether the files in a multi-file dataset can be handled individually.
    `private java.lang.String` | `getComment(int i, int no)`
    `java.lang.String[]` | `getDomains()` Returns the list of domains represented by the current file.
    `private java.lang.String` | `getFirstComment(int i)` Returns the TIFF comment from the first IFD of the first STK file in the given series.
    `private java.lang.String` | `getKey(int id)`
    `private java.lang.String` | `getNDVersionSuffix(loci.common.Location ndfile)` Parses the given ND file to determined the version and return the expected file suffix
    `private java.lang.String` | `getRealSTKFile(loci.common.Location l)` Check that the given STK file exists.
    `java.lang.String[]` | `getSeriesUsedFiles(boolean noPixels)` Returns an array of filenames needed to open the current series.
    `protected ome.units.quantity.Length[]` | `getStageX()`
    `protected ome.units.quantity.Length[]` | `getStageY()`
    `private java.util.Map.Entry<java.lang.Integer,java.lang.Integer>` | `getWellCoords(java.lang.String label)`
    `protected void` | `initFile(java.lang.String id)` Initializes the given file (parsing header information, etc.).
    `protected void` | `initStandardMetadata()` Parses standard metadata.
    `static java.lang.String` | `intFormat(int myint, int digits)` Formats an integer value with leading 0s if needed.
    `static java.lang.String` | `intFormatMax(int myint, int maxint)` Formats an integer with leading 0 using maximum sequence number.
    `boolean` | `isSingleFile(java.lang.String id)` Returns true if the named file is expected to be the only file in the dataset.
    `boolean` | `isThisType(loci.common.RandomAccessInputStream stream)` Checks if the given stream is a valid stream for this file format.
    `boolean` | `isThisType(java.lang.String name, boolean open)` Checks if a file matches the type of this format reader.
    `private java.lang.String` | `locateFirstValidFile()` Locates the first valid file in the STK arrays.
    `private java.lang.String` | `makeImageName(int i)` Create an appropriate name for the given series.
    `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.
    `private void` | `parseUIC1Tags(long uic1offset, int uic1count)` UIC1 entry parser
    `(package private) void` | `parseUIC2Tags(long uic2offset)` Populates metadata fields with some contained in MetaMorph UIC2 Tag.
    `private void` | `parseUIC4Tags(long uic4offset)` UIC4 metadata parser UIC4 Table contains per-plane blocks of metadata stage X/Y positions, camera chip offsets, stage labels...
    `(package private) void` | `readAbsoluteZValid()`
    `private static java.lang.String` | `readCString(loci.common.RandomAccessInputStream s, int n)` Read a null-terminated string.
    `private void` | `readPlaneData()`
    `private TiffRational` | `readRational(loci.common.RandomAccessInputStream s)`
    `private TiffRational` | `readRational(loci.common.RandomAccessInputStream s, long offset)`
    `private void` | `readRationals(java.lang.String[] labels)`
    `(package private) void` | `readStageLabels()`
    `private void` | `readStagePositions()`
    `private void` | `setCanLookForND(boolean v)`

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

      `getExifTagName, getImageCreationDate, initMetadata, initMetadataStore, put, put, put, put, put, put, put, put, put, put, putDouble, putInt, putString`

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

      `copyTile, get16BitLookupTable, get8BitLookupTable, getCompressedByteCount, getIFDs, getOptimalTileHeight, getOptimalTileWidth, getThumbnailIFDs, getThumbSizeX, getThumbSizeY, getTileIndex, initTiffParser, 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, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getAvailableOptions, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCorrection, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, 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, 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, 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

          private static final org.slf4j.Logger LOGGER

      Logger for this class.

    - #### SHORT_DATE_FORMAT

          public static final java.lang.String SHORT_DATE_FORMAT

      See Also:
        Constant Field Values

    - #### LONG_DATE_FORMAT

          public static final java.lang.String LONG_DATE_FORMAT

      See Also:
        Constant Field Values

    - #### ND_SUFFIX

          public static final java.lang.String[] ND_SUFFIX

    - #### STK_SUFFIX

          public static final java.lang.String[] STK_SUFFIX

    - #### WELL_COORDS

          public static final java.util.regex.Pattern WELL_COORDS

    - #### METAMORPH_ID

          private static final int METAMORPH_ID

      See Also:
        Constant Field Values

    - #### UIC1TAG

          private static final int UIC1TAG

      See Also:
        Constant Field Values

    - #### UIC2TAG

          private static final int UIC2TAG

      See Also:
        Constant Field Values

    - #### UIC3TAG

          private static final int UIC3TAG

      See Also:
        Constant Field Values

    - #### UIC4TAG

          private static final int UIC4TAG

      See Also:
        Constant Field Values

    - #### NDINFOFILE_VER1

          private static final java.lang.String NDINFOFILE_VER1

      See Also:
        Constant Field Values

    - #### NDINFOFILE_VER2

          private static final java.lang.String NDINFOFILE_VER2

      See Also:
        Constant Field Values

    - #### ND_ENCODING

          private static final java.lang.String ND_ENCODING

      See Also:
        Constant Field Values

    - #### imageName

          private java.lang.String imageName

      The TIFF's name

    - #### imageCreationDate

          private java.lang.String imageCreationDate

      The TIFF's creation date

    - #### emWavelength

          private long[] emWavelength

      The TIFF's emWavelength

    - #### isHCS

          private boolean isHCS

    - #### stageLabels

          private java.lang.String[] stageLabels

    - #### wave

          private double[] wave

    - #### binning

          private java.lang.String binning

    - #### zoom

          private double zoom

    - #### stepSize

          private double stepSize

    - #### exposureTime

          private java.lang.Double exposureTime

    - #### waveNames

          private java.util.List<java.lang.String> waveNames

    - #### stageNames

          private java.util.List<java.lang.String> stageNames

    - #### internalStamps

          private long[] internalStamps

    - #### zDistances

          private double[] zDistances

    - #### stageX

          private ome.units.quantity.Length[] stageX

    - #### stageY

          private ome.units.quantity.Length[] stageY

    - #### zStart

          private double zStart

    - #### sizeX

          private java.lang.Double sizeX

    - #### sizeY

          private java.lang.Double sizeY

    - #### tempZ

          private double tempZ

    - #### validZ

          private boolean validZ

    - #### gain

          private java.lang.Double gain

    - #### mmPlanes

          private int mmPlanes

    - #### stkReaders

          private MetamorphReader[][] stkReaders

    - #### stks

          private java.lang.String[][] stks

      List of STK files in the dataset.

    - #### ndFilename

          private java.lang.String ndFilename

    - #### canLookForND

          private boolean canLookForND

    - #### firstSeriesChannels

          private boolean[] firstSeriesChannels

    - #### bizarreMultichannelAcquisition

          private boolean bizarreMultichannelAcquisition

    - #### openFiles

          private int openFiles

    - #### hasStagePositions

          private boolean hasStagePositions

    - #### hasChipOffsets

          private boolean hasChipOffsets

    - #### hasAbsoluteZ

          private boolean hasAbsoluteZ

    - #### hasAbsoluteZValid

          private boolean hasAbsoluteZValid

  - ### Constructor Detail

    - #### MetamorphReader

          public MetamorphReader()

      Constructs a new Metamorph reader.

  - ### Method Detail

    - #### getDomains

          public java.lang.String[] getDomains()

      Description copied from interface: `IFormatReader`
      Returns the list of domains represented by the current file.
      Specified by:
        `getDomains` in interface `IFormatReader`
      Overrides:
        `getDomains` in class `FormatReader`

    - #### 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.

    - #### isThisType

          public boolean isThisType(loci.common.RandomAccessInputStream stream)
                             throws java.io.IOException

      Description copied from interface: `IFormatReader`
      Checks if the given stream is a valid stream for this file format. The number of bytes read is format-dependent.
      Specified by:
        `isThisType` in interface `IFormatReader`
      Overrides:
        `isThisType` in class `MinimalTiffReader`
      Parameters:
        `stream` - A RandomAccessInputStream representing the file to check. The first byte in the stream is assumed to be the first byte in the file.
      Returns:
        true if the file represented by the stream can be read by this reader; false otherwise.
      Throws:
        `java.io.IOException`

    - #### 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`

    - #### 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`

    - #### 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`

    - #### 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`
      Overrides:
        `openBytes` in class `MinimalTiffReader`
      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)`

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

    - #### 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 `BaseTiffReader`
      Throws:
        `FormatException` - if a parsing error occurs processing the file.
        `java.io.IOException` - if an I/O error occurs processing the file

    - #### initStandardMetadata

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

    - #### getRealSTKFile

          private java.lang.String getRealSTKFile(loci.common.Location l)

      Check that the given STK file exists. If it does, then return the absolute path. If it does not, then apply various formatting rules until an existing file is found.
      Returns:
        the absolute path of an STK file, or null if no STK file is found.

    - #### getFirstComment

          private java.lang.String getFirstComment(int i)
                                            throws java.io.IOException

      Returns the TIFF comment from the first IFD of the first STK file in the given series.
      Throws:
        `java.io.IOException`

    - #### getComment

          private java.lang.String getComment(int i,
                                              int no)
                                       throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### makeImageName

          private java.lang.String makeImageName(int i)

      Create an appropriate name for the given series.

    - #### parseUIC2Tags

          void parseUIC2Tags(long uic2offset)
                      throws java.io.IOException

      Populates metadata fields with some contained in MetaMorph UIC2 Tag. (for each plane: 6 integers: zdistance numerator, zdistance denominator, creation date, creation time, modif date, modif time)
      Parameters:
        `uic2offset` - offset to UIC2 (33629) tag entries not a regular tiff tag (6*N entries, N being the tagCount)
      Throws:
        `java.io.IOException`

    - #### parseUIC4Tags

          private void parseUIC4Tags(long uic4offset)
                              throws java.io.IOException

      UIC4 metadata parser UIC4 Table contains per-plane blocks of metadata stage X/Y positions, camera chip offsets, stage labels...
      Parameters:
        `uic4offset` - offset of UIC4 table (not tiff-compliant)
      Throws:
        `java.io.IOException`

    - #### getStageX

          protected ome.units.quantity.Length[] getStageX()

    - #### getStageY

          protected ome.units.quantity.Length[] getStageY()

    - #### readStagePositions

          private void readStagePositions()
                                   throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readRationals

          private void readRationals(java.lang.String[] labels)
                              throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readStageLabels

          void readStageLabels()
                        throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readAbsoluteZValid

          void readAbsoluteZValid()
                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### parseUIC1Tags

          private void parseUIC1Tags(long uic1offset,
                                     int uic1count)
                              throws java.io.IOException

      UIC1 entry parser
      Parameters:
        `uic1offset` - offset as found in the tiff tag 33628 (UIC1Tag)
        `uic1count` - number of entries in UIC1 table (not tiff-compliant)
      Throws:
        `java.io.IOException`

    - #### decodeDate

          public static java.lang.String decodeDate(int julian)

      Converts a Julian date value into a human-readable string.

    - #### decodeTime

          public static java.lang.String decodeTime(int millis)

      Converts a time value in milliseconds into a human-readable string. Note that the date and time are handled separately, so this method is only concerned with the time of day. The time of day in milliseconds is stored as a 32-bit int in Metamorph files, but is expected to be a positive integer less than the number of milliseconds in one day.
      Parameters:
        `millis` - milliseconds elapsed in the relevant day
      See Also:
        `decodeDate(int)`

    - #### intFormat

          public static java.lang.String intFormat(int myint,
                                                   int digits)

      Formats an integer value with leading 0s if needed.

    - #### intFormatMax

          public static java.lang.String intFormatMax(int myint,
                                                      int maxint)

      Formats an integer with leading 0 using maximum sequence number.
      Parameters:
        `myint` - integer to format
        `maxint` - max of "myint"
      Returns:
        String

    - #### locateFirstValidFile

          private java.lang.String locateFirstValidFile()

      Locates the first valid file in the STK arrays.
      Returns:
        Path to the first valid file.

    - #### readRational

          private TiffRational readRational(loci.common.RandomAccessInputStream s)
                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readRational

          private TiffRational readRational(loci.common.RandomAccessInputStream s,
                                            long offset)
                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### setCanLookForND

          private void setCanLookForND(boolean v)

    - #### readPlaneData

          private void readPlaneData()
                              throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getKey

          private java.lang.String getKey(int id)

    - #### getWellCoords

          private java.util.Map.Entry<java.lang.Integer,java.lang.Integer> getWellCoords(java.lang.String label)

    - #### readCString

          private static java.lang.String readCString(loci.common.RandomAccessInputStream s,
                                                      int n)
                                               throws java.io.IOException

      Read a null-terminated string. Read at most n characters if the null character is not found.
      Throws:
        `java.io.IOException`

    - #### getNDVersionSuffix

          private java.lang.String getNDVersionSuffix(loci.common.Location ndfile)
                                               throws java.io.IOException

      Parses the given ND file to determined the version and return the expected file suffix
      Parameters:
        `ndfile` - The ND file which should be parsed
      Returns:
        The file suffix to be used for associated files based on the ND version
      Throws:
        `java.io.IOException`

Copyright © 2026 Open Microscopy Environment