loci.formats.in

## Class FilePatternReader

- java.lang.Object
- - loci.formats.FormatHandler
  - - loci.formats.FormatReader
    - - loci.formats.WrappedReader
      - - loci.formats.in.FilePatternReader

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

      public class FilePatternReader
      extends WrappedReader

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private FileStitcher` | `helper`

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `java.util.List<CoreMetadata>` | `getCoreMetadataList()` Obtains the core metadata values for the current file.
    `protected ReaderWrapper` | `getHelper()` Get the helper class that reads images
    `MetadataStore` | `getMetadataStore()` Retrieves the current metadata store for this reader.
    `java.lang.String[]` | `getSeriesUsedFiles(boolean noPixels)` Returns an array of filenames needed to open the current series.
    `java.lang.String[]` | `getUsedFiles(boolean noPixels)` Returns an array of filenames needed to open this dataset.
    `boolean` | `hasCompanionFiles()` Returns true if this format supports multi-file datasets.
    `boolean` | `hasFlattenedResolutions()` Return whether or not resolution flattening is enabled.
    `protected void` | `initFile(java.lang.String id)` Initializes the given file (parsing header information, etc.).
    `boolean` | `isGroupFiles()` Returns true if we should group files in multi-file formats.
    `boolean` | `isMetadataFiltered()` Returns true if ugly metadata (entries with unprintable characters, and extremely large entries) are discarded from the metadata table.
    `boolean` | `isNormalized()` Returns true if we should normalize float data.
    `boolean` | `isOriginalMetadataPopulated()` Returns true if we should save proprietary metadata in the MetadataStore.
    `boolean` | `isSingleFile(java.lang.String id)` Returns true if the named file is expected to be the only file in the dataset.
    `void` | `setFlattenedResolutions(boolean flattened)` Set whether or not to flatten resolutions into individual series.
    `void` | `setGroupFiles(boolean group)` Specifies whether or not to force grouping in multi-file formats.
    `void` | `setMetadataFiltered(boolean filter)` Specifies whether ugly metadata (entries with unprintable characters, and extremely large entries) should be discarded from the metadata table.
    `void` | `setMetadataStore(MetadataStore store)` Sets the default metadata store for this reader.
    `void` | `setNormalized(boolean normalize)` Specifies whether or not to normalize float data.
    `void` | `setOriginalMetadataPopulated(boolean populate)` Specifies whether or not to save proprietary metadata in the MetadataStore.

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

      `callDeferredSetters, close, close, coreIndexToSeries, getBitsPerPixel, getCoreIndex, getDatasetStructureDescription, getDimensionOrder, getDomains, getEffectiveSizeC, getGlobalMetadata, getImageCount, getIndex, getMetadataStoreRoot, getMetadataValue, getModuloC, getModuloT, getModuloZ, getNativeDataType, getOptimalTileHeight, getOptimalTileWidth, getPixelType, getPossibleDomains, getResolution, getResolutionCount, getRGBChannelCount, getSeries, getSeriesCount, getSeriesMetadata, getSeriesMetadataValue, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getThumbSizeX, getThumbSizeY, getUnderlyingReaders, getZCTCoords, isFalseColor, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isOrderCertain, isRGB, isThumbnailSeries, openBytes, openBytes, openBytes, openBytes, openPlane, openThumbBytes, reopenFile, seriesToCoreIndex, setCoreIndex, setResolution, setSeries`

    - ### 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, fileGroupOption, flattenHashtables, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getAvailableOptions, getBinning, getCompression, getContrastMethod, getCorrection, getCurrentCore, getCurrentFile, getDetectorType, getDimensionOrder, getExperimentType, getFilamentType, getFillColor, getFillRule, getFilterType, getFontFamily, getFontStyle, getGlobalMeta, getIlluminationType, getImmersion, getIndex, getLaserMedium, getLaserType, getMarker, getMedium, getMicrobeamManipulationType, getMicroscopeType, getNamingConvention, getPixelType, getPulse, getRequiredDirectories, getRotationTransform, getSeriesMeta, getSeriesUsedFiles, getTileColumns, getTileRows, getUsedFiles, getZCTModuloCoords, isThisType, isThisType, isThisType, isThisType, isUsedFile, makeFilterMetadata, readPlane, readPlane, readPlane, setFillColor, setId, updateMetadataLists`

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

      `checkSuffix, checkSuffix, getFormat, getMetadataOptions, 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, getSuffixes`

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

      `getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions`

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

      `getTileCodec, getTileCodecOptions, openCompressedBytes, openCompressedBytes`

