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
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
FieldsModifier and TypeFieldDescriptionprotected BooleanWhether to fill in the indices.protected intNumber of LUT components.Fields inherited from class loci.formats.ReaderWrapper
readerFields inherited from interface loci.formats.IFormatReader
CAN_GROUP, CANNOT_GROUP, MUST_GROUP -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a ChannelFiller around a new image reader.Constructs a ChannelFiller with a given reader. -
Method Summary
Modifier and TypeMethodDescriptionshort[][]byte[][]intClass<?> intgetSizeC()getTileCodec(int no) getTileCodecOptions(int no, int x, int y) booleanisFilled()Returns true if the indices are being factored out.booleanbooleanisRGB()static ChannelFillerConverts 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) voidsetFilled(boolean filled) Toggles whether the indices should be factored out.voidMethods 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, 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
-
Field Details
-
filled
Whether to fill in the indices. By default, indices are filled iff data not false color. -
lutLength
protected int lutLengthNumber of LUT components.
-
-
Constructor Details
-
ChannelFiller
public ChannelFiller()Constructs a ChannelFiller around a new image reader. -
ChannelFiller
Constructs a ChannelFiller with a given reader.
-
-
Method Details
-
makeChannelFiller
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:
getSizeCin interfaceloci.formats.IFormatReader- Overrides:
getSizeCin classloci.formats.ReaderWrapper
-
isRGB
public boolean isRGB()- Specified by:
isRGBin interfaceloci.formats.IFormatReader- Overrides:
isRGBin classloci.formats.ReaderWrapper
-
isIndexed
public boolean isIndexed()- Specified by:
isIndexedin interfaceloci.formats.IFormatReader- Overrides:
isIndexedin classloci.formats.ReaderWrapper
-
getBitsPerPixel
public int getBitsPerPixel()- Specified by:
getBitsPerPixelin interfaceloci.formats.IFormatReader- Overrides:
getBitsPerPixelin classloci.formats.ReaderWrapper
-
get8BitLookupTable
- Specified by:
get8BitLookupTablein interfaceloci.formats.IFormatReader- Overrides:
get8BitLookupTablein classloci.formats.ReaderWrapper- Throws:
loci.formats.FormatExceptionIOException
-
get16BitLookupTable
- Specified by:
get16BitLookupTablein interfaceloci.formats.IFormatReader- Overrides:
get16BitLookupTablein classloci.formats.ReaderWrapper- Throws:
loci.formats.FormatExceptionIOException
-
openBytes
- Specified by:
openBytesin interfaceloci.formats.IFormatReader- Overrides:
openBytesin classloci.formats.ReaderWrapper- Throws:
loci.formats.FormatExceptionIOException
-
openBytes
- Specified by:
openBytesin interfaceloci.formats.IFormatReader- Overrides:
openBytesin classloci.formats.ReaderWrapper- Throws:
loci.formats.FormatExceptionIOException
-
openBytes
public byte[] openBytes(int no, int x, int y, int w, int h) throws loci.formats.FormatException, IOException - Specified by:
openBytesin interfaceloci.formats.IFormatReader- Overrides:
openBytesin classloci.formats.ReaderWrapper- Throws:
loci.formats.FormatExceptionIOException
-
openBytes
public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws loci.formats.FormatException, IOException - Specified by:
openBytesin interfaceloci.formats.IFormatReader- Overrides:
openBytesin classloci.formats.ReaderWrapper- Throws:
loci.formats.FormatExceptionIOException
-
openCompressedBytes
public byte[] openCompressedBytes(int no, int x, int y) throws loci.formats.FormatException, IOException - Specified by:
openCompressedBytesin interfaceloci.formats.ICompressedTileReader- Overrides:
openCompressedBytesin classloci.formats.ReaderWrapper- Throws:
loci.formats.FormatExceptionIOException
-
openCompressedBytes
public byte[] openCompressedBytes(int no, byte[] buf, int x, int y) throws loci.formats.FormatException, IOException - Specified by:
openCompressedBytesin interfaceloci.formats.ICompressedTileReader- Overrides:
openCompressedBytesin classloci.formats.ReaderWrapper- Throws:
loci.formats.FormatExceptionIOException
-
getTileCodec
public loci.formats.codec.Codec getTileCodec(int no) throws loci.formats.FormatException, IOException - Specified by:
getTileCodecin interfaceloci.formats.ICompressedTileReader- Overrides:
getTileCodecin classloci.formats.ReaderWrapper- Throws:
loci.formats.FormatExceptionIOException
-
getTileCodecOptions
public loci.formats.codec.CodecOptions getTileCodecOptions(int no, int x, int y) throws loci.formats.FormatException, IOException - Specified by:
getTileCodecOptionsin interfaceloci.formats.ICompressedTileReader- Overrides:
getTileCodecOptionsin classloci.formats.ReaderWrapper- Throws:
loci.formats.FormatExceptionIOException
-
getNativeDataType
- Specified by:
getNativeDataTypein interfaceloci.formats.IFormatHandler- Overrides:
getNativeDataTypein classloci.formats.ReaderWrapper
-
setId
- Specified by:
setIdin interfaceloci.formats.IFormatHandler- Overrides:
setIdin classloci.formats.ReaderWrapper- Throws:
loci.formats.FormatExceptionIOException
-