Class JPanelSlices
- 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.JPanelSlices
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.awt.event.FocusListener,java.awt.event.ItemListener,java.awt.event.KeyListener,java.awt.event.MouseListener,java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,java.util.EventListener,javax.accessibility.Accessible,javax.swing.event.ChangeListener
public class JPanelSlices extends JPanelRendererJ3D implements javax.swing.event.ChangeListener, java.awt.event.MouseListener
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.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classJPanelSlices.CancelListenerDoes nothing.(package private) classJPanelSlices.DrawingPanelWrapper in order to hold the control panel layout in the JScrollPane.(package private) classJPanelSlices.OkColorListenerPick up the selected color and call method to change the VOI 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.JPanelboundingBoxPanelBounding box control panel.private javax.swing.JCheckBox[]boundingCheckCheck box for turning bounding boxes on and off.javax.swing.JCheckBoxboxXCheck boxes that turn the image plane on and off.javax.swing.JCheckBoxboxYCheck boxes that turn the image plane on and off.javax.swing.JCheckBoxboxZCheck boxes that turn the image plane on and off.private javax.swing.JButton[]colorButtonColor button for changing bounding box color.private ViewJColorChoosercolorChooserColor chooser dialog.private javax.swing.JPanelcontrolPanelMain panel for sliders.private intcurrentCurrent event vector index.private javax.swing.JLabellabelTLabels next to sliders.private javax.swing.JLabellabelXLabels next to sliders.private javax.swing.JLabellabelX1Labels beneath sliders.private javax.swing.JLabellabelXEndLabels beneath sliders.private javax.swing.JLabellabelXMidLabels beneath sliders.private javax.swing.JLabellabelYLabels next to sliders.private javax.swing.JLabellabelY1Labels beneath sliders.private javax.swing.JLabellabelYEndLabels beneath sliders.private javax.swing.JLabellabelYMidLabels beneath sliders.private javax.swing.JLabellabelZLabels next to sliders.private javax.swing.JLabellabelZ1Labels beneath sliders.private javax.swing.JLabellabelZEndLabels beneath sliders.private javax.swing.JLabellabelZMidLabels beneath sliders.private javax.swing.JPanelopacityControlPanelOpacity control panel.private javax.swing.JLabelopacityLabelXThe opacity slider label.private javax.swing.JLabelopacityLabelYThe opacity slider label.private javax.swing.JLabelopacityLabelZThe opacity slider label.private javax.swing.JLabel[]opacitySliderLabelsXThe labels below the opacity slider.private javax.swing.JLabel[]opacitySliderLabelsYThe labels below the opacity slider.private javax.swing.JLabel[]opacitySliderLabelsZThe labels below the opacity slider.private javax.swing.JSlideropacitySliderXOpacity slider, not enabled yet.private javax.swing.JSlideropacitySliderYOpacity slider, not enabled yet.private javax.swing.JSlideropacitySliderZOpacity slider, not enabled yet.private javax.swing.JScrollPanescrollerThe scroll pane holding the panel content.private JPanelSlices.DrawingPanelscrollPanelScroll panel that holding the all the control components.private static longserialVersionUIDUse serialVersionUID for interoperability.private booleansetSliderFlagFlag to indicate the first time slider name changes.private WildMagic.LibFoundation.Mathematics.Vector3fslicePositionboolean[]sliceVisibleFlags indicating if the image slices are on or off.javax.swing.JSlidersliderTSliders for the image planes.javax.swing.JSlidersliderXSliders for the image planes.javax.swing.JSlidersliderYSliders for the image planes.javax.swing.JSlidersliderZSliders for the image planes.private inttDimx, y, z and time dimension values.private javax.swing.JTextFieldtextTText fields that display the slice number next to the sliders.private javax.swing.JTextFieldtextXText fields that display the slice number next to the sliders.private javax.swing.JTextFieldtextYText fields that display the slice number next to the sliders.private javax.swing.JTextFieldtextZText fields that display the slice number next to the sliders.inttSliceWhich time slice is currently displayed.private intxDimx, y, z and time dimension values.private intxOpacitySlicex, y, z opacity slider values.private intxProbeProbe x, y, z position.intxSliceWhich slice is currently displayed in the ZY plane.private intyDimx, y, z and time dimension values.private intyOpacitySlicex, y, z opacity slider values.private intyProbeProbe x, y, z position.intySliceWhich slice is currently displayed in the XZ plane.private intzDimx, y, z and time dimension values.private intzOpacitySlicex, y, z opacity slider values.private intzProbeProbe x, y, z position.intzSliceWhich slice is currently displayed in the XY plane.-
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 JPanelSlices(SurfaceRender parent)Creates new dialog for turning slices bounding box frame on and off.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent event)Changes color of slices box frame and button if color button was pressed; turns bounding box on and off if checkbox was pressed; and closes dialog if "Close" button was pressed.private voidaddControlPanel(java.awt.Component c, java.awt.GridBagConstraints gbc, int x, int y, int w, int h)Helper method that adds components to the control panel for the grid bag layout.private voidaddOpacityControlPanel(java.awt.Component c, java.awt.GridBagConstraints gbc, int x, int y, int w, int h)Helper method that adds components to the control panel for the grid bag layout.private voidbuildBoundingBox()Build the boudning box for X, Y, Z slices.voidbuildControlPanel()Builds panel that has 3 sliders for the 3 planes shown, 3 checkboxes for showing the planes, 3 text boxes for the current values of the sliders, and a fourth slider and text box for the time dimension, if necessary.voidbuildOpacityPanel()Builds panel for opacity control change on the triplanar X, Y, Z.voidbuildSlicePickPanel()Build the slice pickable panelprivate voidbuildTimeSlider()Builds the time (4D) slider.private javax.swing.JLabelcreateLabel(java.lang.String title)Creates a label in the proper font and color.voiddisableSlices()When 3D texture volume render is invoked, disable all the slices and bounding frame boxes.voiddispose()Dispose memory.voidenableSlices()Enable slider X, Y, Z and triplanar.javax.swing.JCheckBoxgetBoxX()Return the checkbox of X slider.javax.swing.JCheckBoxgetBoxY()Return the checkbox of Y slider.javax.swing.JCheckBoxgetBoxZ()Return the checkbox of Z slider.WildMagic.LibFoundation.Mathematics.Vector3fgetCenter()Gets the three slider positions, representing the center point of the three orthogonal planes.javax.swing.JPanelgetMainPanel()Return the control panel.javax.swing.JSlidergetOpacitySliderX()Return the X opacity slider.javax.swing.JSlidergetOpacitySliderY()Return the Y opacity slider.javax.swing.JSlidergetOpacitySliderZ()Return the Z opacity slider.intgetSlice(int orientation)Get the current slider value for the slider that matches the orientation input parameter.javax.swing.JSlidergetSliderX()Return the X slider.javax.swing.JSlidergetSliderY()Return the Y slider.javax.swing.JSlidergetSliderZ()Return the Z slider.booleangetVisible(int orientation)slice slider visible or not.intgetXOpacitySlice()Get the x opacity slider value.intgetXProbePos()Get the probe x coordinate.intgetXSlice()Get the X slider value.intgetYOpacitySlice()Get the y opacity slider value.intgetYProbePos()Get the probe y coordinate.intgetYSlice()Get the y slider value.intgetZOpacitySlice()Get the z opacity slider value.intgetZProbePos()Get the probe z coordinate.intgetZSlice()Get the z slider value.voidinit()Initializes GUI components.voidmouseClicked(java.awt.event.MouseEvent event)Unchanged.voidmouseEntered(java.awt.event.MouseEvent event)Unchanged.voidmouseExited(java.awt.event.MouseEvent event)Unchanged.voidmousePressed(java.awt.event.MouseEvent event)Unchanged.voidmouseReleased(java.awt.event.MouseEvent event)Used in MouseRecorder to stop one series of slide moves.voidresizePanel(int panelWidth, int frameHeight)Resizig the control panel with ViewJFrameVolumeView's frame width and height.protected voidsetBoxColor(javax.swing.JButton button, java.awt.Color color)Calls the appropriate method in the parent frame.voidsetCenter(int x, int y, int z)Sets the three slider positions, based on the position of the three orthogonal planes: AXIAL, CORONAL, and SAGITTAL.voidsetOpacitySliderXEnabled(boolean flag)Set the opacity slider X with given boolean value.voidsetOpacitySliderYEnabled(boolean flag)Set the opacity slider Y with given boolean value.voidsetOpacitySliderZEnabled(boolean flag)Set the opacity slider Z with given boolean value.voidsetSceneState(java.lang.Object scene)Sets the scene state appropriately, so that the slices that are supposed to be visible are showing, the ones that aren't are hidden, and the sliders are starting at the appropriate value.voidsetXProbePos(int _xProbe)Set probe x coordinate.private voidsetXSlicePos(int _xSlice)Set the current x slider move position.voidsetXSliderEnabled(boolean flag)Sets the x slider and the labels beside and beneath it to the state given byflag.voidsetYProbePos(int _yProbe)Set probe y coordinate.private voidsetYSlicePos(int _ySlice)Set the current y slider move position.voidsetYSliderEnabled(boolean flag)Sets the y slider and the labels beside and beneath it to the state given byflag.voidsetZProbePos(int _zProbe)Set probe z coordinate.private voidsetZSlicePos(int _zSlice)Set the current z slider move position.voidsetZSliderEnabled(boolean flag)Sets the z slider and the labels beside and beneath it to the state given byflag.voidstateChanged(javax.swing.event.ChangeEvent e)Sets how the image plane should be displayed depending on value of slider.-
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
-
boxX
public javax.swing.JCheckBox boxX
Check boxes that turn the image plane on and off.
-
boxY
public javax.swing.JCheckBox boxY
Check boxes that turn the image plane on and off.
-
boxZ
public javax.swing.JCheckBox boxZ
Check boxes that turn the image plane on and off.
-
sliderX
public javax.swing.JSlider sliderX
Sliders for the image planes.
-
sliderY
public javax.swing.JSlider sliderY
Sliders for the image planes.
-
sliderZ
public javax.swing.JSlider sliderZ
Sliders for the image planes.
-
sliderT
public javax.swing.JSlider sliderT
Sliders for the image planes.
-
tSlice
public int tSlice
Which time slice is currently displayed.
-
slicePosition
private WildMagic.LibFoundation.Mathematics.Vector3f slicePosition
-
xSlice
public int xSlice
Which slice is currently displayed in the ZY plane.
-
sliceVisible
public boolean[] sliceVisible
Flags indicating if the image slices are on or off.
-
ySlice
public int ySlice
Which slice is currently displayed in the XZ plane.
-
zSlice
public int zSlice
Which slice is currently displayed in the XY plane.
-
boundingBoxPanel
private javax.swing.JPanel boundingBoxPanel
Bounding box control panel.
-
boundingCheck
private javax.swing.JCheckBox[] boundingCheck
Check box for turning bounding boxes on and off.
-
colorButton
private javax.swing.JButton[] colorButton
Color button for changing bounding box color.
-
colorChooser
private ViewJColorChooser colorChooser
Color chooser dialog.
-
controlPanel
private javax.swing.JPanel controlPanel
Main panel for sliders.
-
current
private int current
Current event vector index.
-
labelX
private javax.swing.JLabel labelX
Labels next to sliders.
-
labelY
private javax.swing.JLabel labelY
Labels next to sliders.
-
labelZ
private javax.swing.JLabel labelZ
Labels next to sliders.
-
labelT
private javax.swing.JLabel labelT
Labels next to sliders.
-
labelX1
private javax.swing.JLabel labelX1
Labels beneath sliders.
-
labelXMid
private javax.swing.JLabel labelXMid
Labels beneath sliders.
-
labelXEnd
private javax.swing.JLabel labelXEnd
Labels beneath sliders.
-
labelY1
private javax.swing.JLabel labelY1
Labels beneath sliders.
-
labelYMid
private javax.swing.JLabel labelYMid
Labels beneath sliders.
-
labelYEnd
private javax.swing.JLabel labelYEnd
Labels beneath sliders.
-
labelZ1
private javax.swing.JLabel labelZ1
Labels beneath sliders.
-
labelZMid
private javax.swing.JLabel labelZMid
Labels beneath sliders.
-
labelZEnd
private javax.swing.JLabel labelZEnd
Labels beneath sliders.
-
opacityControlPanel
private javax.swing.JPanel opacityControlPanel
Opacity control panel.
-
opacityLabelX
private javax.swing.JLabel opacityLabelX
The opacity slider label.
-
opacityLabelY
private javax.swing.JLabel opacityLabelY
The opacity slider label.
-
opacityLabelZ
private javax.swing.JLabel opacityLabelZ
The opacity slider label.
-
opacitySliderLabelsX
private javax.swing.JLabel[] opacitySliderLabelsX
The labels below the opacity slider.
-
opacitySliderLabelsY
private javax.swing.JLabel[] opacitySliderLabelsY
The labels below the opacity slider.
-
opacitySliderLabelsZ
private javax.swing.JLabel[] opacitySliderLabelsZ
The labels below the opacity slider.
-
opacitySliderX
private javax.swing.JSlider opacitySliderX
Opacity slider, not enabled yet.
-
opacitySliderY
private javax.swing.JSlider opacitySliderY
Opacity slider, not enabled yet.
-
opacitySliderZ
private javax.swing.JSlider opacitySliderZ
Opacity slider, not enabled yet.
-
scroller
private javax.swing.JScrollPane scroller
The scroll pane holding the panel content. Useful when the screen is small.
-
scrollPanel
private JPanelSlices.DrawingPanel scrollPanel
Scroll panel that holding the all the control components.
-
setSliderFlag
private boolean setSliderFlag
Flag to indicate the first time slider name changes.
-
textX
private javax.swing.JTextField textX
Text fields that display the slice number next to the sliders.
-
textY
private javax.swing.JTextField textY
Text fields that display the slice number next to the sliders.
-
textZ
private javax.swing.JTextField textZ
Text fields that display the slice number next to the sliders.
-
textT
private javax.swing.JTextField textT
Text fields that display the slice number next to the sliders.
-
xDim
private int xDim
x, y, z and time dimension values.
-
yDim
private int yDim
x, y, z and time dimension values.
-
zDim
private int zDim
x, y, z and time dimension values.
-
tDim
private int tDim
x, y, z and time dimension values.
-
xOpacitySlice
private int xOpacitySlice
x, y, z opacity slider values.
-
yOpacitySlice
private int yOpacitySlice
x, y, z opacity slider values.
-
zOpacitySlice
private int zOpacitySlice
x, y, z opacity slider values.
-
xProbe
private int xProbe
Probe x, y, z position.
-
yProbe
private int yProbe
Probe x, y, z position.
-
zProbe
private int zProbe
Probe x, y, z position.
-
-
Constructor Detail
-
JPanelSlices
public JPanelSlices(SurfaceRender parent)
Creates new dialog for turning slices bounding box frame on and off.- Parameters:
parent- Should be of type ViewJFrameSurfaceRenderer
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Changes color of slices box frame and button if color button was pressed; turns bounding box on and off if checkbox was pressed; and closes dialog if "Close" button was pressed.- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Specified by:
actionPerformedin classJPanelRendererBase- Parameters:
event- Event that triggered function.
-
buildSlicePickPanel
public void buildSlicePickPanel()
Build the slice pickable panel
-
buildControlPanel
public void buildControlPanel()
Builds panel that has 3 sliders for the 3 planes shown, 3 checkboxes for showing the planes, 3 text boxes for the current values of the sliders, and a fourth slider and text box for the time dimension, if necessary.
-
buildOpacityPanel
public void buildOpacityPanel()
Builds panel for opacity control change on the triplanar X, Y, Z.
-
disableSlices
public void disableSlices()
When 3D texture volume render is invoked, disable all the slices and bounding frame boxes.
-
dispose
public void dispose()
Dispose memory.
-
enableSlices
public void enableSlices()
Enable slider X, Y, Z and triplanar.
-
getBoxX
public javax.swing.JCheckBox getBoxX()
Return the checkbox of X slider.- Returns:
- boxX Get X slider check box.
-
getBoxY
public javax.swing.JCheckBox getBoxY()
Return the checkbox of Y slider.- Returns:
- boxY Get Y slider check box.
-
getBoxZ
public javax.swing.JCheckBox getBoxZ()
Return the checkbox of Z slider.- Returns:
- boxZ Get Z slider check box.
-
getMainPanel
public javax.swing.JPanel getMainPanel()
Return the control panel.- Specified by:
getMainPanelin classJPanelRendererBase- Returns:
- JPanel slices move control panel
-
getOpacitySliderX
public javax.swing.JSlider getOpacitySliderX()
Return the X opacity slider.- Returns:
- opcitySliderX Opacity slider X.
-
getOpacitySliderY
public javax.swing.JSlider getOpacitySliderY()
Return the Y opacity slider.- Returns:
- opcitySliderY Opacity slider Y.
-
getOpacitySliderZ
public javax.swing.JSlider getOpacitySliderZ()
Return the Z opacity slider.- Returns:
- opcitySliderZ Opacity slider Z.
-
getSliderX
public javax.swing.JSlider getSliderX()
Return the X slider.- Returns:
- sliderX X slider.
-
getSliderY
public javax.swing.JSlider getSliderY()
Return the Y slider.- Returns:
- sliderY Y slider.
-
getSliderZ
public javax.swing.JSlider getSliderZ()
Return the Z slider.- Returns:
- sliderZ Z slider.
-
getXOpacitySlice
public int getXOpacitySlice()
Get the x opacity slider value.- Returns:
- xOpacityslice X opacity slider value.
-
getXProbePos
public int getXProbePos()
Get the probe x coordinate.- Returns:
- xProbe probe x position
-
getSlice
public int getSlice(int orientation)
Get the current slider value for the slider that matches the orientation input parameter.- Parameters:
orientation- either FileInfoBase.AXIAL, FileInfoBase.CORONAL, FileInfoBase.SAGITTAL, or FileInfoBase.UNKNOWN_ORIENT.- Returns:
- The slider position for the given orientation is returned. *
-
setCenter
public void setCenter(int x, int y, int z)Sets the three slider positions, based on the position of the three orthogonal planes: AXIAL, CORONAL, and SAGITTAL.- Parameters:
x- center x-position in FileCoordinatesy- center y-position in FileCoordinatesz- center z-position in FileCoordinates
-
getCenter
public WildMagic.LibFoundation.Mathematics.Vector3f getCenter()
Gets the three slider positions, representing the center point of the three orthogonal planes. The center point is translated from local ModelCoordinates into FileCoordinates.- Returns:
- , the center of the three orthogonal planes (the three slider positions) in FileCoordinates.
-
getXSlice
public int getXSlice()
Get the X slider value.- Returns:
- xSlice X slider value.
-
getVisible
public boolean getVisible(int orientation)
slice slider visible or not.- Returns:
- sliceVisible if
truevisible, otherwise invisible.
-
getYOpacitySlice
public int getYOpacitySlice()
Get the y opacity slider value.- Returns:
- yOpacityslice Y opacity slider value.
-
getYProbePos
public int getYProbePos()
Get the probe y coordinate.- Returns:
- yProbe probe y position
-
getYSlice
public int getYSlice()
Get the y slider value.- Returns:
- ySlice Y slider value.
-
getZOpacitySlice
public int getZOpacitySlice()
Get the z opacity slider value.- Returns:
- zOpacityslice Z opacity slider value.
-
getZProbePos
public int getZProbePos()
Get the probe z coordinate.- Returns:
- zProbe probe z position
-
getZSlice
public int getZSlice()
Get the z slider value.- Returns:
- zSlice Z slider value.
-
init
public void init()
Initializes GUI components.
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent event)
Unchanged.- Specified by:
mouseClickedin interfacejava.awt.event.MouseListener- Parameters:
event- Original mouse event.
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent event)
Unchanged.- Specified by:
mouseEnteredin interfacejava.awt.event.MouseListener- Parameters:
event- Original mouse event.
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent event)
Unchanged.- Specified by:
mouseExitedin interfacejava.awt.event.MouseListener- Parameters:
event- Original mouse event.
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent event)
Unchanged.- Specified by:
mousePressedin interfacejava.awt.event.MouseListener- Parameters:
event- Original mouse event.
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent event)
Used in MouseRecorder to stop one series of slide moves.- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener- Parameters:
event- Original mouse event.
-
resizePanel
public void resizePanel(int panelWidth, int frameHeight)Resizig the control panel with ViewJFrameVolumeView's frame width and height.- Overrides:
resizePanelin classJPanelRendererBase- Parameters:
panelWidth- DOCUMENT ME!frameHeight- DOCUMENT ME!
-
setOpacitySliderXEnabled
public void setOpacitySliderXEnabled(boolean flag)
Set the opacity slider X with given boolean value.- Parameters:
flag- indicate opacity slider is set or not
-
setOpacitySliderYEnabled
public void setOpacitySliderYEnabled(boolean flag)
Set the opacity slider Y with given boolean value.- Parameters:
flag- indicate opacity slider is set or not
-
setOpacitySliderZEnabled
public void setOpacitySliderZEnabled(boolean flag)
Set the opacity slider Z with given boolean value.- Parameters:
flag- indicate opacity slider is set or not
-
setSceneState
public void setSceneState(java.lang.Object scene)
Sets the scene state appropriately, so that the slices that are supposed to be visible are showing, the ones that aren't are hidden, and the sliders are starting at the appropriate value.- Parameters:
scene- The state of the scene.
-
setXProbePos
public void setXProbePos(int _xProbe)
Set probe x coordinate.- Parameters:
_xProbe- probe x position
-
setXSlicePos
private void setXSlicePos(int _xSlice)
Set the current x slider move position.- Parameters:
_xSlice- x slider position
-
setXSliderEnabled
public void setXSliderEnabled(boolean flag)
Sets the x slider and the labels beside and beneath it to the state given byflag.- Parameters:
flag- iftrueenable, otherwise disable.
-
setYProbePos
public void setYProbePos(int _yProbe)
Set probe y coordinate.- Parameters:
_yProbe- probe y position
-
setYSlicePos
private void setYSlicePos(int _ySlice)
Set the current y slider move position.- Parameters:
_ySlice- y slider position
-
setYSliderEnabled
public void setYSliderEnabled(boolean flag)
Sets the y slider and the labels beside and beneath it to the state given byflag.- Parameters:
flag- iftrueenable, otherwise disable.
-
setZProbePos
public void setZProbePos(int _zProbe)
Set probe z coordinate.- Parameters:
_zProbe- probe z position
-
setZSlicePos
private void setZSlicePos(int _zSlice)
Set the current z slider move position.- Parameters:
_zSlice- z slider position
-
setZSliderEnabled
public void setZSliderEnabled(boolean flag)
Sets the z slider and the labels beside and beneath it to the state given byflag.- Parameters:
flag- iftrueenable, otherwise disable.
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
Sets how the image plane should be displayed depending on value of slider.- Specified by:
stateChangedin interfacejavax.swing.event.ChangeListener- Parameters:
e- Event that triggered this function.
-
setBoxColor
protected void setBoxColor(javax.swing.JButton button, java.awt.Color color)Calls the appropriate method in the parent frame.- Parameters:
button- DOCUMENT ME!color- Color to set box frame to.
-
addControlPanel
private void addControlPanel(java.awt.Component c, java.awt.GridBagConstraints gbc, int x, int y, int w, int h)Helper method that adds components to the control panel for the grid bag layout.- Parameters:
c- Component added to the control panel.gbc- GridBagConstraints of added component.x- Gridx locationy- Gridy locationw- Gridwidthh- Gridheight
-
addOpacityControlPanel
private void addOpacityControlPanel(java.awt.Component c, java.awt.GridBagConstraints gbc, int x, int y, int w, int h)Helper method that adds components to the control panel for the grid bag layout.- Parameters:
c- Component added to the control panel.gbc- GridBagConstraints of added component.x- Gridx locationy- Gridy locationw- Gridwidthh- Gridheight
-
buildBoundingBox
private void buildBoundingBox()
Build the boudning box for X, Y, Z slices.
-
buildTimeSlider
private void buildTimeSlider()
Builds the time (4D) slider. No check box, because there is no plane to turn off.
-
createLabel
private 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.
-
-