Class JDialogFastMarching

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

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

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • image25DCheckbox

      private JCheckBox image25DCheckbox
      Process each slice independently, or as a 3D image.
    • image

      private ModelImage image
      Source Image
    • textIters

      private JTextField textIters
      Number of Iterations
    • textGMScale

      private JTextField textGMScale
      Gradient Magnitude Scale factor
    • textSigmoidAlpha

      private JTextField textSigmoidAlpha
      Sigmoid Alpha parameter
    • textSigmoiBeta

      private JTextField textSigmoiBeta
      Sigmoid Beta parameter
    • textSigmoidMin

      private JTextField textSigmoidMin
      Sigmoid Min parameter
    • textSigmoidMax

      private JTextField textSigmoidMax
      Sigmoid Max parameter
    • textCoarseMax

      private JTextField textCoarseMax
      Max coarse iterations.
    • textMaxDistance

      private JTextField textMaxDistance
      Max Distance parameter
    • textAdvectionWeight

      private JTextField textAdvectionWeight
      Advection weight parameter
    • textPropagationWeight

      private JTextField textPropagationWeight
      Propagation weight parameter
    • textCurvatureWeight

      private JTextField textCurvatureWeight
      Curvature weight parameter
    • textLaplacianWeight

      private JTextField textLaplacianWeight
      Laplacian weight parameter
    • textMaxEvolution

      private JTextField textMaxEvolution
      Maximum Evolution steps
    • m_iIters

      private int m_iIters
    • m_fGMScale

      private float m_fGMScale
    • m_fSAlpha

      private float m_fSAlpha
    • m_fSBeta

      private float m_fSBeta
    • m_fSMin

      private float m_fSMin
    • m_fSMax

      private float m_fSMax
    • m_iCoarseMax

      private int m_iCoarseMax
    • m_fMaxDistance

      private float m_fMaxDistance
    • m_fAdvectionWeight

      private float m_fAdvectionWeight
    • m_fPropagationWeight

      private float m_fPropagationWeight
    • m_fCurvatureWeight

      private float m_fCurvatureWeight
    • m_fLaplacianWeight

      private float m_fLaplacianWeight
    • m_iEvolveMax

      private int m_iEvolveMax
    • m_iFilterType

      private int m_iFilterType
    • m_bImage25D

      private boolean m_bImage25D
  • Constructor Details

    • JDialogFastMarching

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

      public JDialogFastMarching(Frame theParentFrame, ModelImage im, int iFilterType)
      Creates new dialog for finding the level set.
      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 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.
    • init

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

      public ActionMetadata getActionMetadata()
      Description copied from interface: ActionDiscovery
      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()
      Description copied from interface: ActionDiscovery
      Returns a table listing the input parameters of this algorithm (which should match up with the scripting parameters used in
      invalid reference
      #setGUIFromParams()
      ).
      Specified by:
      createInputParameters in interface ActionDiscovery
      Returns:
      A parameter table listing the inputs of this algorithm.
    • createOutputParameters

      public ParameterTable createOutputParameters()
      Description copied from interface: ActionDiscovery
      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)
      Description copied from interface: ActionDiscovery
      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()
      Description copied from interface: ActionDiscovery
      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.
    • 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
    • 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.