loci.formats
Class FormatReader

java.lang.Object
  extended by loci.formats.FormatHandler
      extended by loci.formats.FormatReader
All Implemented Interfaces:
IFormatHandler, IFormatReader, StatusReporter
Direct Known Subclasses:
AliconaReader, AVIReader, BaseTiffReader, BioRadReader, BMPReader, DeltavisionReader, DicomReader, EPSReader, FitsReader, GatanReader, GIFReader, ICSReader, ImageIOReader, ImarisReader, IPLabReader, KhorosReader, LegacyPictReader, LegacyQTReader, LegacyZVIReader, LeicaReader, LIFReader, LIMReader, MicromanagerReader, MNGReader, MRCReader, ND2Reader, NRRDReader, OIBReader, OIFReader, OMEXMLReader, OpenlabRawReader, OpenlabReader, PCIReader, PerkinElmerReader, PGMReader, PictReader, PrairieReader, PSDReader, QTReader, SDTReader, SlidebookReader, VisitechReader, ZeissZVIReader

public abstract class FormatReader
extends FormatHandler
implements IFormatReader

Abstract superclass of all biological file format readers.

Source code:
Trac, SVN


Field Summary
protected  boolean collectMetadata
          Whether or not to collect metadata.
protected  CoreMetadata core
          Core metadata values.
protected  boolean filterMetadata
          Whether or not to filter out invalid metadata.
protected  boolean group
          Whether or not to group multi-file formats.
protected  RandomAccessStream in
          Current file.
protected  Hashtable metadata
          Hashtable containing metadata key/value pairs.
protected  MetadataStore metadataStore
          Current metadata store.
protected  boolean normalizeData
          Whether or not to normalize float data.
protected  boolean saveOriginalMetadata
          Whether or not to save proprietary metadata in the MetadataStore.
protected  int series
          The number of the current series.
protected static int THUMBNAIL_DIMENSION
          Default thumbnail width and height.
 
Fields inherited from class loci.formats.FormatHandler
currentId, debug, debugLevel, format, statusListeners, suffixes
 
Fields inherited from interface loci.formats.IFormatReader
CAN_GROUP, CANNOT_GROUP, MUST_GROUP
 
Constructor Summary
FormatReader(String format, String suffix)
          Constructs a format reader with the given name and default suffix.
FormatReader(String format, String[] suffixes)
          Constructs a format reader with the given name and default suffixes.
 
Method Summary
protected  void addMeta(String key, Object value)
          Adds an entry to the metadata table.
protected  boolean checkBytes(String name, int maxLen)
          Opens the given file, reads in the first few KB and calls isThisType(byte[]) to check whether it matches this format.
 void close()
          Closes currently open file(s) and frees allocated memory.
 void close(boolean fileOnly)
          Closes the currently open file.
 int fileGroupOption(String id)
          Returns an int indicating that we cannot, must, or might group the files in a given dataset.
 short[][] get16BitLookupTable()
          Gets the 16-bit color lookup table associated with the most recently opened image.
 byte[][] get8BitLookupTable()
          Gets the 8-bit color lookup table associated with the most recently opened image.
 int[] getChannelDimLengths()
          Gets the lengths of each subdimension of C, in fastest-to-sloweset rasterization order.
 int[] getChannelDimLengths(String id)
          Deprecated. Replaced by getChannelDimLengths()
 String[] getChannelDimTypes()
          Gets the name of each subdimension of C, in fastest-to-slowest rasterization order.
 String[] getChannelDimTypes(String id)
          Deprecated. Replaced by getChannelDimTypes()
 CoreMetadata getCoreMetadata()
          Obtains the core metadata values for the current file.
 CoreMetadata getCoreMetadata(String id)
          Deprecated. Replaced by getCoreMetadata()
 String getCurrentFile()
          Returns the current file.
 String getDimensionOrder()
          Gets a five-character string representing the dimension order within the file.
 String getDimensionOrder(String id)
          Deprecated. Replaced by getDimensionOrder()
 int getEffectiveSizeC()
          Gets the effective size of the C dimension, guaranteeing that getEffectiveSizeC() * getSizeZ() * getSizeT() == getImageCount() regardless of the result of isRGB().
 int getEffectiveSizeC(String id)
          Deprecated. Replaced by getEffectiveSizeC()
 int getImageCount()
          Determines the number of images in the current file.
 int getImageCount(String id)
          Deprecated. Replaced by getImageCount()
 int getIndex(int z, int c, int t)
          Gets the rasterized index corresponding to the given Z, C and T coordinates.
 int getIndex(String id, int z, int c, int t)
          Deprecated. Replaced by getIndex(int, int, int)
