Class JDialogRegularizedIsotropicDiffusion

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

public class JDialogRegularizedIsotropicDiffusion extends JDialogScriptableBase implements AlgorithmInterface, ActionDiscovery
Dialog to get user input, then call a specified diffusion algorithm. It should be noted that the algorithms are executed in their own thread.
See Also:
  • Field Details

    • serialVersionUID

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

      private JCheckBox checkBox25D
      DOCUMENT ME!
    • useOCLCheckbox

      private JCheckBox useOCLCheckbox
    • contrast

      private float contrast
      DOCUMENT ME!
    • do25D

      private boolean do25D
      DOCUMENT ME!
    • doOCL

      private boolean doOCL
    • numIterations

      private int numIterations
      DOCUMENT ME!
    • regIsoDiffusionAlgo

      private AlgorithmRegularizedIsotropicDiffusion regIsoDiffusionAlgo
      DOCUMENT ME!
    • resultImage

      private ModelImage resultImage
      DOCUMENT ME!
    • srcImage

      private ModelImage srcImage
      DOCUMENT ME!
    • stdDev

      private float stdDev
      DOCUMENT ME!
    • textNumberIterations

      private JTextField textNumberIterations
      DOCUMENT ME!
    • textGaussian

      private JTextField textGaussian
      DOCUMENT ME!
    • textContrast

      private JTextField textContrast
      DOCUMENT ME!
  • Constructor Details

    • JDialogRegularizedIsotropicDiffusion

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

      public JDialogRegularizedIsotropicDiffusion(Frame frame, ModelImage im)
      Creates a new JDialogRegularizedIsotropicDiffusion object.
      Parameters:
      frame - DOCUMENT ME!
      im - DOCUMENT ME!
  • 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)
      DOCUMENT ME!
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algorithm - DOCUMENT ME!
    • getResultImage

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

      public void setContrast(float contrast)
      Accessor that sets the contrast.
      Parameters:
      contrast - DOCUMENT ME!
    • setDo25D

      public void setDo25D(boolean do25D)
      Accessor that sets if slice by slice processing occurs.
      Parameters:
      do25D - DOCUMENT ME!
    • setNumIterations

      public void setNumIterations(int numIterations)
      Accessor that sets the number of iterations.
      Parameters:
      numIterations - DOCUMENT ME!
    • setStdDev

      public void setStdDev(float stdDev)
      Accessor that sets the standard deviastion.
      Parameters:
      stdDev - DOCUMENT ME!
    • callAlgorithm

      protected void callAlgorithm()
      Once all the necessary variables are set, call the mean 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
    • doPostAlgorithmActions

      protected void doPostAlgorithmActions()
      Store the result image in the script runner's image table now that the action execution is finished.
      Overrides:
      doPostAlgorithmActions in class JDialogScriptableBase
    • 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.
    • buildParameterPanel

      private JPanel buildParameterPanel()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • init

      private void init()
      DOCUMENT ME!
    • setVariables

      private boolean setVariables()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • 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.