Class JDialogGenerateIsolines

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

public class JDialogGenerateIsolines extends JDialogScriptableBase implements AlgorithmInterface, ActionDiscovery, ScriptableActionInterface
See Also:
  • Field Details

    • image

      private ModelImage image
      DOCUMENT ME!
    • resultImage

      private ModelImage resultImage
      DOCUMENT ME!
    • textThreshold

      private JTextField textThreshold
    • threshold

      private double threshold
    • contourColor

      private Color contourColor
    • colorButton

      private JButton colorButton
    • colorChooser

      private ViewJColorChooser colorChooser
    • intensityR

      private float intensityR
    • intensityG

      private float intensityG
    • intensityB

      private float intensityB
    • imageMin

      private double imageMin
    • imageMax

      private double imageMax
    • defaultThreshold

      private double defaultThreshold
    • isoAlgo

      private AlgorithmGenerateIsolines isoAlgo
  • Constructor Details

    • JDialogGenerateIsolines

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

      public JDialogGenerateIsolines(Frame theParentFrame, ModelImage im)
  • Method Details

    • init

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

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
    • setVariables

      private boolean setVariables()
    • callAlgorithm

      protected void callAlgorithm()
      Description copied from class: JDialogScriptableBase
      Starts the algorithm. Already exists in most algorithm dialogs. Should be called during scripted execution and regular operation.
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • 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.
    • getResultImage

      public ModelImage getResultImage()
      Accessor that returns the image.
      Returns:
      the result image
    • setGUIFromParams

      protected void setGUIFromParams()
      Description copied from class: JDialogScriptableBase
      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
      Description copied from class: JDialogScriptableBase
      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.
    • getActionMetadata

      public ActionMetadata getActionMetadata()
      Return meta-information about this discoverable action for categorization and labeling purposes.
      Specified by:
      getActionMetadata in interface ActionDiscovery
      Returns:
      Metadata for this action.
    • createInputParameters

      public ParameterTable createInputParameters()
      Returns a table listing the input parameters of this algorithm (which should match up with the scripting parameters used in setGUIFromParams()).
      Specified by:
      createInputParameters in interface ActionDiscovery
      Returns:
      A parameter table listing the inputs of this algorithm.
    • createOutputParameters

      public ParameterTable createOutputParameters()
      Returns a table listing the output parameters of this algorithm (usually just labels used to obtain output image names later).
      Specified by:
      createOutputParameters in interface ActionDiscovery
      Returns:
      A parameter table listing the outputs of this algorithm.
    • getOutputImageName

      public String getOutputImageName(String imageParamName)
      Returns the name of an image output by this algorithm, the image returned depends on the parameter label given (which can be used to retrieve the image object from the image registry).
      Specified by:
      getOutputImageName in interface ActionDiscovery
      Parameters:
      imageParamName - The output image parameter label for which to get the image name.
      Returns:
      The image name of the requested output image parameter label.
    • isActionComplete

      public boolean isActionComplete()
      Returns whether the action has successfully completed its execution.
      Specified by:
      isActionComplete in interface ActionDiscovery
      Returns:
      True, if the action is complete. False, if the action failed or is still running.