protected  Object getMeta(String key)
          Gets a value from the metadata table.
 Hashtable getMetadata()
          Obtains the hashtable containing the metadata field/value pairs from the current file.
 Hashtable getMetadata(String id)
          Deprecated. Replaced by getMetadata()
 MetadataStore getMetadataStore()
          Retrieves the current metadata store for this reader.
 MetadataStore getMetadataStore(String id)
          Deprecated. Replaced by getMetadataStore()
 Object getMetadataStoreRoot()
          Retrieves the current metadata store's root object.
 Object getMetadataStoreRoot(String id)
          Deprecated. Replaced by getMetadataStoreRoot()
 Object getMetadataValue(String field)
          Obtains the specified metadata field's value for the current file.
 Object getMetadataValue(String id, String field)
          Deprecated. Replaced by getMetadataValue(String)
 int getPixelType()
          Gets the pixel type.
 int getPixelType(String id)
          Deprecated. Replaced by getPixelType()
 int getRGBChannelCount()
          Gets the number of channels per RGB image (if not RGB, this returns 1).
 int getRGBChannelCount(String id)
          Deprecated. Replaced by getRGBChannelCount()
 int getSeries()
          Gets the currently active series.
 int getSeries(String id)
          Deprecated. Replaced by getSeries()
 int getSeriesCount()
          Gets the number of series in this file.
 int getSeriesCount(String id)
          Deprecated. Replaced by getSeriesCount()
 int getSizeC()
          Gets the size of the C dimension.
 int getSizeC(String id)
          Deprecated. Replaced by getSizeC()
 int getSizeT()
          Gets the size of the T dimension.
 int getSizeT(String id)
          Deprecated. Replaced by getSizeT()
 int getSizeX()
          Gets the size of the X dimension.
 int getSizeX(String id)
          Deprecated. Replaced by getSizeX()
 int getSizeY()
          Gets the size of the Y dimension.
 int getSizeY(String id)
          Deprecated. Replaced by getSizeY()
 int getSizeZ()
          Gets the size of the Z dimension.
 int getSizeZ(String id)
          Deprecated. Replaced by getSizeZ()
 int getThumbSizeX()
          Get the size of the X dimension for the thumbnail.
 int getThumbSizeX(String id)
          Deprecated. Replaced by getThumbSizeX()
 int getThumbSizeY()
          Get the size of the Y dimension for the thumbnail.
 int getThumbSizeY(String id)
          Deprecated. Replaced by getThumbSizeY()
 String[] getUsedFiles()
          Returns an array of filenames needed to open this dataset.
 String[] getUsedFiles(String id)
          Deprecated. Replaced by getUsedFiles()
 int[] getZCTCoords(int index)
          Gets the Z, C and T coordinates corresponding to the given rasterized index value.
 int[] getZCTCoords(String id, int index)
          Deprecated. Replaced by getZCTCoords(int)
