loci.formats
Class ICSReader

java.lang.Object
  extended byloci.formats.FormatHandler
      extended byloci.formats.FormatReader
          extended byloci.formats.ICSReader

public class ICSReader
extends FormatReader

ICSReader is the file format reader for ICS (Image Cytometry Standard) files. More information on ICS can be found at http://libics.sourceforge.net


Field Summary
protected  String currentIcsId
          Current filename.
protected  String currentIdsId
           
protected  int[] dimensions
          Dimensions in the following order: 1) bits per pixel 2) width 3) height 4) z 5) channels 6) timepoints
protected  File icsIn
           
protected  RandomAccessFile idsIn
          Current file.
protected  boolean littleEndian
          Flag indicating whether current file is little endian.
protected  int numImages
          Number of images.
 
Fields inherited from class loci.formats.FormatReader
DEBUG, DEBUG_LEVEL, metadata, ome
 
Fields inherited from class loci.formats.FormatHandler
chooser, currentId, filters, format, suffixes
 
Constructor Summary
ICSReader()
          Constructs a new ICSReader.
 
Method Summary
 void close()
          Closes any open files.
 int getImageCount(String id)
          Determines the number of images in the given ICS file.
protected  void initFile(String id)
          Initializes the given IPLab file.
 boolean isThisType(byte[] block)
          Checks if the given block is a valid header for an ICS file.
static void main(String[] args)
           
 BufferedImage open(String id, int no)
          Obtains the specified image from the given ICS file.
 byte[] openBytes(String id, int no)
          Obtains the bytes for the specified image from the given ICS file.
 
Methods inherited from class loci.formats.FormatReader
createFilters, getMetadata, getMetadataValue, getOMENode, open, testRead
 
Methods inherited from class loci.formats.FormatHandler
getFileChooser, getFileFilters, getFormat, getSuffixes, isThisType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentIcsId

protected String currentIcsId
Current filename.


currentIdsId

protected String currentIdsId

idsIn

protected RandomAccessFile idsIn
Current file.


icsIn

protected File icsIn

littleEndian

protected boolean littleEndian
Flag indicating whether current file is little endian.


numImages

protected int numImages
Number of images.


dimensions

protected int[] dimensions
Dimensions in the following order: 1) bits per pixel 2) width 3) height 4) z 5) channels 6) timepoints

Constructor Detail

ICSReader

public ICSReader()
Constructs a new ICSReader.

Method Detail

isThisType

public boolean isThisType(byte[] block)
Checks if the given block is a valid header for an ICS file.

Specified by:
isThisType in class FormatReader

getImageCount

public int getImageCount(String id)
                  throws FormatException,
                         IOException
Determines the number of images in the given ICS file.

Specified by:
getImageCount in class FormatReader
Throws:
FormatException
IOException

openBytes

public byte[] openBytes(String id,
                        int no)
                 throws FormatException,
                        IOException
Obtains the bytes for the specified image from the given ICS file. Note : this method will be added to the FormatReader API.

Throws:
FormatException
IOException

open

public BufferedImage open(String id,
                          int no)
                   throws FormatException,
                          IOException
Obtains the specified image from the given ICS file.

Specified by:
open in class FormatReader
Throws:
FormatException
IOException

close

public void close()
           throws FormatException,
                  IOException
Closes any open files.

Specified by:
close in class FormatReader
Throws:
FormatException
IOException

initFile

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

Overrides:
initFile in class FormatReader
Throws:
FormatException
IOException

main

public static void main(String[] args)
                 throws FormatException,
                        IOException
Throws:
FormatException
IOException