loci.formats.in

## Class LiFlimReader

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

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

      public class LiFlimReader
      extends FormatReader

  LiFlimReader is the file format reader for LI-FLIM files.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `private class` | `LiFlimReader.ROI`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `BACKGROUND_TABLE`
    `private java.lang.String` | `backgroundC`
    `private java.lang.String` | `backgroundDatatype`
    `private java.lang.String` | `backgroundF`
    `private java.lang.String` | `backgroundP`
    `private java.lang.String` | `backgroundT`
    `private java.lang.String` | `backgroundX`
    `private java.lang.String` | `backgroundY`
    `private java.lang.String` | `backgroundZ`
    `static java.lang.String` | `C_KEY`
    `private java.lang.String` | `channels`
    `private java.lang.String` | `compression`
    `static java.lang.String` | `COMPRESSION_GZIP`
    `static java.lang.String` | `COMPRESSION_KEY`
    `static java.lang.String` | `COMPRESSION_NONE`
    `private java.lang.String` | `DarkImage`
    `static java.lang.String` | `DarkImage_KEY`
    `private long` | `dataOffset` Offset to start of pixel data.
    `private java.lang.String` | `datatype`
    `static java.lang.String` | `DATATYPE_INT16`
    `static java.lang.String` | `DATATYPE_INT32`
    `static java.lang.String` | `DATATYPE_INT8`
    `static java.lang.String` | `DATATYPE_KEY`
    `static java.lang.String` | `DATATYPE_REAL32`
    `static java.lang.String` | `DATATYPE_REAL64`
    `static java.lang.String` | `DATATYPE_UINT12`
    `static java.lang.String` | `DATATYPE_UINT16`
    `static java.lang.String` | `DATATYPE_UINT32`
    `static java.lang.String` | `DATATYPE_UINT8`
    `private java.lang.Double` | `exposureTime`
    `private ome.units.unit.Unit<ome.units.quantity.Time>` | `exposureTimeUnit`
    `static java.lang.String` | `F_KEY`
    `private java.lang.String` | `frequencies`
    `private java.io.DataInputStream` | `gz` Stream to use for reading gzip-compressed pixel data.
    `private boolean` | `gzip` True if gzip compression was used to deflate the pixels.
    `private int` | `gzPos` Image number indicating position in gzip stream.
    `private int` | `gzSeries` Series number indicating position in gzip stream.
    `static java.lang.String` | `INFO_TABLE`
    `private loci.common.IniList` | `ini` Parsed configuration data.
    `static java.lang.String[]` | `KNOWN_VERSIONS`
    `static java.lang.String` | `LAYOUT_TABLE`
    `static java.lang.String` | `NUMBEROFDARKIMAGES_KEY`
    `static java.lang.String` | `NUMBEROFFRAMES_KEY`
    `private int` | `numRegions`
    `static java.lang.String` | `P_KEY`
    `private java.lang.String` | `packing`
    `static java.lang.String` | `PACKING_KEY`
    `private java.lang.String` | `phases`
    `static java.lang.String` | `PIXELFORMAT_KEY`
    `private java.util.Map<java.lang.Integer,LiFlimReader.ROI>` | `rois`
    `private java.util.Map<java.lang.Integer,java.lang.String>` | `stampValues`
    `static java.lang.String` | `T_KEY`
    `static java.lang.String` | `TIMESTAMP_KEY`
    `private java.lang.String` | `timestamps`
    `private boolean` | `TypeUINT12` if DataType is UINT12, data is compressed in 12 bits.
    `private java.io.DataInputStream` | `UINT12stream`
    `private int` | `UINT12streamPos`
    `private int` | `UINT12streamSeries`
    `private java.lang.String` | `version`
    `static java.lang.String` | `VERSION_KEY`
    `static java.lang.String` | `X_KEY`
    `private java.lang.String` | `xLen`
    `static java.lang.String` | `Y_KEY`
    `private java.lang.String` | `yLen`
    `static java.lang.String` | `Z_KEY`
    `private java.lang.String` | `zLen`

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

      `core, coreIndex, datasetDescription, domains, fillColor, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSION`

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

      `COMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixes`

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

      `CAN_GROUP, CANNOT_GROUP, MUST_GROUP`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LiFlimReader()` Constructs a new LI-FLIM 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.
    `private static byte[]` | `convert12to16LSB(byte[] image)`
    `private static byte[]` | `convert12to16MSB(byte[] image)`
    `private int` | `getPixelTypeFromString(java.lang.String type)`
    `private java.lang.String` | `getVersion()`
    `private void` | `initCoreMetadata()`
    `protected void` | `initFile(java.lang.String id)` Initializes the given file (parsing header information, etc.).
    `private void` | `initOMEMetadata()`
    `private void` | `initOriginalMetadata()`
    `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` | `parseHeader()`
    `private void` | `prepareGZipStream(int no)`
    `private void` | `prepareUINT12Stream(int no)` Similar to Gzip, make a DataInputstream for UINT12 data
    `private void` | `skip(java.io.InputStream is, long num)`

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

      `addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addMetaList, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMetaList, close, coreIndexToSeries, fileGroupOption, flattenHashtables, get16BitLookupTable, get8BitLookupTable, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getAvailableOptions, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCoreIndex, getCoreMetadataList, getCorrection, getCurrentCore, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, getDomains, getEffectiveSizeC, getExperimentType, getFilamentType, getFillColor, getFillRule, getFilterType, getFontFamily, getFontStyle, getGlobalMeta, getGlobalMetadata, getIlluminationType, getImageCount, getImmersion, getIndex, getIndex, getLaserMedium, getLaserType, getMarker, getMedium, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getMicrobeamManipulationType, getMicroscopeType, getModuloC, getModuloT, getModuloZ, getNamingConvention, getOptimalTileHeight, getOptimalTileWidth, getPixelType, getPixelType, getPossibleDomains, getPulse, getRequiredDirectories, getResolution, getResolutionCount, getRGBChannelCount, getRotationTransform, getSeries, getSeriesCount, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getThumbSizeX, getThumbSizeY, getTileColumns, getTileRows, getUnderlyingReaders, getUsedFiles, getUsedFiles, getZCTCoords, getZCTModuloCoords, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isSingleFile, isThisType, isThisType, isThisType, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, openThumbBytes, readPlane, readPlane, readPlane, reopenFile, seriesToCoreIndex, setCoreIndex, setFillColor, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries, updateMetadataLists`

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

      `checkSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptions`

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

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

    - ### Methods inherited from interface loci.formats.IFormatHandler

      `getFormat, getNativeDataType, getSuffixes`

    - ### Methods inherited from interface loci.formats.IMetadataConfigurable

      `getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions`

    - ### Methods inherited from interface loci.formats.ICompressedTileReader

      `getTileCodec, getTileCodecOptions, openCompressedBytes, openCompressedBytes`

- - ### Field Detail

    - #### INFO_TABLE

          public static final java.lang.String INFO_TABLE

      See Also:
        Constant Field Values

    - #### LAYOUT_TABLE

          public static final java.lang.String LAYOUT_TABLE

      See Also:
        Constant Field Values

    - #### BACKGROUND_TABLE

          public static final java.lang.String BACKGROUND_TABLE

      See Also:
        Constant Field Values

    - #### VERSION_KEY

          public static final java.lang.String VERSION_KEY

      See Also:
        Constant Field Values

    - #### COMPRESSION_KEY

          public static final java.lang.String COMPRESSION_KEY

      See Also:
        Constant Field Values

    - #### DATATYPE_KEY

          public static final java.lang.String DATATYPE_KEY

      See Also:
        Constant Field Values

    - #### PACKING_KEY

          public static final java.lang.String PACKING_KEY

      See Also:
        Constant Field Values

    - #### C_KEY

          public static final java.lang.String C_KEY

      See Also:
        Constant Field Values

    - #### X_KEY

          public static final java.lang.String X_KEY

      See Also:
        Constant Field Values

    - #### Y_KEY

          public static final java.lang.String Y_KEY

      See Also:
        Constant Field Values

    - #### Z_KEY

          public static final java.lang.String Z_KEY

      See Also:
        Constant Field Values

    - #### P_KEY

          public static final java.lang.String P_KEY

      See Also:
        Constant Field Values

    - #### F_KEY

          public static final java.lang.String F_KEY

      See Also:
        Constant Field Values

    - #### T_KEY

          public static final java.lang.String T_KEY

      See Also:
        Constant Field Values

    - #### DarkImage_KEY

          public static final java.lang.String DarkImage_KEY

      See Also:
        Constant Field Values

    - #### TIMESTAMP_KEY

          public static final java.lang.String TIMESTAMP_KEY

      See Also:
        Constant Field Values

    - #### NUMBEROFFRAMES_KEY

          public static final java.lang.String NUMBEROFFRAMES_KEY

      See Also:
        Constant Field Values

    - #### NUMBEROFDARKIMAGES_KEY

          public static final java.lang.String NUMBEROFDARKIMAGES_KEY

      See Also:
        Constant Field Values

    - #### PIXELFORMAT_KEY

          public static final java.lang.String PIXELFORMAT_KEY

      See Also:
        Constant Field Values

    - #### KNOWN_VERSIONS

          public static final java.lang.String[] KNOWN_VERSIONS

    - #### COMPRESSION_NONE

          public static final java.lang.String COMPRESSION_NONE

      See Also:
        Constant Field Values

    - #### COMPRESSION_GZIP

          public static final java.lang.String COMPRESSION_GZIP

      See Also:
        Constant Field Values

    - #### DATATYPE_UINT8

          public static final java.lang.String DATATYPE_UINT8

      See Also:
        Constant Field Values

    - #### DATATYPE_INT8

          public static final java.lang.String DATATYPE_INT8

      See Also:
        Constant Field Values

    - #### DATATYPE_UINT16

          public static final java.lang.String DATATYPE_UINT16

      See Also:
        Constant Field Values

    - #### DATATYPE_INT16

          public static final java.lang.String DATATYPE_INT16

      See Also:
        Constant Field Values

    - #### DATATYPE_UINT32

          public static final java.lang.String DATATYPE_UINT32

      See Also:
        Constant Field Values

    - #### DATATYPE_INT32

          public static final java.lang.String DATATYPE_INT32

      See Also:
        Constant Field Values

    - #### DATATYPE_REAL32

          public static final java.lang.String DATATYPE_REAL32

      See Also:
        Constant Field Values

    - #### DATATYPE_REAL64

          public static final java.lang.String DATATYPE_REAL64

      See Also:
        Constant Field Values

    - #### DATATYPE_UINT12

          public static final java.lang.String DATATYPE_UINT12

      See Also:
        Constant Field Values

    - #### dataOffset

          private long dataOffset

      Offset to start of pixel data.

    - #### ini

          private loci.common.IniList ini

      Parsed configuration data.

    - #### version

          private java.lang.String version

    - #### compression

          private java.lang.String compression

    - #### datatype

          private java.lang.String datatype

    - #### packing

          private java.lang.String packing

    - #### channels

          private java.lang.String channels

    - #### xLen

          private java.lang.String xLen

    - #### yLen

          private java.lang.String yLen

    - #### zLen

          private java.lang.String zLen

    - #### phases

          private java.lang.String phases

    - #### frequencies

          private java.lang.String frequencies

    - #### timestamps

          private java.lang.String timestamps

    - #### DarkImage

          private java.lang.String DarkImage

    - #### backgroundDatatype

          private java.lang.String backgroundDatatype

    - #### backgroundX

          private java.lang.String backgroundX

    - #### backgroundY

          private java.lang.String backgroundY

    - #### backgroundC

          private java.lang.String backgroundC

    - #### backgroundZ

          private java.lang.String backgroundZ

    - #### backgroundT

          private java.lang.String backgroundT

    - #### backgroundP

          private java.lang.String backgroundP

    - #### backgroundF

          private java.lang.String backgroundF

    - #### numRegions

          private int numRegions

    - #### rois

          private java.util.Map<java.lang.Integer,LiFlimReader.ROI> rois

    - #### stampValues

          private java.util.Map<java.lang.Integer,java.lang.String> stampValues

    - #### exposureTime

          private java.lang.Double exposureTime

    - #### exposureTimeUnit

          private ome.units.unit.Unit<ome.units.quantity.Time> exposureTimeUnit

    - #### gzip

          private boolean gzip

      True if gzip compression was used to deflate the pixels.

    - #### gz

          private java.io.DataInputStream gz

      Stream to use for reading gzip-compressed pixel data.

    - #### gzPos

          private int gzPos

      Image number indicating position in gzip stream.

    - #### gzSeries

          private int gzSeries

      Series number indicating position in gzip stream.

    - #### TypeUINT12

          private boolean TypeUINT12

      if DataType is UINT12, data is compressed in 12 bits. Similar to Gzipstream make use of a DataInputStream to unpack the compressed UINT12 pixel data into 16 bits.

    - #### UINT12stream

          private java.io.DataInputStream UINT12stream

    - #### UINT12streamPos

          private int UINT12streamPos

    - #### UINT12streamSeries

          private int UINT12streamSeries

  - ### Constructor Detail

    - #### LiFlimReader

          public LiFlimReader()

      Constructs a new LI-FLIM reader.

  - ### Method Detail

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

    - #### initFile

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

      Description copied from class: `FormatReader`
      Initializes the given file (parsing header information, etc.). Most subclasses should override this method to perform initialization operations such as parsing metadata.
      Overrides:
        `initFile` in class `FormatReader`
      Throws:
        `FormatException` - if a parsing error occurs processing the file.
        `java.io.IOException` - if an I/O error occurs processing the file

    - #### getVersion

          private java.lang.String getVersion()

    - #### parseHeader

          private void parseHeader()
                            throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### initOriginalMetadata

          private void initOriginalMetadata()

    - #### initCoreMetadata

          private void initCoreMetadata()
                                 throws FormatException

      Throws:
        `FormatException`

    - #### initOMEMetadata

          private void initOMEMetadata()

    - #### getPixelTypeFromString

          private int getPixelTypeFromString(java.lang.String type)
                                      throws FormatException

      Throws:
        `FormatException`

    - #### prepareGZipStream

          private void prepareGZipStream(int no)
                                  throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### prepareUINT12Stream

          private void prepareUINT12Stream(int no)
                                    throws java.io.IOException

      Similar to Gzip, make a DataInputstream for UINT12 data
      Throws:
        `java.io.IOException`

    - #### convert12to16LSB

          private static byte[] convert12to16LSB(byte[] image)

    - #### convert12to16MSB

          private static byte[] convert12to16MSB(byte[] image)

    - #### skip

          private void skip(java.io.InputStream is,
                            long num)
                     throws java.io.IOException

      Throws:
        `java.io.IOException`

Copyright © 2026 Open Microscopy Environment