Package loci.formats

Class ChannelFiller

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

public class ChannelFiller extends loci.formats.ReaderWrapper
For indexed color data representing true color, factors out the indices, replacing them with the color table values directly. For all other data (either non-indexed, or indexed with "false color" tables), does nothing.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Boolean
    Whether to fill in the indices.
    protected int
    Number of LUT components.

    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 ChannelFiller around a new image reader.
    ChannelFiller(loci.formats.IFormatReader r)
    Constructs a ChannelFiller with a given reader.
  • Method Summary

    Modifier and Type
    Method
    Description
    short[][]
     
    byte[][]
     
    int
     
     
    int
     
    loci.formats.codec.Codec
    getTileCodec(int no)
     
    loci.formats.codec.CodecOptions
    getTileCodecOptions(int no, int x, int y)
     
    boolean
    Returns true if the indices are being factored out.
    boolean
     
    boolean
     
    makeChannelFiller(loci.formats.IFormatReader r)
    Converts the given reader into a ChannelFiller, 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
    setFilled(boolean filled)
    Toggles whether the indices should be factored out.
    void
     

    Methods inherited from class loci.formats.ReaderWrapper

    close, close, coreIndexToSeries, duplicate, fileGroupOption, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getCoreIndex, getCoreMetadataList, getCurrentFile, getDatasetStructureDescription, getDimensionOrder, getDomains, getEffectiveSizeC, getFillColor, getFormat, getGlobalMetadata, getImageCount, getIndex, getIndex, getMetadataOptions, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getModuloC, getModuloT, getModuloZ, getOptimalTileHeight, getOptimalTileWidth, getPixelType, getPossibleDomains, getReader, getRequiredDirectories, getResolution, getResolutionCount, getRGBChannelCount, getSeries, getSeriesCount, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSeriesUsedFiles, getSizeT, getSizeX, getSizeY, getSizeZ, getSuffixes, getSupportedMetadataLevels, getThumbSizeX, getThumbSizeY, getTileBoundingBox, getTileColumns, getTileRows, getUnderlyingReaders, getUsedFiles, getUsedFiles, getZCTCoords, getZCTModuloCoords, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isInterleaved, 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
  • Field Details

    • filled

      protected Boolean filled
      Whether to fill in the indices. By default, indices are filled iff data not false color.
    • lutLength

      protected int lutLength
      Number of LUT components.
  • Constructor Details

    • ChannelFiller

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

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

    • makeChannelFiller

      public static ChannelFiller makeChannelFiller(loci.formats.IFormatReader r)
      Converts the given reader into a ChannelFiller, wrapping if needed.
    • isFilled

      public boolean isFilled()
      Returns true if the indices are being factored out.
    • setFilled

      public void setFilled(boolean filled)
      Toggles whether the indices should be factored out.
    • getSizeC

      public int getSizeC()
      Specified by:
      getSizeC in interface loci.formats.IFormatReader
      Overrides:
      getSizeC 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
    • getBitsPerPixel

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

      public byte[][] get8BitLookupTable() throws loci.formats.FormatException, IOException
      Specified by:
      get8BitLookupTable in interface loci.formats.IFormatReader
      Overrides:
      get8BitLookupTable in class loci.formats.ReaderWrapper
      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.ReaderWrapper
      Throws:
      loci.formats.FormatException
      IOException
    • 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
    • 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