loci.formats.in
Class SDTReader

java.lang.Object
  extended by loci.formats.FormatHandler
      extended by loci.formats.FormatReader
          extended by loci.formats.in.SDTReader
All Implemented Interfaces:
IFormatHandler, IFormatReader, StatusReporter

public class SDTReader
extends FormatReader

SDTReader is the file format reader for Becker & Hickl SPC-Image SDT files.

Source code:
Trac, SVN

Author:
Curtis Rueden ctrueden at wisc.edu

Field Summary
protected  int channels
          Number of spectral channels.
protected  SDTInfo info
          Object containing SDT header information.
protected  boolean intensity
          Whether to combine lifetime bins into single intensity image planes.
protected  int off
          Offset to binary data.
protected  int timeBins
          Number of time bins in lifetime histogram.
 
Fields inherited from class loci.formats.FormatReader
collectMetadata, core, filterMetadata, group, in, metadata, metadataStore, normalizeData, saveOriginalMetadata, series, THUMBNAIL_DIMENSION
 
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
SDTReader()
          Constructs a new SDT reader.
 
Method Summary
 int getChannelCount()
          Gets the number of spectral channels.
 int getChannelCount(String id)
          Deprecated. Replaced by getChannelCount()
 int[] getChannelDimLengths()
          Gets the lengths of each subdimension of C, in fastest-to-sloweset rasterization order.
 String[] getChannelDimTypes()
          Gets the name of each subdimension of C, in fastest-to-slowest rasterization order.
 SDTInfo getInfo()
          Gets object containing SDT header information.
 SDTInfo getInfo(String id)
          Deprecated. Replaced by getInfo()
 int getTimeBinCount()
          Gets the number of bins in the lifetime histogram.
 int getTimeBinCount(String id)
          Deprecated. Replaced by getTimeBinCount()
protected  void initFile(String id)
          Initializes the given SDT file.
 boolean isIntensity()
          Gets whether the reader is combining each lifetime histogram into a summed intensity image plane.
 boolean isInterleaved(int subC)
          Gets whether or not the given sub-channel is interleaved.
 boolean isThisType(byte[] block)
          Checks if the given block is a valid header for this file format.
 byte[] openBytes(int no, byte[] buf)
          Obtains the specified image from the current file into a pre-allocated byte array of (sizeX * sizeY * bytesPerPixel).
 void setIntensity(boolean intensity)
          Toggles whether the reader should return intensity data only (the sum of each lifetime histogram).
 
Methods inherited from class loci.formats.FormatReader
addMeta, checkBytes, close, close, fileGroupOption, get16BitLookupTable, get8BitLookupTable, getChannelDimLengths, getChannelDimTypes, getCoreMetadata, getCoreMetadata, getCurrentFile, getDimensionOrder, getDimensionOrder, getEffectiveSizeC, getEffectiveSizeC, getImageCount, getImageCount, getIndex, getIndex, getMeta, getMetadata, getMetadata, getMetadataStore, getMetadataStore, getMetadataStoreRoot, getMetadataStoreRoot, getMetadataValue, getMetadataValue, getPixelType, getPixelType, getRGBChannelCount, getRGBChannelCount, getSeries, getSeries, getSeriesCount, getSeriesCount, getSizeC, getSizeC, getSizeT, getSizeT, getSizeX, getSizeX, getSizeY, getSizeY, getSizeZ, getSizeZ, getThumbSizeX, getThumbSizeX, getThumbSizeY, getThumbSizeY, getUsedFiles, getUsedFiles, getZCTCoords, getZCTCoords, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isInterleaved, isLittleEndian, isLittleEndian, isMetadataCollected, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOrderCertain, isOriginalMetadataPopulated, isRGB, isRGB, isUsedFile, openBytes, openBytes, openBytes, openImage, openImage, openThumbBytes, openThumbBytes, openThumbImage, openThumbImage, setGroupFiles, setId, setMetadataCollected, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setSeries, setSeries
 
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.IFormatHandler
getFormat, getSuffixes, isThisType, isThisType, setId
 
Methods inherited from interface loci.formats.StatusReporter
addStatusListener, getStatusListeners, removeStatusListener
 

Field Detail

info

protected SDTInfo info
Object containing SDT header information.


off

protected int off
Offset to binary data.


timeBins

protected int timeBins
Number of time bins in lifetime histogram.


channels

protected int channels
Number of spectral channels.


intensity

protected boolean intensity
Whether to combine lifetime bins into single intensity image planes.

Constructor Detail

SDTReader

public SDTReader()
Constructs a new SDT reader.

Method Detail

setIntensity

public void setIntensity(boolean intensity)
Toggles whether the reader should return intensity data only (the sum of each lifetime histogram).


isIntensity

public boolean isIntensity()
Gets whether the reader is combining each lifetime histogram into a summed intensity image plane.


getTimeBinCount

public int getTimeBinCount()
Gets the number of bins in the lifetime histogram.


getChannelCount

public int getChannelCount()
Gets the number of spectral channels.


getInfo

public SDTInfo getInfo()
Gets object containing SDT header information.


isThisType

public boolean isThisType(byte[] block)
Description copied from interface: IFormatReader
Checks if the given block is a valid header for this file format.


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
Overrides:
getChannelDimLengths in class FormatReader

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
Overrides:
getChannelDimTypes in class FormatReader

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
Overrides:
isInterleaved in class FormatReader

openBytes

public byte[] openBytes(int no,
                        byte[] buf)
                 throws FormatException,
                        IOException
Description copied from interface: IFormatReader
Obtains the specified image from the current file into a pre-allocated byte array of (sizeX * sizeY * bytesPerPixel).

Parameters:
no - the image index within the file.
buf - a pre-allocated buffer.
Returns:
the pre-allocated buffer buf for convenience.
Throws:
FormatException - if there was a problem parsing the metadata of the file.
IOException - if there was a problem reading the file.

initFile

protected void initFile(String id)
                 throws FormatException,
                        IOException
Initializes the given SDT file.

Overrides:
initFile in class FormatReader
Throws:
FormatException
IOException

getTimeBinCount

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

Throws:
FormatException
IOException

getChannelCount

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

Throws:
FormatException
IOException

getInfo

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

Throws:
FormatException
IOException