loci.formats.in

## Class TissueFAXSReader

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

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

      public class TissueFAXSReader
      extends FormatReader

  Reader for TissueFAXS format from TissueGnostics.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `(package private) class` | `TissueFAXSReader.Channel`
    `(package private) class` | `TissueFAXSReader.ScanRegion`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static org.slf4j.Logger` | `LOGGER`
    `private java.util.List<java.lang.String>` | `pixelsFiles`
    `private java.util.List<TissueFAXSReader.ScanRegion>` | `regions`
    `private static int` | `WAVE_MAX`
    `private static int` | `WAVE_MIN`

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

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

      `CAN_GROUP, CANNOT_GROUP, MUST_GROUP`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TissueFAXSReader()` Constructs a new TissueGnostics TissueFAXS reader.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `applyTransformation(byte[] tile, int regionID, int level, int channel, int zIndex, int fovRow, int fovColumn)` Extension point for doing something to an FOV immediately after decompression, before any stitching or cropping.
    `void` | `close(boolean fileOnly)` Closes the currently open file.
    `private void` | `copyCorrectionImageToBuffer(TissueFAXSReader.ScanRegion region, loci.common.Region dest, int[] zct, byte[] buf)`
    `private void` | `copyRegion(loci.common.Region srcRegion, byte[] src, loci.common.Region destRegion, byte[] dest, int tileWidth)`
    `private void` | `copyRegionToBuffer(TissueFAXSReader.ScanRegion region, int level, loci.common.Region dest, int[] zct, byte[] buf)`
    `private void` | `findDBFiles()` If a .tfcyto file was provided, then that is the only file that should be read.
    `private java.util.List<TissueFAXSReader.ScanRegion>` | `getAllRegions(int t)`
    `private Codec` | `getCodec(int compression)`
    `private CodecOptions` | `getCodecOptions(TissueFAXSReader.ScanRegion region)`
    `private int` | `getLevel()`
    `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 TissueFAXSReader.ScanRegion` | `getRegion()`
    `private TissueFAXSReader.ScanRegion` | `getRegion(int t)`
    `java.lang.String[]` | `getSeriesUsedFiles(boolean noPixels)` Returns an array of filenames needed to open the current series.
    `protected void` | `initFile(java.lang.String id)` Initializes the given file (parsing header information, etc.).
    `private boolean` | `isCorrectionImage(TissueFAXSReader.ScanRegion r)`
    `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 java.sql.Connection` | `openConnection(java.lang.String file)`
    `private byte[][]` | `splitFOVs(TissueFAXSReader.ScanRegion region, byte[] tile, int scale)` The largest resolution stores one field of view (FOV) per tile.

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

    - #### LOGGER

          private static final org.slf4j.Logger LOGGER

    - #### WAVE_MIN

          private static final int WAVE_MIN

      See Also:
        Constant Field Values

    - #### WAVE_MAX

          private static final int WAVE_MAX

      See Also:
        Constant Field Values

    - #### pixelsFiles

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

    - #### regions

          private java.util.List<TissueFAXSReader.ScanRegion> regions

  - ### Constructor Detail

    - #### TissueFAXSReader

          public TissueFAXSReader()

      Constructs a new TissueGnostics TissueFAXS reader.

  - ### Method Detail

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

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

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

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

    - #### findDBFiles

          private void findDBFiles()

      If a .tfcyto file was provided, then that is the only file that should be read. If an .aqproj file was provided, look for all associated .tfcyto files.

    - #### getAllRegions

          private java.util.List<TissueFAXSReader.ScanRegion> getAllRegions(int t)
                                                                     throws FormatException

      Throws:
        `FormatException`

    - #### getRegion

          private TissueFAXSReader.ScanRegion getRegion()
                                                 throws FormatException

      Throws:
        `FormatException`

    - #### getRegion

          private TissueFAXSReader.ScanRegion getRegion(int t)
                                                 throws FormatException

      Throws:
        `FormatException`

    - #### isCorrectionImage

          private boolean isCorrectionImage(TissueFAXSReader.ScanRegion r)

    - #### getLevel

          private int getLevel()
                        throws FormatException

      Throws:
        `FormatException`

    - #### getCodec

          private Codec getCodec(int compression)
                          throws UnsupportedCompressionException

      Throws:
        `UnsupportedCompressionException`

    - #### getCodecOptions

          private CodecOptions getCodecOptions(TissueFAXSReader.ScanRegion region)

    - #### splitFOVs

          private byte[][] splitFOVs(TissueFAXSReader.ScanRegion region,
                                     byte[] tile,
                                     int scale)

      The largest resolution stores one field of view (FOV) per tile. Each sub-resolution has the same tile size as the largest resolution, so the number of FOVs stored in one tile increases as the resolutions get smaller. For example, with a tile size of 2048x2048 and a downsample factor of 4, resolution 1 will have 16 (4x4) FOVs per tile, with each FOV being 512x512. However, none of the FOV positions or overlaps are taken into account. So the first step in assembling a sub-resolution is to split each tile into its component FOVs. Then each FOV can be repositioned according to its associated stitching rectangle and overlap. This method only splits the given tile into component FOVs. This is not necessary for the largest resolution, only sub-resolutions.

    - #### copyRegionToBuffer

          private void copyRegionToBuffer(TissueFAXSReader.ScanRegion region,
                                          int level,
                                          loci.common.Region dest,
                                          int[] zct,
                                          byte[] buf)
                                   throws FormatException,
                                          java.io.IOException

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

    - #### copyRegion

          private void copyRegion(loci.common.Region srcRegion,
                                  byte[] src,
                                  loci.common.Region destRegion,
                                  byte[] dest,
                                  int tileWidth)

    - #### copyCorrectionImageToBuffer

          private void copyCorrectionImageToBuffer(TissueFAXSReader.ScanRegion region,
                                                   loci.common.Region dest,
                                                   int[] zct,
                                                   byte[] buf)
                                            throws FormatException,
                                                   java.io.IOException

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

    - #### openConnection

          private java.sql.Connection openConnection(java.lang.String file)
                                              throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### applyTransformation

          public byte[] applyTransformation(byte[] tile,
                                            int regionID,
                                            int level,
                                            int channel,
                                            int zIndex,
                                            int fovRow,
                                            int fovColumn)

      Extension point for doing something to an FOV immediately after decompression, before any stitching or cropping. Overriding this in a subclass could be used to apply a correction image. Currently this method is a no-op.

Copyright © 2026 Open Microscopy Environment