ij.io
Class Opener

java.lang.Object
  extended by ij.io.Opener

public class Opener
extends java.lang.Object

Opens tiff (and tiff stacks), dicom, fits, pgm, jpeg, bmp or gif images, and look-up tables, using a file open dialog or a path.


Constructor Summary
Opener()
           
 
Method Summary
static void convertGrayJpegTo8Bits(ImagePlus imp)
          If this image is grayscale, convert it to 8-bits.
 void openImage()
          Displays a file open dialog box and then opens, the tiff, dicom, fits, pgm, jpeg, bmp, gif, lut or roi file specified by the user.
 ImagePlus openImage(java.lang.String directory, java.lang.String name)
          Attempts to open the specified file as a tiff, bmp, dicom, fits, pgm, gif, jpeg, bmp, lut or roi.
 ImagePlus openTiff(java.io.InputStream in, java.lang.String name)
          Attempts to open the specified inputStream as a TIFF, returning an ImagePlus object if successful.
 ImagePlus openTiff(java.lang.String directory, java.lang.String name)
          Attempts to open the specified file as a tiff.
 ImagePlus openTiffStack(FileInfo[] info)
          Attemps to open a tiff file as a stack.
 ImagePlus openURL(java.lang.String url)
          Attempts to open the specified url as a tiff, zip compressed tiff, gif or jpeg.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Opener

public Opener()
Method Detail

openImage

public void openImage()
Displays a file open dialog box and then opens, the tiff, dicom, fits, pgm, jpeg, bmp, gif, lut or roi file specified by the user.


openImage

public ImagePlus openImage(java.lang.String directory,
                           java.lang.String name)
Attempts to open the specified file as a tiff, bmp, dicom, fits, pgm, gif, jpeg, bmp, lut or roi. Returns an ImagePlus object if successful.


openURL

public ImagePlus openURL(java.lang.String url)
Attempts to open the specified url as a tiff, zip compressed tiff, gif or jpeg. Tiff file names must end in ".tif" and ZIP file names must end in ".zip". Returns an ImagePlus object if successful.


convertGrayJpegTo8Bits

public static void convertGrayJpegTo8Bits(ImagePlus imp)
If this image is grayscale, convert it to 8-bits.


openTiffStack

public ImagePlus openTiffStack(FileInfo[] info)
Attemps to open a tiff file as a stack. Returns an ImagePlus object if successful.


openTiff

public ImagePlus openTiff(java.lang.String directory,
                          java.lang.String name)
Attempts to open the specified file as a tiff. Returns an ImagePlus object if successful.


openTiff

public ImagePlus openTiff(java.io.InputStream in,
                          java.lang.String name)
Attempts to open the specified inputStream as a TIFF, returning an ImagePlus object if successful.