loci.formats
Class OMEXMLReader

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

public class OMEXMLReader
extends FormatReader

OMEXMLReader is the file format reader for OME-XML files.


Field Summary
protected  int bpp
          Number of bits per pixel.
protected  String compression
          String indicating the compression type.
protected  RandomAccessFile in
          Current file.
protected  boolean littleEndian
          Flag indicating whether current file is little endian.
protected  int numImages
          Number of image planes in the file.
protected  Vector offsets
          Offset to each plane's data.
 
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
OMEXMLReader()
          Constructs a new OME-XML reader.
 
Method Summary
 void close()
          Closes any open files.
 int getImageCount(String id)
          Determines the number of images in the given OME-XML file.
protected  void initFile(String id)
          Initializes the given OME-XML file.
 boolean isThisType(byte[] block)
          Checks if the given block is a valid header for an OME-XML file.
static void main(String[] args)
           
 BufferedImage open(String id, int no)
          Obtains the specified image from the given OME-XML 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

in

protected RandomAccessFile in
Current file.


littleEndian

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


numImages

protected int numImages
Number of image planes in the file.


bpp

protected int bpp
Number of bits per pixel.


offsets

protected Vector offsets
Offset to each plane's data.


compression

protected String compression
String indicating the compression type.

Constructor Detail

OMEXMLReader

public OMEXMLReader()
Constructs a new OME-XML reader.

Method Detail

isThisType

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

Specified by:
isThisType in class FormatReader

getImageCount

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

Specified by:
getImageCount in class FormatReader
Throws:
FormatException
IOException

open

public BufferedImage open(String id,
                          int no)
                   throws FormatException,
                          IOException
Obtains the specified image from the given OME-XML 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 OME-XML file.

Overrides:
initFile in class FormatReader
Throws:
FormatException
IOException

main

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