- - ### Field Detail

    - #### helper

          private FileStitcher helper

  - ### Constructor Detail

    - #### FilePatternReader

          public FilePatternReader()

      Constructs a new pattern reader.

  - ### Method Detail

    - #### getHelper

          protected ReaderWrapper getHelper()

      Description copied from class: `WrappedReader`
      Get the helper class that reads images
      Specified by:
        `getHelper` in class `WrappedReader`

    - #### setGroupFiles

          public void setGroupFiles(boolean group)

      Description copied from interface: `IFormatReader`
      Specifies whether or not to force grouping in multi-file formats.
      Specified by:
        `setGroupFiles` in interface `IFormatReader`
      Overrides:
        `setGroupFiles` in class `FormatReader`
      See Also:
        `IFormatReader.fileGroupOption(String)`, `IFormatReader.isGroupFiles()`

    - #### isGroupFiles

          public boolean isGroupFiles()

      Description copied from interface: `IFormatReader`
      Returns true if we should group files in multi-file formats.
      Specified by:
        `isGroupFiles` in interface `IFormatReader`
      Overrides:
        `isGroupFiles` in class `FormatReader`
      See Also:
        `IFormatReader.setGroupFiles(boolean)`, `IFormatReader.fileGroupOption(String)`

    - #### setNormalized

          public void setNormalized(boolean normalize)

      Description copied from interface: `IFormatReader`
      Specifies whether or not to normalize float data.
      Specified by:
        `setNormalized` in interface `IFormatReader`
      Overrides:
        `setNormalized` in class `FormatReader`

    - #### isNormalized

          public boolean isNormalized()

      Description copied from interface: `IFormatReader`
      Returns true if we should normalize float data.
      Specified by:
        `isNormalized` in interface `IFormatReader`
      Overrides:
        `isNormalized` in class `FormatReader`

    - #### setOriginalMetadataPopulated

          public void setOriginalMetadataPopulated(boolean populate)

      Description copied from interface: `IFormatReader`
      Specifies whether or not to save proprietary metadata in the MetadataStore.
      Specified by:
        `setOriginalMetadataPopulated` in interface `IFormatReader`
      Overrides:
        `setOriginalMetadataPopulated` in class `FormatReader`

    - #### isOriginalMetadataPopulated

          public boolean isOriginalMetadataPopulated()

      Description copied from interface: `IFormatReader`
      Returns true if we should save proprietary metadata in the MetadataStore.
      Specified by:
        `isOriginalMetadataPopulated` in interface `IFormatReader`
      Overrides:
        `isOriginalMetadataPopulated` in class `FormatReader`

    - #### setMetadataFiltered

          public void setMetadataFiltered(boolean filter)

      Description copied from interface: `IFormatReader`
      Specifies whether ugly metadata (entries with unprintable characters, and extremely large entries) should be discarded from the metadata table.
      Specified by:
        `setMetadataFiltered` in interface `IFormatReader`
      Overrides:
        `setMetadataFiltered` in class `FormatReader`

    - #### isMetadataFiltered

          public boolean isMetadataFiltered()

      Description copied from interface: `IFormatReader`
      Returns true if ugly metadata (entries with unprintable characters, and extremely large entries) are discarded from the metadata table.
      Specified by:
        `isMetadataFiltered` in interface `IFormatReader`
      Overrides:
        `isMetadataFiltered` in class `FormatReader`

    - #### setMetadataStore

          public void setMetadataStore(MetadataStore store)

      Description copied from interface: `IFormatReader`
      Sets the default metadata store for this reader.
      Specified by:
        `setMetadataStore` in interface `IFormatReader`
      Overrides:
        `setMetadataStore` in class `FormatReader`
      Parameters:
        `store` - a metadata store implementation.

    - #### getMetadataStore

          public MetadataStore getMetadataStore()

      Description copied from interface: `IFormatReader`
      Retrieves the current metadata store for this reader. You can be assured that this method will never return a `null` metadata store.
      Specified by:
        `getMetadataStore` in interface `IFormatReader`
      Overrides:
        `getMetadataStore` in class `FormatReader`
      Returns:
        A metadata store implementation.

    - #### hasFlattenedResolutions

          public boolean hasFlattenedResolutions()

      Description copied from interface: `IFormatReader`
      Return whether or not resolution flattening is enabled.
      Specified by:
        `hasFlattenedResolutions` in interface `IFormatReader`
      Overrides:
        `hasFlattenedResolutions` in class `FormatReader`

    - #### setFlattenedResolutions

          public void setFlattenedResolutions(boolean flattened)

      Description copied from interface: `IFormatReader`
      Set whether or not to flatten resolutions into individual series.
      Specified by:
        `setFlattenedResolutions` in interface `IFormatReader`
      Overrides:
        `setFlattenedResolutions` in class `FormatReader`

    - #### 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 `WrappedReader`
      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 `WrappedReader`
      Throws:
        `FormatException`
        `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 `WrappedReader`

    - #### getUsedFiles

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

      Description copied from interface: `IFormatReader`
      Returns an array of filenames needed to open this dataset. 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:
        `getUsedFiles` in interface `IFormatReader`
      Overrides:
        `getUsedFiles` in class `WrappedReader`

    - #### getCoreMetadataList

          public java.util.List<CoreMetadata> getCoreMetadataList()

      Description copied from interface: `IFormatReader`
      Obtains the core metadata values for the current file.
      Specified by:
        `getCoreMetadataList` in interface `IFormatReader`
      Overrides:
        `getCoreMetadataList` in class `WrappedReader`

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

    - #### hasCompanionFiles

          public boolean hasCompanionFiles()

      Description copied from interface: `IFormatReader`
      Returns true if this format supports multi-file datasets.
      Specified by:
        `hasCompanionFiles` in interface `IFormatReader`
      Overrides:
        `hasCompanionFiles` in class `WrappedReader`

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

Copyright © 2026 Open Microscopy Environment