loci.formats

## Class FileStitcher

- java.lang.Object
- - loci.formats.ReaderWrapper
  - - loci.formats.FileStitcher

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

      public class FileStitcher
      extends ReaderWrapper

  Logic to stitch together files with similar names. Assumes that all files have the same characteristics (e.g., dimensions).

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `(package private) class` | `FileStitcher.ExternalSeries`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private ClassList<IFormatReader>` | `classList`
    `private java.util.ArrayList<CoreMetadata>` | `core` Core metadata.
    `private int` | `coreIndex` The number of the current series.
    `private boolean` | `doNotChangePattern`
    `private FileStitcher.ExternalSeries[]` | `externals`
    `private boolean` | `group`
    `private int[][]` | `lenC` Component lengths for each axis type.
    `private int[][]` | `lenT` Component lengths for each axis type.
    `private int[][]` | `lenZ` Component lengths for each axis type.
    `private static org.slf4j.Logger` | `LOGGER`
    `private static int` | `MAX_READERS`
    `private boolean` | `noStitch`
    `private boolean` | `patternIds` Whether string ids given should be treated as file patterns rather than single file paths.
    `private int` | `series` The number of the current series (non flat).
    `private int[]` | `sizeC` Dimensional axis lengths per file.
    `private int[]` | `sizeT` Dimensional axis lengths per file.
    `private int[]` | `sizeZ` Dimensional axis lengths per file.
    `private MetadataStore` | `store`

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

      `reader`

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

      `CAN_GROUP, CANNOT_GROUP, MUST_GROUP`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileStitcher()` Constructs a FileStitcher around a new image reader.
    `FileStitcher(boolean patternIds)` Constructs a FileStitcher around a new image reader.
    `FileStitcher(IFormatReader r)` Constructs a FileStitcher with the given reader.
    `FileStitcher(IFormatReader r, boolean patternIds)` Constructs a FileStitcher with the given reader.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canChangePattern()`
    `void` | `close()`
    `void` | `close(boolean fileOnly)` Closes the currently open file.
    `protected void` | `computeAxisLengths()` Computes axis length arrays, and total axis lengths.
    `protected int[]` | `computeIndices(int no)` Gets the file index, and image index into that file, corresponding to the given global image index.
    `int` | `coreIndexToSeries(int index)` Returns the series corresponding to the specified core index.
    `FilePattern` | `findPattern(java.lang.String id)`
    `java.lang.String[]` | `findPatterns(java.lang.String id)` Finds the file pattern for the given ID, based on the state of the file stitcher.
    `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` | `getAdjustedIndex(int no)` Gets the local reader index for use with the given image plane.
    `FileInfo[]` | `getAdvancedSeriesUsedFiles(boolean noPixels)` Returns an array of FileInfo objects representing the files needed to open the current series.
    `FileInfo[]` | `getAdvancedUsedFiles(boolean noPixels)` Returns an array of FileInfo objects representing the files needed to open this dataset.
    `AxisGuesser` | `getAxisGuesser()` Gets the axis guesser object used to guess which dimensional axes are which.
    `int[]` | `getAxisTypes()` Gets the axis type for each dimensional block.
    `int` | `getBitsPerPixel()` Gets the number of valid bits per pixel.
    `int` | `getCoreIndex()` Return the index into CoreMetadata of the current resolution/series.
    `java.util.List<CoreMetadata>` | `getCoreMetadataList()` Obtains the core metadata values for the current file.
    `java.lang.String` | `getDimensionOrder()` Gets a five-character string representing the dimension order in which planes will be returned.
    `private int` | `getExternalSeries()`
    `private int` | `getExternalSeries(int currentSeries)`
    `FilePattern` | `getFilePattern()` Gets the file pattern object used to build the list of files.
    `int` | `getImageCount()` Determines the number of image planes in the current file.
    `int` | `getIndex(int z, int c, int t)` Gets the rasterized index corresponding to the given Z, C and T coordinates (real sizes).
    `int` | `getIndex(int z, int c, int t, int moduloZ, int moduloC, int moduloT)` Gets the rasterized index corresponding to the given Z, C, T, moduloZ, moduloC and moduloT coordinates (effective sizes).
    `MetadataStore` | `getMetadataStore()` Retrieves the current metadata store for this reader.
    `java.lang.Object` | `getMetadataStoreRoot()` Retrieves the current metadata store's root object.
    `int` | `getPixelType()` Gets the pixel type.
    `IFormatReader` | `getReader()` Gets the wrapped reader prototype.
    `IFormatReader` | `getReader(int no)` Gets the reader appropriate for use with the given image plane.
    `DimensionSwapper` | `getReader(int series, int no)` Gets the reader that should be used with the given series and image plane.
    `int` | `getRequiredDirectories(java.lang.String[] files)` Returns the number of parent directories that are important when processing the given list of files.
    `int` | `getResolution()` Get the current resolution level.
    `int` | `getSeries()` Gets the currently active series.
    `int` | `getSeriesCount()` Gets the number of series in this file.
    `java.util.Hashtable<java.lang.String,java.lang.Object>` | `getSeriesMetadata()` Obtains the hashtable containing metadata field/value pairs from the current series in the current file.
    `java.lang.String[]` | `getSeriesUsedFiles()` Returns an array of filenames needed to open the current series.
    `java.lang.String[]` | `getSeriesUsedFiles(boolean noPixels)` Returns an array of filenames needed to open the current series.
    `int` | `getSizeC()` Gets the size of the C dimension.
    `int` | `getSizeT()` Gets the size of the T dimension.
    `int` | `getSizeX()` Gets the size of the X dimension.
    `int` | `getSizeY()` Gets the size of the Y dimension.
    `int` | `getSizeZ()` Gets the size of the Z dimension.
    `int` | `getThumbSizeX()` Get the size of the X dimension for the thumbnail.
    `int` | `getThumbSizeY()` Get the size of the Y dimension for the thumbnail.
    `Codec` | `getTileCodec(int no)` Retrieve a codec that can be used to decompress compressed tiles.
    `CodecOptions` | `getTileCodecOptions(int no, int x, int y)` Retrieve codec options that can be used to decompressed the specified tile.
    `IFormatReader[]` | `getUnderlyingReaders()` Retrieves all underlying readers.
    `java.lang.String[]` | `getUsedFiles()` Returns an array of filenames needed to open this dataset.
    `java.lang.String[]` | `getUsedFiles(boolean noPixels)` Returns an array of filenames needed to open this dataset.
    `int[]` | `getZCTCoords(int index)` Gets the Z, C and T coordinates (real sizes) corresponding to the given rasterized index value.
    `int[]` | `getZCTModuloCoords(int index)` Gets the Z, C, T, moduloZ, moduloC and moduloT coordinates (effective sizes) corresponding to the given rasterized index value.
    `protected void` | `initFile(java.lang.String id)` Initializes the given file or file pattern.
    `protected void` | `initReader(int sno, int fno)`
    `boolean` | `isFalseColor()` Returns false if `IFormatReader.isIndexed()` is false, or if `IFormatReader.isIndexed()` is true and the lookup table represents "real" color data.
    `boolean` | `isGroupFiles()` Returns true if we should group files in multi-file formats.
    `boolean` | `isIndexed()` Gets whether the image planes are indexed color.
    `boolean` | `isInterleaved()` Gets whether or not the channels are interleaved.
    `boolean` | `isInterleaved(int subC)` Gets whether or not the given sub-channel is interleaved.
    `boolean` | `isLittleEndian()` Gets whether the data is in little-endian format.
    `boolean` | `isOrderCertain()` Gets whether the dimension order and sizes are known, or merely guesses.
    `boolean` | `isRGB()` Checks if the image planes in the file have more than one channel per `IFormatReader.openBytes(int)` call.
    `boolean` | `isThumbnailSeries()` Gets whether the current series is a lower resolution copy of a different series.
    `boolean` | `isUsingPatternIds()` Gets whether the reader is using file patterns for IDs.
    `byte[]` | `openBytes(int no)` Obtains the specified image plane from the current file as a byte array.
    `byte[]` | `openBytes(int no, byte[] buf)` Obtains the specified image plane from the current file into a pre-allocated byte array of (sizeX * sizeY * bytesPerPixel * RGB channel count).
    `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.
    `byte[]` | `openBytes(int no, int x, int y, int w, int h)` Obtains a sub-image of the specified image plane, whose upper-left corner is given by (x, y).
    `byte[]` | `openCompressedBytes(int no, byte[] buf, int x, int y)` Retrieve the specified tile without performing any decompression.
    `byte[]` | `openCompressedBytes(int no, int x, int y)` Retrieve the specified tile without performing any decompression.
    `java.lang.Object` | `openPlane(int no, int x, int y, int w, int h)` Obtains the specified image plane (or sub-image thereof) in the reader's native data structure.
    `byte[]` | `openThumbBytes(int no)` Obtains a thumbnail for the specified image plane from the current file, as a byte array.
    `void` | `reopenFile()` Reopen any files that were closed, and which are expected to be open while the reader is open.
    `int` | `seriesToCoreIndex(int series)` Returns the first core index corresponding to the specified series.
    `void` | `setAxisTypes(int[] axes)` Sets the axis type for each dimensional block.
    `void` | `setCanChangePattern(boolean doChange)`
    `void` | `setCoreIndex(int no)` Set the current resolution/series (ignores subresolutions).
    `void` | `setFlattenedResolutions(boolean flatten)` Set whether or not to flatten resolutions into individual series.
    `void` | `setGroupFiles(boolean group)` Specifies whether or not to force grouping in multi-file formats.
    `void` | `setId(java.lang.String id)` Sets the current file name.
    `void` | `setMetadataOptions(MetadataOptions options)`
    `void` | `setMetadataStore(MetadataStore store)` Sets the default metadata store for this reader.
    `void` | `setNormalized(boolean normalize)` Specifies whether or not to normalize float data.
    `void` | `setOriginalMetadataPopulated(boolean populate)` Specifies whether or not to save proprietary metadata in the MetadataStore.
    `void` | `setReaderClassList(ClassList<IFormatReader> classList)` Set the ClassList object to use when constructing any helper readers.
    `void` | `setResolution(int no)` Set the resolution level.
    `void` | `setSeries(int no)` Activates the specified series.
    `void` | `setUsingPatternIds(boolean patternIds)` Sets whether the reader is using file patterns for IDs.

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

      `duplicate, fileGroupOption, getCurrentFile, getDatasetStructureDescription, getDomains, getEffectiveSizeC, getFillColor, getFormat, getGlobalMetadata, getMetadataOptions, getMetadataValue, getModuloC, getModuloT, getModuloZ, getNativeDataType, getOptimalTileHeight, getOptimalTileWidth, getPossibleDomains, getResolutionCount, getRGBChannelCount, getSeriesMetadataValue, getSuffixes, getSupportedMetadataLevels, getTileColumns, getTileRows, hasCompanionFiles, hasFlattenedResolutions, isMetadataComplete, isMetadataFiltered, isNormalized, isOriginalMetadataPopulated, isSingleFile, isThisType, isThisType, isThisType, isThisType, setFillColor, setMetadataFiltered, unwrap, unwrap, unwrap`

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

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

