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
Logic to automatically separate the channels in a file.
-
Field Summary
Fields inherited from class loci.formats.ReaderWrapper
readerFields inherited from interface loci.formats.IFormatReader
CAN_GROUP, CANNOT_GROUP, MUST_GROUP -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a ChannelSeparator around a new image reader.Constructs a ChannelSeparator with the given reader. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(boolean fileOnly) intintgetIndex(int z, int c, int t) intgetIndex(int z, int c, int t, int moduloZ, int moduloC, int moduloT) Class<?> intgetOriginalIndex(int no) Returns the image number in the original dataset that corresponds to the given image number.getTileCodec(int no) getTileCodecOptions(int no, int x, int y) int[]getZCTCoords(int index) int[]getZCTModuloCoords(int index) booleanisRGB()static ChannelSeparatorConverts 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[]openThumbBytes(int no) voidMethods 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, 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
-
Constructor Details
-
ChannelSeparator
public ChannelSeparator()Constructs a ChannelSeparator around a new image reader. -
ChannelSeparator
Constructs a ChannelSeparator with the given reader.
-
-
Method Details
-
makeChannelSeparator
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:
getImageCountin interfaceloci.formats.IFormatReader- Overrides:
getImageCountin classloci.formats.ReaderWrapper
-
getDimensionOrder
- Specified by:
getDimensionOrderin interfaceloci.formats.IFormatReader- Overrides:
getDimensionOrderin classloci.formats.ReaderWrapper
-
isRGB
public boolean isRGB()- Specified by:
isRGBin interfaceloci.formats.IFormatReader- Overrides:
isRGBin classloci.formats.ReaderWrapper
-
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
-
openThumbBytes
- Specified by:
openThumbBytesin interfaceloci.formats.IFormatReader- Overrides:
openThumbBytesin classloci.formats.ReaderWrapper- Throws:
loci.formats.FormatExceptionIOException
-
close
- Specified by:
closein interfaceloci.formats.IFormatReader- Overrides:
closein classloci.formats.ReaderWrapper- Throws:
IOException
-
getIndex
public int getIndex(int z, int c, int t) - Specified by:
getIndexin interfaceloci.formats.IFormatReader- Overrides:
getIndexin classloci.formats.ReaderWrapper
-
getIndex
public int getIndex(int z, int c, int t, int moduloZ, int moduloC, int moduloT) - Specified by:
getIndexin interfaceloci.formats.IFormatReader- Overrides:
getIndexin classloci.formats.ReaderWrapper
-
getZCTCoords
public int[] getZCTCoords(int index) - Specified by:
getZCTCoordsin interfaceloci.formats.IFormatReader- Overrides:
getZCTCoordsin classloci.formats.ReaderWrapper
-
getZCTModuloCoords
public int[] getZCTModuloCoords(int index) - Specified by:
getZCTModuloCoordsin interfaceloci.formats.IFormatReader- Overrides:
getZCTModuloCoordsin classloci.formats.ReaderWrapper
-
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
-