protected  void initFile(String id)
          Initializes the given file (parsing header information, etc.).
 boolean isFalseColor()
          Returns false if isIndexed is false, or if isIndexed is true and the lookup table represents "real" color data.
 boolean isGroupFiles()
          Returns true if we should group files in multi-file formats.
 boolean isIndexed()
          Gets whether the images are indexed color.
 boolean isInterleaved()
          Gets whether or not the channels are interleaved.
 boolean isInterleaved(int subC)
          Gets whether or not the given sub-channel is interleaved.
 boolean isInterleaved(String id)
          Deprecated. Replaced by isInterleaved()
 boolean isInterleaved(String id, int subC)
          Deprecated. Replaced by isInterleaved(int)
 boolean isLittleEndian()
          Gets whether the data is in little-endian format.
 boolean isLittleEndian(String id)
          Deprecated. Replaced by isLittleEndian()
 boolean isMetadataCollected()
          Returns true if we should collect metadata.
 boolean isMetadataComplete()
          Returns true if this format's metadata is completely parsed.
 boolean isMetadataFiltered()
          Returns true if ugly metadata (entries with unprintable characters, and extremely large entries) are discarded from the metadata table.
 boolean isNormalized()
          Returns true if we should normalize float data.
 boolean isOrderCertain()
          Gets whether the dimension order and sizes are known, or merely guesses.
 boolean isOrderCertain(String id)
          Deprecated. Replaced by isOrderCertain()
 boolean isOriginalMetadataPopulated()
          Returns true if we should save proprietary metadata in the MetadataStore.
 boolean isRGB()
          Checks if the images in the file are RGB.
 boolean isRGB(String id)
          Deprecated. Replaced by isRGB()
protected  boolean isUsedFile(String file)
          Returns true if the given file name is in the used files list.
 byte[] openBytes(int no)
          Obtains the specified image from the current file as a byte array.
 byte[] openBytes(String id, int no)
          Deprecated. Replaced by openBytes(int)
 byte[] openBytes(String id, int no, byte[] buf)
          Deprecated. Replaced by IFormatReader.openBytes(int, byte[])
 BufferedImage openImage(int no)
          Obtains the specified image from the current file.
 BufferedImage openImage(String id, int no)
          Deprecated. Replaced by openImage(int)
 byte[] openThumbBytes(int no)
          Obtains a thumbnail for the specified image from the current file, as a byte array.
 byte[] openThumbBytes(String id, int no)
          Deprecated. Replaced by openThumbBytes(int)
 BufferedImage openThumbImage(int no)
          Obtains a thumbnail for the specified image from the current file.
 BufferedImage openThumbImage(String id, int no)
          Deprecated. Replaced by openThumbImage(int)
 void setGroupFiles(boolean groupFiles)
          Specifies whether or not to force grouping in multi-file formats.
 void setId(String id, boolean force)
          Sets the current file name.
 void setMetadataCollected(boolean collect)
          Specifies whether or not to collect metadata.
 void setMetadataFiltered(boolean filter)
          Specifies whether ugly metadata (entries with unprintable characters, and extremely large entries) should be discarded from the metadata table.
 void setMetadataStore(MetadataStore store)
          Sets the default metadata store for this reader.
 void setNormalized(boolean normalize)
          Specifies whether or not to normalize float data.
 void setOriginalMetadataPopulated(boolean populate)
          Specifies whether or not to save proprietary metadata in the MetadataStore.
 void setSeries(int no)
          Activates the specified series.
 void setSeries(String id, int no)
          Deprecated. Replaced by setSeries(int)
 
Methods inherited from class loci.formats.FormatHandler
addStatusListener, debug, getFormat, getStatusListeners, getSuffixes, isThisType, isThisType, removeStatusListener, setDebug, setDebugLevel, setId, status, status, status, trace, trace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface loci.formats.IFormatReader
isThisType, openBytes
 
Methods inherited from interface loci.formats.IFormatHandler
getFormat, getSuffixes, isThisType, isThisType, setId
 
Methods inherited from interface loci.formats.StatusReporter
addStatusListener, getStatusListeners, removeStatusListener
 

Field Detail

THUMBNAIL_DIMENSION

protected static final int THUMBNAIL_DIMENSION
Default thumbnail width and height.

See Also:
Constant Field Values

in

protected RandomAccessStream in
Current file.


metadata

protected Hashtable metadata
Hashtable containing metadata key/value pairs.


series

protected int series
The number of the current series.


core

protected CoreMetadata core
Core metadata values.


normalizeData

protected boolean normalizeData
Whether or not to normalize float data.


filterMetadata

protected boolean filterMetadata
Whether or not to filter out invalid metadata.


collectMetadata

protected boolean collectMetadata
Whether or not to collect metadata.


saveOriginalMetadata

protected boolean saveOriginalMetadata
Whether or not to save proprietary metadata in the MetadataStore.


group

protected boolean group
Whether or not to group multi-file formats.


