Class JDialogPaintGrow

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

public class JDialogPaintGrow extends JDialogBase implements RegionGrowDialog, ChangeListener, KeyListener
Dialog to get the upper and lower bounds for the region grow used by the paint functions.
Version:
1.0 Nov 9, 1999
Author:
Matthew J. McAuliffe, Ph.D.
See Also:
  • Field Details

    • serialVersionUID

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

      protected JCheckBox constrainBoundsCheckbox
      DOCUMENT ME!
    • currentFuzzy

      protected JLabel currentFuzzy
      DOCUMENT ME!
    • displayFuzzy

      protected boolean displayFuzzy
      DOCUMENT ME!
    • distanceCheckbox

      protected JCheckBox distanceCheckbox
      DOCUMENT ME!
    • enableVariableCheckbox

      protected boolean enableVariableCheckbox
      DOCUMENT ME!
    • frame

      protected Frame frame
      DOCUMENT ME!
    • fuzzyCheckbox

      protected JCheckBox fuzzyCheckbox
      DOCUMENT ME!
    • fuzzyImageCheckbox

      protected JCheckBox fuzzyImageCheckbox
      DOCUMENT ME!
    • fuzzySlider

      protected JSlider fuzzySlider
      DOCUMENT ME!
    • fuzzyThreshold

      protected float fuzzyThreshold
      DOCUMENT ME!
    • haveBlue

      protected boolean haveBlue
      DOCUMENT ME!
    • haveColor

      protected boolean haveColor
      DOCUMENT ME!
    • haveGreen

      protected boolean haveGreen
      DOCUMENT ME!
    • haveRed

      protected boolean haveRed
      DOCUMENT ME!
    • initialDelta

      protected int initialDelta
      DOCUMENT ME!
    • initialDeltaB

      protected int initialDeltaB
      DOCUMENT ME!
    • initialDeltaG

      protected int initialDeltaG
      DOCUMENT ME!
    • initialDeltaR

      protected int initialDeltaR
      DOCUMENT ME!
    • leadString

      protected String leadString
      DOCUMENT ME!
    • less

      protected float less
      DOCUMENT ME!
    • more

      protected float more
      DOCUMENT ME!
    • lowerMid

      protected JLabel lowerMid
      DOCUMENT ME!
    • lowerMidB

      protected JLabel lowerMidB
      DOCUMENT ME!
    • lowerMidG

      protected JLabel lowerMidG
      DOCUMENT ME!
    • lowerMidR

      protected JLabel lowerMidR
      DOCUMENT ME!
    • lowSlider

      protected JSlider lowSlider
      DOCUMENT ME!
    • lowSliderB

      protected JSlider lowSliderB
      DOCUMENT ME!
    • lowSliderField

      protected JTextField lowSliderField
      DOCUMENT ME!
    • lowSliderFieldB

      protected JTextField lowSliderFieldB
      DOCUMENT ME!
    • lowSliderFieldG

      protected JTextField lowSliderFieldG
      DOCUMENT ME!
    • lowSliderFieldR

      protected JTextField lowSliderFieldR
      DOCUMENT ME!
    • lowSliderG

      protected JSlider lowSliderG
      DOCUMENT ME!
    • lowSliderR

      protected JSlider lowSliderR
      DOCUMENT ME!
    • max

      protected float max
      DOCUMENT ME!
    • maxB

      protected float maxB
      DOCUMENT ME!
    • maxDistLabel

      protected JLabel maxDistLabel
      DOCUMENT ME!
    • maxDistTextF

      protected JTextField maxDistTextF
      DOCUMENT ME!
    • maxG

      protected float maxG
      DOCUMENT ME!
    • maximumFuzzy

      protected JLabel maximumFuzzy
      DOCUMENT ME!
    • maximumL

      protected JLabel maximumL
      DOCUMENT ME!
    • maximumLB

      protected JLabel maximumLB
      DOCUMENT ME!
    • maximumLG

      protected JLabel maximumLG
      DOCUMENT ME!
    • maximumLR

      protected JLabel maximumLR
      DOCUMENT ME!
    • maximumU

      protected JLabel maximumU
      DOCUMENT ME!
    • maximumUB

      protected JLabel maximumUB
      DOCUMENT ME!
    • maximumUG

      protected JLabel maximumUG
      DOCUMENT ME!
    • maximumUR

      protected JLabel maximumUR
      DOCUMENT ME!
    • maximumValue

      protected double maximumValue
      DOCUMENT ME!
    • maximumValueButton

      protected JButton maximumValueButton
      DOCUMENT ME!
    • maximumValueField

      protected JTextField maximumValueField
      DOCUMENT ME!
    • maxR

      protected float maxR
      DOCUMENT ME!
    • maxSizeLabel

      protected JLabel maxSizeLabel
      DOCUMENT ME!
    • maxSizeTextF

      protected JTextField maxSizeTextF
      DOCUMENT ME!
    • maxValue

      protected double maxValue
      DOCUMENT ME!
    • minValue

      protected double minValue
      DOCUMENT ME!
    • maxValueB

      protected double maxValueB
      DOCUMENT ME!
    • minValueB

      protected double minValueB
      DOCUMENT ME!
    • maxValueG

      protected double maxValueG
      DOCUMENT ME!
    • minValueG

      protected double minValueG
      DOCUMENT ME!
    • maxValueR

      protected double maxValueR
      DOCUMENT ME!
    • minValueR

      protected double minValueR
      DOCUMENT ME!
    • min

      protected float min
      DOCUMENT ME!
    • minB

      protected float minB
      DOCUMENT ME!
    • minG

      protected float minG
      DOCUMENT ME!
    • minimumFuzzy

      protected JLabel minimumFuzzy
      DOCUMENT ME!
    • minimumL

      protected JLabel minimumL
      DOCUMENT ME!
    • minimumLB

      protected JLabel minimumLB
      DOCUMENT ME!
    • minimumLG

      protected JLabel minimumLG
      DOCUMENT ME!
    • minimumLR

      protected JLabel minimumLR
      DOCUMENT ME!
    • minimumU

      protected JLabel minimumU
      DOCUMENT ME!
    • minimumUB

      protected JLabel minimumUB
      DOCUMENT ME!
    • minimumUG

      protected JLabel minimumUG
      DOCUMENT ME!
    • minimumUR

      protected JLabel minimumUR
      DOCUMENT ME!
    • minR

      protected float minR
      DOCUMENT ME!
    • paintGrowListeners

      protected Vector<PaintGrowListener> paintGrowListeners
      DOCUMENT ME!
    • posTextF

      protected JTextField posTextF
      DOCUMENT ME!
    • range

      protected double range
      DOCUMENT ME!
    • rangeB

      protected double rangeB
      DOCUMENT ME!
    • rangeG

      protected double rangeG
      DOCUMENT ME!
    • rangeR

      protected double rangeR
      DOCUMENT ME!
    • regionGrowAlgo

      protected AlgorithmRegionGrow regionGrowAlgo
      DOCUMENT ME!
    • setRadioBoth

      protected boolean setRadioBoth
      DOCUMENT ME!
    • sizeCheckbox

      protected JCheckBox sizeCheckbox
      DOCUMENT ME!
    • upperMid

      protected JLabel upperMid
      DOCUMENT ME!
    • upperMidB

      protected JLabel upperMidB
      DOCUMENT ME!
    • upperMidG

      protected JLabel upperMidG
      DOCUMENT ME!
    • upperMidR

      protected JLabel upperMidR
      DOCUMENT ME!
    • upSlider

      protected JSlider upSlider
      DOCUMENT ME!
    • upSliderB

      protected JSlider upSliderB
      DOCUMENT ME!
    • upSliderField

      protected JTextField upSliderField
      DOCUMENT ME!
    • upSliderFieldB

      protected JTextField upSliderFieldB
      DOCUMENT ME!
    • upSliderFieldG

      protected JTextField upSliderFieldG
      DOCUMENT ME!
    • upSliderFieldR

      protected JTextField upSliderFieldR
      DOCUMENT ME!
    • upSliderG

      protected JSlider upSliderG
      DOCUMENT ME!
    • upSliderR

      protected JSlider upSliderR
      DOCUMENT ME!
    • useVOI

      protected boolean useVOI
      DOCUMENT ME!
    • variableDeltasCheckbox

      protected JCheckBox variableDeltasCheckbox
      DOCUMENT ME!
    • variableThresholds

      protected boolean variableThresholds
      DOCUMENT ME!
    • voiCheckbox

      protected JCheckBox voiCheckbox
      DOCUMENT ME!
    • disableSliders

      private boolean disableSliders
      DOCUMENT ME!
    • disableSlidersB

      private boolean disableSlidersB
      DOCUMENT ME!
    • disableSlidersG

      private boolean disableSlidersG
      DOCUMENT ME!
    • disableSlidersR

      private boolean disableSlidersR
      DOCUMENT ME!
    • font12B

      private Font font12B
      DOCUMENT ME!
    • imageType

      private int imageType
      DOCUMENT ME!
    • lowSetFromField

      private boolean lowSetFromField
      DOCUMENT ME!
    • lowSetFromFieldB

      private boolean lowSetFromFieldB
      DOCUMENT ME!
    • lowSetFromFieldG

      private boolean lowSetFromFieldG
      DOCUMENT ME!
    • lowSetFromFieldR

      private boolean lowSetFromFieldR
      DOCUMENT ME!
    • tabbedPane

      private JTabbedPane tabbedPane
      DOCUMENT ME!
    • upSetFromField

      private boolean upSetFromField
      DOCUMENT ME!
    • upSetFromFieldB

      private boolean upSetFromFieldB
      DOCUMENT ME!
    • upSetFromFieldG

      private boolean upSetFromFieldG
      DOCUMENT ME!
    • upSetFromFieldR

      private boolean upSetFromFieldR
      DOCUMENT ME!
    • surfacePaint

      private SurfacePaint surfacePaint
      SurfacePaint reference
    • surfacePaint_WM

      private SurfacePaint_WM surfacePaint_WM
      SurfacePaint reference
  • Constructor Details

    • JDialogPaintGrow

      public JDialogPaintGrow(Frame theParentFrame, Vector<PaintGrowListener> paintListeners)
      Creates new dialog and sets up GUI components.
      Parameters:
      theParentFrame - Parent frame.
      paintListeners - DOCUMENT ME!
    • JDialogPaintGrow

      public JDialogPaintGrow(Frame theParentFrame, Vector<PaintGrowListener> paintListeners, boolean isVisible)
      Creates new dialog and sets up GUI components.
      Parameters:
      theParentFrame - Parent frame.
      paintListeners - DOCUMENT ME!
      isVisible - Dialog visible or not.
    • JDialogPaintGrow

      public JDialogPaintGrow(Frame theParentFrame, Frame attachedFrame, Vector<PaintGrowListener> paintListeners)
      Creates new dialog and sets up GUI components.
      Parameters:
      theParentFrame - Parent frame (the frame with the component image this dialog should perform region grows on).
      attachedFrame - the frame this dialog should be attached to
      paintListeners - DOCUMENT ME!
    • JDialogPaintGrow

      public JDialogPaintGrow(Frame theParentFrame, Vector<PaintGrowListener> paintListeners, boolean setRadioBoth, String leadString)
      Creates new dialog and sets up GUI components.
      Parameters:
      theParentFrame - Parent frame.
      paintListeners - DOCUMENT ME!
      setRadioBoth - enabled the both button option on frame
      leadString - DOCUMENT ME!
    • JDialogPaintGrow

      public JDialogPaintGrow(Frame theParentFrame, SurfacePaint surfacePaint, Vector<PaintGrowListener> paintListeners)
      Creates new dialog and sets up GUI components.
      Parameters:
      theParentFrame - Parent frame.
      surfacePaint - for Painting on a surface
      paintListeners - DOCUMENT ME!
    • JDialogPaintGrow

      public JDialogPaintGrow(Frame theParentFrame, SurfacePaint_WM surfacePaint, Vector<PaintGrowListener> paintListeners)
      Creates new dialog and sets up GUI components.
      Parameters:
      theParentFrame - Parent frame.
      surfacePaint - for Painting on a surface
      paintListeners - DOCUMENT ME!
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Sets parameters in PaintGrowListener when Apply is pressed. Closes dialog box in response to both Apply and Cancel buttons.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - Event that triggers function.
    • boundsConstrained

      public boolean boundsConstrained()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getDisplayFuzzy

      public boolean getDisplayFuzzy()
      Accessor that returns displayFuzzy.
      Specified by:
      getDisplayFuzzy in interface RegionGrowDialog
      Returns:
      displayFuzzy
    • getFuzzyThreshold

      public float getFuzzyThreshold()
      Accessor that returns the fuzzy threshold.
      Specified by:
      getFuzzyThreshold in interface RegionGrowDialog
      Returns:
      fuzzy threshold
    • getLowerBound

      public float getLowerBound()
      Accessor to the lower bound slider.
      Specified by:
      getLowerBound in interface RegionGrowDialog
      Returns:
      The value to be subtracted to the seed intensity the defines the lower intensity value that the region can grow into.
    • getLowerBoundB

      public float getLowerBoundB()
      Accessor to the lower bound blue slider.
      Specified by:
      getLowerBoundB in interface RegionGrowDialog
      Returns:
      The value to be subtracted to the seed blue intensity the defines the lower blue intensity value that the region can grow into.
    • getLowerBoundG

      public float getLowerBoundG()
      Accessor to the lower bound green slider.
      Specified by:
      getLowerBoundG in interface RegionGrowDialog
      Returns:
      The value to be subtracted to the seed green intensity the defines the lower green intensity value that the region can grow into.
    • getLowerBoundR

      public float getLowerBoundR()
      Accessor to the lower bound red slider.
      Specified by:
      getLowerBoundR in interface RegionGrowDialog
      Returns:
      The value to be subtracted to the seed red intensity the defines the lower red intensity value that the region can grow into.
    • getMaxDistance

      public int getMaxDistance()
      Accessor that returns the maximum distance from the seed point to a point in the object.
      Specified by:
      getMaxDistance in interface RegionGrowDialog
      Returns:
      The maximum distance from the seed point to the object in units of the image.
    • getMaxSize

      public int getMaxSize()
      Accessor that returns the maximum size of the object.
      Specified by:
      getMaxSize in interface RegionGrowDialog
      Returns:
      The maximum size of the object in units of the image.
    • getUpperBound

      public float getUpperBound()
      Accessor to the upper bound slider.
      Specified by:
      getUpperBound in interface RegionGrowDialog
      Returns:
      The value to be added to the seed intensity the defines the upper intensity value that the region can grow into.
    • getUpperBoundB

      public float getUpperBoundB()
      Accessor to the upper bound blue slider.
      Specified by:
      getUpperBoundB in interface RegionGrowDialog
      Returns:
      The value to be added to the seed blue intensity the defines the upper blue intensity value that the region can grow into.
    • getUpperBoundG

      public float getUpperBoundG()
      Accessor to the upper bound green slider.
      Specified by:
      getUpperBoundG in interface RegionGrowDialog
      Returns:
      The value to be added to the seed green intensity the defines the upper green intensity value that the region can grow into.
    • getUpperBoundR

      public float getUpperBoundR()
      Accessor to the upper bound red slider.
      Specified by:
      getUpperBoundR in interface RegionGrowDialog
      Returns:
      The value to be added to the seed red intensity the defines the upper red intensity value that the region can grow into.
    • getUseVOI

      public boolean getUseVOI()
      Accessor that returns useVOI.
      Specified by:
      getUseVOI in interface RegionGrowDialog
      Returns:
      useVOI
    • getVariableThresholds

      public boolean getVariableThresholds()
      Accessor that tells if the thresholds vary with region growth.
      Specified by:
      getVariableThresholds in interface RegionGrowDialog
      Returns:
      variableThresholds
    • keyPressed

      public void keyPressed(KeyEvent e)
      DOCUMENT ME!
      Specified by:
      keyPressed in interface KeyListener
      Parameters:
      e - DOCUMENT ME!
    • keyReleased

      public void keyReleased(KeyEvent e)
      Placeholder required by KeyListener. Does nothing.
      Specified by:
      keyReleased in interface KeyListener
      Parameters:
      e - KeyEvent
    • keyTyped

      public void keyTyped(KeyEvent e)
      Placeholder required by KeyListener. Does nothing.
      Specified by:
      keyTyped in interface KeyListener
      Parameters:
      e - KeyEvent
    • notifyPaintListeners

      public void notifyPaintListeners(boolean backup)
      Tells images which are watching the paint region grow to update themselves.
      Parameters:
      backup - whether to backup the paint region before updating it (to allow for undos)
    • notifyPaintListeners

      public void notifyPaintListeners(boolean isRegionGrow, boolean backup, BitSet paintMask)
      Tells images which are watching the paint region grow to update themselves.
      Specified by:
      notifyPaintListeners in interface RegionGrowDialog
      Parameters:
      isRegionGrow - whether the update was caused by a region grow or by something else (eg - eraseall)
      backup - whether to backup the paint region before updating it (to allow for undos).
      paintMask - the paint mask to tell the listeners about.
    • resetDialogs

      public void resetDialogs()
      Sets the reference to this dialog for all of the images listening to it to null.
      Specified by:
      resetDialogs in interface RegionGrowDialog
    • setPositionText

      public void setPositionText(String posString)
      Sets text in positionPanel.
      Specified by:
      setPositionText in interface RegionGrowDialog
      Parameters:
      posString - String to put in text field.
    • setRegionGrowAlgo

      public void setRegionGrowAlgo(AlgorithmRegionGrow regionGrowAlgo)
      DOCUMENT ME!
      Specified by:
      setRegionGrowAlgo in interface RegionGrowDialog
      Parameters:
      regionGrowAlgo - DOCUMENT ME!
    • stateChanged

      public void stateChanged(ChangeEvent e)
      Sets values based on knob along slider.
      Specified by:
      stateChanged in interface ChangeListener
      Parameters:
      e - Event that triggered this function
    • windowClosing

      public void windowClosing(WindowEvent event)
      DOCUMENT ME!
      Specified by:
      windowClosing in interface WindowListener
      Overrides:
      windowClosing in class JDialogBase
      Parameters:
      event - Event that triggered this method.
    • init

      protected void init()
      Initializes GUI components.
    • buildFuzzyPanel

      private JPanel buildFuzzyPanel()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • buildStaticPanel

      private JPanel buildStaticPanel()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • focusLost

      public void focusLost(FocusEvent e)
      Description copied from class: JDialogBase
      Unchanged.
      Specified by:
      focusLost in interface FocusListener
      Overrides:
      focusLost in class JDialogBase
      Parameters:
      e - FocusEvent