Class MinimalTiffReader

java.lang.Object
loci.formats.FormatHandler
loci.formats.FormatReader
loci.formats.SubResolutionFormatReader
loci.formats.in.MinimalTiffReader
All Implemented Interfaces:
Closeable, AutoCloseable, loci.formats.ICompressedTileReader, loci.formats.IFormatHandler, loci.formats.IFormatReader, loci.formats.IMetadataConfigurable, loci.formats.IPyramidHandler
Direct Known Subclasses:
BaseTiffReader

public class MinimalTiffReader extends loci.formats.SubResolutionFormatReader
MinimalTiffReader is the superclass for file format readers compatible with or derived from the TIFF 6.0 file format.
Author:
Melissa Linkert melissa at glencoesoftware.com
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
    Whether or not IFDs with different dimensions can be split into separate series.
    protected boolean
     
    protected IFDList
    List of IFDs for the current TIFF.
    protected int
     
    protected boolean
    Merge SubIFDs into the main IFD list.
    protected boolean
     
    protected boolean
     
    protected List<IFDList>
    List of sub-resolution IFDs for each IFD in the current TIFF with the same order as ifds.
    protected IFDList
    List of thumbnail IFDs for the current TIFF.
    protected TiffParser
     
    protected boolean
     

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

    Fields inherited from interface loci.formats.IFormatReader

    CAN_GROUP, CANNOT_GROUP, MUST_GROUP
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new MinimalTiffReader.
    Constructs a new MinimalTiffReader.
    MinimalTiffReader(String name, String[] suffixes)
    Constructs a new MinimalTiffReader.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    close(boolean fileOnly)
     
    protected byte[]
    copyTile(IFD ifd, byte[] buf, int x, int y)
     
    short[][]
     
    byte[][]
     
    protected long
    getCompressedByteCount(IFD ifd, int x, int y)
     
    Gets the list of IFDs associated with the current TIFF's image planes.
    int
     
    int
     
    Gets the list of IFDs associated with the current TIFF's thumbnails.
    int
     
    int
     
    protected int
    getTileIndex(IFD ifd, int x, int y)
    Get the index of the tile corresponding to given IFD (plane) and tile XY indexes.
    protected void
     
    protected void
    Reinitialize the underlying TiffParser.
    boolean
    isThisType(loci.common.RandomAccessInputStream stream)
     
    byte[]
    openBytes(int no, byte[] buf, int x, int y, int w, int h)
     
    byte[]
     
    void
     
    protected void
    Sets the resolution level when we have JPEG 2000 compressed data.

    Methods inherited from class loci.formats.SubResolutionFormatReader

    coreIndexToSeries, flattenHashtables, getCoreIndex, getCoreMetadataList, getCurrentCore, getResolution, getResolutionCount, getSeries, getSeriesCount, 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, close, fileGroupOption, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getAvailableOptions, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCorrection, 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, getRGBChannelCount, getRotationTransform, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, 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, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, 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.ICompressedTileReader

    getTileBoundingBox, getTileCodec, getTileCodecOptions, openCompressedBytes, openCompressedBytes

    Methods inherited from interface loci.formats.IFormatHandler

    getFormat, getNativeDataType, getSuffixes

    Methods inherited from interface loci.formats.IMetadataConfigurable

    getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions
  • Field Details

    • ifds

      protected IFDList ifds
      List of IFDs for the current TIFF.
    • thumbnailIFDs

      protected IFDList thumbnailIFDs
      List of thumbnail IFDs for the current TIFF.
    • subResolutionIFDs

      protected List<IFDList> subResolutionIFDs
      List of sub-resolution IFDs for each IFD in the current TIFF with the same order as ifds.
    • tiffParser

      protected transient TiffParser tiffParser
    • equalStrips

      protected boolean equalStrips
    • use64Bit

      protected boolean use64Bit
    • lastPlane

      protected int lastPlane
    • noSubresolutions

      protected boolean noSubresolutions
    • seriesToIFD

      protected boolean seriesToIFD
    • mergeSubIFDs

      protected transient boolean mergeSubIFDs
      Merge SubIFDs into the main IFD list.
    • canSeparateSeries

      protected transient boolean canSeparateSeries
      Whether or not IFDs with different dimensions can be split into separate series.
  • Constructor Details

    • MinimalTiffReader

      public MinimalTiffReader()
      Constructs a new MinimalTiffReader.
    • MinimalTiffReader

      public MinimalTiffReader(String name, String suffix)
      Constructs a new MinimalTiffReader.
    • MinimalTiffReader

      public MinimalTiffReader(String name, String[] suffixes)
      Constructs a new MinimalTiffReader.
  • Method Details

    • getIFDs

      public IFDList getIFDs()
      Gets the list of IFDs associated with the current TIFF's image planes.
    • getThumbnailIFDs

      public IFDList getThumbnailIFDs()
      Gets the list of IFDs associated with the current TIFF's thumbnails.
    • 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
    • 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
    • getThumbSizeX

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

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

      public byte[] openThumbBytes(int no) throws loci.formats.FormatException, IOException
      Specified by:
      openThumbBytes in interface loci.formats.IFormatReader
      Overrides:
      openThumbBytes in class loci.formats.FormatReader
      Throws:
      loci.formats.FormatException
      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
      See Also:
      • FormatReader.openBytes(int, byte[], int, int, int, int)
    • reopenFile

      public void reopenFile() throws IOException
      Specified by:
      reopenFile in interface loci.formats.IFormatReader
      Overrides:
      reopenFile in class loci.formats.FormatReader
      Throws:
      IOException
    • 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
    • initFile

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

      protected void setResolutionLevel(IFD ifd)
      Sets the resolution level when we have JPEG 2000 compressed data.
      Parameters:
      ifd - The active IFD that is being used in our current openBytes() calling context. It will be the sub-resolution IFD if currentSeries > 0.
    • initTiffParser

      protected void initTiffParser()
      Reinitialize the underlying TiffParser.
    • getTileIndex

      protected int getTileIndex(IFD ifd, int x, int y) throws loci.formats.FormatException
      Get the index of the tile corresponding to given IFD (plane) and tile XY indexes.
      Parameters:
      ifd - IFD for the requested tile's plane
      x - tile X index
      y - tile Y index
      Returns:
      corresponding tile index
      Throws:
      loci.formats.FormatException
    • getCompressedByteCount

      protected long getCompressedByteCount(IFD ifd, int x, int y) throws loci.formats.FormatException, IOException
      Throws:
      loci.formats.FormatException
      IOException
    • copyTile

      protected byte[] copyTile(IFD ifd, byte[] buf, int x, int y) throws loci.formats.FormatException, IOException
      Throws:
      loci.formats.FormatException
      IOException