Class JDialogLoadImage

All Implemented Interfaces:
AlgorithmInterface, ScriptableActionInterface, DialogDefaultsInterface, ActionListener, FocusListener, ItemListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class JDialogLoadImage extends JDialogScriptableBase implements AlgorithmInterface
JDialogLoadImage allows the MIPAV user to import an image (namely, ImageA) from another image frame. The titles of other images are listed in a drop-down combo-box, as they are found by MIPAV when the dialog is opened. The dialog is modal and the okay button will not be available if there is only one frame open (the only way to bring up the dialog). The dialog will not discriminate between frames which have the same names, taking the first frame it finds which the selected name.

This class has the option to include a "Browse Files..." button; however, this functionality has not been completely implemented.

Version:
1.00
Author:
David Parsons
See Also:
  • Field Details

    • LOAD_FROM_FRAME

      public static final int LOAD_FROM_FRAME
      DOCUMENT ME!
      See Also:
    • LOAD_FROM_FILE

      public static final int LOAD_FROM_FILE
      DOCUMENT ME!
      See Also:
    • LOAD_BLANK

      public static final int LOAD_BLANK
      DOCUMENT ME!
      See Also:
    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • browseButton

      private JButton browseButton
      DOCUMENT ME!
    • dataType

      private int dataType
      If blank image is to be loaded...need the type (for non-color images).
    • doOrigins

      private boolean doOrigins
      DOCUMENT ME!
    • doOrients

      private boolean doOrients
      DOCUMENT ME!
    • image

      private ModelImage image
      Source image.
    • imageChooser

      private JComboBox imageChooser
      DOCUMENT ME!
    • importImage

      private ModelImage importImage
      image taken from the frame to be imported:.
    • importLUT

      private ModelLUT importLUT
    • importRGB

      private ModelRGB importRGB
    • loadType

      private int loadType
      are we loading from frame, file, or blank.
    • matchOrigins

      private JCheckBox matchOrigins
      DOCUMENT ME!
    • matchOrients

      private JCheckBox matchOrients
      DOCUMENT ME!
    • picListingPanel

      private JPanel picListingPanel
      DOCUMENT ME!
    • radioBool

      private JRadioButton radioBool
      DOCUMENT ME!
    • radioByte

      private JRadioButton radioByte
      DOCUMENT ME!
    • radioDouble

      private JRadioButton radioDouble
      DOCUMENT ME!
    • radioFloat

      private JRadioButton radioFloat
      DOCUMENT ME!
    • radioInt

      private JRadioButton radioInt
      DOCUMENT ME!
    • radioLong

      private JRadioButton radioLong
      DOCUMENT ME!
    • radioShort

      private JRadioButton radioShort
      DOCUMENT ME!
    • radioUByte

      private JRadioButton radioUByte
      DOCUMENT ME!
    • radioUInt

      private JRadioButton radioUInt
      DOCUMENT ME!
    • radioUShort

      private JRadioButton radioUShort
      DOCUMENT ME!
    • defaultBlueInput

      private JTextField defaultBlueInput
      DOCUMENT ME!
    • defaultGreenInput

      private JTextField defaultGreenInput
      DOCUMENT ME!
    • defaultRedInput

      private JTextField defaultRedInput
      DOCUMENT ME!
    • resultImage

      private ModelImage resultImage
      a cloned version of importImage that will be inserted into the source images's B slot.
    • userInterface

      private ViewUserInterface userInterface
      DOCUMENT ME!
  • Constructor Details

    • JDialogLoadImage

      public JDialogLoadImage()
      Empty Constructor for script.
    • JDialogLoadImage

      public JDialogLoadImage(Frame parentFrame, ModelImage srcImage, int type)
      Creates a new JDialogLoadImage object.
      Parameters:
      parentFrame - DOCUMENT ME!
      srcImage - DOCUMENT ME!
      type - DOCUMENT ME!
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent ae)
      when a button is clicked.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      ae - DOCUMENT ME!
    • addBrowseFilesButton

      public void addBrowseFilesButton()
      adds the "Browse Files ...." button to the right of the panel.
    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algo)
      DOCUMENT ME!
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algo - DOCUMENT ME!
    • callAlgorithm

      public void callAlgorithm()
      DOCUMENT ME!
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • getMatchOrients

      public boolean getMatchOrients()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getMatchOrigins

      public boolean getMatchOrigins()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • doPostAlgorithmActions

      protected void doPostAlgorithmActions()
      Used to perform actions after the execution of the algorithm is completed (e.g., put the result image in the image table). Defaults to no action, override to actually have it do something.
      Overrides:
      doPostAlgorithmActions in class JDialogScriptableBase
    • setGUIFromParams

      protected void setGUIFromParams()
      Set the dialog GUI using the script parameters while running this algorithm as part of a script.
      Specified by:
      setGUIFromParams in class JDialogScriptableBase
    • storeParamsFromGUI

      protected void storeParamsFromGUI() throws ParserException
      Record the parameters just used to run this algorithm in a script.
      Specified by:
      storeParamsFromGUI in class JDialogScriptableBase
      Throws:
      ParserException - If there is a problem creating/recording the new parameters.
    • init

      private void init()
      DOCUMENT ME!
    • setVariables

      private boolean setVariables()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!