ij.io
Class FileOpener

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

public class FileOpener
extends java.lang.Object

Opens or reverts an image specified by a FileInfo object. Images can be loaded from either a file (directory+fileName) or a URL (url+fileName).


Constructor Summary
FileOpener(FileInfo fi)
           
 
Method Summary
static java.awt.image.ColorModel createColorModel(FileInfo fi)
          Returns an IndexColorModel for the image specified by this FileInfo.
static java.io.InputStream createInputStream(FileInfo fi)
          Returns an InputStream for the image described by this FileInfo.
 void open()
          Opens the image and displays it.
 ImagePlus open(boolean show)
          Opens the image.
 void revertToSaved(ImagePlus imp)
          Restores original disk or network version of image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileOpener

public FileOpener(FileInfo fi)
Method Detail

open

public void open()
Opens the image and displays it.


open

public ImagePlus open(boolean show)
Opens the image. Displays it if 'show' is true. Returns an ImagePlus object if successful.


revertToSaved

public void revertToSaved(ImagePlus imp)
Restores original disk or network version of image.


createColorModel

public static java.awt.image.ColorModel createColorModel(FileInfo fi)
Returns an IndexColorModel for the image specified by this FileInfo.


createInputStream

public static java.io.InputStream createInputStream(FileInfo fi)
                                             throws java.io.IOException,
                                                    java.net.MalformedURLException
Returns an InputStream for the image described by this FileInfo.

Throws:
java.io.IOException
java.net.MalformedURLException