metadataStore

protected MetadataStore metadataStore
Current metadata store. Should never be accessed directly as the semantics of getMetadataStore() prevent "null" access.

Constructor Detail

FormatReader

public FormatReader(String format,
                    String suffix)
Constructs a format reader with the given name and default suffix.


FormatReader

public FormatReader(String format,
                    String[] suffixes)
Constructs a format reader with the given name and default suffixes.

Method Detail

initFile

protected void initFile(String id)
                 throws FormatException,
                        IOException
Initializes the given file (parsing header information, etc.). Most subclasses should override this method to perform initialization operations such as parsing metadata.

Throws:
FormatException
IOException

checkBytes

protected boolean checkBytes(String name,
                             int maxLen)
Opens the given file, reads in the first few KB and calls isThisType(byte[]) to check whether it matches this format.


isUsedFile

protected boolean isUsedFile(String file)
Returns true if the given file name is in the used files list.


addMeta

protected void addMeta(String key,
                       Object value)
Adds an entry to the metadata table.


getMeta

protected Object getMeta(String key)
Gets a value from the metadata table.


getImageCount

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

Specified by:
getImageCount in interface IFormatReader

isRGB

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

Specified by:
isRGB in interface IFormatReader

getSizeX

public int getSizeX()
Description copied from interface: IFormatReader
Gets the size of the X dimension.

Specified by:
getSizeX in interface IFormatReader

getSizeY

public int getSizeY()
Description copied from interface: IFormatReader
Gets the size of the Y dimension.

Specified by:
getSizeY in interface IFormatReader

getSizeZ

public int getSizeZ()
Description copied from interface: IFormatReader
Gets the size of the Z dimension.

Specified by:
getSizeZ in interface IFormatReader

getSizeC

public int getSizeC()
Description copied from interface: IFormatReader
Gets the size of the C dimension.

Specified by:
getSizeC in interface IFormatReader

getSizeT

public int getSizeT()
Description copied from interface: IFormatReader
Gets the size of the T dimension.

Specified by:
getSizeT in interface IFormatReader

getPixelType

public int getPixelType()
Description copied from interface: IFormatReader
Gets the pixel type.

Specified by:
getPixelType in interface IFormatReader
Returns:
the pixel type as an enumeration from FormatTools static pixel types such as INT8.

getEffectiveSizeC

public int getEffectiveSizeC()
Description copied from interface: IFormatReader
Gets the effective size of the C dimension, guaranteeing that getEffectiveSizeC() * getSizeZ() * getSizeT() == getImageCount() regardless of the result of isRGB().

Specified by:
getEffectiveSizeC in interface IFormatReader

getRGBChannelCount

public int getRGBChannelCount()
Description copied from interface: IFormatReader
Gets the number of channels per RGB image (if not RGB, this returns 1).

Specified by:
getRGBChannelCount in interface IFormatReader

isIndexed

public boolean isIndexed()
Description copied from interface: IFormatReader
Gets whether the images are indexed color.

Specified by:
isIndexed in interface IFormatReader

isFalseColor

public boolean isFalseColor()
Description copied from interface: IFormatReader
Returns false if isIndexed is false, or if isIndexed is true and the lookup table represents "real" color data. Returns true if isIndexed is true and the lookup table is only present to aid in visualization.

Specified by:
isFalseColor in interface IFormatReader

get8BitLookupTable

public byte[][] get8BitLookupTable()
                            throws FormatException,
                                   IOException
Description copied from interface: IFormatReader
Gets the 8-bit color lookup table associated with the most recently opened image. If no images have been opened, or if isIndexed() returns false, then this returns null. Also, if getPixelType() returns anything other than INT8 or UINT8, this method will return null.

Specified by:
get8BitLookupTable in interface IFormatReader
Throws:
FormatException
IOException

get16BitLookupTable

public short[][] get16BitLookupTable()
                              throws FormatException,
                                     IOException
Description copied from interface: IFormatReader
Gets the 16-bit color lookup table associated with the most recently opened image. If no images have been opened, or if isIndexed() returns false, then this returns null. Also, if getPixelType() returns anything other than INT16 or UINT16, this method will return null.

