Class JDialogMatchImages

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

public class JDialogMatchImages extends JDialogScriptableBase implements AlgorithmInterface
Dialog to get user input, then call the algorithm...
Version:
0.1 July 14, 2003
Author:
Zohara A Cohen, Ph.D.
See Also:
  • Field Details

    • serialVersionUID

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

      private JCheckBox checkOrigins
      DOCUMENT ME!
    • checkDimensions

      private JCheckBox checkDimensions
      DOCUMENT ME!
    • comboBoxImageA

      private JComboBox comboBoxImageA
      DOCUMENT ME!
    • comboBoxImageB

      private JComboBox comboBoxImageB
      DOCUMENT ME!
    • doOrigins

      private boolean doOrigins
      DOCUMENT ME!
    • doDimensions

      private boolean doDimensions
      DOCUMENT ME!
    • imageA

      private ModelImage imageA
      DOCUMENT ME!
    • imageB

      private ModelImage imageB
      DOCUMENT ME!
    • matchAlgo

      private AlgorithmMatchImages matchAlgo
      DOCUMENT ME!
    • padValTxt

      private JTextField padValTxt
      DOCUMENT ME!
    • padValue

      private int padValue
      DOCUMENT ME!
    • resultImageA

      private ModelImage resultImageA
      DOCUMENT ME!
    • resultImageB

      private ModelImage resultImageB
      DOCUMENT ME!
    • selectedNameA

      private String selectedNameA
      DOCUMENT ME!
    • selectedNameB

      private String selectedNameB
      DOCUMENT ME!
    • userInterface

      private ViewUserInterface userInterface
      DOCUMENT ME!
  • Constructor Details

    • JDialogMatchImages

      public JDialogMatchImages()
      Empty constructor needed for dynamic instantiation (used during scripting).
    • JDialogMatchImages

      public JDialogMatchImages(Frame theParentFrame, ModelImage im)
      Creates new match image dialog and displays.
      Parameters:
      theParentFrame - Parent frame.
      im - Source image.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Closes dialog box when the OK button is pressed and calls the algorithm.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - event that triggers function
    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algorithm)
      This method is required if the AlgorithmPerformed interface is implemented. It is called by the algorithms when it has completed or failed to complete, so that the dialog can display the result image and/or clean up.
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algorithm - Algorithm that caused the event.
    • getResultImageA

      public ModelImage getResultImageA()
      Accessor that returns the image.
      Returns:
      The result image.
    • getResultImageB

      public ModelImage getResultImageB()
      Accessor that returns the image.
      Returns:
      The result image.
    • setImageA

      public void setImageA(ModelImage im)
      Accessor that sets image A.
      Parameters:
      im - Image A.
    • setImageB

      public void setImageB(ModelImage im)
      Accessor that sets image B.
      Parameters:
      im - Image B.
    • callAlgorithm

      protected void callAlgorithm()
      Once all the necessary variables are set, call the Match Images algorithm.
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • doPostAlgorithmActions

      protected void doPostAlgorithmActions()
      Store the result image in the script runner's image table now that the action execution is finished.
      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.
    • buildComboBoxImage

      private JComboBox buildComboBoxImage()
      Builds a list of images to operate on from the template image.
      Returns:
      DOCUMENT ME!
    • init

      private void init()
      Sets up the GUI (panels, buttons, etc) and displays it on the screen.
    • setVariables

      private boolean setVariables()
      Use the GUI results to set up the variables needed to run the algorithm.
      Returns:
      true if parameters set successfully, false otherwise.