Class JDialogEvaluateMaskSegmentation

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

public class JDialogEvaluateMaskSegmentation extends JDialogScriptableBase implements AlgorithmInterface
Dialog to get user input, then call AlgorithmEvaluateMaskSegmentation. Selected image is test image, the image that is compared to a gold standard true image. Algorithms are executed in their own thread.
See Also:
  • Field Details

    • serialVersionUID

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

      private JComboBox comboBoxImage
      Combo box with image names for choosing test image.
    • evalSeg

      Algorithm to run from this dialog.
    • testImage

      private ModelImage testImage
      DOCUMENT ME!
    • titles

      private String[] titles
      Used to lock and unlock images.
    • trueImage

      private ModelImage trueImage
      DOCUMENT ME!
    • userInterface

      private ViewUserInterface userInterface
      Reference to userface.
  • Constructor Details

    • JDialogEvaluateMaskSegmentation

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

      public JDialogEvaluateMaskSegmentation(Frame theParentFrame, ModelImage im)
      Creates new evaluate segmentation dialog to get test image name.
      Parameters:
      theParentFrame - Parent frame.
      im - Source image.
  • Method Details

    • 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.
    • 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
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Closes dialog box when the OK button is pressed, set variables, 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 to complete.
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algorithm - Algorithm that caused the event.
    • setTestImage

      public void setTestImage(ModelImage im)
      Accessor to set the reference image.
      Parameters:
      im - Reference image.
    • buildImageEvalComboBox

      private JComboBox buildImageEvalComboBox(ModelImage image)
      Builds a list of images. Returns combobox.
      Parameters:
      image - DOCUMENT ME!
      Returns:
      Newly created combo box.
    • callAlgorithm

      protected void callAlgorithm()
      Sets arrays appropriately and calls registration algorithm, running it in it's own thread.
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • init

      private void init()
      Initializes GUI components and displays dialog.
    • setVariables

      private boolean setVariables()
      Sets the variables needed for calling the algorithm.
      Returns:
      true if successful in setting variables.