Class JDialogBoundaryAttenuation

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

public class JDialogBoundaryAttenuation extends JDialogScriptableBase implements AlgorithmInterface
Dialog for an algorithm which reduces the intensity of an image near the boundary of the VOIs within an image volume.
Author:
Evan McCreedy
See Also:
  • Field Details

    • serialVersionUID

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

      private AlgorithmBoundaryAttenuation attenuationAlgo
      The attenuation algorithm.
    • destImage

      private ModelImage destImage
      The attenuated image.
    • maxAttenuation

      private float maxAttenuation
      The maximum amount of attenuation to apply to the image (0 = no attenuation, 1 = full attenuation).
    • maxAttenuationTF

      private JTextField maxAttenuationTF
      Maximum attenuation text field.
    • numErosions

      private int numErosions
      The number of levels of attenuation to perform (done through morphological erosion).
    • numErosionsTF

      private JTextField numErosionsTF
      Number of erosions text field.
    • srcImage

      private ModelImage srcImage
      The image to attenuate.
    • userInterface

      private ViewUserInterface userInterface
      The MIPAV user interface.
  • Constructor Details

    • JDialogBoundaryAttenuation

      public JDialogBoundaryAttenuation()
      Empty constructor needed for dynamic instantiation.
    • JDialogBoundaryAttenuation

      public JDialogBoundaryAttenuation(Frame theParentFrame, ModelImage im)
      Set up the algorithm dialog.
      Parameters:
      theParentFrame - the (image) frame that the dialog is attached to
      im - the image to apply the algorithm to
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Handle action events from the GUI.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - GUI action event
    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algo)
      Respond to the completion or failure of the algorithm we called.
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algo - the algorithm which has completed execution
    • callAlgorithm

      protected void callAlgorithm()
      Construct and run the algorithm.
      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.
    • init

      private void init()
      Set up the algorithm GUI.
    • 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.