- java.lang.Object
-
- ij.io.FileOpener
-
public class FileOpener extends java.lang.ObjectOpens or reverts an image specified by a FileInfo object. Images can be loaded from either a file (directory+fileName) or a URL (url+fileName). Here is an example:public class FileInfo_Test implements PlugIn { public void run(String arg) { FileInfo fi = new FileInfo(); fi.width = 256; fi.height = 254; fi.offset = 768; fi.fileName = "blobs.tif"; fi.directory = "/Users/wayne/Desktop/"; new FileOpener(fi).open(); } }
-
-
Constructor Summary
Constructors Constructor Description FileOpener(FileInfo fi)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.ColorModelcreateColorModel(FileInfo fi)Returns an IndexColorModel for the image specified by this FileInfo.java.io.InputStreamcreateInputStream(FileInfo fi)Returns an InputStream for the image described by this FileInfo.java.util.PropertiesdecodeDescriptionString(FileInfo fi)voidopen()Opens the image and displays it.ImagePlusopen(boolean show)Obsolete, replaced by openImage() and open().ImagePlusopenImage()Opens the image and returns it has an ImagePlus object.ImageProcessoropenProcessor()voidrevertToSaved(ImagePlus imp)Restores the original version of the specified image.static voidsetShowConflictMessage(boolean b)
-
-
-
Constructor Detail
-
FileOpener
public FileOpener(FileInfo fi)
-
-
Method Detail
-
openImage
public ImagePlus openImage()
Opens the image and returns it has an ImagePlus object.
-
open
public void open()
Opens the image and displays it.
-
open
public ImagePlus open(boolean show)
Obsolete, replaced by openImage() and open().
-
openProcessor
public ImageProcessor openProcessor()
-
revertToSaved
public void revertToSaved(ImagePlus imp)
Restores the original version of the specified image.
-
createColorModel
public java.awt.image.ColorModel createColorModel(FileInfo fi)
Returns an IndexColorModel for the image specified by this FileInfo.
-
createInputStream
public 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.IOExceptionjava.net.MalformedURLException
-
decodeDescriptionString
public java.util.Properties decodeDescriptionString(FileInfo fi)
-
setShowConflictMessage
public static void setShowConflictMessage(boolean b)
-
-