Package ij.io
Class FileOpener
java.lang.Object
ij.io.FileOpener
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).
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 -
Method Summary
Modifier and TypeMethodDescriptionReturns an IndexColorModel for the image specified by this FileInfo.Returns an InputStream for the image described by this FileInfo.void
open()
Opens the image and displays it.open
(boolean show) Opens the image.void
revertToSaved
(ImagePlus imp) Restores the original version of the specified image.static void
setShowConflictMessage
(boolean b)
-
Constructor Details
-
FileOpener
-
-
Method Details
-
open
public void open()Opens the image and displays it. -
open
Opens the image. Displays it if 'show' is true. Returns an ImagePlus object if successful. -
revertToSaved
Restores the original version of the specified image. -
createColorModel
Returns an IndexColorModel for the image specified by this FileInfo. -
createInputStream
Returns an InputStream for the image described by this FileInfo.- Throws:
IOException
MalformedURLException
-
decodeDescriptionString
-
setShowConflictMessage
public static void setShowConflictMessage(boolean b)
-