Class JDialogAnyTwoImagesSNR

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

public class JDialogAnyTwoImagesSNR extends JDialogBase implements AlgorithmInterface, ItemListener, WindowListener
Dialog to get user input any two images SNR Algorithms are executed in their own thread.
See Also:
  • Field Details

    • comboBoxCostFunct

      private JComboBox comboBoxCostFunct
      DOCUMENT ME!
    • cost

      private int cost
      DOCUMENT ME!
    • createRegCheckBox

      private JCheckBox createRegCheckBox
      DOCUMENT ME!
    • createRegImage

      private boolean createRegImage
      DOCUMENT ME!
    • image

      private ModelImage image
      DOCUMENT ME!
    • image2

      private ModelImage image2
      DOCUMENT ME!
    • imageComboBox

      private JComboBox imageComboBox
      DOCUMENT ME!
    • labelCost

      private JLabel labelCost
      DOCUMENT ME!
    • regCheckBox

      private JCheckBox regCheckBox
      DOCUMENT ME!
    • register

      private boolean register
      DOCUMENT ME!
    • snrAlgo

      private AlgorithmAnyTwoImagesSNR snrAlgo
      DOCUMENT ME!
    • UI

      private ViewUserInterface UI
    • scaleCheckBox

      private JCheckBox scaleCheckBox
    • scale

      private boolean scale
  • Constructor Details

    • JDialogAnyTwoImagesSNR

      public JDialogAnyTwoImagesSNR(ModelImage image)
      Creates a new JDialogFRET object.
      Parameters:
      image - DOCUMENT ME!
    • JDialogAnyTwoImagesSNR

      public JDialogAnyTwoImagesSNR(Frame theParentFrame, ModelImage im)
      Creates new dialog.
      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 algorithm when it has completed or failed to to complete, so that the dialog can be display the result image and/or clean up.
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algorithm - Algorithm that caused the event.
    • itemStateChanged

      public void itemStateChanged(ItemEvent event)
      itemStateChanged.
      Specified by:
      itemStateChanged in interface ItemListener
      Overrides:
      itemStateChanged in class JDialogBase
      Parameters:
      event - DOCUMENT ME!
    • setCost

      public void setCost(int cost)
      DOCUMENT ME!
      Parameters:
      cost - DOCUMENT ME!
    • setImage2

      public void setImage2(ModelImage image2)
      DOCUMENT ME!
      Parameters:
      image2 - DOCUMENT ME!
    • setRegister

      public void setRegister(boolean register)
      DOCUMENT ME!
      Parameters:
      register - DOCUMENT ME!
    • setScale

      public void setScale(boolean scale)
      Parameters:
      scale -
    • windowClosing

      public void windowClosing(WindowEvent event)
      Disposes of error dialog, then frame. Sets cancelled to true.
      Specified by:
      windowClosing in interface WindowListener
      Overrides:
      windowClosing in class JDialogBase
      Parameters:
      event - DOCUMENT ME!
    • buildComboBox

      private JComboBox buildComboBox(ModelImage image)
      Builds a list of images. Returns combobox. List must be all color or all black and white.
      Parameters:
      image - DOCUMENT ME!
      Returns:
      Newly created combo box.
    • callAlgorithm

      private void callAlgorithm()
      DOCUMENT ME!
    • init

      private void init()
      Initializes GUI components and displays dialog.
    • 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.