public class Opener
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
AVI |
static int |
BMP |
static int |
CHART |
static int |
CUSTOM |
static int |
DICOM |
static int |
FITS |
static int |
GIF |
static int |
JAVA_OR_TEXT |
static int |
JPEG |
static int |
LAYOUT |
static int |
LUT |
static int |
OJJ |
static int |
PGM |
static int |
PNG |
static int |
PYTHON |
static int |
RAW |
static int |
ROI |
static int |
TABLE |
static int |
TEXT |
static int |
TIFF |
static int |
TIFF_AND_DICOM |
static java.lang.String[] |
types |
static int |
UNKNOWN |
static int |
ZIP |
Constructor and Description |
---|
Opener() |
Modifier and Type | Method and Description |
---|---|
static void |
convertGrayJpegTo8Bits(ImagePlus imp)
If the specified image is grayscale, convert it to 8-bits.
|
ImagePlus |
deserialize(byte[] bytes)
Deserialize a byte array that was serialized using the FileSaver.serialize().
|
java.lang.String |
getDir(java.lang.String path) |
static java.lang.String |
getFileFormat(java.lang.String path) |
int |
getFileType(java.lang.String path)
Attempts to determine the image file type by looking for
'magic numbers' and the file name extension.
|
static java.lang.String |
getLoadRate(double time,
ImagePlus imp) |
java.lang.String |
getName(java.lang.String path) |
static boolean |
getOpenUsingPlugins()
Returns the state of the openUsingPlugins flag.
|
void |
open()
Displays a file open dialog box and then opens the tiff, dicom,
fits, pgm, jpeg, bmp, gif, lut, roi, or text file selected by
the user.
|
void |
open(java.lang.String path)
Opens and displays a tiff, dicom, fits, pgm, jpeg, bmp, gif, lut,
roi, or text file.
|
boolean |
openAndAddToRecent(java.lang.String path)
Opens the specified file and adds it to the File/Open Recent menu.
|
ImagePlus |
openImage(java.lang.String path)
Attempts to open the specified file as a tiff, bmp, dicom, fits,
pgm, gif or jpeg.
|
ImagePlus |
openImage(java.lang.String path,
int n)
Open the nth image of the specified tiff stack.
|
ImagePlus |
openImage(java.lang.String directory,
java.lang.String name)
Attempts to open the specified file as a tiff, bmp, dicom, fits,
pgm, gif or jpeg image.
|
void |
openMultiple()
Displays a JFileChooser and then opens the tiff, dicom,
fits, pgm, jpeg, bmp, gif, lut, roi, or text files selected by
the user.
|
static void |
openResultsTable(java.lang.String path)
Opens a tab or comma delimited text file in the Results window.
|
Roi |
openRoi(java.lang.String path)
Attempts to open the specified ROI, returning null if unsuccessful.
|
static void |
openTable(java.lang.String path)
Opens a tab or comma delimited text file.
|
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 path,
int n)
Opens the nth image of the specified TIFF stack.
|
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,
dicom, gif or jpeg.
|
static ImagePlus |
openUsingBioFormats(java.lang.String path)
Opens an image file using the Bio-Formats plugin.
|
ImagePlus |
openWithHandleExtraFileTypes(java.lang.String path,
int[] fileType) |
ImagePlus |
openZip(java.lang.String path)
Opens a single TIFF or DICOM contained in a ZIP archive,
or a ZIPed collection of ".roi" files created by the ROI manager.
|
static void |
setOpenUsingPlugins(boolean b)
Open all images using HandleExtraFileTypes.
|
void |
setSilentMode(boolean mode)
The "Opening: path" status message is not displayed in silent mode.
|
public static final int UNKNOWN
public static final int TIFF
public static final int DICOM
public static final int FITS
public static final int PGM
public static final int JPEG
public static final int GIF
public static final int LUT
public static final int BMP
public static final int ZIP
public static final int JAVA_OR_TEXT
public static final int ROI
public static final int TEXT
public static final int PNG
public static final int TIFF_AND_DICOM
public static final int CUSTOM
public static final int AVI
public static final int OJJ
public static final int TABLE
public static final int RAW
public static final int CHART
public static final int LAYOUT
public static final int PYTHON
public static final java.lang.String[] types
public void open()
public void openMultiple()
public void open(java.lang.String path)
public static java.lang.String getLoadRate(double time, ImagePlus imp)
public boolean openAndAddToRecent(java.lang.String path)
public ImagePlus openImage(java.lang.String directory, java.lang.String name)
public ImagePlus openImage(java.lang.String path)
public ImagePlus openImage(java.lang.String path, int n)
public ImagePlus openURL(java.lang.String url)
public ImagePlus openWithHandleExtraFileTypes(java.lang.String path, int[] fileType)
public static void convertGrayJpegTo8Bits(ImagePlus imp)
public ImagePlus openTiffStack(FileInfo[] info)
public ImagePlus openTiff(java.lang.String directory, java.lang.String name)
public ImagePlus openTiff(java.lang.String path, int n)
public ImagePlus openTiff(java.io.InputStream in, java.lang.String name)
public ImagePlus openZip(java.lang.String path)
public ImagePlus deserialize(byte[] bytes)
public java.lang.String getName(java.lang.String path)
public java.lang.String getDir(java.lang.String path)
public Roi openRoi(java.lang.String path)
public static ImagePlus openUsingBioFormats(java.lang.String path)
public static void openResultsTable(java.lang.String path)
public static void openTable(java.lang.String path)
public static java.lang.String getFileFormat(java.lang.String path)
public int getFileType(java.lang.String path)
public void setSilentMode(boolean mode)
public static void setOpenUsingPlugins(boolean b)
public static boolean getOpenUsingPlugins()