loci.formats.in

## Class FakeReader

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

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

      public class FakeReader
      extends FormatReader

  FakeReader is the file format reader for faking input data. It is mainly useful for testing.

  Examples:

  - showinf 'multi-series&series=11&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake' -series 9
  - showinf '8bit-signed&pixelType=int8&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
  - showinf '8bit-unsigned&pixelType=uint8&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
  - showinf '16bit-signed&pixelType=int16&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
  - showinf '16bit-unsigned&pixelType=uint16&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
  - showinf '32bit-signed&pixelType=int32&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
  - showinf '32bit-unsigned&pixelType=uint32&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
  - showinf '32bit-floating&pixelType=float&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
  - showinf '64bit-floating&pixelType=double&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
  - showinf 'SPW&plates=2&plateRows=3&plateCols=3&fields=8&plateAcqs=5.fake'
  - showinf 'SPW&screens=2&plates=1&plateRows=3&plateCols=3&fields=1&plateAcqs=1.fake'
  - showinf 'Plate&screens=0&plates=1&plateRows=3&plateCols=3&fields=8&plateAcqs=5.fake'
  - showinf 'regions&points=10&ellipses=5&rectangles=10.fake'
  - showinf 'pyramid&sizeX=10000&sizeY=10000&resolutions=5&resolutionScale=2.fake' -noflat -resolution 4

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `private static class` | `FakeReader.TextLine`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `ac` Channel of last opened image plane.
    `private static boolean` | `ANN_BOOLEAN_VALUE`
    `private static java.lang.String` | `ANN_COMMENT_VALUE`
    `private static java.lang.Double` | `ANN_DOUBLE_VALUE`
    `private static long` | `ANN_LONG_VALUE`
    `private static java.lang.String` | `ANN_TAG_VALUE`
    `private static java.lang.String` | `ANN_TERM_VALUE`
    `private static ome.xml.model.primitives.Timestamp` | `ANN_TIME_VALUE`
    `private static java.lang.String` | `ANN_XML_VALUE_END`
    `private static java.lang.String` | `ANN_XML_VALUE_START`
    `private int` | `annBool`
    `private int` | `annComment`
    `private int` | `annDouble`
    `private int` | `annLong`
    `private int` | `annMap`
    `private static java.lang.String` | `ANNOTATION_NAMESPACE`
    `private static java.lang.String` | `ANNOTATION_PREFIX`
    `private int` | `annotationBoolCount`
    `private int` | `annotationCommentCount`
    `private int` | `annotationCount`
    `private int` | `annotationDoubleCount`
    `private int` | `annotationLongCount`
    `private int` | `annotationMapCount`
    `private int` | `annotationTagCount`
    `private int` | `annotationTermCount`
    `private int` | `annotationTimeCount`
    `private int` | `annotationXmlCount`
    `private int` | `annTag`
    `private int` | `annTerm`
    `private int` | `annTime`
    `private int` | `annXml`
    `static int` | `BOX_SIZE`
    `static java.lang.String` | `DEFAULT_DIMENSION_ORDER`
    `static int` | `DEFAULT_PIXEL_TYPE`
    `static int` | `DEFAULT_RESOLUTION_SCALE`
    `static int` | `DEFAULT_RGB_CHANNEL_COUNT`
    `static java.lang.String` | `DEFAULT_RGB_DIMENSION_ORDER`
    `static int` | `DEFAULT_SIZE_C`
    `static int` | `DEFAULT_SIZE_T`
    `static int` | `DEFAULT_SIZE_X`
    `static int` | `DEFAULT_SIZE_Y`
    `static int` | `DEFAULT_SIZE_Z`
    `private int` | `ellipses`
    `private java.util.ArrayList<ome.units.quantity.Length>` | `emissionWavelengths`
    `private java.util.ArrayList<ome.units.quantity.Length>` | `excitationWavelengths`
    `private ome.units.quantity.Time` | `exposureTime` exposure time per plane info
    `private java.util.List<java.lang.String>` | `fakeSeries` List of used files if the fake is a SPW structure
    `private int` | `fields`
    `private int[][]` | `indexToValue` For indexed color, mapping from indices to values and vice versa.
    `private java.lang.String` | `iniFile` Properties companion file which can be associated with this fake file
    `private boolean` | `labelPlanes`
    `private int` | `labels`
    `private int` | `lines`
    `private short[][][]` | `lut16` 16-bit lookup table, if indexed color, one per channel.
    `private byte[][][]` | `lut8` 8-bit lookup table, if indexed color, one per channel.
    `private int` | `masks`
    `private OMEXMLMetadata` | `omeXmlMetadata`
    `private OMEXMLService` | `omeXmlService`
    `private ome.units.quantity.Length` | `physicalSizeX`
    `private ome.units.quantity.Length` | `physicalSizeY`
    `private ome.units.quantity.Length` | `physicalSizeZ`
    `private int` | `plateAcqs`
    `private int` | `plateCols`
    `private int` | `plateRows`
    `private int` | `plates`
    `private int` | `points`
    `private int` | `polygons`
    `private int` | `polylines`
    `private int` | `rectangles`
    `private static java.lang.String` | `ROI_PREFIX`
    `private static int` | `ROI_SPACING`
    `private int` | `roiCount`
    `private double` | `scaleFactor` Scale factor for gradient, if any.
    `private int` | `screens`
    `private static long` | `SEED`
    `private static java.lang.String` | `SHAPE_PREFIX`
    `private int` | `sizeC`
    `private int` | `sizeT`
    `private int` | `sizeX`
    `private int` | `sizeY`
    `private int` | `sizeZ`
    `private int` | `sleepInitFile`
    `private int` | `sleepOpenBytes`
    `private static java.lang.String` | `TOKEN_SEPARATOR`
    `private int[][]` | `valueToIndex` For indexed color, mapping from indices to values and vice versa.

    - ### 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
    `FakeReader()` Constructs a new fake 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 void` | `createIndexMap(int num)` Creates a mapping between indices and color values.
    `private java.lang.String[]` | `extractTokensFromFakeSeries(java.lang.String path)`
    `private void` | `fillAcquisitionDate(MetadataStore store, java.lang.String date, int imageIndex)`
    `private void` | `fillAnnotations(MetadataStore store, int imageIndex)`
    `private void` | `fillChannelWavelengths(MetadataStore store)`
    `private void` | `fillExposureTime(MetadataStore store)`
    `private void` | `fillInstrumentRefs(MetadataStore store)`
    `private void` | `fillPhysicalSizes(MetadataStore store)`
    `private void` | `fillRegions(MetadataStore store, int imageIndex)`
    `private void` | `findLogFiles()`
    `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.
    `OMEXMLMetadata` | `getOmeXmlMetadata()`
    `OMEXMLService` | `getOmeXmlService()`
    `private java.lang.String` | `getPoints(int i)`
    `java.lang.String[]` | `getSeriesUsedFiles(boolean noPixels)` Returns an array of filenames needed to open the current series.
    `private java.lang.Double` | `getX(int i)`
    `private java.lang.Double` | `getY(int i)`
    `protected void` | `initFile(java.lang.String id)` Initializes the given file (parsing header information, etc.).
    `boolean` | `isSingleFile(java.lang.String id)` Returns true if the named file is expected to be the only file in the dataset.
    `private boolean` | `isSPWStructure(java.lang.String path)`
    `boolean` | `isThisType(java.lang.String name, boolean open)` Checks if a file matches the type of this format reader.
    `private java.util.List<java.lang.String>` | `listFakeSeries(java.lang.String traversedDirectory)` Traverses a fake file folder structure indicated by traversedDirectory
    `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 int` | `parseColor(java.lang.String value)`
    `private ome.units.quantity.Length` | `parsePhysicalSize(java.lang.String s, java.lang.String defaultUnit)`
    `private ome.units.quantity.Length` | `parsePosition(java.lang.String axis, int s, int index, loci.common.IniTable table)`
    `private void` | `parseSeriesTable(loci.common.IniTable table, MetadataStore store, int newSeries)` Translate key/value pairs from the INI table for the specified series.
    `private ome.units.quantity.Length` | `parseWavelength(java.lang.String s, java.lang.String defaultUnit)`
    `private void` | `populateInstrument(MetadataStore store)`
    `private int` | `populateSPW(MetadataStore store, int screens, int plates, int rows, int cols, int fields, int acqs, boolean withMicrobeam)`
    `static int[]` | `readSpecialPixels(byte[] plane)` Read byte-encoded metadata from the given plane.
    `static int[]` | `readSpecialPixels(byte[] plane, int pixelType, boolean little)` Read byte-encoded metadata from the given plane.
    `static int[]` | `readSpecialPixels(byte[] plane, int pixelType, boolean little, int rgb, boolean interleaved)` Read byte-encoded metadata from the given plane.
    `void` | `reopenFile()` Reopen any files that were closed, and which are expected to be open while the reader is open.
    `private static void` | `shuffle(int c, int[] array)` Fisher-Yates shuffle with constant seeds to ensure reproducibility.
    `(package private) static void` | `sleep(java.lang.String msg, int ms)`
    `private int[]` | `toSPWCoordinates(int seriesIndex)` Convert the given series (Image) index to a WellSample, Well, and Plate index.

    - ### 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, 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, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, openThumbBytes, readPlane, readPlane, readPlane, 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

    - #### ANN_LONG_VALUE

          private static final long ANN_LONG_VALUE

      See Also:
        Constant Field Values

    - #### ANN_DOUBLE_VALUE

          private static final java.lang.Double ANN_DOUBLE_VALUE

    - #### ANNOTATION_PREFIX

          private static final java.lang.String ANNOTATION_PREFIX

      See Also:
        Constant Field Values

    - #### ANNOTATION_NAMESPACE

          private static final java.lang.String ANNOTATION_NAMESPACE

      See Also:
        Constant Field Values

    - #### ANN_TERM_VALUE

          private static final java.lang.String ANN_TERM_VALUE

      See Also:
        Constant Field Values

    - #### ANN_TAG_VALUE

          private static final java.lang.String ANN_TAG_VALUE

      See Also:
        Constant Field Values

    - #### ANN_TIME_VALUE

          private static final ome.xml.model.primitives.Timestamp ANN_TIME_VALUE

    - #### ANN_BOOLEAN_VALUE

          private static final boolean ANN_BOOLEAN_VALUE

      See Also:
        Constant Field Values

    - #### ANN_COMMENT_VALUE

          private static final java.lang.String ANN_COMMENT_VALUE

      See Also:
        Constant Field Values

    - #### ANN_XML_VALUE_START

          private static final java.lang.String ANN_XML_VALUE_START

      See Also:
        Constant Field Values

    - #### ANN_XML_VALUE_END

          private static final java.lang.String ANN_XML_VALUE_END

      See Also:
        Constant Field Values

    - #### ROI_PREFIX

          private static final java.lang.String ROI_PREFIX

      See Also:
        Constant Field Values

    - #### SHAPE_PREFIX

          private static final java.lang.String SHAPE_PREFIX

      See Also:
        Constant Field Values

    - #### BOX_SIZE

          public static final int BOX_SIZE

      See Also:
        Constant Field Values

    - #### ROI_SPACING

          private static final int ROI_SPACING

      See Also:
        Constant Field Values

    - #### DEFAULT_SIZE_X

          public static final int DEFAULT_SIZE_X

      See Also:
        Constant Field Values

    - #### DEFAULT_SIZE_Y

          public static final int DEFAULT_SIZE_Y

      See Also:
        Constant Field Values

    - #### DEFAULT_SIZE_Z

          public static final int DEFAULT_SIZE_Z

      See Also:
        Constant Field Values

    - #### DEFAULT_SIZE_C

          public static final int DEFAULT_SIZE_C

      See Also:
        Constant Field Values

    - #### DEFAULT_SIZE_T

          public static final int DEFAULT_SIZE_T

      See Also:
        Constant Field Values

    - #### DEFAULT_PIXEL_TYPE

          public static final int DEFAULT_PIXEL_TYPE

      See Also:
        Constant Field Values

    - #### DEFAULT_RGB_CHANNEL_COUNT

          public static final int DEFAULT_RGB_CHANNEL_COUNT

      See Also:
        Constant Field Values

    - #### DEFAULT_DIMENSION_ORDER

          public static final java.lang.String DEFAULT_DIMENSION_ORDER

      See Also:
        Constant Field Values

    - #### DEFAULT_RGB_DIMENSION_ORDER

          public static final java.lang.String DEFAULT_RGB_DIMENSION_ORDER

      See Also:
        Constant Field Values

    - #### DEFAULT_RESOLUTION_SCALE

          public static final int DEFAULT_RESOLUTION_SCALE

      See Also:
        Constant Field Values

    - #### TOKEN_SEPARATOR

          private static final java.lang.String TOKEN_SEPARATOR

      See Also:
        Constant Field Values

    - #### SEED

          private static final long SEED

      See Also:
        Constant Field Values

    - #### sizeX

          private int sizeX

    - #### sizeY

          private int sizeY

    - #### sizeZ

          private int sizeZ

    - #### sizeC

          private int sizeC

    - #### sizeT

          private int sizeT

    - #### exposureTime

          private ome.units.quantity.Time exposureTime

      exposure time per plane info

    - #### physicalSizeX

          private ome.units.quantity.Length physicalSizeX

    - #### physicalSizeY

          private ome.units.quantity.Length physicalSizeY

    - #### physicalSizeZ

          private ome.units.quantity.Length physicalSizeZ

    - #### excitationWavelengths

          private transient java.util.ArrayList<ome.units.quantity.Length> excitationWavelengths

    - #### emissionWavelengths

          private transient java.util.ArrayList<ome.units.quantity.Length> emissionWavelengths

    - #### annBool

          private int annBool

    - #### annComment

          private int annComment

    - #### annDouble

          private int annDouble

    - #### annLong

          private int annLong

    - #### annMap

          private int annMap

    - #### annTime

          private int annTime

    - #### annTag

          private int annTag

    - #### annTerm

          private int annTerm

    - #### annXml

          private int annXml

    - #### annotationCount

          private int annotationCount

    - #### annotationBoolCount

          private int annotationBoolCount

    - #### annotationCommentCount

          private int annotationCommentCount

    - #### annotationDoubleCount

          private int annotationDoubleCount

    - #### annotationLongCount

          private int annotationLongCount

    - #### annotationMapCount

          private int annotationMapCount

    - #### annotationTagCount

          private int annotationTagCount

    - #### annotationTermCount

          private int annotationTermCount

    - #### annotationTimeCount

          private int annotationTimeCount

    - #### annotationXmlCount

          private int annotationXmlCount

    - #### ellipses

          private int ellipses

    - #### labels

          private int labels

    - #### lines

          private int lines

    - #### masks

          private int masks

    - #### points

          private int points

    - #### polygons

          private int polygons

    - #### polylines

          private int polylines

    - #### rectangles

          private int rectangles

    - #### roiCount

          private int roiCount

    - #### scaleFactor

          private double scaleFactor

      Scale factor for gradient, if any.

    - #### lut8

          private byte[][][] lut8

      8-bit lookup table, if indexed color, one per channel.

    - #### lut16

          private short[][][] lut16

      16-bit lookup table, if indexed color, one per channel.

    - #### indexToValue

          private int[][] indexToValue

      For indexed color, mapping from indices to values and vice versa.

    - #### valueToIndex

          private int[][] valueToIndex

      For indexed color, mapping from indices to values and vice versa.

    - #### ac

          private int ac

      Channel of last opened image plane.

    - #### iniFile

          private java.lang.String iniFile

      Properties companion file which can be associated with this fake file

    - #### fakeSeries

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

      List of used files if the fake is a SPW structure

    - #### omeXmlMetadata

          private OMEXMLMetadata omeXmlMetadata

    - #### omeXmlService

          private OMEXMLService omeXmlService

    - #### screens

          private transient int screens

    - #### plates

          private transient int plates

    - #### plateRows

          private transient int plateRows

    - #### plateCols

          private transient int plateCols

    - #### fields

          private transient int fields

    - #### plateAcqs

          private transient int plateAcqs

    - #### sleepOpenBytes

          private int sleepOpenBytes

    - #### sleepInitFile

          private int sleepInitFile

    - #### labelPlanes

          private boolean labelPlanes

  - ### Constructor Detail

    - #### FakeReader

          public FakeReader()

      Constructs a new fake reader.

  - ### Method Detail

    - #### sleep

          static void sleep(java.lang.String msg,
                            int ms)

    - #### readSpecialPixels

          public static int[] readSpecialPixels(byte[] plane)

      Read byte-encoded metadata from the given plane.
      See Also:
        `readSpecialPixels(byte[], int, boolean, int, boolean)`

    - #### readSpecialPixels

          public static int[] readSpecialPixels(byte[] plane,
                                                int pixelType,
                                                boolean little)

      Read byte-encoded metadata from the given plane.
      See Also:
        `readSpecialPixels(byte[], int, boolean, int, boolean)`

    - #### readSpecialPixels

          public static int[] readSpecialPixels(byte[] plane,
                                                int pixelType,
                                                boolean little,
                                                int rgb,
                                                boolean interleaved)

      Read byte-encoded metadata from the given plane.

      FakeReader encodes the following information in the upper-left section of each plane: series, plane number, Z index, C index, T index. Given an image plane generated by FakeReader (or by anything that follows the same encoding rules), this method decodes the above information and returns it as an array of integers.

      Note that the above numbers are encoded as valid pixels, so that the information is still retrievable after conversion to a pixel-oriented image format (this allows to use the class for testing the ImageJ plugin). Among other things, this implies that the maximum encodable values depend on the pixel type.

      Note:

      In the case of indexed color data, the returned values will be the indices of the actual values in the relevant lookup table (see `get8BitLookupTable()` and `get16BitLookupTable()`).

      Parameters:
        `plane` - an image plane as a byte array
        `pixelType` - the pixel type of the image; see `FormatTools`
        `little` - true if the byte order is little-endian, false otherwise
        `rgb` - the RGB channel count
        `interleaved` - true if the channels are interleaved, false otherwise
      Returns:
        an array of integers representing, in order: series; plane number; Z index; C index, T index

    - #### get8BitLookupTable

          public byte[][] get8BitLookupTable()
                                      throws FormatException,
                                             java.io.IOException

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

    - #### get16BitLookupTable

          public short[][] get16BitLookupTable()
                                        throws FormatException,
                                               java.io.IOException

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

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

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

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

    - #### findLogFiles

          private void findLogFiles()

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

    - #### getOmeXmlMetadata

          public OMEXMLMetadata getOmeXmlMetadata()

    - #### getOmeXmlService

          public OMEXMLService getOmeXmlService()

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

    - #### reopenFile

          public void reopenFile()
                          throws java.io.IOException

      Description copied from interface: `IFormatReader`
      Reopen any files that were closed, and which are expected to be open while the reader is open. This assumes that `IFormatHandler.setId(java.lang.String)` has been called, but close(false) has not been called.
      Specified by:
        `reopenFile` in interface `IFormatReader`
      Overrides:
        `reopenFile` in class `FormatReader`
      Throws:
        `java.io.IOException`

    - #### fillPhysicalSizes

          private void fillPhysicalSizes(MetadataStore store)

    - #### fillExposureTime

          private void fillExposureTime(MetadataStore store)

    - #### fillChannelWavelengths

          private void fillChannelWavelengths(MetadataStore store)

    - #### fillAcquisitionDate

          private void fillAcquisitionDate(MetadataStore store,
                                           java.lang.String date,
                                           int imageIndex)

    - #### fillAnnotations

          private void fillAnnotations(MetadataStore store,
                                       int imageIndex)

    - #### fillInstrumentRefs

          private void fillInstrumentRefs(MetadataStore store)

    - #### getX

          private java.lang.Double getX(int i)

    - #### getY

          private java.lang.Double getY(int i)

    - #### getPoints

          private java.lang.String getPoints(int i)

    - #### fillRegions

          private void fillRegions(MetadataStore store,
                                   int imageIndex)

    - #### parseSeriesTable

          private void parseSeriesTable(loci.common.IniTable table,
                                        MetadataStore store,
                                        int newSeries)

      Translate key/value pairs from the INI table for the specified series.

    - #### toSPWCoordinates

          private int[] toSPWCoordinates(int seriesIndex)

      Convert the given series (Image) index to a WellSample, Well, and Plate index. This should match the ordering used by XMLMockObjects.
      Parameters:
        `seriesIndex` - the index of the series/Image
      Returns:
        an array of length 3 containing the WellSample, Well, and Plate indices (in order), or null if SPW metadata was not defined

    - #### extractTokensFromFakeSeries

          private java.lang.String[] extractTokensFromFakeSeries(java.lang.String path)

    - #### isSPWStructure

          private boolean isSPWStructure(java.lang.String path)

    - #### populateSPW

          private int populateSPW(MetadataStore store,
                                  int screens,
                                  int plates,
                                  int rows,
                                  int cols,
                                  int fields,
                                  int acqs,
                                  boolean withMicrobeam)

    - #### populateInstrument

          private void populateInstrument(MetadataStore store)

    - #### createIndexMap

          private void createIndexMap(int num)

      Creates a mapping between indices and color values.

    - #### listFakeSeries

          private java.util.List<java.lang.String> listFakeSeries(java.lang.String traversedDirectory)

      Traverses a fake file folder structure indicated by traversedDirectory

    - #### shuffle

          private static void shuffle(int c,
                                      int[] array)

      Fisher-Yates shuffle with constant seeds to ensure reproducibility.

    - #### parseColor

          private int parseColor(java.lang.String value)

    - #### parsePosition

          private ome.units.quantity.Length parsePosition(java.lang.String axis,
                                                          int s,
                                                          int index,
                                                          loci.common.IniTable table)

    - #### parsePhysicalSize

          private ome.units.quantity.Length parsePhysicalSize(java.lang.String s,
                                                              java.lang.String defaultUnit)

    - #### parseWavelength

          private ome.units.quantity.Length parseWavelength(java.lang.String s,
                                                            java.lang.String defaultUnit)

Copyright © 2026 Open Microscopy Environment