Specified by:
get16BitLookupTable in interface IFormatReader
Throws:
FormatException
IOException

getChannelDimLengths

public int[] getChannelDimLengths()
Description copied from interface: IFormatReader
Gets the lengths of each subdimension of C, in fastest-to-sloweset rasterization order.

Specified by:
getChannelDimLengths in interface IFormatReader

getChannelDimTypes

public String[] getChannelDimTypes()
Description copied from interface: IFormatReader
Gets the name of each subdimension of C, in fastest-to-slowest rasterization order. Common subdimensional types are enumerated in FormatTools.

Specified by:
getChannelDimTypes in interface IFormatReader

getThumbSizeX

public int getThumbSizeX()
Description copied from interface: IFormatReader
Get the size of the X dimension for the thumbnail.

Specified by:
getThumbSizeX in interface IFormatReader

getThumbSizeY

public int getThumbSizeY()
Description copied from interface: IFormatReader
Get the size of the Y dimension for the thumbnail.

Specified by:
getThumbSizeY in interface IFormatReader

isLittleEndian

public boolean isLittleEndian()
Description copied from interface: IFormatReader
Gets whether the data is in little-endian format.

Specified by:
isLittleEndian in interface IFormatReader

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

isOrderCertain

public boolean isOrderCertain()
Description copied from interface: IFormatReader
Gets whether the dimension order and sizes are known, or merely guesses.

Specified by:
isOrderCertain in interface IFormatReader

isInterleaved

public boolean isInterleaved()
Description copied from interface: IFormatReader
Gets whether or not the channels are interleaved. This method exists because X and Y must appear first in the dimension order. For interleaved data, XYCTZ or XYCZT is used, and this method returns true.

Specified by:
isInterleaved in interface IFormatReader

isInterleaved

public boolean isInterleaved(int subC)
Description copied from interface: IFormatReader
Gets whether or not the given sub-channel is interleaved. This method exists because some data with multiple rasterized sub-dimensions within C have one sub-dimension interleaved, and the other not—e.g., SDTReader handles spectral-lifetime data with the interleaved lifetime bins and non-interleaved spectral channels.

Specified by:
isInterleaved in interface IFormatReader

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
Throws:
FormatException
IOException

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
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
Throws:
FormatException
IOException

openThumbBytes

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

Specified by:
openThumbBytes in interface IFormatReader
Throws:
FormatException
IOException

close

public void close(boolean fileOnly)
           throws IOException
Description copied from interface: IFormatReader
Closes the currently open file. If the flag is set, this is all that happens; if unset, it is equivalent to calling IFormatHandler.close().

Specified by:
close in interface IFormatReader
Throws:
IOException

getSeriesCount

public int getSeriesCount()
Description copied from interface: IFormatReader
Gets the number of series in this file.

Specified by:
getSeriesCount in interface IFormatReader

setSeries

public void setSeries(int no)
Description copied from interface: IFormatReader
Activates the specified series.

Specified by:
setSeries in interface IFormatReader

getSeries

public int getSeries()
Description copied from interface: IFormatReader
Gets the currently active series.

Specified by:
getSeries in interface IFormatReader

setGroupFiles

public void setGroupFiles(boolean groupFiles)
Description copied from interface: IFormatReader
Specifies whether or not to force grouping in multi-file formats.

Specified by:
setGroupFiles in interface IFormatReader

isGroupFiles

public boolean isGroupFiles()
Description copied from interface: IFormatReader
Returns true if we should group files in multi-file formats.

Specified by:
isGroupFiles in interface IFormatReader

fileGroupOption

public int fileGroupOption(String id)
                    throws FormatException,
                           IOException
Description copied from interface: IFormatReader
Returns an int indicating that we cannot, must, or might group the files in a given dataset.

Specified by:
fileGroupOption in interface IFormatReader
Throws:
FormatException
IOException

isMetadataComplete

public boolean isMetadataComplete()
Description copied from interface: IFormatReader
Returns true if this format's metadata is completely parsed.

Specified by:
isMetadataComplete in interface IFormatReader

setNormalized

public void setNormalized(boolean normalize)
Description copied from interface: IFormatReader
Specifies whether or not to normalize float data.

