loci.formats.in

## Class DeltavisionReader

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

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

      public class DeltavisionReader
      extends FormatReader

  DeltavisionReader is the file format reader for Deltavision files.
  Author:
    Melissa Linkert melissa at glencoesoftware.com

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `private static class` | `DeltavisionReader.DVExtHdrFields` This private class structure holds the details for the extended header.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private boolean` | `backwardsStageX` Whether or not the stage moved backwards.
    `private boolean` | `backwardsStageY`
    `static java.lang.String` | `DATE_FORMAT` Deprecated. Use `DATE_FORMATS` instead
    `static java.lang.String[]` | `DATE_FORMATS`
    `private java.lang.String` | `deconvolutionLogFile`
    `static int` | `DV_MAGIC_BYTES_1`
    `static int` | `DV_MAGIC_BYTES_2`
    `protected DeltavisionReader.DVExtHdrFields[]` | `extHdrFields` Initialize an array of Extended Header Field structures.
    `private int` | `extSize` Size of extended header.
    `private static int` | `HEADER_LENGTH`
    `private static java.lang.String[]` | `IMAGE_TYPES`
    `private java.lang.String` | `imageSequence`
    `private int[]` | `lengths`
    `private static short` | `LITTLE_ENDIAN`
    `private java.lang.String` | `logFile`
    `private static int` | `MAX_CHANNELS`
    `private java.lang.Double[]` | `ndFilters`
    `private static int` | `NEW_TYPE`
    `private boolean` | `newFileType`
    `protected int` | `numFloatsPerSection`
    `protected int` | `numIntsPerSection` The number of ints in each extended header section.
    `protected int` | `panelSize`
    `protected boolean` | `positionInT`
    `private boolean` | `truncatedFileFlag`
    `protected int` | `tSize` Size of one time element in the extended header.
    `protected int` | `wSize` Size of one wave in the extended header.
    `private int` | `xTiles` Number of tiles in X direction.
    `private int` | `yTiles` Number of tiles in Y direction.
    `protected int` | `zSize` Size of one z section in the extended header.

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close(boolean fileOnly)` Closes the currently open file.
    `private void` | `findLogFiles()` Find the log files.
    `private java.lang.String` | `getImageSequence(int imageSequence)` Get the image sequence string.
    `private java.lang.String` | `getPixelString(int filePixelType)` Get a descriptive string representing the pixel type.
    `private int` | `getPixelType(int filePixelType)` Get the OME pixel type from the pixel type stored in the file.
    `long` | `getPlaneByteOffset(int currentZ, int currentW, int currentT)` Given any specific Z, W, and T of a plane, determine the absolute byte offset of the plane in the file.
    `private int` | `getPlaneIndex(int series, int plane)`
    `java.lang.String[]` | `getSeriesUsedFiles(boolean noPixels)` Returns an array of filenames needed to open the current series.
    `private int` | `getTotalPlaneHeaderSize()`
    `protected void` | `initExtraMetadata()`
    `protected void` | `initFile(java.lang.String id)` Initializes the given file (parsing header information, etc.).
    `protected void` | `initPixels()`
    `boolean` | `isSingleFile(java.lang.String id)` Returns true if the named file is expected to be the only file in the dataset.
    `boolean` | `isThisType(loci.common.RandomAccessInputStream stream)` Checks if the given stream is a valid stream for this file format.
    `boolean` | `isThisType(java.lang.String name, boolean open)` Checks if a file matches the type of this format reader.
    `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` | `parseDeconvolutionLog(loci.common.RandomAccessInputStream s, MetadataStore store)` Parse deconvolution output, if it exists.
    `private boolean` | `parseLogFile(MetadataStore store)` Extract metadata from associated log file, if it exists.
    `protected void` | `populateObjective(MetadataStore store, int lensID)` Populate an Objective based upon the lens ID.
    `private void` | `readWavelength(int channel, MetadataStore store)`
    `private void` | `setOffsetInfo(int numZSections, int numWaves, int numTimes, int numPanels)` This method calculates the size of a w, t, z section depending on which sequence is being used
    `void` | `setTruncatedFileFlag(boolean truncatedFileFlag)` This flag indicates if the file is known to be truncated.

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

    - #### DV_MAGIC_BYTES_1

          public static final int DV_MAGIC_BYTES_1

      See Also:
        Constant Field Values

    - #### DV_MAGIC_BYTES_2

          public static final int DV_MAGIC_BYTES_2

      See Also:
        Constant Field Values

    - #### DATE_FORMAT

          @Deprecated
          public static final java.lang.String DATE_FORMAT

      Deprecated. Use `DATE_FORMATS` instead
      See Also:
        Constant Field Values

    - #### DATE_FORMATS

          public static final java.lang.String[] DATE_FORMATS

    - #### LITTLE_ENDIAN

          private static final short LITTLE_ENDIAN

      See Also:
        Constant Field Values

    - #### HEADER_LENGTH

          private static final int HEADER_LENGTH

      See Also:
        Constant Field Values

    - #### NEW_TYPE

          private static final int NEW_TYPE

      See Also:
        Constant Field Values

    - #### MAX_CHANNELS

          private static final int MAX_CHANNELS

      See Also:
        Constant Field Values

    - #### IMAGE_TYPES

          private static final java.lang.String[] IMAGE_TYPES

    - #### extSize

          private int extSize

      Size of extended header.

    - #### wSize

          protected int wSize

      Size of one wave in the extended header.

    - #### zSize

          protected int zSize

      Size of one z section in the extended header.

    - #### tSize

          protected int tSize

      Size of one time element in the extended header.

    - #### panelSize

          protected int panelSize

    - #### xTiles

          private int xTiles

      Number of tiles in X direction.

    - #### yTiles

          private int yTiles

      Number of tiles in Y direction.

    - #### backwardsStageX

          private boolean backwardsStageX

      Whether or not the stage moved backwards.

    - #### backwardsStageY

          private boolean backwardsStageY

    - #### numIntsPerSection

          protected int numIntsPerSection

      The number of ints in each extended header section. These fields appear to be all blank but need to be skipped to get to the floats afterwards

    - #### numFloatsPerSection

          protected int numFloatsPerSection

    - #### extHdrFields

          protected DeltavisionReader.DVExtHdrFields[] extHdrFields

      Initialize an array of Extended Header Field structures.

    - #### ndFilters

          private java.lang.Double[] ndFilters

    - #### lengths

          private int[] lengths

    - #### logFile

          private java.lang.String logFile

    - #### deconvolutionLogFile

          private java.lang.String deconvolutionLogFile

    - #### truncatedFileFlag

          private boolean truncatedFileFlag

    - #### imageSequence

          private java.lang.String imageSequence

    - #### newFileType

          private boolean newFileType

    - #### positionInT

          protected boolean positionInT

  - ### Constructor Detail

    - #### DeltavisionReader

          public DeltavisionReader()

      Constructs a new Deltavision reader.

  - ### Method Detail

    - #### isSingleFile

          public boolean isSingleFile(java.lang.String id)
                               throws FormatException,
                                      java.io.IOException

      Description copied from interface: `IFormatReader`
      Returns true if the named file is expected to be the only file in the dataset. For single-file formats, always returns true.
      Specified by:
        `isSingleFile` in interface `IFormatReader`
      Overrides:
        `isSingleFile` in class `FormatReader`
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### isThisType

          public boolean isThisType(java.lang.String name,
                                    boolean open)

      Description copied from class: `FormatReader`
      Checks if a file matches the type of this format reader. Checks filename suffixes against those known for this format. If the suffix check is inconclusive and the open parameter is true, the file is opened and tested with `FormatReader.isThisType(RandomAccessInputStream)`.
      Specified by:
        `isThisType` in interface `IFormatReader`
      Overrides:
        `isThisType` in class `FormatReader`
        `open` - If true, and the file extension is insufficient to determine the file type, the (existing) file is opened for further analysis.

    - #### isThisType

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

      Description copied from interface: `IFormatReader`
      Checks if the given stream is a valid stream for this file format. The number of bytes read is format-dependent.
      Specified by:
        `isThisType` in interface `IFormatReader`
      Overrides:
        `isThisType` in class `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`

    - #### getSeriesUsedFiles

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

      Description copied from interface: `IFormatReader`
      Returns an array of filenames needed to open the current series. If the 'noPixels' flag is set, then only files that do not contain pixel data will be returned. The first element in the array is expected to be the path passed to `IFormatHandler.setId(String)`, if appropriate based upon 'noPixels'. The remaining elements are expected to be in a consistent order; if a directory listing is necessary to build the list then it should be sorted first.
      Specified by:
        `getSeriesUsedFiles` in interface `IFormatReader`
      Overrides:
        `getSeriesUsedFiles` in class `FormatReader`

    - #### openBytes

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

      Description copied from interface: `IFormatReader`
      Obtains a sub-image of the specified image plane into a pre-allocated byte array.
      Specified by:
        `openBytes` in interface `IFormatReader`
      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`

    - #### setTruncatedFileFlag

          public void setTruncatedFileFlag(boolean truncatedFileFlag)

      This flag indicates if the file is known to be truncated. If true, the dimension size information is kept as it is specified in the file header, otherwise the length of the file is used to override size information. This flag must be set before `FormatReader.setId(String)` is called. Default is false.

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

    - #### initPixels

          protected void initPixels()
                             throws FormatException,
                                    java.io.IOException

      Throws:
        `FormatException`
        `java.io.IOException`

    - #### initExtraMetadata

          protected void initExtraMetadata()
                                    throws FormatException,
                                           java.io.IOException

      Throws:
        `FormatException`
        `java.io.IOException`

    - #### getPixelString

          private java.lang.String getPixelString(int filePixelType)

      Get a descriptive string representing the pixel type.

    - #### getPixelType

          private int getPixelType(int filePixelType)

      Get the OME pixel type from the pixel type stored in the file.

    - #### getImageSequence

          private java.lang.String getImageSequence(int imageSequence)

      Get the image sequence string.

    - #### setOffsetInfo

          private void setOffsetInfo(int numZSections,
                                     int numWaves,
                                     int numTimes,
                                     int numPanels)

      This method calculates the size of a w, t, z section depending on which sequence is being used
      Parameters:
        `numZSections` -
        `numWaves` -
        `numTimes` -
        `numPanels` -

    - #### getTotalPlaneHeaderSize

          private int getTotalPlaneHeaderSize()

    - #### getPlaneIndex

          private int getPlaneIndex(int series,
                                    int plane)

    - #### getPlaneByteOffset

          public long getPlaneByteOffset(int currentZ,
                                         int currentW,
                                         int currentT)

      Given any specific Z, W, and T of a plane, determine the absolute byte offset of the plane in the file.
      Parameters:
        `currentZ` -
        `currentW` -
        `currentT` -

    - #### findLogFiles

          private void findLogFiles()
                             throws java.io.IOException

      Find the log files.
      Throws:
        `java.io.IOException`

    - #### parseLogFile

          private boolean parseLogFile(MetadataStore store)
                                throws FormatException,
                                       java.io.IOException

      Extract metadata from associated log file, if it exists.
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### parseDeconvolutionLog

          private void parseDeconvolutionLog(loci.common.RandomAccessInputStream s,
                                             MetadataStore store)
                                      throws java.io.IOException

      Parse deconvolution output, if it exists.
      Throws:
        `java.io.IOException`

    - #### readWavelength

          private void readWavelength(int channel,
                                      MetadataStore store)
                               throws FormatException,
                                      java.io.IOException

      Throws:
        `FormatException`
        `java.io.IOException`

    - #### populateObjective

          protected void populateObjective(MetadataStore store,
                                           int lensID)
                                    throws FormatException

      Populate an Objective based upon the lens ID. This is based upon information received from Applied Precision.
      Throws:
        `FormatException`

Copyright © 2026 Open Microscopy Environment