loci.formats
Class ImageJReader

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

public class ImageJReader
extends FormatReader

ImageJReader is the file format reader for the image formats supported by Wayne Rasband's excellent ImageJ program: DICOM, FITS, PGM, JPEG, GIF, LUT, BMP, TIFF, ZIP-compressed TIFF and ROI.


Field Summary
 
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
ImageJReader()
          Constructs a new ImageJ reader.
 
Method Summary
 void close()
          Closes any open files.
protected  void createFilters()
          Creates JFileChooser file filters for this file format.
 int getImageCount(String id)
          Determines the number of images in the given file.
 boolean isThisType(byte[] block)
          Checks if the given block is a valid header.
static void main(String[] args)
           
 BufferedImage open(String id, int no)
          Obtains the specified image from the given file.
 
Methods inherited from class loci.formats.FormatReader
getMetadata, getMetadataValue, getOMENode, initFile, 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
 

Constructor Detail

ImageJReader

public ImageJReader()
Constructs a new ImageJ reader.

Method Detail

isThisType

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

Specified by:
isThisType in class FormatReader

getImageCount

public int getImageCount(String id)
                  throws FormatException,
                         IOException
Determines the number of images in the given 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 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

createFilters

protected void createFilters()
Creates JFileChooser file filters for this file format.

Overrides:
createFilters in class FormatReader

main

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