Specified by:
setNormalized in interface IFormatReader

isNormalized

public boolean isNormalized()
Description copied from interface: IFormatReader
Returns true if we should normalize float data.

Specified by:
isNormalized in interface IFormatReader

setMetadataCollected

public void setMetadataCollected(boolean collect)
Description copied from interface: IFormatReader
Specifies whether or not to collect metadata.

Specified by:
setMetadataCollected in interface IFormatReader

isMetadataCollected

public boolean isMetadataCollected()
Description copied from interface: IFormatReader
Returns true if we should collect metadata.

Specified by:
isMetadataCollected in interface IFormatReader

setOriginalMetadataPopulated

public void setOriginalMetadataPopulated(boolean populate)
Description copied from interface: IFormatReader
Specifies whether or not to save proprietary metadata in the MetadataStore.

Specified by:
setOriginalMetadataPopulated in interface IFormatReader

isOriginalMetadataPopulated

public boolean isOriginalMetadataPopulated()
Description copied from interface: IFormatReader
Returns true if we should save proprietary metadata in the MetadataStore.

Specified by:
isOriginalMetadataPopulated in interface IFormatReader

getUsedFiles

public String[] getUsedFiles()
Description copied from interface: IFormatReader
Returns an array of filenames needed to open this dataset.

Specified by:
getUsedFiles in interface IFormatReader

getCurrentFile

public String getCurrentFile()
Description copied from interface: IFormatReader
Returns the current file.

Specified by:
getCurrentFile in interface IFormatReader

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

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

getMetadataValue

public Object getMetadataValue(String field)
Description copied from interface: IFormatReader
Obtains the specified metadata field's value for the current file.

Specified by:
getMetadataValue in interface IFormatReader
Parameters:
field - the name associated with the metadata field
Returns:
the value, or null if the field doesn't exist

getMetadata

public Hashtable getMetadata()
Description copied from interface: IFormatReader
Obtains the hashtable containing the metadata field/value pairs from the current file.

Specified by:
getMetadata in interface IFormatReader
Returns:
the hashtable containing all metadata from the file

getCoreMetadata

public CoreMetadata getCoreMetadata()
Description copied from interface: IFormatReader
Obtains the core metadata values for the current file.

Specified by:
getCoreMetadata in interface IFormatReader

setMetadataFiltered

public void setMetadataFiltered(boolean filter)
Description copied from interface: IFormatReader
Specifies whether ugly metadata (entries with unprintable characters, and extremely large entries) should be discarded from the metadata table.

Specified by:
setMetadataFiltered in interface IFormatReader

isMetadataFiltered

public boolean isMetadataFiltered()
Description copied from interface: IFormatReader
Returns true if ugly metadata (entries with unprintable characters, and extremely large entries) are discarded from the metadata table.

Specified by:
isMetadataFiltered in interface IFormatReader

setMetadataStore

public void setMetadataStore(MetadataStore store)
Description copied from interface: IFormatReader
Sets the default metadata store for this reader.

Specified by:
setMetadataStore in interface IFormatReader
Parameters:
store - a metadata store implementation.

getMetadataStore

public MetadataStore getMetadataStore()
Description copied from interface: IFormatReader
Retrieves the current metadata store for this reader. You can be assured that this method will never return a null metadata store.

Specified by:
getMetadataStore in interface IFormatReader
Returns:
A metadata store implementation.

getMetadataStoreRoot

public Object getMetadataStoreRoot()
Description copied from interface: IFormatReader
Retrieves the current metadata store's root object. It is guaranteed that all file parsing has been performed by the reader prior to retrieval. Requests for a full populated root object should be made using this method.

Specified by:
getMetadataStoreRoot in interface IFormatReader
Returns:
Current metadata store's root object fully populated.

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
force - If set, the handler will be re-initialized no matter what.
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
Throws:
IOException

getImageCount

public int getImageCount(String id)
                  throws FormatException,
                         IOException
Deprecated. Replaced by getImageCount()

Specified by:
getImageCount in interface IFormatReader
Throws:
FormatException
IOException

isRGB

