loci.formats
Class ChannelSeparator

java.lang.Object
  extended by loci.formats.ReaderWrapper
      extended by loci.formats.ChannelSeparator
All Implemented Interfaces:
IFormatHandler, IFormatReader, StatusReporter

public class ChannelSeparator
extends ReaderWrapper

Logic to automatically separate the channels in a file.

Source code:
Trac, SVN


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
ChannelSeparator()
          Constructs a ChannelSeparator around a new image reader.
ChannelSeparator(IFormatReader r)
          Constructs a ChannelSeparator with the given reader.
 
Method Summary
 void close()
          Closes currently open file(s) and frees allocated memory.
 String getDimensionOrder()
          Gets a five-character string representing the dimension order within the file.
 int getImageCount()
          Determines the number of images in the current file.
 int getIndex(int z, int c, int t)
          Gets the rasterized index corresponding to the given Z, C and T coordinates.
 int[] getZCTCoords(int index)
          Gets the Z, C and T coordinates corresponding to the given rasterized index value.
 boolean isRGB()
          Checks if the images in the file are RGB.
 byte[] openBytes(int no)
          Obtains the specified image from the current file as a byte array.
 BufferedImage openImage(int no)
          Obtains the specified image from the current file.
 BufferedImage openThumbImage(int no)
          Obtains a thumbnail for the specified image from the current file.
 void setId(String id)
          Sets the current file name.
 void setId(String id, boolean force)
          Sets the current file name.
 
Methods inherited from class loci.formats.ReaderWrapper
addStatusListener, close, fileGroupOption, get16BitLookupTable, get8BitLookupTable, getChannelDimLengths, getChannelDimLengths, getChannelDimTypes, getChannelDimTypes, getCoreMetadata, getCoreMetadata, getCurrentFile, getDimensionOrder, getEffectiveSizeC, getEffectiveSizeC, getFormat, getImageCount, getIndex, getMetadata, getMetadata, getMetadataStore, getMetadataStore, getMetadataStoreRoot, getMetadataStoreRoot, getMetadataValue, getMetadataValue, getPixelType, getPixelType, getReader, getRGBChannelCount, getRGBChannelCount, getSeries, getSeries, getSeriesCount, getSeriesCount, getSizeC, getSizeC, getSizeT, getSizeT, getSizeX, getSizeX, getSizeY, getSizeY, getSizeZ, getSizeZ, getStatusListeners, getSuffixes, getThumbSizeX, getThumbSizeX, getThumbSizeY, getThumbSizeY, getUsedFiles, getUsedFiles, getZCTCoords, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isInterleaved, isInterleaved, isLittleEndian, isLittleEndian, isMetadataCollected, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOrderCertain, isOriginalMetadataPopulated, isRGB, isThisType, isThisType, isThisType, openBytes, openBytes, openBytes, openImage, openThumbBytes, openThumbBytes, openThumbImage, removeStatusListener, setGroupFiles, setMetadataCollected, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setSeries, setSeries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelSeparator

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


ChannelSeparator

public ChannelSeparator(IFormatReader r)
Constructs a ChannelSeparator with the given reader.

Method Detail

setId

public void setId(String id)
           throws FormatException,
                  IOException
Description copied from interface: IFormatHandler
Sets the current file name.

Specified by:
setId in interface IFormatHandler
Overrides:
setId in class ReaderWrapper
Throws:
FormatException
IOException

setId

public void setId(String id,
                  boolean force)
           throws FormatException,
                  IOException
Description copied from interface: IFormatHandler
Sets the current file name.

Specified by:
setId in interface IFormatHandler
Overrides:
setId in class ReaderWrapper
force - If set, the handler will be re-initialized no matter what.
Throws:
FormatException
IOException

getImageCount

public int getImageCount()
Description copied from interface: IFormatReader
Determines the number of images in the current file.

Specified by:
getImageCount in interface IFormatReader
Overrides:
getImageCount in class ReaderWrapper

getDimensionOrder

public String getDimensionOrder()
Description copied from interface: IFormatReader
Gets a five-character string representing the dimension order within the file. Valid orders are: In cases where the channels are interleaved (e.g., CXYTZ), C will be the first dimension after X and Y (e.g., XYCTZ) and the IFormatReader.isInterleaved(String) method will return true.

Specified by:
getDimensionOrder in interface IFormatReader
Overrides:
getDimensionOrder in class ReaderWrapper

isRGB

public boolean isRGB()
Description copied from interface: IFormatReader
Checks if the images in the file are RGB.

Specified by:
isRGB in interface IFormatReader
Overrides:
isRGB in class ReaderWrapper

openImage

public BufferedImage openImage(int no)
                        throws FormatException,
                               IOException
Description copied from interface: IFormatReader
Obtains the specified image from the current file.

Specified by:
openImage in interface IFormatReader
Overrides:
openImage in class ReaderWrapper
Throws:
FormatException
IOException

openBytes

public byte[] openBytes(int no)
                 throws FormatException,
                        IOException
Description copied from interface: IFormatReader
Obtains the specified image from the current file as a byte array.

Specified by:
openBytes in interface IFormatReader
Overrides:
openBytes in class ReaderWrapper
Throws:
FormatException
IOException

openThumbImage

public BufferedImage openThumbImage(int no)
                             throws FormatException,
                                    IOException
Description copied from interface: IFormatReader
Obtains a thumbnail for the specified image from the current file.

Specified by:
openThumbImage in interface IFormatReader
Overrides:
openThumbImage in class ReaderWrapper
Throws:
FormatException
IOException

close

public void close()
           throws IOException
Description copied from interface: IFormatHandler
Closes currently open file(s) and frees allocated memory.

Specified by:
close in interface IFormatHandler
Overrides:
close in class ReaderWrapper
Throws:
IOException

getIndex

public int getIndex(int z,
                    int c,
                    int t)
Description copied from interface: IFormatReader
Gets the rasterized index corresponding to the given Z, C and T coordinates.

Specified by:
getIndex in interface IFormatReader
Overrides:
getIndex in class ReaderWrapper

getZCTCoords

public int[] getZCTCoords(int index)
Description copied from interface: IFormatReader
Gets the Z, C and T coordinates corresponding to the given rasterized index value.

Specified by:
getZCTCoords in interface IFormatReader
Overrides:
getZCTCoords in class ReaderWrapper