loci.formats.in

## Class SDTReader

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

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

      public class SDTReader
      extends FormatReader

  SDTReader is the file format reader for Becker & Hickl SPC-Image SDT files.
  Author:
    Curtis Rueden ctrueden at wisc.edu Please Note: This format holds FLIM data arranged so that each decay is stored contiguously. Therefore, as in other FLIM format readers e.g. SDTReader.java, on the first call to openBytes the whole data cube (x, y, t) (NB actually t, not real-time T) is loaded from the file and buffered. On further calls to openBytes the appropriate 2D (x, y) plane (timebin) is returned from this buffer. This is in the interest of significantly improved performance when all the planes are requested one after another. There will be a performance cost if a single plane is requested but this is highly unlikely for FLIM data. In order to limit the size of the buffer, beyond a certain size threshold only a subset of planes (a Block) are retained in the buffer.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `blockLength` No of timeBins pre-loaded as a block
    `protected int` | `channels` Number of spectral channels.
    `protected int` | `currentBlock` Block of time bins currently stored for faster loading.
    `protected byte[]` | `dataStore`
    `protected SDTInfo` | `info` Object containing SDT header information.
    `protected boolean` | `intensity` Whether to combine lifetime bins into single intensity image planes.
    `protected boolean` | `preLoad` Whether to pre-load all lifetime bins for faster loading.
    `protected int` | `storedChannel`
    `protected int` | `storedSeries`
    `protected int` | `timeBins` Number of time bins in lifetime histogram.

    - ### 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
    `SDTReader()` Constructs a new SDT reader.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close(boolean fileOnly)` Closes the currently open file.
    `int` | `getChannelCount()` Gets the number of spectral channels.
    `SDTInfo` | `getInfo()` Gets object containing SDT header information.
    `int` | `getTimeBinCount()` Gets the number of bins in the lifetime histogram.
    `protected void` | `initFile(java.lang.String id)` Initializes the given file (parsing header information, etc.).
    `boolean` | `isIntensity()` Gets whether the reader is combining each lifetime histogram into a summed intensity image plane.
    `boolean` | `isInterleaved(int subC)` Gets whether or not the given sub-channel is interleaved.
    `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` | `readPixels(byte[] rowBuf, loci.common.RandomAccessInputStream in, java.util.zip.ZipInputStream codec, long skip)`
    `void` | `setIntensity(boolean intensity)` Toggles whether the reader should return intensity data only (the sum of each lifetime histogram).
    `void` | `setPreLoad(boolean preLoad)` Toggles whether the reader should pre-load data for increased performance.

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

          protected SDTInfo info

      Object containing SDT header information.

    - #### timeBins

          protected int timeBins

      Number of time bins in lifetime histogram.

    - #### channels

          protected int channels

      Number of spectral channels.

    - #### intensity

          protected boolean intensity

      Whether to combine lifetime bins into single intensity image planes.

    - #### preLoad

          protected boolean preLoad

      Whether to pre-load all lifetime bins for faster loading.

    - #### storedChannel

          protected int storedChannel

    - #### storedSeries

          protected int storedSeries

    - #### dataStore

          protected byte[] dataStore

    - #### currentBlock

          protected int currentBlock

      Block of time bins currently stored for faster loading.

    - #### blockLength

          protected int blockLength

      No of timeBins pre-loaded as a block

  - ### Constructor Detail

    - #### SDTReader

          public SDTReader()

      Constructs a new SDT reader.

  - ### Method Detail

    - #### setIntensity

          public void setIntensity(boolean intensity)

      Toggles whether the reader should return intensity data only (the sum of each lifetime histogram).

    - #### setPreLoad

          public void setPreLoad(boolean preLoad)

      Toggles whether the reader should pre-load data for increased performance.

    - #### isIntensity

          public boolean isIntensity()

      Gets whether the reader is combining each lifetime histogram into a summed intensity image plane.

    - #### getTimeBinCount

          public int getTimeBinCount()

      Gets the number of bins in the lifetime histogram.

    - #### getChannelCount

          public int getChannelCount()

      Gets the number of spectral channels.

    - #### getInfo

          public SDTInfo getInfo()

      Gets object containing SDT header information.

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

    - #### readPixels

          private void readPixels(byte[] rowBuf,
                                  loci.common.RandomAccessInputStream in,
                                  java.util.zip.ZipInputStream codec,
                                  long skip)
                           throws java.io.IOException

      Throws:
        `java.io.IOException`

Copyright © 2026 Open Microscopy Environment