public boolean isRGB(String id)
              throws FormatException,
                     IOException
Deprecated. Replaced by isRGB()

Specified by:
isRGB in interface IFormatReader
Throws:
FormatException
IOException

getSizeX

public int getSizeX(String id)
             throws FormatException,
                    IOException
Deprecated. Replaced by getSizeX()

Specified by:
getSizeX in interface IFormatReader
Throws:
FormatException
IOException

getSizeY

public int getSizeY(String id)
             throws FormatException,
                    IOException
Deprecated. Replaced by getSizeY()

Specified by:
getSizeY in interface IFormatReader
Throws:
FormatException
IOException

getSizeZ

public int getSizeZ(String id)
             throws FormatException,
                    IOException
Deprecated. Replaced by getSizeZ()

Specified by:
getSizeZ in interface IFormatReader
Throws:
FormatException
IOException

getSizeC

public int getSizeC(String id)
             throws FormatException,
                    IOException
Deprecated. Replaced by getSizeC()

Specified by:
getSizeC in interface IFormatReader
Throws:
FormatException
IOException

getSizeT

public int getSizeT(String id)
             throws FormatException,
                    IOException
Deprecated. Replaced by getSizeT()

Specified by:
getSizeT in interface IFormatReader
Throws:
FormatException
IOException

getPixelType

public int getPixelType(String id)
                 throws FormatException,
                        IOException
Deprecated. Replaced by getPixelType()

Specified by:
getPixelType in interface IFormatReader
Throws:
FormatException
IOException

getEffectiveSizeC

public int getEffectiveSizeC(String id)
                      throws FormatException,
                             IOException
Deprecated. Replaced by getEffectiveSizeC()

Specified by:
getEffectiveSizeC in interface IFormatReader
Throws:
FormatException
IOException

getRGBChannelCount

public int getRGBChannelCount(String id)
                       throws FormatException,
                              IOException
Deprecated. Replaced by getRGBChannelCount()

Specified by:
getRGBChannelCount in interface IFormatReader
Throws:
FormatException
IOException

getChannelDimLengths

public int[] getChannelDimLengths(String id)
                           throws FormatException,
                                  IOException
Deprecated. Replaced by getChannelDimLengths()

Specified by:
getChannelDimLengths in interface IFormatReader
Throws:
FormatException
IOException

getChannelDimTypes

public String[] getChannelDimTypes(String id)
                            throws FormatException,
                                   IOException
Deprecated. Replaced by getChannelDimTypes()

Specified by:
getChannelDimTypes in interface IFormatReader
Throws:
FormatException
IOException

getThumbSizeX

public int getThumbSizeX(String id)
                  throws FormatException,
                         IOException
Deprecated. Replaced by getThumbSizeX()

Specified by:
getThumbSizeX in interface IFormatReader
Throws:
FormatException
IOException

getThumbSizeY

public int getThumbSizeY(String id)
                  throws FormatException,
                         IOException
Deprecated. Replaced by getThumbSizeY()

Specified by:
getThumbSizeY in interface IFormatReader
Throws:
FormatException
IOException

isLittleEndian

public boolean isLittleEndian(String id)
                       throws FormatException,
                              IOException
Deprecated. Replaced by isLittleEndian()

Specified by:
isLittleEndian in interface IFormatReader
Throws:
FormatException
IOException

getDimensionOrder

public String getDimensionOrder(String id)
                         throws FormatException,
                                IOException
Deprecated. Replaced by getDimensionOrder()

Specified by:
getDimensionOrder in interface IFormatReader
Throws:
FormatException
IOException

isOrderCertain

public boolean isOrderCertain(String id)
                       throws FormatException,
                              IOException
Deprecated. Replaced by isOrderCertain()

Specified by:
isOrderCertain in interface IFormatReader
Throws:
FormatException
IOException

isInterleaved

public boolean isInterleaved(String id)
                      throws FormatException,
                             IOException
Deprecated. Replaced by isInterleaved()

Specified by:
isInterleaved in interface IFormatReader
Throws:
FormatException
IOException

isInterleaved

public boolean isInterleaved(String id,
                             int subC)
                      throws FormatException,
                             IOException
Deprecated. Replaced by isInterleaved(int)

