Package gov.nih.mipav.view
Class ViewOpenFileUI
java.lang.Object
gov.nih.mipav.view.ViewFileChooserBase
gov.nih.mipav.view.ViewOpenFileUI
Opens an image file by calling FileIO.readImage and puts it into an image frame.
- Version:
- 0.1 Sept 4, 1997
- Author:
- Matthew J. McAuliffe, Ph.D.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intIndicate what the current filter should be on opening the the dialog.private ModelImageDOCUMENT ME!private ModelImageDOCUMENT ME!private ModelLUTDOCUMENT ME!private ModelLUTDOCUMENT ME!private ModelRGBDOCUMENT ME!private ModelRGBDOCUMENT ME!private booleanDOCUMENT ME!private RawImageInfoprivate booleanDOCUMENT ME!private booleanDOCUMENT ME!Fields inherited from class gov.nih.mipav.view.ViewFileChooserBase
chooser, dialog, directory, fileName, openedFile, UI -
Constructor Summary
ConstructorsConstructorDescriptionViewOpenFileUI(boolean openDialog) Creates the way to open and verify files before they are loaded by the FileIO. -
Method Summary
Modifier and TypeMethodDescriptionstatic final FileFilterfindFilter(JFileChooser chooser, int filterType) DOCUMENT ME!getImage()DOCUMENT ME!DOCUMENT ME!Returns the path to the last opened image.getLUT()Returns the model LUT from the file.getLUT2()Returns the model LUT2 from the file.booleanIndicates whether there is an xml linked image.booleanReturns whether or not the new image will be put into a frame.open(boolean multiFile) Open an image based on the suffix of the file.open(String fileName, boolean multiFile, FileInfoBase fileInfo) Open an image based on the suffix of the file.openJSON()private ModelImageDOCUMENT ME!voidsetFilterType(int fType) Set the current filter type to the given parameter.voidsetLastImage(boolean flag) Indicates whether or not to put the image file path into the list of recently opened images.voidsetPutInFrame(boolean putIn) Indicates whether or not the new image should be put into a frame.voidsetRawImageInfo(RawImageInfo rawInfo) Methods inherited from class gov.nih.mipav.view.ViewFileChooserBase
getDirectory, getFileChooser, getFileDialog, getFileName, getOpenedFile, isMulti, setMulti, setSaveAs
-
Field Details
-
filterType
private int filterTypeIndicate what the current filter should be on opening the the dialog. The values for this are the static ints in ViewImageFileFilter. -
image
DOCUMENT ME! -
image2
DOCUMENT ME! -
LUT
DOCUMENT ME! -
LUT2
DOCUMENT ME! -
modelRGB
DOCUMENT ME! -
modelRGB2
DOCUMENT ME! -
putInFrame
private boolean putInFrameDOCUMENT ME! -
setLastImageFlag
private boolean setLastImageFlagDOCUMENT ME! -
xmlLinked
private boolean xmlLinkedDOCUMENT ME! -
rawInfo
-
-
Constructor Details
-
ViewOpenFileUI
public ViewOpenFileUI(boolean openDialog) Creates the way to open and verify files before they are loaded by the FileIO.- Parameters:
openDialog- a boolean that selects whether this UI should be built and displayed.trueindicates the UI will be displayed, andfalseis that it will not be displayed.
-
-
Method Details
-
findFilter
DOCUMENT ME!- Parameters:
chooser- DOCUMENT ME!filterType- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getImage
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getImage2
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getImagePath
Returns the path to the last opened image.- Returns:
- imagePath
-
getLUT
Returns the model LUT from the file.- Returns:
- ModelLUT -- returns LUT.
-
getLUT2
Returns the model LUT2 from the file.- Returns:
- ModelLUT -- returns LUT2.
-
hasXMLLinked
public boolean hasXMLLinked()Indicates whether there is an xml linked image.- Returns:
- xmllinked
-
isPutInFrame
public boolean isPutInFrame()Returns whether or not the new image will be put into a frame.- Returns:
- boolean -- if true, then image will be put into a frame.
-
openJSON
-
open
Open an image based on the suffix of the file.- Parameters:
multiFile- Flag to indicate if image is an array of 2D image files (true) or if the image is stored in a single file (false).imageset- DOCUMENT ME!- Returns:
- List of the names of the images that were opened.
-
open
Open an image based on the suffix of the file.- Parameters:
fileName- Full pathname of file to open.multiFile- Flag to indicate if image is an array of 2D image files (true) or if the image is stored in a single file (false).fileInfo- File info, can be null. In the case of RAW images read by the script, will not be null.- Returns:
- The image name of the image that was read in.
-
setFilterType
public void setFilterType(int fType) Set the current filter type to the given parameter.- Parameters:
fType- Indicate what the current filter should be on opening the the dialog. The values for this are the static ints in ViewImageFileFilter.
-
setLastImage
public void setLastImage(boolean flag) Indicates whether or not to put the image file path into the list of recently opened images.- Parameters:
flag- if true, then image path is put into recently used image list
-
setPutInFrame
public void setPutInFrame(boolean putIn) Indicates whether or not the new image should be put into a frame.- Parameters:
putIn- -- if true, then image is put into a frame.
-
setRawImageInfo
-
getRawImageInfo
-
readLinkedImage
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-