loci.formats.in

## Class ImarisHDFReader

- java.lang.Object
- - loci.formats.FormatHandler
  - - loci.formats.FormatReader
    - - loci.formats.SubResolutionFormatReader
      - - loci.formats.in.ImarisHDFReader

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

      public class ImarisHDFReader
      extends SubResolutionFormatReader

  Reader for Bitplane Imaris 5.5 (HDF) files.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int[]` | `blockSizeZPerResolution`
    `private java.lang.Object[]` | `buffer`
    `private java.util.List<java.lang.String>` | `channelMax`
    `private java.util.List<java.lang.String>` | `channelMin`
    `private java.util.List<java.lang.String>` | `channelName`
    `private java.util.List<double[]>` | `colors`
    `private static java.lang.String[]` | `DELIMITERS`
    `private java.util.List<java.lang.String>` | `emWave`
    `private java.util.List<java.lang.String>` | `exWave`
    `private java.util.List<java.lang.String>` | `gain`
    `static java.lang.String` | `HDF_MAGIC_STRING`
    `private int` | `lastChannel`
    `private int` | `lastMaxZ`
    `private int` | `lastMinZ`
    `private int` | `lastRes`
    `private int` | `lastT`
    `private long` | `maxBufferSize`
    `private double` | `maxX`
    `private double` | `maxY`
    `private double` | `maxZ`
    `private java.util.List<java.lang.String>` | `microscopyMode`
    `private double` | `minX`
    `private double` | `minY`
    `private double` | `minZ`
    `private NetCDFService` | `netcdf`
    `private java.util.List<java.lang.String>` | `pinhole`
    `private double` | `pixelSizeX`
    `private double` | `pixelSizeY`
    `private double` | `pixelSizeZ`
    `private int` | `seriesCount`

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

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

      `CAN_GROUP, CANNOT_GROUP, MUST_GROUP`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ImarisHDFReader()` Constructs a new Imaris HDF reader.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `addValue(java.util.List l, java.lang.Object value, int index)`
    `void` | `close(boolean fileOnly)` Closes the currently open file.
    `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.
    `private java.lang.Object` | `getImageData(int no, int x, int y, int width, int height)` Retrieve an array corresponding to the specified image tile.
    `int` | `getOptimalTileHeight()` Returns the optimal sub-image height for use with openBytes.
    `int` | `getOptimalTileWidth()` Returns the optimal sub-image width for use with openBytes.
    `private java.lang.Object` | `getSampleData()`
    `protected void` | `initFile(java.lang.String id)` Initializes the given file (parsing header information, etc.).
    `boolean` | `isThisType(loci.common.RandomAccessInputStream stream)` Checks if the given stream is a valid stream for this file format.
    `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` | `parseAttributes()`

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

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

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

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

    - #### HDF_MAGIC_STRING

          public static final java.lang.String HDF_MAGIC_STRING

      See Also:
        Constant Field Values

    - #### DELIMITERS

          private static final java.lang.String[] DELIMITERS

    - #### pixelSizeX

          private double pixelSizeX

    - #### pixelSizeY

          private double pixelSizeY

    - #### pixelSizeZ

          private double pixelSizeZ

    - #### minX

          private double minX

    - #### minY

          private double minY

    - #### minZ

          private double minZ

    - #### maxX

          private double maxX

    - #### maxY

          private double maxY

    - #### maxZ

          private double maxZ

    - #### seriesCount

          private int seriesCount

    - #### netcdf

          private NetCDFService netcdf

    - #### emWave

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

    - #### exWave

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

    - #### channelMin

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

    - #### channelMax

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

    - #### gain

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

    - #### pinhole

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

    - #### channelName

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

    - #### microscopyMode

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

    - #### colors

          private java.util.List<double[]> colors

    - #### lastChannel

          private int lastChannel

    - #### maxBufferSize

          private long maxBufferSize

    - #### buffer

          private java.lang.Object[] buffer

    - #### blockSizeZPerResolution

          private int[] blockSizeZPerResolution

    - #### lastMinZ

          private int lastMinZ

    - #### lastMaxZ

          private int lastMaxZ

    - #### lastRes

          private int lastRes

    - #### lastT

          private int lastT

  - ### Constructor Detail

    - #### ImarisHDFReader

          public ImarisHDFReader()

      Constructs a new Imaris HDF reader.

  - ### Method Detail

    - #### getOptimalTileWidth

          public int getOptimalTileWidth()

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

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

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

    - #### get8BitLookupTable

          public byte[][] get8BitLookupTable()

      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`

    - #### get16BitLookupTable

          public short[][] get16BitLookupTable()

      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`

    - #### openBytes

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

      Description copied from interface: `IFormatReader`
      Obtains a sub-image of the specified image plane into a pre-allocated byte array.
      Specified by:
        `openBytes` in interface `IFormatReader`
      Specified by:
        `openBytes` in class `FormatReader`
      Parameters:
        `no` - the plane index within the current series.
        `buf` - a pre-allocated buffer.
        `x` - X coordinate of the upper-left corner of the sub-image
        `y` - Y coordinate of the upper-left corner of the sub-image
        `w` - width of the sub-image
        `h` - height of the sub-image
      Returns:
        the pre-allocated buffer `buf` for convenience.
      Throws:
        `FormatException` - if there was a problem parsing the metadata of the file.
        `java.io.IOException` - if there was a problem reading the file.
      See Also:
        `IFormatReader.openBytes(int, byte[], int, int, int, int)`

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

    - #### getImageData

          private java.lang.Object getImageData(int no,
                                                int x,
                                                int y,
                                                int width,
                                                int height)
                                         throws FormatException

      Retrieve an array corresponding to the specified image tile. In some cases, the returned tile will be larger than the requested tile; openBytes will correct for this as needed.
      Throws:
        `FormatException`

    - #### getSampleData

          private java.lang.Object getSampleData()
                                          throws FormatException

      Throws:
        `FormatException`

    - #### parseAttributes

          private void parseAttributes()

    - #### addValue

          private void addValue(java.util.List l,
                                java.lang.Object value,
                                int index)

Copyright © 2026 Open Microscopy Environment