Class ViewOpenFileUI


  • public class ViewOpenFileUI
    extends ViewFileChooserBase
    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:
    FileIO
    • Field Detail

      • filterType

        private int filterType
        Indicate what the current filter should be on opening the the dialog. The values for this are the static ints in ViewImageFileFilter.
      • LUT

        private ModelLUT LUT
        DOCUMENT ME!
      • LUT2

        private ModelLUT LUT2
        DOCUMENT ME!
      • modelRGB

        private ModelRGB modelRGB
        DOCUMENT ME!
      • modelRGB2

        private ModelRGB modelRGB2
        DOCUMENT ME!
      • putInFrame

        private boolean putInFrame
        DOCUMENT ME!
      • setLastImageFlag

        private boolean setLastImageFlag
        DOCUMENT ME!
      • xmlLinked

        private boolean xmlLinked
        DOCUMENT ME!
    • Constructor Detail

      • 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. true indicates the UI will be displayed, and false is that it will not be displayed.
    • Method Detail

      • findFilter

        public static final javax.swing.filechooser.FileFilter findFilter​(javax.swing.JFileChooser chooser,
                                                                          int filterType)
        DOCUMENT ME!
        Parameters:
        chooser - DOCUMENT ME!
        filterType - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • getImage

        public ModelImage getImage()
        DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • getImage2

        public ModelImage getImage2()
        DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • getImagePath

        public java.lang.String getImagePath()
        Returns the path to the last opened image.
        Returns:
        imagePath
      • getLUT

        public ModelLUT getLUT()
        Returns the model LUT from the file.
        Returns:
        ModelLUT -- returns LUT.
      • getLUT2

        public ModelLUT 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

        public java.util.ArrayList<java.util.Vector<java.lang.String>> openJSON()
      • open

        public java.util.ArrayList<java.util.Vector<java.lang.String>> open​(boolean multiFile)
        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

        public java.lang.String open​(java.lang.String fileName,
                                     boolean multiFile,
                                     FileInfoBase fileInfo)
        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

        public void setRawImageInfo​(RawImageInfo rawInfo)
      • readLinkedImage

        private ModelImage readLinkedImage()
        DOCUMENT ME!
        Returns:
        DOCUMENT ME!