Class JDialogEmbeddedConfidenceEdgeDetection

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

public class JDialogEmbeddedConfidenceEdgeDetection extends JDialogScriptableBase implements AlgorithmInterface
See Also:
  • Field Details

  • Constructor Details

    • JDialogEmbeddedConfidenceEdgeDetection

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

      public JDialogEmbeddedConfidenceEdgeDetection(Frame theParentFrame, ModelImage im)
      Creates new dialog for entering parameters for embedded confidence edge detection.
      Parameters:
      theParentFrame - Parent frame
      im - Source image
  • Method Details

    • init

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

      public void actionPerformed(ActionEvent event)
      actionPerformed - 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
    • 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.
    • 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, 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.
    • callAlgorithm

      protected void callAlgorithm()
      Once all the necessary variables are set, call the Mean Shift Segmentation algorithm based on what type of image this is and whether or not there is a separate destination image.
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • setDisplayLocNew

      public void setDisplayLocNew()
      Accessor that sets the display loc variable to new, so that a new image is created once the algorithm completes.
    • setDisplayLocReplace

      public void setDisplayLocReplace()
      Accessor that sets the display loc variable to replace, so the current image is replaced once the algorithm completes.
    • 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.