Class JDialogStandardDeviationThreshold

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

public class JDialogStandardDeviationThreshold extends JDialogScriptableBase implements AlgorithmInterface
The Standard Deviation Threshold works by first having an active VOI in which the standard deviation and other statistics are calculated. The dialog allows the user to enter the number of standard deviations and the values outside the range for the thersholding process. The theresholding can be done on the whole image or alternatively, on other VOIS that are not active that might be on the image. The destination can either be a new image or paint in existing image except if the src image is a color image.
Author:
pandyan
See Also:
  • Field Details

    • srcImage

      private ModelImage srcImage
      src image, result image
    • resultImage

      private ModelImage resultImage
      src image, result image
    • VOIs

      private ViewVOIVector VOIs
      vois in image
    • groupNum

      private int groupNum
      number for id of VOI
    • srcVOI

      private VOI srcVOI
      src VOI used for thresholding ME!
    • algoVOI

      private AlgorithmVOIProps algoVOI
      handle to algorithm
    • UI

      private ViewUserInterface UI
      handle to UI
    • mainPanel

      private JPanel mainPanel
      panels
    • voiStatsPanel

      private JPanel voiStatsPanel
      panels
    • voiStatsLeftPanel

      private JPanel voiStatsLeftPanel
      panels
    • voiStatsRightPanel

      private JPanel voiStatsRightPanel
      panels
    • thresholdParametersPanel

      private JPanel thresholdParametersPanel
      panels
    • thresholdParametersLeftPanel

      private JPanel thresholdParametersLeftPanel
      panels
    • thresholdParametersRightPanel

      private JPanel thresholdParametersRightPanel
      panels
    • destinationPanel

      private JPanel destinationPanel
      panels
    • thresholdPanel

      private JPanel thresholdPanel
      panels
    • stdDevTextField

      private JTextField stdDevTextField
      text fields
    • stdDevTextFieldR

      private JTextField stdDevTextFieldR
      text fields
    • stdDevTextFieldG

      private JTextField stdDevTextFieldG
      text fields
    • stdDevTextFieldB

      private JTextField stdDevTextFieldB
      text fields
    • valuesOutsideTextField

      private JTextField valuesOutsideTextField
      text fields
    • valuesOutsideTextFieldR

      private JTextField valuesOutsideTextFieldR
      text fields
    • valuesOutsideTextFieldG

      private JTextField valuesOutsideTextFieldG
      text fields
    • valuesOutsideTextFieldB

      private JTextField valuesOutsideTextFieldB
      text fields
    • inverseThresholdCheckBox

      private JCheckBox inverseThresholdCheckBox
      checkbox for inverse threshold
    • setMinThresholdCheckBox

      private JCheckBox setMinThresholdCheckBox
      checkbox for inverse threshold
    • setMinThresholdCheckBoxR

      private JCheckBox setMinThresholdCheckBoxR
      checkbox for inverse threshold
    • setMinThresholdCheckBoxG

      private JCheckBox setMinThresholdCheckBoxG
      checkbox for inverse threshold
    • setMinThresholdCheckBoxB

      private JCheckBox setMinThresholdCheckBoxB
      checkbox for inverse threshold
    • setMaxThresholdCheckBox

      private JCheckBox setMaxThresholdCheckBox
      checkbox for inverse threshold
    • setMaxThresholdCheckBoxR

      private JCheckBox setMaxThresholdCheckBoxR
      checkbox for inverse threshold
    • setMaxThresholdCheckBoxG

      private JCheckBox setMaxThresholdCheckBoxG
      checkbox for inverse threshold
    • setMaxThresholdCheckBoxB

      private JCheckBox setMaxThresholdCheckBoxB
      checkbox for inverse threshold
    • maxIntensity

      private float maxIntensity
      max intensities calculatd using std dev
    • maxIntensityR

      private float maxIntensityR
      max intensities calculatd using std dev
    • maxIntensityG

      private float maxIntensityG
      max intensities calculatd using std dev
    • maxIntensityB

      private float maxIntensityB
      max intensities calculatd using std dev
    • minIntensity

      private float minIntensity
      min intensities calculatd using std dev
    • minIntensityR

      private float minIntensityR
      min intensities calculatd using std dev
    • minIntensityG

      private float minIntensityG
      min intensities calculatd using std dev
    • minIntensityB

      private float minIntensityB
      min intensities calculatd using std dev
    • avgIntensity

      private float avgIntensity
      average intensities in VOI
    • avgIntensityR

      private float avgIntensityR
      average intensities in VOI
    • avgIntensityG

      private float avgIntensityG
      average intensities in VOI
    • avgIntensityB

      private float avgIntensityB
      average intensities in VOI
    • stdDev

      private float stdDev
      standard deviations in VOI
    • stdDevR

      private float stdDevR
      standard deviations in VOI
    • stdDevG

      private float stdDevG
      standard deviations in VOI
    • stdDevB

      private float stdDevB
      standard deviations in VOI
    • numStdDev

      private float numStdDev
      number of standard deviations used in thresholding
    • numStdDevR

      private float numStdDevR
      number of standard deviations used in thresholding
    • numStdDevG

      private float numStdDevG
      number of standard deviations used in thresholding
    • numStdDevB

      private float numStdDevB
      number of standard deviations used in thresholding
    • valuesOutside

      private float valuesOutside
      intensity values to be used in thresholding
    • valuesOutsideR

      private float valuesOutsideR
      intensity values to be used in thresholding
    • valuesOutsideG

      private float valuesOutsideG
      intensity values to be used in thresholding
    • valuesOutsideB

      private float valuesOutsideB
      intensity values to be used in thresholding
    • alg

      handle to algorithm
    • newImageRadio

      private JRadioButton newImageRadio
      radio buttons
    • paintRadio

      private JRadioButton paintRadio
      radio buttons
    • wholeImageRadio

      private JRadioButton wholeImageRadio
      radio buttons
    • voiRegionsRadio

      private JRadioButton voiRegionsRadio
      radio buttons
    • destinationRadioGroup

      private ButtonGroup destinationRadioGroup
      radio groups
    • thresholdRadioGroup

      private ButtonGroup thresholdRadioGroup
      radio groups
    • newImageDestination

      private boolean newImageDestination
      flags for destination and threshold
    • wholeImageThreshold

      private boolean wholeImageThreshold
      flags for destination and threshold
    • isColorImage

      private boolean isColorImage
      boolean for color image
    • inverseThreshold

      private boolean inverseThreshold
      boolean for inverse threshold
    • outMax

      private double outMax
      image type max
    • outMin

      private double outMin
      image type min
    • scriptFail

      private boolean scriptFail
      boolean telling if script failed
    • numPixels

      private int numPixels
    • sumPixelInten

      double sumPixelInten
    • sumPixelIntenR

      double sumPixelIntenR
    • sumPixelIntenG

      double sumPixelIntenG
    • sumPixelIntenB

      double sumPixelIntenB
  • Constructor Details

    • JDialogStandardDeviationThreshold

      public JDialogStandardDeviationThreshold()
      empty constructor
    • JDialogStandardDeviationThreshold

      public JDialogStandardDeviationThreshold(Frame theParentFrame, ModelImage im)
      constructor
      Parameters:
      theParentFrame -
      im -
  • Method Details

    • init

      public void init()
      init
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      action performed
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event -
    • validateParams

      public boolean validateParams()
      validate params
    • callAlgorithm

      protected void callAlgorithm()
      call algorithm
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algorithm)
      algorithm performed
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algorithm - the algorithm which has just completed
    • getRangeString

      private String getRangeString(int imageType)
      Parameters:
      imageType -
      Returns:
    • setOutMinAndMax

      private void setOutMinAndMax(int imageType)
      sets out min and max...used in scripting
      Parameters:
      imageType -
    • storeParamsFromGUI

      protected void storeParamsFromGUI() throws ParserException
      store params
      Specified by:
      storeParamsFromGUI in class JDialogScriptableBase
      Throws:
      ParserException
    • setGUIFromParams

      protected void setGUIFromParams()
      set gui from params
      Specified by:
      setGUIFromParams in class JDialogScriptableBase
    • getActiveVOIs

      private ViewVOIVector getActiveVOIs(ModelImage srcImage)
      This legacy code returns all active vois for a given source image. PlugIns should explicitly identify VOIs they would like to process using AlgorithmVOIProps, because the user may have already added other VOIs to srcImage, or VOIs may be created by the algorithm in an unexpected way. This plugin relied on AlgorithmVOIProp's getActiveVOIs() code, so that code has been moved into this plugin. Use of this method is discouraged, as shown by the old documentation for this method: not for use. should be moved to a better location. does NOT clone the VOIs that it find to be active, and inserts into a new ViewVOIVector. if no VOIs are active, the ViewVOIVector returned is null.
      Returns:
      All the active VOIs for a given srcImage.