Package loci.formats

Class ChannelSeparator

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

public class ChannelSeparator extends loci.formats.ReaderWrapper
Logic to automatically separate the 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 ChannelSeparator around a new image reader.
    ChannelSeparator(loci.formats.IFormatReader r)
    Constructs a ChannelSeparator with the given reader.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    close(boolean fileOnly)
     
     
    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
     
    makeChannelSeparator(loci.formats.IFormatReader r)
    Converts the given reader into a ChannelSeparator, 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)
     
    byte[]
     
    void
     

    Methods inherited from class loci.formats.ReaderWrapper

    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, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isSingleFile, isThisType, isThisType, isThisType, isThisType, isThumbnailSeries, openPlane, 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

    • ChannelSeparator

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

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

    • makeChannelSeparator

      public static ChannelSeparator makeChannelSeparator(loci.formats.IFormatReader r)
      Converts the given reader into a ChannelSeparator, wrapping if needed.
    • getOriginalIndex

      public int getOriginalIndex(int no)
      Returns the image number in the original dataset that corresponds to the given image number. For instance, if the original dataset was a single RGB image and the given image number is 2, the return value will be 0.
      Parameters:
      no - is an image number greater than or equal to 0 and less than getImageCount()
      Returns:
      the corresponding image number in the original (unseparated) data.
    • 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
    • isRGB

      public boolean isRGB()
      Specified by:
      isRGB in interface loci.formats.IFormatReader
      Overrides:
      isRGB 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
    • 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.ReaderWrapper
      Throws:
      loci.formats.FormatException
      IOException
    • close

      public void close(boolean fileOnly) throws IOException
      Specified by:
      close in interface loci.formats.IFormatReader
      Overrides:
      close in class loci.formats.ReaderWrapper
      Throws:
      IOException
    • 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
    • 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
    • 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