Class JDialogSnake

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

public class JDialogSnake extends JDialogBase implements AlgorithmInterface
Dialog to get user input, then call the algorithm. The user is able to control the degree of blurring in all dimensions and indicate if a correction factor be applied to the z-dimension to account for differing resolutions between the xy resolutions (intra-plane) and the z resolution (inter-plane). The user has the option to generate a new image or replace the source image. In addition the user can indicate if you wishes to have the algorithm applied to whole image or to the VOI regions. In should be noted, that the algorithms are executed in their own thread.
Version:
0.1 Nov 17, 1998
Author:
Matthew J. McAuliffe, Ph.D.
See Also:
  • Field Details

    • serialVersionUID

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

      private int boundaryDir
      DOCUMENT ME!
    • boundaryDirBox

      private JComboBox boundaryDirBox
      DOCUMENT ME!
    • boundaryIterations

      private int boundaryIterations
      DOCUMENT ME!
    • groupNum

      private int groupNum
      DOCUMENT ME!
    • image

      private ModelImage image
      DOCUMENT ME!
    • labelCorrected

      private JLabel labelCorrected
      DOCUMENT ME!
    • normFactor

      private float normFactor
      DOCUMENT ME!
    • propagate

      private JRadioButton propagate
      DOCUMENT ME!
    • propagationType

      private int propagationType
      DOCUMENT ME!
    • removeOriginal

      private boolean removeOriginal
      DOCUMENT ME!
    • removeOriginalCheckBox

      private JCheckBox removeOriginalCheckBox
      DOCUMENT ME!
    • resolutionCheckbox

      private JCheckBox resolutionCheckbox
      DOCUMENT ME!
    • scaleX

      private float scaleX
      DOCUMENT ME!
    • scaleY

      private float scaleY
      DOCUMENT ME!
    • scaleZ

      private float scaleZ
      DOCUMENT ME!
    • singleSlice

      private JRadioButton singleSlice
      DOCUMENT ME!
    • smoothness

      private float smoothness
      DOCUMENT ME!
    • snakeAlgo

      private AlgorithmSnake snakeAlgo
      DOCUMENT ME!
    • srcVOI

      private VOI srcVOI
      DOCUMENT ME!
    • textBoundaryIterations

      private JTextField textBoundaryIterations
      DOCUMENT ME!
    • textGaussX

      private JTextField textGaussX
      DOCUMENT ME!
    • textGaussY

      private JTextField textGaussY
      DOCUMENT ME!
    • textGaussZ

      private JTextField textGaussZ
      DOCUMENT ME!
    • textSmoothness

      private JTextField textSmoothness
      DOCUMENT ME!
    • titles

      private String[] titles
      DOCUMENT ME!
    • userInterface

      private ViewUserInterface userInterface
      DOCUMENT ME!
    • voiColor

      private Color voiColor
      DOCUMENT ME!
    • VOIs

      private ViewVOIVector VOIs
      DOCUMENT ME!
  • Constructor Details

    • JDialogSnake

      public JDialogSnake(Frame theParentFrame, ModelImage im)
      Creates new dialog for entering parameters for algorithm.
      Parameters:
      theParentFrame - Parent frame
      im - Source image.
    • JDialogSnake

      public JDialogSnake(Frame theParentFrame, ModelImage im, boolean separateThread)
      Creates new dialog for entering parameters for algorithm.
      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 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.
    • focusLost

      public void focusLost(FocusEvent event)
      When the user clicks the mouse out of a text field, resets the necessary variables.
      Specified by:
      focusLost in interface FocusListener
      Overrides:
      focusLost in class JDialogBase
      Parameters:
      event - Event that triggers this function
    • itemStateChanged

      public void itemStateChanged(ItemEvent event)
      Sets corrected label if resolution checkbox is checked.
      Specified by:
      itemStateChanged in interface ItemListener
      Overrides:
      itemStateChanged in class JDialogBase
      Parameters:
      event - Event that cause the method to fire
    • init

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