Class OMETiffReader

java.lang.Object
loci.formats.FormatHandler
loci.formats.FormatReader
loci.formats.SubResolutionFormatReader
loci.formats.in.OMETiffReader
All Implemented Interfaces:
Closeable, AutoCloseable, loci.formats.ICompressedTileReader, loci.formats.IFormatHandler, loci.formats.IFormatReader, loci.formats.IMetadataConfigurable, loci.formats.IPyramidHandler

public class OMETiffReader extends loci.formats.SubResolutionFormatReader
OMETiffReader is the file format reader for OME-TIFF files.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
     
    static final String
     
    protected loci.formats.in.OMETiffReader.OMETiffPlane[][]
    Mapping from series and plane numbers to files and IFD entries.
    protected loci.formats.ome.OMEXMLMetadata
    Represents OME-XML stored in the current OME-TIFF file(s).
    static final String[]
     
    protected loci.formats.services.OMEXMLService
    OMEXMLService that can be used to manipulate OME-XML.
    protected String[]
    List of used files.

    Fields inherited from class loci.formats.SubResolutionFormatReader

    core

    Fields inherited from class loci.formats.FormatReader

    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
    Description
    Constructs a new OME-TIFF reader.
    OMETiffReader(String name, String[] suffixes)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    close(boolean fileOnly)
     
    protected void
    convertMetadata(loci.formats.ome.OMEXMLMetadata meta, loci.formats.meta.MetadataStore store)
    Convert metadata contained within an OMEXMLMetadata object to a separate MetadataStore.
    boolean
     
    int
     
    short[][]
     
    byte[][]
     
    protected ArrayList<String>
     
     
    loci.formats.meta.MetadataStore
    Deprecated.
    Use the general FormatReader.getMetadataStore() method.
    loci.formats.meta.MetadataStore
    Deprecated.
    Use the general FormatReader.getMetadataStore() method.
    int
     
    int
     
    int
     
    getSeriesUsedFiles(boolean noPixels)
     
    loci.common.Region
    getTileBoundingBox(int no, int x, int y)
     
    loci.formats.codec.Codec
    getTileCodec(int no)
     
    loci.formats.codec.CodecOptions
    getTileCodecOptions(int no, int x, int y)
     
    int
     
    int
    getTileRows(int no)
     
    protected void
     
    boolean
     
    boolean
    isThisType(String name, boolean open)
     
    boolean
    isThisType(loci.common.RandomAccessInputStream stream)
     
    byte[]
    openBytes(int no, byte[] buf, int x, int y, int w, int h)
     
    byte[]
    openCompressedBytes(int no, byte[] buf, int x, int y)
     
    byte[]
    openCompressedBytes(int no, int x, int y)
     
    void
     
    void
    setSeries(int series)
     

    Methods inherited from class loci.formats.SubResolutionFormatReader

    coreIndexToSeries, flattenHashtables, getCoreIndex, getCoreMetadataList, getCurrentCore, getResolution, getResolutionCount, getSeries, getSeriesCount, seriesToCoreIndex, setCoreIndex, setResolution

    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, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCorrection, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, 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, getRGBChannelCount, getRotationTransform, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getThumbSizeX, getThumbSizeY, 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, setFillColor, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, 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
  • Field Details

    • OME_TIFF_SUFFIXES

      public static final String[] OME_TIFF_SUFFIXES
    • FAIL_ON_MISSING_KEY

      public static final String FAIL_ON_MISSING_KEY
      See Also:
    • FAIL_ON_MISSING_DEFAULT

      public static final boolean FAIL_ON_MISSING_DEFAULT
      See Also:
    • info

      protected loci.formats.in.OMETiffReader.OMETiffPlane[][] info
      Mapping from series and plane numbers to files and IFD entries.
    • used

      protected String[] used
      List of used files.
    • service

      protected loci.formats.services.OMEXMLService service
      OMEXMLService that can be used to manipulate OME-XML.
    • meta

      protected transient loci.formats.ome.OMEXMLMetadata meta
      Represents OME-XML stored in the current OME-TIFF file(s).
  • Constructor Details

    • OMETiffReader

      public OMETiffReader()
      Constructs a new OME-TIFF reader.
    • OMETiffReader

      public OMETiffReader(String name, String[] suffixes)
  • Method Details

    • getTileRows

      public int getTileRows(int no)
      Specified by:
      getTileRows in interface loci.formats.ICompressedTileReader
      Overrides:
      getTileRows in class loci.formats.FormatReader
    • getTileColumns

      public int getTileColumns(int no)
      Specified by:
      getTileColumns in interface loci.formats.ICompressedTileReader
      Overrides:
      getTileColumns in class loci.formats.FormatReader
    • getTileBoundingBox

      public loci.common.Region getTileBoundingBox(int no, int x, int y)
    • openCompressedBytes

      public byte[] openCompressedBytes(int no, int x, int y) throws loci.formats.FormatException, IOException
      Throws:
      loci.formats.FormatException
      IOException
    • openCompressedBytes

      public byte[] openCompressedBytes(int no, byte[] buf, int x, int y) throws loci.formats.FormatException, IOException
      Throws:
      loci.formats.FormatException
      IOException
    • getTileCodec

      public loci.formats.codec.Codec getTileCodec(int no) throws loci.formats.FormatException, IOException
      Throws:
      loci.formats.FormatException
      IOException
    • getTileCodecOptions

      public loci.formats.codec.CodecOptions getTileCodecOptions(int no, int x, int y) throws loci.formats.FormatException, IOException
      Throws:
      loci.formats.FormatException
      IOException
    • getAvailableOptions

      protected ArrayList<String> getAvailableOptions()
      Overrides:
      getAvailableOptions in class loci.formats.FormatReader
    • isSingleFile

      public boolean isSingleFile(String id) throws loci.formats.FormatException, IOException
      Specified by:
      isSingleFile in interface loci.formats.IFormatReader
      Overrides:
      isSingleFile in class loci.formats.FormatReader
      Throws:
      loci.formats.FormatException
      IOException
    • isThisType

      public boolean isThisType(String name, boolean open)
      Specified by:
      isThisType in interface loci.formats.IFormatReader
      Overrides:
      isThisType in class loci.formats.FormatReader
    • isThisType

      public boolean isThisType(loci.common.RandomAccessInputStream stream) throws IOException
      Specified by:
      isThisType in interface loci.formats.IFormatReader
      Overrides:
      isThisType in class loci.formats.FormatReader
      Throws:
      IOException
    • getDomains

      public String[] getDomains()
      Specified by:
      getDomains in interface loci.formats.IFormatReader
      Overrides:
      getDomains in class loci.formats.FormatReader
    • setSeries

      public void setSeries(int series)
      Specified by:
      setSeries in interface loci.formats.IFormatReader
      Overrides:
      setSeries in class loci.formats.SubResolutionFormatReader
    • get8BitLookupTable

      public byte[][] get8BitLookupTable() throws loci.formats.FormatException, IOException
      Specified by:
      get8BitLookupTable in interface loci.formats.IFormatReader
      Overrides:
      get8BitLookupTable in class loci.formats.FormatReader
      Throws:
      loci.formats.FormatException
      IOException
    • get16BitLookupTable

      public short[][] get16BitLookupTable() throws loci.formats.FormatException, IOException
      Specified by:
      get16BitLookupTable in interface loci.formats.IFormatReader
      Overrides:
      get16BitLookupTable in class loci.formats.FormatReader
      Throws:
      loci.formats.FormatException
      IOException
    • reopenFile

      public void reopenFile() throws IOException
      Specified by:
      reopenFile in interface loci.formats.IFormatReader
      Overrides:
      reopenFile in class loci.formats.FormatReader
      Throws:
      IOException
    • openBytes

      public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws loci.formats.FormatException, IOException
      Specified by:
      openBytes in interface loci.formats.IFormatReader
      Specified by:
      openBytes in class loci.formats.FormatReader
      Throws:
      loci.formats.FormatException
      IOException
    • getSeriesUsedFiles

      public String[] getSeriesUsedFiles(boolean noPixels)
      Specified by:
      getSeriesUsedFiles in interface loci.formats.IFormatReader
      Overrides:
      getSeriesUsedFiles in class loci.formats.FormatReader
    • fileGroupOption

      public int fileGroupOption(String id)
      Specified by:
      fileGroupOption in interface loci.formats.IFormatReader
      Overrides:
      fileGroupOption in class loci.formats.FormatReader
    • close

      public void close(boolean fileOnly) throws IOException
      Specified by:
      close in interface loci.formats.IFormatReader
      Overrides:
      close in class loci.formats.SubResolutionFormatReader
      Throws:
      IOException
    • getOptimalTileWidth

      public int getOptimalTileWidth()
      Specified by:
      getOptimalTileWidth in interface loci.formats.IFormatReader
      Overrides:
      getOptimalTileWidth in class loci.formats.FormatReader
    • getOptimalTileHeight

      public int getOptimalTileHeight()
      Specified by:
      getOptimalTileHeight in interface loci.formats.IFormatReader
      Overrides:
      getOptimalTileHeight in class loci.formats.FormatReader
    • getRequiredDirectories

      public int getRequiredDirectories(String[] files) throws loci.formats.FormatException, IOException
      Specified by:
      getRequiredDirectories in interface loci.formats.IFormatReader
      Overrides:
      getRequiredDirectories in class loci.formats.FormatReader
      Throws:
      loci.formats.FormatException
      IOException
    • initFile

      protected void initFile(String id) throws loci.formats.FormatException, IOException
      Overrides:
      initFile in class loci.formats.SubResolutionFormatReader
      Throws:
      loci.formats.FormatException
      IOException
    • getMetadataStoreForDisplay

      @Deprecated public loci.formats.meta.MetadataStore getMetadataStoreForDisplay()
      Deprecated.
      Use the general FormatReader.getMetadataStore() method.
      Get a MetadataStore suitable for display. Note: Historically, this method removed certain elements for display purposes and was not be suitable for use with FormatWriter due to not containing required BinData BigEndian attributes. This is no longer the case; the general FormatReader.getMetadataStore() method will always create valid metadata which is suitable for both display and use with FormatWriter, and so should be used instead.
      Returns:
      the metadata store.
    • getMetadataStoreForConversion

      @Deprecated public loci.formats.meta.MetadataStore getMetadataStoreForConversion()
      Deprecated.
      Use the general FormatReader.getMetadataStore() method.
      Get a MetadataStore suitable for writing. Note: Historically, this method created metadata suitable for use with FormatWriter, but would possibly not generate valid OME-XML if both BinData and TiffData elements were present. This is no longer the case; the general FormatReader.getMetadataStore() method will always create valid metadata which is suitable for use with FormatWriter, and so should be used instead.
      Returns:
      the metadata store.
    • convertMetadata

      protected void convertMetadata(loci.formats.ome.OMEXMLMetadata meta, loci.formats.meta.MetadataStore store)
      Convert metadata contained within an OMEXMLMetadata object to a separate MetadataStore. The OMEXMLMetadata object is expected to represent the original OME-XML stored in this OME-TIFF. The MetadataStore is expected to represent the output metadata; if the MetadataStore is of type OMEXMLMetadata, the output is expected to be valid OME-XML. By default, this simply copies everything from the source OMEXMLMetadata to the destination MetadataStore without modification. Classes that extend OMETiffReader may wish to override this method if the OME-XML stored in the OME-TIFF is expected to be invalid or incorrect.
      Parameters:
      meta - source representing stored OME-XML
      store - destination representing valid OME metadata
    • failOnMissingTIFF

      public boolean failOnMissingTIFF()