Class JPanelProbe
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- gov.nih.mipav.view.renderer.JPanelRendererBase
-
- gov.nih.mipav.view.renderer.J3D.JPanelRendererJ3D
-
- gov.nih.mipav.view.renderer.J3D.surfaceview.rfaview.JPanelProbe
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.FocusListener
,java.awt.event.ItemListener
,java.awt.event.KeyListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.event.ChangeListener
,javax.swing.event.ListSelectionListener
public class JPanelProbe extends JPanelRendererJ3D implements javax.swing.event.ChangeListener, javax.swing.event.ListSelectionListener
Dialog to turn slices bounding box of surface renderer on and off, and to change the color of the frame. This dialog also control the X, Y, Z slices movements.- Author:
- Ruida Cheng
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
JPanelProbe.CancelListener
Cancel the color dialog, change nothing.class
JPanelProbe.DrawingPane
Helper class for resizing.(package private) class
JPanelProbe.OkColorListener
Pick up the selected color and call method to change the surface color.-
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JButton
bonePresetButton
DOCUMENT ME!private javax.swing.JCheckBox
burnBackFaceCB
burning point back face culling check box.private BurnBase
burnBase
Burn base reference.private javax.swing.JCheckBox
burnClipCB
burning point clipping check box.private int
burnIndex
Current burning point index being hightlighted.private javax.vecmath.Vector3f
burningPtTransVector
Burning point coordinate vector in world coordinate system.private javax.swing.JList
burnList
Burn list that hold the burning point names.private javax.swing.JButton
calcButton
Calculat button.private javax.vecmath.Point3f
center
Burning point coordinate.private javax.swing.JLabel
centerLabel
burning point center label.private boolean
clipping
Burning surface being clipped or not.private javax.swing.JButton
colorButton
Burning point color button.private ViewJColorChooser
colorChooser
Color chooser when the user changes the color of the surface.private javax.swing.JLabel
colorLabel
Burning point color label.private boolean
culling
Burning surface being culled ( back face bulling ) or not.private int
cursorMode
curreent cursor nevigation mode.private javax.swing.JLabel
diffVolumeLabel
Volume difference label for the current treatment.private javax.swing.JTextField
diffVolumeText
Volume difference text.private JPanelProbe.DrawingPane
drawingPane
Associate structure of the scroll pane to resize the panel properly.private javax.vecmath.Vector3f
endPtTransVector
End point coordinate vector in the world coordinate system.private javax.swing.JLabel
entryPointLabel
entry point label.private javax.swing.JPanel
entryPointPanel
Panel that hold the entry point roation check box.private javax.swing.JCheckBox
entryPointRotationCB
entry point rotation check box.private javax.swing.JButton
liverPresetButton
Liver segmentation preset opacity transform function control button.private javax.swing.JButton
loadVisualizationButton
Load button for the opacity transform function.private javax.swing.JLabel
m_kProbeTwistLabel
DOCUMENT ME!private javax.swing.JSlider
m_kProbeTwistSlider
Rotation/Twist around the direction of the probe:.private float
maxBox
The maximum of the fram box values.private static int
NONE
cursor default nevigation mode.private TreatmentInformation
noTargetTreatment
Treatment information to be used if the user wants to burn without any target surface.private float
opacity
Burning point opacity.private javax.swing.JLabel
opacityLabel
The opacity slider label.private javax.swing.JSlider
opacitySlider
burning point surface opacity slider.private javax.swing.JLabel[]
opacitySliderLabels
burning point surface opacity slider label.private ViewJFrameVolumeView
parentFrame
Volume view frame work reference.private Probe
probe
Probe reference.private javax.swing.JList
probeList
Probes list.private static int
PROBEMOVE
cursor probe nevigation mode.private javax.swing.JToggleButton
probeResetButton
Reset probe nevigation mode.private javax.swing.JToggleButton
probeTargetButton
Control the tri-planar probe nevigation mode.private javax.swing.JLabel
radiusLabel
burning point diameter label.private javax.swing.JLabel
resultLabel
result label to show the bone, vasculature detection information message.private javax.swing.JButton
saveVisualizationButton
Save button for the opacity tranform function.private javax.swing.JScrollPane
scroller
Scroll pane that control the resizing of the panel.private javax.swing.JLabel
semiXLabel
burning point semi axis X label.private javax.swing.JTextField
semiXText
burning point semi axis X text field.private javax.swing.JLabel
semiYLabel
burning point semi axis Y label.private javax.swing.JTextField
semiYText
burning point semi axis Y text field.private javax.swing.JLabel
semiZLabel
burning point semi axis Z label.private javax.swing.JTextField
semiZText
burning point semi axis Z text field.private static long
serialVersionUID
Use serialVersionUID for interoperability.private boolean
showBurnLabels
Flag indicates the show burning text label or not.private javax.swing.JCheckBox
showBurnLabelsCB
Show the burning text label checkbox.private javax.swing.JButton
skinPresetButton
Skin segmentation preset opacity transform function control button.private javax.swing.JSlider
sliderX
The probe X slider that control the probe push and pull movements.private boolean
snapToTarget
Whether to snap to center of a target surface when it is selected; defaults to true.private javax.swing.JCheckBox
snapToTargetCB
Checkbox indicating whether to snap to center of a target surface when it is selected.private javax.vecmath.Vector3f
startPtTransVector
Start point ( invisible ) coordinate vector in world coordinate system.private javax.swing.JTabbedPane
tabbedPane
The main tabbed pane in the volume view frame.private javax.swing.JPanel
tabPanel
The main tab contrl panel.private javax.swing.JList
targetList
Surface target list (tumors).private javax.swing.JTextField
targetVolumeText
Label containing the volume of the current target surface.private javax.swing.JTextField
targetXText
X label for the center coordinate of the current target surface.private javax.swing.JTextField
targetYText
Y label for the center coordinate of the current target surface.private javax.swing.JTextField
targetZText
Z label for the center coordinate of the current target surface.private javax.swing.JComboBox
tipLengthCB
Combo box for indicating the length of the probe tip.private javax.swing.JToolBar
toolBar
Tool bar.private javax.swing.JLabel
totalVolumeLabel
Burning points total volume label.private javax.swing.JTextField
totalVolumeText
Burning point total volume text.private javax.swing.JToggleButton
traverseButton
Control the tri-planar default view nevigation mode.private java.util.Vector<TreatmentInformation>
treatmentVector
List of treatment sets.private javax.swing.JLabel
volumeLabel
buring point volume label.private javax.swing.JTextField
volumeText
burning pont volume text box.private float
xBox
Parent frame box value.private javax.swing.JLabel
xLabel
burning point X, Y, Z coordinate label.private javax.swing.JLabel
xLabelEntry
entry point X, Y, Z coordinate label.private float
xRes
The resolutions of the (possibly respampled) image (the one shown in the renderer).private javax.swing.JSlider
xSliderS
slider that controls the probe moves along the x direction.private javax.swing.JTextField
xText
burning point X, Y, Z coordinate text box.private javax.swing.JTextField
xTextEntry
entry point X, Y, Z coordinate text box.private float
yBox
Parent frame box value.private javax.swing.JLabel
yLabel
burning point X, Y, Z coordinate label.private javax.swing.JLabel
yLabelEntry
entry point X, Y, Z coordinate label.private float
yRes
The resolutions of the (possibly respampled) image (the one shown in the renderer).private javax.swing.JSlider
ySliderS
slider that controls the probe moves along the y direction.private javax.swing.JTextField
yText
burning point X, Y, Z coordinate text box.private javax.swing.JTextField
yTextEntry
entry point X, Y, Z coordinate text box.private float
zBox
Parent frame box value.private javax.swing.JLabel
zLabel
burning point X, Y, Z coordinate label.private javax.swing.JLabel
zLabelEntry
entry point X, Y, Z coordinate label.private float
zRes
The resolutions of the (possibly respampled) image (the one shown in the renderer).private javax.swing.JSlider
zSliderS
slider that controls the probe moves along the z direction.private javax.swing.JTextField
zText
burning point X, Y, Z coordinate text box.private javax.swing.JTextField
zTextEntry
entry point X, Y, Z coordinate text box.-
Fields inherited from class gov.nih.mipav.view.renderer.J3D.JPanelRendererJ3D
rayBasedRender, renderBase
-
Fields inherited from class gov.nih.mipav.view.renderer.JPanelRendererBase
applyButton, cancelButton, cancelFlag, closeButton, helpButton, isActiveImage, mainPanel, NEW, OKButton, REPLACE, runInSeparateThread, serif12, serif12B
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description JPanelProbe(SurfaceRender parent, ViewJFrameBase _parentFrame, float xBox, float yBox, float zBox)
Constructor to initialize the probe control panel.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
Action perform event function that handle all the commands in the probe panel.private void
buildBurnPackingPanel()
Build the tab panel containing ablation (sphere/ellipsoid) packing parameters, etc.private void
buildBurnVisPanel()
Build the tab containing the color, opac, picking, labels, etc for burns.private void
buildProbeModelPanel()
Build the tab which allows the user to change the currently used probe model.private void
buildProbePlacementPanel()
Build the tab with controls / info used in probe placement before a burn.private javax.swing.JPanel
buildProbeSlider()
Setup the probe moving control panel that include x, y, z moving sliders.private void
buildTabbedPanel()
Build the four tabbed panes, probe control pane, burn control pane, burn parameter control pane, and demo pane.private javax.swing.JPanel
buildTargetListPanel()
Build the target surface (tumor) control panel.private void
buildTargetPanel()
Build the tab which allows the user to pick the current tumor to target, to load/remove tumor surfaces and show tumor position and volume info.private void
buildToolBar()
Build the probe toolbar control.private void
buildTreatmentPanel()
Build the tab containing ablation treatment information, including a list of burns; burn removal, position and volume; comparison of current tumor vs current set of burns.private static javax.swing.JLabel
createBoldLabel(java.lang.String title)
Creates a label in the proper (bold) font and color.private static javax.swing.JLabel
createLabel(java.lang.String title)
Creates a label in the proper font and color.void
detectTissue()
Detect the body tissue component.void
dispose()
Dispose memory.private void
enableBurnTreatmentComponents(boolean flag)
Enable or disable the components on the target treatment panel.private void
enableBurnVisComponents(boolean flag)
Enable or disable the components on the burn visualization panel.void
enableProbeBehavior(boolean flag)
Enable probe mouse behavior branch group.BurnBase
getBurnBase()
Get the burn base reference inside the probe control panel.boolean
getBurnLabelFlag()
Get the show burning point label's flag.javax.vecmath.Vector3f
getBurnPoint()
Get the burning point world coordinate.javax.media.j3d.BranchGroup
getBurnRootParentBG()
Get the burn root branch group.private void
getColorChange(java.awt.Color color)
This is called when the user chooses a new color for the surface.SurfaceAttributes
getCurSurface()
Get the current highlight surface.TreatmentInformation
getCurTreatment()
Get the treatment info that matches the currently selected target surface.javax.vecmath.Vector3f
getEndPoint()
Get the end point world coordinate vector.javax.vecmath.Point3f
getEntryPoint()
Get the entry ponit world coordinate.javax.swing.JPanel
getMainPanel()
Get the main control panel.Probe
getProbeBase()
Get the probe base reference inside the burning control panel.javax.media.j3d.BranchGroup
getProbesRootBG()
Return the root to the probes branches.javax.vecmath.Vector3f
getStartPoint()
Get the start point world coordinate vector.SurfaceAttributes
getTargetSurface()
Return the currently targeted surface.private TreatmentInformation
getTreatmentInfo(int index)
Get information about a treatment.private void
init()
Initialize the whole probe panel control layout.boolean
isSnapToTarget()
Return whether the user wants to snap to the treatment target surface.private ModelImage
loadImage()
Ask the user for an image to load and return it.void
loadVisualizationDataFrom(boolean loadAll, java.lang.String filename, java.lang.String dirName, boolean quietMode)
This method loads the LUT and opacity transfer function for the active image.private void
loadVisualizationSettings(TransferFunction lut, TransferFunction opac)
Loads visualization settings for this image.private void
removeAllBurn()
Remove all the burning point geometry shapes in the volume.private void
removeBurn()
The action taken when the Remove button is clicked in the list box.void
removeProbingPath()
During mouse release, remove the probing path and clear the probe color mask.void
resizePanel(int panelWidth, int frameHeight)
Resizig the control panel with ViewJFrameVolumeView's frame width and height.private void
saveImage(ModelImage img)
Ask the user for a name to save an image as and then write it out to disk.void
saveVisualizationDataAs(boolean saveAll, java.lang.String filename, java.lang.String dirName)
This method saves the LUT and opacity function for the active image.void
setProbeGreenColor(boolean flag)
When the probe is picked, switch the probe geometry appearance to green.void
startBurn()
When the burn button is clicked, invoked the start burn method to show the burnning process.private void
startBurnPacking()
Start to try to choose an optimal ablation plan for the current target surface.void
stateChanged(javax.swing.event.ChangeEvent e)
State change event, invokded by the sliders moves.javax.vecmath.Point3f
transformPtVolumeToImage(javax.vecmath.Point3f pt)
Transform a java3d point [-1,1] to the image volume space.void
updateBurnList(int index)
Updates the burn name list's selected element.void
updateProbeList()
Update probe list.void
updateProbePos(float x, float y, float z)
Updates the probe world coordinate from the tri-planar view's mouse drag event.private void
updateTargetLabels()
Update the labels which show info about the current target surface.void
updateTargetList()
Update target surface list from the JPanelSurface control dialog.void
updateTreatmentPanel(boolean swapBurnList)
Update the treatment panel components to correpsond to the currently selected target surface.void
valueChanged(javax.swing.event.ListSelectionEvent kEvent)
Value changed event, which invoked by probe name list, burn name list, surface name list, burn param name list.boolean
withinDistance(float centerX, float centerY, float centerZ, float ptrX, float ptrY, float ptrZ, double r)
Check to see if the given voxel is within the sphere radius from the center point.-
Methods inherited from class gov.nih.mipav.view.renderer.J3D.JPanelRendererJ3D
disposeLocal, getSurfaceRender, setRayBasedRender, setSurfaceRender
-
Methods inherited from class gov.nih.mipav.view.renderer.JPanelRendererBase
buildApplyButton, buildCancelButton, buildCloseButton, buildHelpButton, buildOKButton, buildTitledBorder, finalize, focusGained, focusLost, isCancelled, itemStateChanged, keyPressed, keyReleased, keyTyped, makeString, setLeftHandSystem, setVisible, setVisibleStandard, setWCSystem, testParameter
-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
NONE
private static int NONE
cursor default nevigation mode.
-
PROBEMOVE
private static int PROBEMOVE
cursor probe nevigation mode.
-
bonePresetButton
private javax.swing.JButton bonePresetButton
DOCUMENT ME!
-
burnBackFaceCB
private javax.swing.JCheckBox burnBackFaceCB
burning point back face culling check box.
-
burnBase
private BurnBase burnBase
Burn base reference.
-
burnClipCB
private javax.swing.JCheckBox burnClipCB
burning point clipping check box.
-
burnIndex
private int burnIndex
Current burning point index being hightlighted.
-
burningPtTransVector
private javax.vecmath.Vector3f burningPtTransVector
Burning point coordinate vector in world coordinate system.
-
burnList
private javax.swing.JList burnList
Burn list that hold the burning point names.
-
calcButton
private javax.swing.JButton calcButton
Calculat button.
-
center
private javax.vecmath.Point3f center
Burning point coordinate.
-
centerLabel
private javax.swing.JLabel centerLabel
burning point center label.
-
clipping
private boolean clipping
Burning surface being clipped or not.
-
colorButton
private javax.swing.JButton colorButton
Burning point color button.
-
colorChooser
private ViewJColorChooser colorChooser
Color chooser when the user changes the color of the surface.
-
colorLabel
private javax.swing.JLabel colorLabel
Burning point color label.
-
culling
private boolean culling
Burning surface being culled ( back face bulling ) or not.
-
cursorMode
private int cursorMode
curreent cursor nevigation mode.
-
diffVolumeLabel
private javax.swing.JLabel diffVolumeLabel
Volume difference label for the current treatment.
-
diffVolumeText
private javax.swing.JTextField diffVolumeText
Volume difference text.
-
drawingPane
private JPanelProbe.DrawingPane drawingPane
Associate structure of the scroll pane to resize the panel properly.
-
endPtTransVector
private javax.vecmath.Vector3f endPtTransVector
End point coordinate vector in the world coordinate system.
-
entryPointLabel
private javax.swing.JLabel entryPointLabel
entry point label.
-
entryPointPanel
private javax.swing.JPanel entryPointPanel
Panel that hold the entry point roation check box.
-
entryPointRotationCB
private javax.swing.JCheckBox entryPointRotationCB
entry point rotation check box.
-
liverPresetButton
private javax.swing.JButton liverPresetButton
Liver segmentation preset opacity transform function control button.
-
loadVisualizationButton
private javax.swing.JButton loadVisualizationButton
Load button for the opacity transform function.
-
m_kProbeTwistLabel
private javax.swing.JLabel m_kProbeTwistLabel
DOCUMENT ME!
-
m_kProbeTwistSlider
private javax.swing.JSlider m_kProbeTwistSlider
Rotation/Twist around the direction of the probe:.
-
maxBox
private float maxBox
The maximum of the fram box values.
-
noTargetTreatment
private TreatmentInformation noTargetTreatment
Treatment information to be used if the user wants to burn without any target surface.
-
opacity
private float opacity
Burning point opacity.
-
opacityLabel
private javax.swing.JLabel opacityLabel
The opacity slider label.
-
opacitySlider
private javax.swing.JSlider opacitySlider
burning point surface opacity slider.
-
opacitySliderLabels
private javax.swing.JLabel[] opacitySliderLabels
burning point surface opacity slider label.
-
parentFrame
private ViewJFrameVolumeView parentFrame
Volume view frame work reference.
-
probe
private Probe probe
Probe reference.
-
probeList
private javax.swing.JList probeList
Probes list.
-
probeResetButton
private javax.swing.JToggleButton probeResetButton
Reset probe nevigation mode.
-
probeTargetButton
private javax.swing.JToggleButton probeTargetButton
Control the tri-planar probe nevigation mode.
-
radiusLabel
private javax.swing.JLabel radiusLabel
burning point diameter label.
-
resultLabel
private javax.swing.JLabel resultLabel
result label to show the bone, vasculature detection information message.
-
saveVisualizationButton
private javax.swing.JButton saveVisualizationButton
Save button for the opacity tranform function.
-
scroller
private javax.swing.JScrollPane scroller
Scroll pane that control the resizing of the panel.
-
semiXLabel
private javax.swing.JLabel semiXLabel
burning point semi axis X label.
-
semiXText
private javax.swing.JTextField semiXText
burning point semi axis X text field.
-
semiYLabel
private javax.swing.JLabel semiYLabel
burning point semi axis Y label.
-
semiYText
private javax.swing.JTextField semiYText
burning point semi axis Y text field.
-
semiZLabel
private javax.swing.JLabel semiZLabel
burning point semi axis Z label.
-
semiZText
private javax.swing.JTextField semiZText
burning point semi axis Z text field.
-
showBurnLabels
private boolean showBurnLabels
Flag indicates the show burning text label or not.
-
showBurnLabelsCB
private javax.swing.JCheckBox showBurnLabelsCB
Show the burning text label checkbox.
-
skinPresetButton
private javax.swing.JButton skinPresetButton
Skin segmentation preset opacity transform function control button.
-
sliderX
private javax.swing.JSlider sliderX
The probe X slider that control the probe push and pull movements.
-
snapToTarget
private boolean snapToTarget
Whether to snap to center of a target surface when it is selected; defaults to true.
-
snapToTargetCB
private javax.swing.JCheckBox snapToTargetCB
Checkbox indicating whether to snap to center of a target surface when it is selected.
-
startPtTransVector
private javax.vecmath.Vector3f startPtTransVector
Start point ( invisible ) coordinate vector in world coordinate system.
-
tabbedPane
private javax.swing.JTabbedPane tabbedPane
The main tabbed pane in the volume view frame.
-
tabPanel
private javax.swing.JPanel tabPanel
The main tab contrl panel.
-
targetList
private javax.swing.JList targetList
Surface target list (tumors).
-
targetVolumeText
private javax.swing.JTextField targetVolumeText
Label containing the volume of the current target surface.
-
targetXText
private javax.swing.JTextField targetXText
X label for the center coordinate of the current target surface.
-
targetYText
private javax.swing.JTextField targetYText
Y label for the center coordinate of the current target surface.
-
targetZText
private javax.swing.JTextField targetZText
Z label for the center coordinate of the current target surface.
-
tipLengthCB
private javax.swing.JComboBox tipLengthCB
Combo box for indicating the length of the probe tip. Currently used just by CoolTip probe.
-
toolBar
private javax.swing.JToolBar toolBar
Tool bar.
-
totalVolumeLabel
private javax.swing.JLabel totalVolumeLabel
Burning points total volume label.
-
totalVolumeText
private javax.swing.JTextField totalVolumeText
Burning point total volume text.
-
traverseButton
private javax.swing.JToggleButton traverseButton
Control the tri-planar default view nevigation mode.
-
treatmentVector
private java.util.Vector<TreatmentInformation> treatmentVector
List of treatment sets.
-
volumeLabel
private javax.swing.JLabel volumeLabel
buring point volume label.
-
volumeText
private javax.swing.JTextField volumeText
burning pont volume text box.
-
xBox
private float xBox
Parent frame box value.
-
yBox
private float yBox
Parent frame box value.
-
zBox
private float zBox
Parent frame box value.
-
xLabel
private javax.swing.JLabel xLabel
burning point X, Y, Z coordinate label.
-
yLabel
private javax.swing.JLabel yLabel
burning point X, Y, Z coordinate label.
-
zLabel
private javax.swing.JLabel zLabel
burning point X, Y, Z coordinate label.
-
xLabelEntry
private javax.swing.JLabel xLabelEntry
entry point X, Y, Z coordinate label.
-
yLabelEntry
private javax.swing.JLabel yLabelEntry
entry point X, Y, Z coordinate label.
-
zLabelEntry
private javax.swing.JLabel zLabelEntry
entry point X, Y, Z coordinate label.
-
xRes
private float xRes
The resolutions of the (possibly respampled) image (the one shown in the renderer).
-
yRes
private float yRes
The resolutions of the (possibly respampled) image (the one shown in the renderer).
-
zRes
private float zRes
The resolutions of the (possibly respampled) image (the one shown in the renderer).
-
xSliderS
private javax.swing.JSlider xSliderS
slider that controls the probe moves along the x direction.
-
xText
private javax.swing.JTextField xText
burning point X, Y, Z coordinate text box.
-
yText
private javax.swing.JTextField yText
burning point X, Y, Z coordinate text box.
-
zText
private javax.swing.JTextField zText
burning point X, Y, Z coordinate text box.
-
xTextEntry
private javax.swing.JTextField xTextEntry
entry point X, Y, Z coordinate text box.
-
yTextEntry
private javax.swing.JTextField yTextEntry
entry point X, Y, Z coordinate text box.
-
zTextEntry
private javax.swing.JTextField zTextEntry
entry point X, Y, Z coordinate text box.
-
ySliderS
private javax.swing.JSlider ySliderS
slider that controls the probe moves along the y direction.
-
zSliderS
private javax.swing.JSlider zSliderS
slider that controls the probe moves along the z direction.
-
-
Constructor Detail
-
JPanelProbe
public JPanelProbe(SurfaceRender parent, ViewJFrameBase _parentFrame, float xBox, float yBox, float zBox)
Constructor to initialize the probe control panel.- Parameters:
parent
- SurfaceRender reference._parentFrame
- ViewJFrameVolumeView reference.xBox
- DOCUMENT ME!yBox
- DOCUMENT ME!zBox
- DOCUMENT ME!
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Action perform event function that handle all the commands in the probe panel.- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Specified by:
actionPerformed
in classJPanelRendererBase
- Parameters:
event
- Action Event
-
detectTissue
public void detectTissue()
Detect the body tissue component. If the bone or the vasculature is detected, draw the corresponding color along the probing path, also, show the detection message in the search panel.
-
dispose
public void dispose()
Dispose memory.
-
enableProbeBehavior
public void enableProbeBehavior(boolean flag)
Enable probe mouse behavior branch group.- Parameters:
flag
-true
means turn on,false
means turn off.
-
getBurnBase
public BurnBase getBurnBase()
Get the burn base reference inside the probe control panel.- Returns:
- BurnBase
-
getBurnLabelFlag
public boolean getBurnLabelFlag()
Get the show burning point label's flag.- Returns:
- boolean show label or not.
-
getBurnPoint
public javax.vecmath.Vector3f getBurnPoint()
Get the burning point world coordinate.- Returns:
- Vector3f burning point tranform vector.
-
getBurnRootParentBG
public javax.media.j3d.BranchGroup getBurnRootParentBG()
Get the burn root branch group. JPanelSurface calls this method during the geometry picking procedure.- Returns:
- BranchGroup
-
getCurSurface
public SurfaceAttributes getCurSurface()
Get the current highlight surface.- Returns:
- SurfaceAttributes
-
getCurTreatment
public TreatmentInformation getCurTreatment()
Get the treatment info that matches the currently selected target surface.- Returns:
- info about a treatment
-
getEndPoint
public javax.vecmath.Vector3f getEndPoint()
Get the end point world coordinate vector.- Returns:
- Vector3f end point transform vector.
-
getEntryPoint
public javax.vecmath.Point3f getEntryPoint()
Get the entry ponit world coordinate.- Returns:
- Point3f entry ponit transform vector.
-
getMainPanel
public javax.swing.JPanel getMainPanel()
Get the main control panel.- Specified by:
getMainPanel
in classJPanelRendererBase
- Returns:
- JPanel main control panel.
-
getProbeBase
public Probe getProbeBase()
Get the probe base reference inside the burning control panel.- Returns:
- Probe
-
getProbesRootBG
public javax.media.j3d.BranchGroup getProbesRootBG()
Return the root to the probes branches.- Returns:
- BranchGroup probes branch group
-
getStartPoint
public javax.vecmath.Vector3f getStartPoint()
Get the start point world coordinate vector.- Returns:
- Vector3f start point tranform vector.
-
getTargetSurface
public SurfaceAttributes getTargetSurface()
Return the currently targeted surface.- Returns:
- the attributes of the current target surface
-
isSnapToTarget
public boolean isSnapToTarget()
Return whether the user wants to snap to the treatment target surface.- Returns:
- whether to snap to the target
-
loadVisualizationDataFrom
public void loadVisualizationDataFrom(boolean loadAll, java.lang.String filename, java.lang.String dirName, boolean quietMode)
This method loads the LUT and opacity transfer function for the active image.- Parameters:
loadAll
- boolean indicating that both lut and transfer functions should be loaded. If false, then only transfer functions are loaded.filename
- filename to load LUT fromdirName
- directory to load LUT fromquietMode
- if true indicates that warnings should not be displayed.
-
removeProbingPath
public void removeProbingPath()
During mouse release, remove the probing path and clear the probe color mask.
-
resizePanel
public void resizePanel(int panelWidth, int frameHeight)
Resizig the control panel with ViewJFrameVolumeView's frame width and height.- Overrides:
resizePanel
in classJPanelRendererBase
- Parameters:
panelWidth
- the panel should beframeHeight
- the height of the renderer frame
-
saveVisualizationDataAs
public void saveVisualizationDataAs(boolean saveAll, java.lang.String filename, java.lang.String dirName)
This method saves the LUT and opacity function for the active image. If either filename or directory is null, then the user will be prompted for a filename.- Parameters:
saveAll
- boolean indicating that both lut and transfer functions should be saved. If false, then only transfer functions are saved.filename
- filename to save LUT asdirName
- directory to save LUT to
-
setProbeGreenColor
public void setProbeGreenColor(boolean flag)
When the probe is picked, switch the probe geometry appearance to green.- Parameters:
flag
- boolean probe picked or not.
-
startBurn
public void startBurn()
When the burn button is clicked, invoked the start burn method to show the burnning process.
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
State change event, invokded by the sliders moves.- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
- Parameters:
e
- ChangeEvent
-
transformPtVolumeToImage
public javax.vecmath.Point3f transformPtVolumeToImage(javax.vecmath.Point3f pt)
Transform a java3d point [-1,1] to the image volume space.- Parameters:
pt
- the point in java3d space- Returns:
- the equivalent point in volume space
-
updateBurnList
public void updateBurnList(int index)
Updates the burn name list's selected element. Called from the JPanelSurface.- Parameters:
index
- selected index number.
-
updateProbeList
public void updateProbeList()
Update probe list.
-
updateProbePos
public void updateProbePos(float x, float y, float z)
Updates the probe world coordinate from the tri-planar view's mouse drag event.- Parameters:
x
- float x coordinatey
- float y coordinatez
- float z coordinate
-
updateTargetList
public void updateTargetList()
Update target surface list from the JPanelSurface control dialog.
-
updateTreatmentPanel
public void updateTreatmentPanel(boolean swapBurnList)
Update the treatment panel components to correpsond to the currently selected target surface.- Parameters:
swapBurnList
- whether to swap in the burn list of the currently selected target surface treatment (used when a new selection is made in the target list)
-
valueChanged
public void valueChanged(javax.swing.event.ListSelectionEvent kEvent)
Value changed event, which invoked by probe name list, burn name list, surface name list, burn param name list.- Specified by:
valueChanged
in interfacejavax.swing.event.ListSelectionListener
- Parameters:
kEvent
- ListSelection Event
-
withinDistance
public boolean withinDistance(float centerX, float centerY, float centerZ, float ptrX, float ptrY, float ptrZ, double r)
Check to see if the given voxel is within the sphere radius from the center point.- Parameters:
centerX
- float center x coordinatecenterY
- float center y coordinatecenterZ
- float center z coordinateptrX
- float given point x coordinateptrY
- float given point x coordinateptrZ
- float given point x coordinater
- double given radius- Returns:
- boolean true within the distance, false not.
-
createBoldLabel
private static javax.swing.JLabel createBoldLabel(java.lang.String title)
Creates a label in the proper (bold) font and color.- Parameters:
title
- The title of the label.- Returns:
- The new label.
-
createLabel
private static javax.swing.JLabel createLabel(java.lang.String title)
Creates a label in the proper font and color.- Parameters:
title
- The title of the label.- Returns:
- The new label.
-
buildBurnPackingPanel
private void buildBurnPackingPanel()
Build the tab panel containing ablation (sphere/ellipsoid) packing parameters, etc.
-
buildBurnVisPanel
private void buildBurnVisPanel()
Build the tab containing the color, opac, picking, labels, etc for burns.
-
buildProbeModelPanel
private void buildProbeModelPanel()
Build the tab which allows the user to change the currently used probe model.
-
buildProbePlacementPanel
private void buildProbePlacementPanel()
Build the tab with controls / info used in probe placement before a burn. This includes rot, trans, in/out, entry pt rotation, warning of intersection of problem regions, and the saving / loading of a problem region mapping.
-
buildProbeSlider
private javax.swing.JPanel buildProbeSlider()
Setup the probe moving control panel that include x, y, z moving sliders.- Returns:
- the trans x, y, z and in/out probe movement panel.
-
buildTabbedPanel
private void buildTabbedPanel()
Build the four tabbed panes, probe control pane, burn control pane, burn parameter control pane, and demo pane.
-
buildTargetListPanel
private javax.swing.JPanel buildTargetListPanel()
Build the target surface (tumor) control panel. This panel can add or remove surfaces, also changes the surface opacity.- Returns:
- the target surface list panel.
-
buildTargetPanel
private void buildTargetPanel()
Build the tab which allows the user to pick the current tumor to target, to load/remove tumor surfaces and show tumor position and volume info.
-
buildToolBar
private void buildToolBar()
Build the probe toolbar control.
-
buildTreatmentPanel
private void buildTreatmentPanel()
Build the tab containing ablation treatment information, including a list of burns; burn removal, position and volume; comparison of current tumor vs current set of burns.
-
enableBurnTreatmentComponents
private void enableBurnTreatmentComponents(boolean flag)
Enable or disable the components on the target treatment panel.- Parameters:
flag
- whether to enable the components
-
enableBurnVisComponents
private void enableBurnVisComponents(boolean flag)
Enable or disable the components on the burn visualization panel.- Parameters:
flag
- whether to enable the components
-
getColorChange
private void getColorChange(java.awt.Color color)
This is called when the user chooses a new color for the surface. It changes the color of the surface.- Parameters:
color
- Color to change surface to.
-
getTreatmentInfo
private TreatmentInformation getTreatmentInfo(int index)
Get information about a treatment.- Parameters:
index
- the index of the treatment to retreive- Returns:
- info about a treatment
-
init
private void init()
Initialize the whole probe panel control layout.
-
loadImage
private ModelImage loadImage()
Ask the user for an image to load and return it.- Returns:
- the image the user wants to load
-
loadVisualizationSettings
private void loadVisualizationSettings(TransferFunction lut, TransferFunction opac)
Loads visualization settings for this image.- Parameters:
lut
- the lut transfer functionopac
- the opacity transfer function
-
removeAllBurn
private void removeAllBurn()
Remove all the burning point geometry shapes in the volume.
-
removeBurn
private void removeBurn()
The action taken when the Remove button is clicked in the list box. All selected surfaces in the list box are removed from the scene graph.
-
saveImage
private void saveImage(ModelImage img)
Ask the user for a name to save an image as and then write it out to disk.- Parameters:
img
- the image to save
-
startBurnPacking
private void startBurnPacking()
Start to try to choose an optimal ablation plan for the current target surface.
-
updateTargetLabels
private void updateTargetLabels()
Update the labels which show info about the current target surface.
-
-