Specified by:
isInterleaved in interface IFormatReader
Throws:
FormatException
IOException

openImage

public BufferedImage openImage(String id,
                               int no)
                        throws FormatException,
                               IOException
Deprecated. Replaced by openImage(int)

Specified by:
openImage in interface IFormatReader
Throws:
FormatException
IOException

openBytes

public byte[] openBytes(String id,
                        int no)
                 throws FormatException,
                        IOException
Deprecated. Replaced by openBytes(int)

Specified by:
openBytes in interface IFormatReader
Throws:
FormatException
IOException

openBytes

public byte[] openBytes(String id,
                        int no,
                        byte[] buf)
                 throws FormatException,
                        IOException
Deprecated. Replaced by IFormatReader.openBytes(int, byte[])

Specified by:
openBytes in interface IFormatReader
Throws:
FormatException
IOException

openThumbImage

public BufferedImage openThumbImage(String id,
                                    int no)
                             throws FormatException,
                                    IOException
Deprecated. Replaced by openThumbImage(int)

Specified by:
openThumbImage in interface IFormatReader
Throws:
FormatException
IOException

openThumbBytes

public byte[] openThumbBytes(String id,
                             int no)
                      throws FormatException,
                             IOException
Deprecated. Replaced by openThumbBytes(int)

Specified by:
openThumbBytes in interface IFormatReader
Throws:
FormatException
IOException

getSeriesCount

public int getSeriesCount(String id)
                   throws FormatException,
                          IOException
Deprecated. Replaced by getSeriesCount()

Specified by:
getSeriesCount in interface IFormatReader
Throws:
FormatException
IOException

setSeries

public void setSeries(String id,
                      int no)
               throws FormatException,
                      IOException
Deprecated. Replaced by setSeries(int)

Specified by:
setSeries in interface IFormatReader
Throws:
FormatException
IOException

getSeries

public int getSeries(String id)
              throws FormatException,
                     IOException
Deprecated. Replaced by getSeries()

Specified by:
getSeries in interface IFormatReader
Throws:
FormatException
IOException

getUsedFiles

public String[] getUsedFiles(String id)
                      throws FormatException,
                             IOException
Deprecated. Replaced by getUsedFiles()

Specified by:
getUsedFiles in interface IFormatReader
Throws:
FormatException
IOException

getIndex

public int getIndex(String id,
                    int z,
                    int c,
                    int t)
             throws FormatException,
                    IOException
Deprecated. Replaced by getIndex(int, int, int)

Specified by:
getIndex in interface IFormatReader
Throws:
FormatException
IOException

getZCTCoords

public int[] getZCTCoords(String id,
                          int index)
                   throws FormatException,
                          IOException
Deprecated. Replaced by getZCTCoords(int)

Specified by:
getZCTCoords in interface IFormatReader
Throws:
FormatException
IOException

getMetadataValue

public Object getMetadataValue(String id,
                               String field)
                        throws FormatException,
                               IOException
Deprecated. Replaced by getMetadataValue(String)

Specified by:
getMetadataValue in interface IFormatReader
Throws:
FormatException
IOException

getMetadata

public Hashtable getMetadata(String id)
                      throws FormatException,
                             IOException
Deprecated. Replaced by getMetadata()

Specified by:
getMetadata in interface IFormatReader
Throws:
FormatException
IOException

getCoreMetadata

public CoreMetadata getCoreMetadata(String id)
                             throws FormatException,
                                    IOException
Deprecated. Replaced by getCoreMetadata()

Specified by:
getCoreMetadata in interface IFormatReader
Throws:
FormatException
IOException

getMetadataStore

public MetadataStore getMetadataStore(String id)
                               throws FormatException,
                                      IOException
Deprecated. Replaced by getMetadataStore()

Specified by:
getMetadataStore in interface IFormatReader
Throws:
FormatException
IOException

getMetadataStoreRoot

public Object getMetadataStoreRoot(String id)
                            throws FormatException,
                                   IOException
Deprecated. Replaced by getMetadataStoreRoot()

Specified by:
getMetadataStoreRoot in interface IFormatReader
Throws:
FormatException
IOException