Class JDialogStandardDeviationThreshold

  • All Implemented Interfaces:
    AlgorithmInterface, ScriptableActionInterface, DialogDefaultsInterface, java.awt.event.ActionListener, java.awt.event.FocusListener, java.awt.event.ItemListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.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:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.JDialog

        javax.swing.JDialog.AccessibleJDialog
      • Nested classes/interfaces inherited from class java.awt.Dialog

        java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
      • Nested classes/interfaces inherited from class java.awt.Window

        java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent event)
      action performed
      void algorithmPerformed​(AlgorithmBase algorithm)
      algorithm performed
      protected void callAlgorithm()
      call algorithm
      private ViewVOIVector getActiveVOIs​(ModelImage srcImage)
      This legacy code returns all active vois for a given source image.
      private java.lang.String getRangeString​(int imageType)  
      void init()
      init
      protected void setGUIFromParams()
      set gui from params
      private void setOutMinAndMax​(int imageType)
      sets out min and max...used in scripting
      protected void storeParamsFromGUI()
      store params
      boolean validateParams()
      validate params
      • Methods inherited from class javax.swing.JDialog

        addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
      • Methods inherited from class java.awt.Dialog

        addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
      • Methods inherited from class java.awt.Window

        addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • srcImage

        private ModelImage srcImage
        src image, result image
      • resultImage

        private ModelImage resultImage
        src image, result image
      • groupNum

        private int groupNum
        number for id of VOI
      • srcVOI

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

        private javax.swing.JPanel mainPanel
        panels
      • voiStatsPanel

        private javax.swing.JPanel voiStatsPanel
        panels
      • voiStatsLeftPanel

        private javax.swing.JPanel voiStatsLeftPanel
        panels
      • voiStatsRightPanel

        private javax.swing.JPanel voiStatsRightPanel
        panels
      • thresholdParametersPanel

        private javax.swing.JPanel thresholdParametersPanel
        panels
      • thresholdParametersLeftPanel

        private javax.swing.JPanel thresholdParametersLeftPanel
        panels
      • thresholdParametersRightPanel

        private javax.swing.JPanel thresholdParametersRightPanel
        panels
      • destinationPanel

        private javax.swing.JPanel destinationPanel
        panels
      • thresholdPanel

        private javax.swing.JPanel thresholdPanel
        panels
      • stdDevTextField

        private javax.swing.JTextField stdDevTextField
        text fields
      • stdDevTextFieldR

        private javax.swing.JTextField stdDevTextFieldR
        text fields
      • stdDevTextFieldG

        private javax.swing.JTextField stdDevTextFieldG
        text fields
      • stdDevTextFieldB

        private javax.swing.JTextField stdDevTextFieldB
        text fields
      • valuesOutsideTextField

        private javax.swing.JTextField valuesOutsideTextField
        text fields
      • valuesOutsideTextFieldR

        private javax.swing.JTextField valuesOutsideTextFieldR
        text fields
      • valuesOutsideTextFieldG

        private javax.swing.JTextField valuesOutsideTextFieldG
        text fields
      • valuesOutsideTextFieldB

        private javax.swing.JTextField valuesOutsideTextFieldB
        text fields
      • inverseThresholdCheckBox

        private javax.swing.JCheckBox inverseThresholdCheckBox
        checkbox for inverse threshold
      • setMinThresholdCheckBox

        private javax.swing.JCheckBox setMinThresholdCheckBox
        checkbox for inverse threshold
      • setMinThresholdCheckBoxR

        private javax.swing.JCheckBox setMinThresholdCheckBoxR
        checkbox for inverse threshold
      • setMinThresholdCheckBoxG

        private javax.swing.JCheckBox setMinThresholdCheckBoxG
        checkbox for inverse threshold
      • setMinThresholdCheckBoxB

        private javax.swing.JCheckBox setMinThresholdCheckBoxB
        checkbox for inverse threshold
      • setMaxThresholdCheckBox

        private javax.swing.JCheckBox setMaxThresholdCheckBox
        checkbox for inverse threshold
      • setMaxThresholdCheckBoxR

        private javax.swing.JCheckBox setMaxThresholdCheckBoxR
        checkbox for inverse threshold
      • setMaxThresholdCheckBoxG

        private javax.swing.JCheckBox setMaxThresholdCheckBoxG
        checkbox for inverse threshold
      • setMaxThresholdCheckBoxB

        private javax.swing.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
      • newImageRadio

        private javax.swing.JRadioButton newImageRadio
        radio buttons
      • paintRadio

        private javax.swing.JRadioButton paintRadio
        radio buttons
      • wholeImageRadio

        private javax.swing.JRadioButton wholeImageRadio
        radio buttons
      • voiRegionsRadio

        private javax.swing.JRadioButton voiRegionsRadio
        radio buttons
      • destinationRadioGroup

        private javax.swing.ButtonGroup destinationRadioGroup
        radio groups
      • thresholdRadioGroup

        private javax.swing.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 Detail

      • JDialogStandardDeviationThreshold

        public JDialogStandardDeviationThreshold()
        empty constructor
      • JDialogStandardDeviationThreshold

        public JDialogStandardDeviationThreshold​(java.awt.Frame theParentFrame,
                                                 ModelImage im)
        constructor
        Parameters:
        theParentFrame -
        im -
    • Method Detail

      • init

        public void init()
        init
      • actionPerformed

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

        public boolean validateParams()
        validate params
      • getRangeString

        private java.lang.String getRangeString​(int imageType)
        Parameters:
        imageType -
        Returns:
      • setOutMinAndMax

        private void setOutMinAndMax​(int imageType)
        sets out min and max...used in scripting
        Parameters:
        imageType -
      • 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.