Package loci.formats

Class ChannelMerger

java.lang.Object
loci.formats.ReaderWrapper
loci.formats.ChannelMerger
All Implemented Interfaces:
Closeable, AutoCloseable, loci.formats.ICompressedTileReader, loci.formats.IFormatHandler, loci.formats.IFormatReader, loci.formats.IMetadataConfigurable, loci.formats.IPyramidHandler

public class ChannelMerger extends loci.formats.ReaderWrapper
Logic to automatically merge channels in a file.
  • Field Summary

    Fields inherited from class loci.formats.ReaderWrapper

    reader

    Fields inherited from interface loci.formats.IFormatReader

    CAN_GROUP, CANNOT_GROUP, MUST_GROUP
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a ChannelMerger around a new image reader.
    ChannelMerger(loci.formats.IFormatReader r)
    Constructs a ChannelMerger with the given reader.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determines whether the channels in the file can be merged.
     
    int
     
    int
    getIndex(int z, int c, int t)
     
    int
    getIndex(int z, int c, int t, int moduloZ, int moduloC, int moduloT)
     
     
    int
    Returns the image number in the original dataset that corresponds to the given image number.
    loci.formats.codec.Codec
    getTileCodec(int no)
     
    loci.formats.codec.CodecOptions
    getTileCodecOptions(int no, int x, int y)
     
    int[]
    getZCTCoords(int index)
     
    int[]
    getZCTModuloCoords(int index)
     
    boolean
     
    boolean
     
    boolean
     
    makeChannelMerger(loci.formats.IFormatReader r)
    Converts the given reader into a ChannelMerger, wrapping if needed.
    byte[]
    openBytes(int no)
     
    byte[]
    openBytes(int no, byte[] buf)
     
    byte[]
    openBytes(int no, byte[] buf, int x, int y, int w, int h)
     
    byte[]
    openBytes(int no, 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
     

    Methods inherited from class loci.formats.ReaderWrapper

    close, close, coreIndexToSeries, duplicate, fileGroupOption, get16BitLookupTable, get8BitLookupTable, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getBitsPerPixel, getCoreIndex, getCoreMetadataList, getCurrentFile, getDatasetStructureDescription, getDomains, getEffectiveSizeC, getFillColor, getFormat, getGlobalMetadata, getMetadataOptions, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getModuloC, getModuloT, getModuloZ, getOptimalTileHeight, getOptimalTileWidth, getPixelType, getPossibleDomains, getReader, getRequiredDirectories, getResolution, getResolutionCount, getRGBChannelCount, getSeries, getSeriesCount, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getSuffixes, getSupportedMetadataLevels, getThumbSizeX, getThumbSizeY, getTileBoundingBox, getTileColumns, getTileRows, getUnderlyingReaders, getUsedFiles, getUsedFiles, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isSingleFile, isThisType, isThisType, isThisType, isThisType, isThumbnailSeries, openPlane, openThumbBytes, reopenFile, seriesToCoreIndex, setCoreIndex, setFillColor, setFlattenedResolutions, setGroupFiles, setMetadataFiltered, setMetadataOptions, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries, unwrap, unwrap, unwrap

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ChannelMerger

      public ChannelMerger()
      Constructs a ChannelMerger around a new image reader.
    • ChannelMerger

      public ChannelMerger(loci.formats.IFormatReader r)
      Constructs a ChannelMerger with the given reader.
  • Method Details

    • makeChannelMerger

      public static ChannelMerger makeChannelMerger(loci.formats.IFormatReader r)
      Converts the given reader into a ChannelMerger, wrapping if needed.
    • canMerge

      public boolean canMerge()
      Determines whether the channels in the file can be merged.
    • getOriginalIndex

      public int getOriginalIndex(int no) throws loci.formats.FormatException, IOException
      Returns the image number in the original dataset that corresponds to the given image number.
      Parameters:
      no - is an image number greater than or equal to 0 and less than getImageCount()
      Returns:
      the corresponding image number in the original (unmerged) data.
      Throws:
      loci.formats.FormatException
      IOException
    • getImageCount

      public int getImageCount()
      Specified by:
      getImageCount in interface loci.formats.IFormatReader
      Overrides:
      getImageCount in class loci.formats.ReaderWrapper
    • getDimensionOrder

      public String getDimensionOrder()
      Specified by:
      getDimensionOrder in interface loci.formats.IFormatReader
      Overrides:
      getDimensionOrder in class loci.formats.ReaderWrapper
    • isInterleaved

      public boolean isInterleaved()
      Specified by:
      isInterleaved in interface loci.formats.IFormatReader
      Overrides:
      isInterleaved in class loci.formats.ReaderWrapper
    • isRGB

      public boolean isRGB()
      Specified by:
      isRGB in interface loci.formats.IFormatReader
      Overrides:
      isRGB in class loci.formats.ReaderWrapper
    • isIndexed

      public boolean isIndexed()
      Specified by:
      isIndexed in interface loci.formats.IFormatReader
      Overrides:
      isIndexed in class loci.formats.ReaderWrapper
    • openBytes

      public byte[] openBytes(int no) throws loci.formats.FormatException, IOException
      Specified by:
      openBytes in interface loci.formats.IFormatReader
      Overrides:
      openBytes in class loci.formats.ReaderWrapper
      Throws:
      loci.formats.FormatException
      IOException
    • openBytes

      public byte[] openBytes(int no, byte[] buf) throws loci.formats.FormatException, IOException
      Specified by:
      openBytes in interface loci.formats.IFormatReader
      Overrides:
      openBytes in class loci.formats.ReaderWrapper
      Throws:
      loci.formats.FormatException
      IOException
    • openBytes

      public byte[] openBytes(int no, int x, int y, int w, int h) throws loci.formats.FormatException, IOException
      Specified by:
      openBytes in interface loci.formats.IFormatReader
      Overrides:
      openBytes in class loci.formats.ReaderWrapper
      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
      Overrides:
      openBytes in class loci.formats.ReaderWrapper
      Throws:
      loci.formats.FormatException
      IOException
    • getIndex

      public int getIndex(int z, int c, int t, int moduloZ, int moduloC, int moduloT)
      Specified by:
      getIndex in interface loci.formats.IFormatReader
      Overrides:
      getIndex in class loci.formats.ReaderWrapper
    • getIndex

      public int getIndex(int z, int c, int t)
      Specified by:
      getIndex in interface loci.formats.IFormatReader
      Overrides:
      getIndex in class loci.formats.ReaderWrapper
    • getZCTCoords

      public int[] getZCTCoords(int index)
      Specified by:
      getZCTCoords in interface loci.formats.IFormatReader
      Overrides:
      getZCTCoords in class loci.formats.ReaderWrapper
    • getZCTModuloCoords

      public int[] getZCTModuloCoords(int index)
      Specified by:
      getZCTModuloCoords in interface loci.formats.IFormatReader
      Overrides:
      getZCTModuloCoords in class loci.formats.ReaderWrapper
    • openCompressedBytes

      public byte[] openCompressedBytes(int no, int x, int y) throws loci.formats.FormatException, IOException
      Specified by:
      openCompressedBytes in interface loci.formats.ICompressedTileReader
      Overrides:
      openCompressedBytes in class loci.formats.ReaderWrapper
      Throws:
      loci.formats.FormatException
      IOException
    • openCompressedBytes

      public byte[] openCompressedBytes(int no, byte[] buf, int x, int y) throws loci.formats.FormatException, IOException
      Specified by:
      openCompressedBytes in interface loci.formats.ICompressedTileReader
      Overrides:
      openCompressedBytes in class loci.formats.ReaderWrapper
      Throws:
      loci.formats.FormatException
      IOException
    • getTileCodec

      public loci.formats.codec.Codec getTileCodec(int no) throws loci.formats.FormatException, IOException
      Specified by:
      getTileCodec in interface loci.formats.ICompressedTileReader
      Overrides:
      getTileCodec in class loci.formats.ReaderWrapper
      Throws:
      loci.formats.FormatException
      IOException
    • getTileCodecOptions

      public loci.formats.codec.CodecOptions getTileCodecOptions(int no, int x, int y) throws loci.formats.FormatException, IOException
      Specified by:
      getTileCodecOptions in interface loci.formats.ICompressedTileReader
      Overrides:
      getTileCodecOptions in class loci.formats.ReaderWrapper
      Throws:
      loci.formats.FormatException
      IOException
    • getNativeDataType

      public Class<?> getNativeDataType()
      Specified by:
      getNativeDataType in interface loci.formats.IFormatHandler
      Overrides:
      getNativeDataType in class loci.formats.ReaderWrapper
    • setId

      public void setId(String id) throws loci.formats.FormatException, IOException
      Specified by:
      setId in interface loci.formats.IFormatHandler
      Overrides:
      setId in class loci.formats.ReaderWrapper
      Throws:
      loci.formats.FormatException
      IOException