Class JDialogBSmooth

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

public class JDialogBSmooth extends JDialogBase implements AlgorithmInterface
Dialog to get user input, then call the algorithm for smoothing VOIs. The user can choose whether or not to remove the original selected voi and whether or not to apply trimming to remove nearly collinear points. The user can choose the number of interpolation points. In 2D all selected curves of a selected voi are smoothed. In 3D all selected curves in all slices of a selected voi are smoothed. The original zslice information is only used so that the default number of interpolated points comes from a contour in zslice. If the original voi is not removed, the new voi has a new color. If the original voi is removed, the new voi has the same color.
See Also:
  • Field Details

    • serialVersionUID

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

      private int defaultPts
      DOCUMENT ME!
    • elementNum

      private int elementNum
      DOCUMENT ME!
    • groupNum

      private int groupNum
      DOCUMENT ME!
    • image

      private ModelImage image
      DOCUMENT ME!
    • nPts

      private int nPts
      DOCUMENT ME!
    • removeOriginal

      private boolean removeOriginal
      DOCUMENT ME!
    • removeOriginalCheckBox

      private JCheckBox removeOriginalCheckBox
      DOCUMENT ME!
    • smoothAlgo

      private AlgorithmBSmooth smoothAlgo
      DOCUMENT ME!
    • ellipticAlgo

    • mppAlgo

    • textInterpNPts

      private JTextField textInterpNPts
      DOCUMENT ME!
    • labelInterpNPts

      private JLabel labelInterpNPts
    • titles

      private String[] titles
      DOCUMENT ME!
    • trim

      private boolean trim
      DOCUMENT ME!
    • trimCheckBox

      private JCheckBox trimCheckBox
      DOCUMENT ME!
    • smoothGroup

      private ButtonGroup smoothGroup
    • BSplineButton

      private JRadioButton BSplineButton
    • ellipticButton

      private JRadioButton ellipticButton
    • minimumPerimeterPolygonButton

      private JRadioButton minimumPerimeterPolygonButton
    • doEllipticFourierDescription

      private boolean doEllipticFourierDescription
    • doMinimumPerimeterPolygon

      private boolean doMinimumPerimeterPolygon
    • voiColor

      private Color voiColor
      DOCUMENT ME!
    • VOIs

      private ViewVOIVector VOIs
      DOCUMENT ME!
    • voiManager

      private VOIManagerInterface voiManager
    • nPoints

      private int nPoints
  • Constructor Details

    • JDialogBSmooth

      public JDialogBSmooth(Frame theParentFrame, ModelImage im, int _zSlice)
      Creates new dialog for entering parameters for algorithm.
      Parameters:
      theParentFrame - Parent frame
      im - Source image
      _zSlice - Z slice of image.
    • JDialogBSmooth

      public JDialogBSmooth(Frame theParentFrame, VOIManagerInterface voiManager, ModelImage im, int _zSlice)
      Creates new dialog for entering parameters for algorithm.
      Parameters:
      theParentFrame - Parent frame
      im - Source image
      _zSlice - Z slice of image.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      actionPerformed - 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)
      algorithmPerformed - 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.