Class JDialogVOIStats

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

DOCUMENT ME!
Version:
1.1 June 15, 1999
Author:
Matthew J. McAuliffe, Ph.D.

$Logfile: /mipav/src/gov/nih/mipav/view/dialogs/JDialogVOIStats.java $ $Revision: 56 $ $Date: 2/17/06 6:20p $

See Also:
  • Field Details

    • serialVersionUID

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

      private static Icon ICON_POLYGON
      DOCUMENT ME!
    • ICON_POLYLINE

      private static Icon ICON_POLYLINE
      DOCUMENT ME!
    • ICON_POINT

      private static Icon ICON_POINT
      DOCUMENT ME!
    • ICON_LINE

      private static Icon ICON_LINE
      DOCUMENT ME!
    • ICON_MEDICAL_FRAME

      private static Icon ICON_MEDICAL_FRAME
      DOCUMENT ME!
    • ICON_X_AXIS

      private static Icon ICON_X_AXIS
      DOCUMENT ME!
    • ICON_Y_AXIS

      private static Icon ICON_Y_AXIS
      DOCUMENT ME!
    • ICON_Z_AXIS

      private static Icon ICON_Z_AXIS
      DOCUMENT ME!
    • ICON_PROTRACTOR

      private static Icon ICON_PROTRACTOR
      DOCUMENT ME!
    • algoVOI

      private AlgorithmVOIProps algoVOI
      Algorithm for computing VOI statistics
    • applyButton

      protected JButton applyButton
      Applies bounding box/shading/name display and other UI changes to ModelImage
    • calcButton

      protected JButton calcButton
      Performs statistics calculations
    • helpButton

      protected JButton helpButton
      Displays Stats dialog help
    • checkboxOpacity

      protected JCheckBox checkboxOpacity
      Whether to display VOI with shading
    • checkboxBoundingBox

      protected JCheckBox checkboxBoundingBox
      Whether to display bounding box around VOI
    • checkboxSaveStats

      protected JCheckBox checkboxSaveStats
      Whether to save statistics to a file
    • checkboxIncludeForProcessing

      protected JCheckBox checkboxIncludeForProcessing
      Whether to include the selected VOI for statistics processing
    • checkboxVOIName

      protected JCheckBox checkboxVOIName
      Whether to display VOI name
    • colorButton

      protected JButton colorButton
      Allows VOI color to be selected
    • colorChooser

      private ViewJColorChooser colorChooser
      Internal dialog box for selecting VOI color
    • colorVOI

      private Color colorVOI
      The current color of the selected VOI
    • contourTextArea

      private JTextArea contourTextArea
      Displays points and name of selected VOI or contour
    • currentOpacity

      protected JLabel currentOpacity
      Displays current opacity level in slider
    • followVOISelectionBox

      protected JCheckBox followVOISelectionBox
      DOCUMENT ME!
    • frameBorder

      protected Border frameBorder
      DOCUMENT ME!
    • frameFollowsSelection

      private boolean frameFollowsSelection
      DOCUMENT ME!
    • image

      protected ModelImage image
      Internal reference to the currently selected ModelImage
    • listPanel

      protected JPanelStatisticsList listPanel
      The list of statistics to calculate
    • opacitySlider

      protected JSlider opacitySlider
      The opacity slider for the selected VOI
    • root

      private DefaultMutableTreeNode root
      A reference in the voiTree to the currently selected image
    • seedValue

      private short seedValue
      The seed value last entered by the user
    • seedValueTF

      protected JTextField seedValueTF
      Watershed seed value
    • treeSelectionChange

      private boolean treeSelectionChange
      DOCUMENT ME!
    • updateTree

      private boolean updateTree
    • voi

      private VOI voi
      The selected VOI when the VOIStats dialogue was created
    • voiContourPane

      protected JScrollPane voiContourPane
      DOCUMENT ME!
    • voiModel

      private DefaultTreeModel voiModel
      The tree of VOIs, composed of an image with children VOIs
    • VOIName

      protected JTextField VOIName
      Name of the currently selected voi
    • VOIThicknessField

      protected JTextField VOIThicknessField
      Thickness of the currently selected voi
    • UIDfield

      protected JTextField UIDfield
      uid of the selected voi
    • voiTree

      private JTree voiTree
      The graphical representation of voiModel
    • voiTreePane

      protected JScrollPane voiTreePane
      Displays the orthoganal list of VOIs in the selected ModelImage
    • processList

      private ViewVOIVector[] processList
      List of VOI sets that will have statistics calculated
    • processListIndex

      private int processListIndex
      Current set of VOIs that are being processed
    • voiHandler

      protected VOIHandlerInterface voiHandler
    • activeVolumeButton

      private JRadioButton activeVolumeButton
    • allVolumesButton

      private JRadioButton allVolumesButton
    • activeVolume

      private int activeVolume
    • doAllVolumes

      private boolean doAllVolumes
    • tDim

      private int tDim
    • subsetAlgo

      private AlgorithmSubset subsetAlgo
    • subsetImage

      private ModelImage subsetImage
    • wholeImage

      private VOI wholeImage
      VOI used for whole image processing
    • rangeMaximum

      private float rangeMaximum
      DOCUMENT ME!
    • rangeMinimum

      private float rangeMinimum
      DOCUMENT ME!
    • rangeMaximumR

      private float rangeMaximumR
    • rangeMinimumR

      private float rangeMinimumR
    • rangeMaximumG

      private float rangeMaximumG
    • rangeMinimumG

      private float rangeMinimumG
    • rangeMaximumB

      private float rangeMaximumB
    • rangeMinimumB

      private float rangeMinimumB
    • excluder

      private JPanelPixelExclusionSelector excluder
    • scriptRange

      When running as a script, holds the pixel exclusion range.
  • Constructor Details

    • JDialogVOIStats

      public JDialogVOIStats()
      Empty constructor needed for dynamic instantiation.
    • JDialogVOIStats

      public JDialogVOIStats(VOIHandlerInterface theVoiHandler, ModelImage img, VOI _voi)
      Constructor for the JDialogVOIStats.

      this class ought to listen for VOI updates, but we are having it implemented elsewhere.

      Parameters:
      img - DOCUMENT ME!
      _voi - DOCUMENT ME!
      theParentFrame - DOCUMENT ME!
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Applies changes to VOI when "Apply" is pressed; closes when "Cancel" is pressed; and calculates statistics and outputs them to the message frame when "Calculate" is pressed. Also brings up a color chooser when the color button is pressed.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - Event that triggers this function
    • getVOIforProcessing

      private VOI getVOIforProcessing(VOI parent)
    • getListPanel

      public JPanelStatisticsList getListPanel()
    • callVOIAlgo

      public void callVOIAlgo(ViewVOIVector voiProcessingSet, int processingMode, boolean inSepThread)
    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algorithm)
      Description copied from interface: AlgorithmInterface
      Called after an algorithm this listener is registered to exits (maybe successfully, maybe not). If the algorithm is run in a separate thread, this call will be made within that thread. If not, this call will be made from that same, shared thread.
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algorithm - the algorithm which has just completed
    • extendName

      private String extendName(String name, VOI tempVOI, int contourNum, int processType)
      Changes voi name used for statistics retrieval based on processing mode
    • anotherCall

      private void anotherCall()
    • focusLost

      public void focusLost(FocusEvent event)
      Test the seed value and if appropriate, sets it.
      Specified by:
      focusLost in interface FocusListener
      Overrides:
      focusLost in class JDialogBase
      Parameters:
      event - Event that triggered function.
    • itemStateChanged

      public void itemStateChanged(ItemEvent event)
      Updates the VOI when the checkboxes for title, boundary, processing, and opacity are changed
      Specified by:
      itemStateChanged in interface ItemListener
      Overrides:
      itemStateChanged in class JDialogBase
      Parameters:
      event - Event that cause the method to fire
    • selectionChanged

      public void selectionChanged(UpdateVOIEvent newVOIselection)
      responds to the volume of interest (VOI) change events.

      This method calls updateVOI using the UpdateVOIEvent changed VOI, and retrieves the runningInSeparateThread out of the current image's frame.

      Specified by:
      selectionChanged in interface UpdateVOISelectionListener
      Parameters:
      newVOIselection - DOCUMENT ME!
      See Also:
      • UpdateVOIEvent
      • invalid reference
        #updateVOI
      • invalid reference
        ViewJFrameBase#getActiveImage
    • setVisible

      public void setVisible(boolean visible)
      DOCUMENT ME!
      Overrides:
      setVisible in class JDialogBase
      Parameters:
      visible - DOCUMENT ME!
    • showColorChooser

      public void showColorChooser()
      DOCUMENT ME!
    • stateChanged

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

      public void updateVOIPanel(VOI _voi, ModelImage img)
      Updates the dialog based on the VOI passed in.
      Parameters:
      _voi - VOI whose properties we want to calculate.
      img - Image where voi is to be updated
    • printTree

      private void printTree(TreeModel model, Object parent)
    • valueChanged

      public void valueChanged(TreeSelectionEvent e)
      Updates the ViewJFrameImage when a VOI/contour is selected.
      Specified by:
      valueChanged in interface TreeSelectionListener
      Parameters:
      e - TreeSelectionEvent
    • setVOIActive

      private void setVOIActive(VOI v)
      Internal method for setting all relevant parts of the GUI and the MIPAV interface to reflect the active VOI.
    • buildVOIContourPane

      protected void buildVOIContourPane()
      DOCUMENT ME!
    • buildVOITree

      protected void buildVOITree()
      DOCUMENT ME!
    • init

      protected void init()
      Sets up GUI components - buttons, checkboxes, sliders, etc.
    • updateContourPane

      private void updateContourPane(VOIBase leadBase)
      DOCUMENT ME!
      Parameters:
      leadBase - DOCUMENT ME!
    • updateTree

      public void updateTree()
      DOCUMENT ME!
    • setCheckboxBoundingBox

      public void setCheckboxBoundingBox(boolean flag)
    • callAlgorithm

      protected void callAlgorithm()
      Description copied from class: JDialogScriptableBase
      Starts the algorithm. Already exists in most algorithm dialogs. Should be called during scripted execution and regular operation.
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • setGUIFromParams

      protected void setGUIFromParams()
      Set the dialog GUI using the script parameters while running this algorithm as part of a script.
      Specified by:
      setGUIFromParams in class JDialogScriptableBase
    • storeParamsFromGUI

      protected void storeParamsFromGUI() throws ParserException
      Record the parameters just used to run this algorithm in a script.
      Specified by:
      storeParamsFromGUI in class JDialogScriptableBase
      Throws:
      ParserException - If there is a problem creating/recording the new parameters.