- - ### Field Detail

    - #### LOGGER

          private static final org.slf4j.Logger LOGGER

    - #### MAX_READERS

          private static final int MAX_READERS

      See Also:
        Constant Field Values

    - #### patternIds

          private boolean patternIds

      Whether string ids given should be treated as file patterns rather than single file paths.

    - #### doNotChangePattern

          private boolean doNotChangePattern

    - #### sizeZ

          private int[] sizeZ

      Dimensional axis lengths per file.

    - #### sizeC

          private int[] sizeC

      Dimensional axis lengths per file.

    - #### sizeT

          private int[] sizeT

      Dimensional axis lengths per file.

    - #### lenZ

          private int[][] lenZ

      Component lengths for each axis type.

    - #### lenC

          private int[][] lenC

      Component lengths for each axis type.

    - #### lenT

          private int[][] lenT

      Component lengths for each axis type.

    - #### core

          private java.util.ArrayList<CoreMetadata> core

      Core metadata.

    - #### coreIndex

          private int coreIndex

      The number of the current series.

    - #### series

          private int series

      The number of the current series (non flat).

    - #### noStitch

          private boolean noStitch

    - #### group

          private boolean group

    - #### store

          private MetadataStore store

    - #### externals

          private FileStitcher.ExternalSeries[] externals

    - #### classList

          private ClassList<IFormatReader> classList

  - ### Constructor Detail

    - #### FileStitcher

          public FileStitcher()

      Constructs a FileStitcher around a new image reader.

    - #### FileStitcher

          public FileStitcher(boolean patternIds)

      Constructs a FileStitcher around a new image reader.
      Parameters:
        `patternIds` - Whether string ids given should be treated as file patterns rather than single file paths.

    - #### FileStitcher

          public FileStitcher(IFormatReader r)

      Constructs a FileStitcher with the given reader.
      Parameters:
        `r` - The reader to use for reading stitched files.

    - #### FileStitcher

          public FileStitcher(IFormatReader r,
                              boolean patternIds)

      Constructs a FileStitcher with the given reader.
      Parameters:
        `r` - The reader to use for reading stitched files.
        `patternIds` - Whether string ids given should be treated as file patterns rather than single file paths.

  - ### Method Detail

    - #### setReaderClassList

          public void setReaderClassList(ClassList<IFormatReader> classList)

      Set the ClassList object to use when constructing any helper readers.

    - #### getReader

          public IFormatReader getReader()

      Gets the wrapped reader prototype.
      Overrides:
        `getReader` in class `ReaderWrapper`

    - #### setUsingPatternIds

          public void setUsingPatternIds(boolean patternIds)

      Sets whether the reader is using file patterns for IDs.

    - #### isUsingPatternIds

          public boolean isUsingPatternIds()

      Gets whether the reader is using file patterns for IDs.

    - #### setCanChangePattern

          public void setCanChangePattern(boolean doChange)

    - #### canChangePattern

          public boolean canChangePattern()

    - #### getReader

          public IFormatReader getReader(int no)
                                  throws FormatException,
                                         java.io.IOException

      Gets the reader appropriate for use with the given image plane.
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### getReader

          public DimensionSwapper getReader(int series,
                                            int no)

      Gets the reader that should be used with the given series and image plane.

    - #### getAdjustedIndex

          public int getAdjustedIndex(int no)
                               throws FormatException,
                                      java.io.IOException

      Gets the local reader index for use with the given image plane.
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### getAxisTypes

          public int[] getAxisTypes()

      Gets the axis type for each dimensional block.
      Returns:
        An array containing values from the enumeration:
        - AxisGuesser.Z_AXIS: focal planes
        - AxisGuesser.T_AXIS: time points
        - AxisGuesser.C_AXIS: channels
        - AxisGuesser.S_AXIS: series

    - #### setAxisTypes

          public void setAxisTypes(int[] axes)
                            throws FormatException

      Sets the axis type for each dimensional block.
      Parameters:
        `axes` - An array containing values from the enumeration:
        - AxisGuesser.Z_AXIS: focal planes
        - AxisGuesser.T_AXIS: time points
        - AxisGuesser.C_AXIS: channels
        - AxisGuesser.S_AXIS: series
      Throws:
        `FormatException`

    - #### getFilePattern

          public FilePattern getFilePattern()

      Gets the file pattern object used to build the list of files.

    - #### getAxisGuesser

          public AxisGuesser getAxisGuesser()

      Gets the axis guesser object used to guess which dimensional axes are which.

    - #### findPattern

          public FilePattern findPattern(java.lang.String id)

    - #### findPatterns

          public java.lang.String[] findPatterns(java.lang.String id)

      Finds the file pattern for the given ID, based on the state of the file stitcher. Takes both ID map entries and the patternIds flag into account.

    - #### getRequiredDirectories

          public int getRequiredDirectories(java.lang.String[] files)
                                     throws FormatException,
                                            java.io.IOException

      Description copied from interface: `IFormatReader`
      Returns the number of parent directories that are important when processing the given list of files. The number of directories is relative to the common parent. For example, given a list with these two files: /path/to/file/foo /path/to/file/that/is/related A return value of 0 indicates that "/path/to/file/" is irrelevant. A return value of 1 indicates that "/path/to/" is irrelevant. Return values less than 0 are invalid. All listed files are assumed to belong to datasets of the same format.
      Specified by:
        `getRequiredDirectories` in interface `IFormatReader`
      Overrides:
        `getRequiredDirectories` in class `ReaderWrapper`
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### getImageCount

          public int getImageCount()

      Description copied from interface: `IFormatReader`
      Determines the number of image planes in the current file.
      Specified by:
        `getImageCount` in interface `IFormatReader`
      Overrides:
        `getImageCount` in class `ReaderWrapper`

    - #### isRGB

          public boolean isRGB()

      Description copied from interface: `IFormatReader`
      Checks if the image planes in the file have more than one channel per `IFormatReader.openBytes(int)` call. This method returns true if and only if `IFormatReader.getRGBChannelCount()` returns a value greater than 1.
      Specified by:
        `isRGB` in interface `IFormatReader`
      Overrides:
        `isRGB` in class `ReaderWrapper`

    - #### getSizeX

          public int getSizeX()

      Description copied from interface: `IFormatReader`
      Gets the size of the X dimension.
      Specified by:
        `getSizeX` in interface `IFormatReader`
      Overrides:
        `getSizeX` in class `ReaderWrapper`

    - #### getSizeY

          public int getSizeY()

      Description copied from interface: `IFormatReader`
      Gets the size of the Y dimension.
      Specified by:
        `getSizeY` in interface `IFormatReader`
      Overrides:
        `getSizeY` in class `ReaderWrapper`

    - #### getSizeZ

          public int getSizeZ()

      Description copied from interface: `IFormatReader`
      Gets the size of the Z dimension.
      Specified by:
        `getSizeZ` in interface `IFormatReader`
      Overrides:
        `getSizeZ` in class `ReaderWrapper`

    - #### getSizeC

          public int getSizeC()

      Description copied from interface: `IFormatReader`
      Gets the size of the C dimension.
      Specified by:
        `getSizeC` in interface `IFormatReader`
      Overrides:
        `getSizeC` in class `ReaderWrapper`

    - #### getSizeT

          public int getSizeT()

      Description copied from interface: `IFormatReader`
      Gets the size of the T dimension.
      Specified by:
        `getSizeT` in interface `IFormatReader`
      Overrides:
        `getSizeT` in class `ReaderWrapper`

    - #### getPixelType

          public int getPixelType()

      Description copied from interface: `IFormatReader`
      Gets the pixel type.
      Specified by:
        `getPixelType` in interface `IFormatReader`
      Overrides:
        `getPixelType` in class `ReaderWrapper`
      Returns:
        the pixel type as an enumeration from `FormatTools` static pixel types such as `FormatTools.INT8`.

    - #### getBitsPerPixel

          public int getBitsPerPixel()

      Description copied from interface: `IFormatReader`
      Gets the number of valid bits per pixel. The number of valid bits per pixel is always less than or equal to the number of bits per pixel that correspond to `IFormatReader.getPixelType()`.
      Specified by:
        `getBitsPerPixel` in interface `IFormatReader`
      Overrides:
        `getBitsPerPixel` in class `ReaderWrapper`

    - #### isIndexed

          public boolean isIndexed()

      Description copied from interface: `IFormatReader`
      Gets whether the image planes are indexed color. This value has no impact on `IFormatReader.getSizeC()`, `IFormatReader.getEffectiveSizeC()` or `IFormatReader.getRGBChannelCount()`.
      Specified by:
        `isIndexed` in interface `IFormatReader`
      Overrides:
        `isIndexed` in class `ReaderWrapper`

    - #### isFalseColor

          public boolean isFalseColor()

      Description copied from interface: `IFormatReader`
      Returns false if `IFormatReader.isIndexed()` is false, or if `IFormatReader.isIndexed()` is true and the lookup table represents "real" color data. Returns true if `IFormatReader.isIndexed()` is true and the lookup table is only present to aid in visualization.
      Specified by:
        `isFalseColor` in interface `IFormatReader`
      Overrides:
        `isFalseColor` in class `ReaderWrapper`

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

    - #### getThumbSizeX

          public int getThumbSizeX()

      Description copied from interface: `IFormatReader`
      Get the size of the X dimension for the thumbnail.
      Specified by:
        `getThumbSizeX` in interface `IFormatReader`
      Overrides:
        `getThumbSizeX` in class `ReaderWrapper`

    - #### getThumbSizeY

          public int getThumbSizeY()

      Description copied from interface: `IFormatReader`
      Get the size of the Y dimension for the thumbnail.
      Specified by:
        `getThumbSizeY` in interface `IFormatReader`
      Overrides:
        `getThumbSizeY` in class `ReaderWrapper`

    - #### isLittleEndian

          public boolean isLittleEndian()

      Description copied from interface: `IFormatReader`
      Gets whether the data is in little-endian format.
      Specified by:
        `isLittleEndian` in interface `IFormatReader`
      Overrides:
        `isLittleEndian` in class `ReaderWrapper`

    - #### getDimensionOrder

          public java.lang.String getDimensionOrder()

      Description copied from interface: `IFormatReader`
      Gets a five-character string representing the dimension order in which planes will be returned. Valid orders are:
      - XYCTZ
      - XYCZT
      - XYTCZ
      - XYTZC
      - XYZCT
      - XYZTC
      In cases where the channels are interleaved (e.g., CXYTZ), C will be the first dimension after X and Y (e.g., XYCTZ) and the `IFormatReader.isInterleaved()` method will return true.
      Specified by:
        `getDimensionOrder` in interface `IFormatReader`
      Overrides:
        `getDimensionOrder` in class `ReaderWrapper`

    - #### isOrderCertain

          public boolean isOrderCertain()

      Description copied from interface: `IFormatReader`
      Gets whether the dimension order and sizes are known, or merely guesses.
      Specified by:
        `isOrderCertain` in interface `IFormatReader`
      Overrides:
        `isOrderCertain` in class `ReaderWrapper`

    - #### isThumbnailSeries

          public boolean isThumbnailSeries()

      Description copied from interface: `IFormatReader`
      Gets whether the current series is a lower resolution copy of a different series.
      Specified by:
        `isThumbnailSeries` in interface `IFormatReader`
      Overrides:
        `isThumbnailSeries` in class `ReaderWrapper`

    - #### isInterleaved

          public boolean isInterleaved()

      Description copied from interface: `IFormatReader`
      Gets whether or not the channels are interleaved. This method exists because X and Y must appear first in the dimension order. For interleaved data, `IFormatReader.getDimensionOrder()` returns XYCTZ or XYCZT, and this method returns true. Note that this flag returns whether or not the data returned by `IFormatReader.openBytes(int)` is interleaved. In most cases, this will match the interleaving in the original file, but for some formats (e.g. TIFF) channel re-ordering is done internally and the return value of this method will not match what is in the original file.
      Specified by:
        `isInterleaved` in interface `IFormatReader`
      Overrides:
        `isInterleaved` in class `ReaderWrapper`

    - #### isInterleaved

          public boolean isInterleaved(int subC)

      Description copied from interface: `IFormatReader`
      Gets whether or not the given sub-channel is interleaved. This method exists because some data with multiple rasterized sub-dimensions within C have one sub-dimension interleaved, and the other not—e.g., `SDTReader` handles spectral-lifetime data with interleaved lifetime bins and non-interleaved spectral channels.
      Specified by:
        `isInterleaved` in interface `IFormatReader`
      Overrides:
        `isInterleaved` in class `ReaderWrapper`

    - #### openBytes

          public byte[] openBytes(int no)
                           throws FormatException,
                                  java.io.IOException

      Description copied from interface: `IFormatReader`
      Obtains the specified image plane from the current file as a byte array.
      Specified by:
        `openBytes` in interface `IFormatReader`
      Overrides:
        `openBytes` in class `ReaderWrapper`
      Throws:
        `FormatException`
        `java.io.IOException`
      See Also:
        `IFormatReader.openBytes(int, byte[])`

    - #### openBytes

          public byte[] openBytes(int no,
                                  byte[] buf)
                           throws FormatException,
                                  java.io.IOException

      Description copied from interface: `IFormatReader`
      Obtains the specified image plane from the current file into a pre-allocated byte array of (sizeX * sizeY * bytesPerPixel * RGB channel count).
      Specified by:
        `openBytes` in interface `IFormatReader`
      Overrides:
        `openBytes` in class `ReaderWrapper`
      Parameters:
        `no` - the plane index within the current series.
        `buf` - a pre-allocated buffer.
      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.

    - #### openBytes

          public byte[] openBytes(int no,
                                  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, whose upper-left corner is given by (x, y).
      Specified by:
        `openBytes` in interface `IFormatReader`
      Overrides:
        `openBytes` in class `ReaderWrapper`
      Throws:
        `FormatException`
        `java.io.IOException`

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

    - #### openPlane

          public java.lang.Object openPlane(int no,
                                            int x,
                                            int y,
                                            int w,
                                            int h)
                                     throws FormatException,
                                            java.io.IOException

      Description copied from interface: `IFormatReader`
      Obtains the specified image plane (or sub-image thereof) in the reader's native data structure. For most readers this is a byte array; however, some readers call external APIs that work with other types such as `BufferedImage`. The openPlane method exists to maintain generality and efficiency while avoiding pollution of the API with AWT-specific logic.
      Specified by:
        `openPlane` in interface `IFormatReader`
      Overrides:
        `openPlane` in class `ReaderWrapper`
      Throws:
        `FormatException`
        `java.io.IOException`
      See Also:
        `FormatReader`, `BufferedImageReader`

    - #### openThumbBytes

          public byte[] openThumbBytes(int no)
                                throws FormatException,
                                       java.io.IOException

      Description copied from interface: `IFormatReader`
      Obtains a thumbnail for the specified image plane from the current file, as a byte array.
      Specified by:
        `openThumbBytes` in interface `IFormatReader`
      Overrides:
        `openThumbBytes` in class `ReaderWrapper`
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### close

          public void close()
                     throws java.io.IOException

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Overrides:
        `close` in class `ReaderWrapper`
      Throws:
        `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 `ReaderWrapper`
      Throws:
        `java.io.IOException`

    - #### getSeriesCount

          public int getSeriesCount()

      Description copied from interface: `IFormatReader`
      Gets the number of series in this file.
      Specified by:
        `getSeriesCount` in interface `IFormatReader`
      Overrides:
        `getSeriesCount` in class `ReaderWrapper`

    - #### setSeries

          public void setSeries(int no)

      Description copied from interface: `IFormatReader`
      Activates the specified series. This also resets the resolution to 0.
      Specified by:
        `setSeries` in interface `IFormatReader`
      Overrides:
        `setSeries` in class `ReaderWrapper`

    - #### getSeries

          public int getSeries()

      Description copied from interface: `IFormatReader`
      Gets the currently active series.
      Specified by:
        `getSeries` in interface `IFormatReader`
      Overrides:
        `getSeries` in class `ReaderWrapper`

    - #### setResolution

          public void setResolution(int no)

      Description copied from interface: `IPyramidHandler`
      Set the resolution level.
      Specified by:
        `setResolution` in interface `IPyramidHandler`
      Overrides:
        `setResolution` in class `ReaderWrapper`
      See Also:
        `IPyramidHandler.getResolutionCount()`

    - #### getResolution

          public int getResolution()

      Description copied from interface: `IPyramidHandler`
      Get the current resolution level.
      Specified by:
        `getResolution` in interface `IPyramidHandler`
      Overrides:
        `getResolution` in class `ReaderWrapper`
      See Also:
        `IPyramidHandler.getResolutionCount()`

    - #### seriesToCoreIndex

          public int seriesToCoreIndex(int series)

      Description copied from interface: `IFormatReader`
      Returns the first core index corresponding to the specified series.
      Specified by:
        `seriesToCoreIndex` in interface `IFormatReader`
      Overrides:
        `seriesToCoreIndex` in class `ReaderWrapper`

    - #### coreIndexToSeries

          public int coreIndexToSeries(int index)

      Description copied from interface: `IFormatReader`
      Returns the series corresponding to the specified core index.
      Specified by:
        `coreIndexToSeries` in interface `IFormatReader`
      Overrides:
        `coreIndexToSeries` in class `ReaderWrapper`

    - #### setCoreIndex

          public void setCoreIndex(int no)

      Description copied from interface: `IFormatReader`
      Set the current resolution/series (ignores subresolutions). Equivalent to setSeries, but with flattened resolutions always set to false.
      Specified by:
        `setCoreIndex` in interface `IFormatReader`
      Overrides:
        `setCoreIndex` in class `ReaderWrapper`

    - #### getCoreIndex

          public int getCoreIndex()

      Description copied from interface: `IFormatReader`
      Return the index into CoreMetadata of the current resolution/series.
      Specified by:
        `getCoreIndex` in interface `IFormatReader`
      Overrides:
        `getCoreIndex` in class `ReaderWrapper`

    - #### setFlattenedResolutions

          public void setFlattenedResolutions(boolean flatten)

      Description copied from interface: `IFormatReader`
      Set whether or not to flatten resolutions into individual series.
      Specified by:
        `setFlattenedResolutions` in interface `IFormatReader`
      Overrides:
        `setFlattenedResolutions` in class `ReaderWrapper`

    - #### setGroupFiles

          public void setGroupFiles(boolean group)

      Description copied from interface: `IFormatReader`
      Specifies whether or not to force grouping in multi-file formats.
      Specified by:
        `setGroupFiles` in interface `IFormatReader`
      Overrides:
        `setGroupFiles` in class `ReaderWrapper`
      See Also:
        `IFormatReader.fileGroupOption(String)`, `IFormatReader.isGroupFiles()`

    - #### isGroupFiles

          public boolean isGroupFiles()

      Description copied from interface: `IFormatReader`
      Returns true if we should group files in multi-file formats.
      Specified by:
        `isGroupFiles` in interface `IFormatReader`
      Overrides:
        `isGroupFiles` in class `ReaderWrapper`
      See Also:
        `IFormatReader.setGroupFiles(boolean)`, `IFormatReader.fileGroupOption(String)`

    - #### setMetadataOptions

          public void setMetadataOptions(MetadataOptions options)

      Specified by:
        `setMetadataOptions` in interface `IMetadataConfigurable`
      Overrides:
        `setMetadataOptions` in class `ReaderWrapper`

    - #### setNormalized

          public void setNormalized(boolean normalize)

      Description copied from interface: `IFormatReader`
      Specifies whether or not to normalize float data.
      Specified by:
        `setNormalized` in interface `IFormatReader`
      Overrides:
        `setNormalized` in class `ReaderWrapper`

    - #### setOriginalMetadataPopulated

          public void setOriginalMetadataPopulated(boolean populate)

      Description copied from interface: `IFormatReader`
      Specifies whether or not to save proprietary metadata in the MetadataStore.
      Specified by:
        `setOriginalMetadataPopulated` in interface `IFormatReader`
      Overrides:
        `setOriginalMetadataPopulated` in class `ReaderWrapper`

    - #### getUsedFiles

          public java.lang.String[] getUsedFiles()

      Description copied from interface: `IFormatReader`
      Returns an array of filenames needed to open this dataset. The first element in the array is expected to be the path passed to `IFormatHandler.setId(String)`. 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:
        `getUsedFiles` in interface `IFormatReader`
      Overrides:
        `getUsedFiles` in class `ReaderWrapper`

    - #### getUsedFiles

          public java.lang.String[] getUsedFiles(boolean noPixels)

      Description copied from interface: `IFormatReader`
      Returns an array of filenames needed to open this dataset. 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:
        `getUsedFiles` in interface `IFormatReader`
      Overrides:
        `getUsedFiles` in class `ReaderWrapper`

    - #### getSeriesUsedFiles

          public java.lang.String[] getSeriesUsedFiles()

      Description copied from interface: `IFormatReader`
      Returns an array of filenames needed to open the current series. The first element in the array is expected to be the path passed to `IFormatHandler.setId(String)`. 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 `ReaderWrapper`

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

    - #### getAdvancedUsedFiles

          public FileInfo[] getAdvancedUsedFiles(boolean noPixels)

      Description copied from interface: `IFormatReader`
      Returns an array of FileInfo objects representing the files needed to open this dataset. If the 'noPixels' flag is set, then only files that do not contain pixel data will be returned.
      Specified by:
        `getAdvancedUsedFiles` in interface `IFormatReader`
      Overrides:
        `getAdvancedUsedFiles` in class `ReaderWrapper`

    - #### getAdvancedSeriesUsedFiles

          public FileInfo[] getAdvancedSeriesUsedFiles(boolean noPixels)

      Description copied from interface: `IFormatReader`
      Returns an array of FileInfo objects representing the files needed to open the current series. If the 'noPixels' flag is set, then only files that do not contain pixel data will be returned.
      Specified by:
        `getAdvancedSeriesUsedFiles` in interface `IFormatReader`
      Overrides:
        `getAdvancedSeriesUsedFiles` in class `ReaderWrapper`

    - #### getIndex

          public int getIndex(int z,
                              int c,
                              int t)

      Description copied from interface: `IFormatReader`
      Gets the rasterized index corresponding to the given Z, C and T coordinates (real sizes).
      Specified by:
        `getIndex` in interface `IFormatReader`
      Overrides:
        `getIndex` in class `ReaderWrapper`

    - #### getIndex

          public int getIndex(int z,
                              int c,
                              int t,
                              int moduloZ,
                              int moduloC,
                              int moduloT)

      Description copied from interface: `IFormatReader`
      Gets the rasterized index corresponding to the given Z, C, T, moduloZ, moduloC and moduloT coordinates (effective sizes). Note that the Z, C and T coordinates take the modulo dimension sizes into account. The effective size for each of these dimensions is limited to the total size of the dimension divided by the modulo size.
      Specified by:
        `getIndex` in interface `IFormatReader`
      Overrides:
        `getIndex` in class `ReaderWrapper`

    - #### getZCTCoords

          public int[] getZCTCoords(int index)

      Description copied from interface: `IFormatReader`
      Gets the Z, C and T coordinates (real sizes) corresponding to the given rasterized index value.
      Specified by:
        `getZCTCoords` in interface `IFormatReader`
      Overrides:
        `getZCTCoords` in class `ReaderWrapper`

    - #### getZCTModuloCoords

          public int[] getZCTModuloCoords(int index)

      Description copied from interface: `IFormatReader`
      Gets the Z, C, T, moduloZ, moduloC and moduloT coordinates (effective sizes) corresponding to the given rasterized index value. Note that the Z, C and T coordinates are not the same as those returned by getZCTCoords(int) because the size of the modulo dimensions is taken into account. The effective size for each of these dimensions is limited to the total size of the dimension divided by the modulo size.
      Specified by:
        `getZCTModuloCoords` in interface `IFormatReader`
      Overrides:
        `getZCTModuloCoords` in class `ReaderWrapper`

    - #### getSeriesMetadata

          public java.util.Hashtable<java.lang.String,java.lang.Object> getSeriesMetadata()

      Description copied from interface: `IFormatReader`
      Obtains the hashtable containing metadata field/value pairs from the current series in the current file.
      Specified by:
        `getSeriesMetadata` in interface `IFormatReader`
      Overrides:
        `getSeriesMetadata` in class `ReaderWrapper`

    - #### getCoreMetadataList

          public java.util.List<CoreMetadata> getCoreMetadataList()

      Description copied from interface: `IFormatReader`
      Obtains the core metadata values for the current file.
      Specified by:
        `getCoreMetadataList` in interface `IFormatReader`
      Overrides:
        `getCoreMetadataList` in class `ReaderWrapper`

    - #### setMetadataStore

          public void setMetadataStore(MetadataStore store)

      Description copied from interface: `IFormatReader`
      Sets the default metadata store for this reader.
      Specified by:
        `setMetadataStore` in interface `IFormatReader`
      Overrides:
        `setMetadataStore` in class `ReaderWrapper`
      Parameters:
        `store` - a metadata store implementation.

    - #### getMetadataStore

          public MetadataStore getMetadataStore()

      Description copied from interface: `IFormatReader`
      Retrieves the current metadata store for this reader. You can be assured that this method will never return a `null` metadata store.
      Specified by:
        `getMetadataStore` in interface `IFormatReader`
      Overrides:
        `getMetadataStore` in class `ReaderWrapper`
      Returns:
        A metadata store implementation.

    - #### getMetadataStoreRoot

          public java.lang.Object getMetadataStoreRoot()

      Description copied from interface: `IFormatReader`
      Retrieves the current metadata store's root object. It is guaranteed that all file parsing has been performed by the reader prior to retrieval. Requests for a full populated root object should be made using this method.
      Specified by:
        `getMetadataStoreRoot` in interface `IFormatReader`
      Overrides:
        `getMetadataStoreRoot` in class `ReaderWrapper`
      Returns:
        Current metadata store's root object fully populated.

    - #### getUnderlyingReaders

          public IFormatReader[] getUnderlyingReaders()

      Description copied from interface: `IFormatReader`
      Retrieves all underlying readers. Returns null if there are no underlying readers.
      Specified by:
        `getUnderlyingReaders` in interface `IFormatReader`
      Overrides:
        `getUnderlyingReaders` in class `ReaderWrapper`

    - #### reopenFile

          public void reopenFile()
                          throws java.io.IOException

      Description copied from interface: `IFormatReader`
      Reopen any files that were closed, and which are expected to be open while the reader is open. This assumes that `IFormatHandler.setId(java.lang.String)` has been called, but close(false) has not been called.
      Specified by:
        `reopenFile` in interface `IFormatReader`
      Overrides:
        `reopenFile` in class `ReaderWrapper`
      Throws:
        `java.io.IOException`

    - #### setId

          public void setId(java.lang.String id)
                     throws FormatException,
                            java.io.IOException

      Description copied from interface: `IFormatHandler`
      Sets the current file name.
      Specified by:
        `setId` in interface `IFormatHandler`
      Overrides:
        `setId` in class `ReaderWrapper`
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### openCompressedBytes

          public byte[] openCompressedBytes(int no,
                                            int x,
                                            int y)
                                     throws FormatException,
                                            java.io.IOException

      Description copied from interface: `ICompressedTileReader`
      Retrieve the specified tile without performing any decompression.
      Specified by:
        `openCompressedBytes` in interface `ICompressedTileReader`
      Overrides:
        `openCompressedBytes` in class `ReaderWrapper`
      Parameters:
        `no` - plane index
        `x` - tile X index (indexed from 0, @see getTileColumns(int))
        `y` - tile Y index (indexed from 0, @see getTileRows(int))
      Returns:
        compressed tile bytes
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### openCompressedBytes

          public byte[] openCompressedBytes(int no,
                                            byte[] buf,
                                            int x,
                                            int y)
                                     throws FormatException,
                                            java.io.IOException

      Description copied from interface: `ICompressedTileReader`
      Retrieve the specified tile without performing any decompression.
      Specified by:
        `openCompressedBytes` in interface `ICompressedTileReader`
      Overrides:
        `openCompressedBytes` in class `ReaderWrapper`
      Parameters:
        `no` - plane index
        `buf` - pre-allocated buffer in which to store compressed bytes
        `x` - tile X index (indexed from 0, @see getTileColumns(int))
        `y` - tile Y index (indexed from 0, @see getTileRows(int))
      Returns:
        compressed tile bytes
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### getTileCodec

          public Codec getTileCodec(int no)
                             throws FormatException,
                                    java.io.IOException

      Description copied from interface: `ICompressedTileReader`
      Retrieve a codec that can be used to decompress compressed tiles.
      Specified by:
        `getTileCodec` in interface `ICompressedTileReader`
      Overrides:
        `getTileCodec` in class `ReaderWrapper`
      Parameters:
        `no` - plane index
      Returns:
        codec that can be used for compressed tiles in the specified plane
      Throws:
        `FormatException`
        `java.io.IOException`
      See Also:
        `ICompressedTileReader.openCompressedBytes(int, int, int)`

    - #### getTileCodecOptions

          public CodecOptions getTileCodecOptions(int no,
                                                  int x,
                                                  int y)
                                           throws FormatException,
                                                  java.io.IOException

      Description copied from interface: `ICompressedTileReader`
      Retrieve codec options that can be used to decompressed the specified tile.
      Specified by:
        `getTileCodecOptions` in interface `ICompressedTileReader`
      Overrides:
        `getTileCodecOptions` in class `ReaderWrapper`
      Parameters:
        `no` - plane index
        `x` - tile X index (indexed from 0, @see getTileColumns(int))
        `y` - tile Y index (indexed from 0, @see getTileRows(int))
      Returns:
        codec options
      Throws:
        `FormatException`
        `java.io.IOException`
      See Also:
        `ICompressedTileReader.getTileCodec(int)`

    - #### initFile

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

      Initializes the given file or file pattern.
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### getExternalSeries

          private int getExternalSeries()

    - #### getExternalSeries

          private int getExternalSeries(int currentSeries)

    - #### computeAxisLengths

          protected void computeAxisLengths()
                                     throws FormatException

      Computes axis length arrays, and total axis lengths.
      Throws:
        `FormatException`

    - #### computeIndices

          protected int[] computeIndices(int no)
                                  throws FormatException,
                                         java.io.IOException

      Gets the file index, and image index into that file, corresponding to the given global image index.
      Returns:
        An array of size 2, dimensioned {file index, image index}.
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### initReader

          protected void initReader(int sno,
                                    int fno)

Copyright © 2026 Open Microscopy Environment