Class JPanelSlices_WM
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Dialog
-
- javax.swing.JDialog
-
- gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
-
- gov.nih.mipav.view.renderer.WildMagic.Interface.JPanelSlices_WM
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.event.ChangeListener
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
public class JPanelSlices_WM extends JInterfaceBase implements javax.swing.event.ChangeListener
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/interfaces inherited from class gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
JInterfaceBase.CancelListener, JInterfaceBase.DrawingPanel, JInterfaceBase.OkColorListener
-
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
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JPanel
boundingBoxPanel
Bounding box control panel.private javax.swing.JCheckBox[]
boundingCheck
Check box for turning bounding boxes on and off.javax.swing.JCheckBox
boxX
Check boxes that turn the image plane on and off.javax.swing.JCheckBox
boxY
Check boxes that turn the image plane on and off.javax.swing.JCheckBox
boxZ
Check boxes that turn the image plane on and off.private javax.swing.JButton[]
colorButton
Color button for changing bounding box color.private javax.swing.JPanel
controlPanel
Main panel for sliders.private javax.swing.JLabel
labelT
Labels next to sliders.private javax.swing.JLabel
labelX
Labels next to sliders.private javax.swing.JLabel
labelX1
Labels beneath sliders.private javax.swing.JLabel
labelXEnd
Labels beneath sliders.private javax.swing.JLabel
labelXMid
Labels beneath sliders.private javax.swing.JLabel
labelY
Labels next to sliders.private javax.swing.JLabel
labelY1
Labels beneath sliders.private javax.swing.JLabel
labelYEnd
Labels beneath sliders.private javax.swing.JLabel
labelYMid
Labels beneath sliders.private javax.swing.JLabel
labelZ
Labels next to sliders.private javax.swing.JLabel
labelZ1
Labels beneath sliders.private javax.swing.JLabel
labelZEnd
Labels beneath sliders.private javax.swing.JLabel
labelZMid
Labels beneath sliders.private javax.swing.JPanel
opacityControlPanel
Opacity control panel.private javax.swing.JLabel
opacityLabelX
The opacity slider label.private javax.swing.JLabel
opacityLabelY
The opacity slider label.private javax.swing.JLabel
opacityLabelZ
The opacity slider label.private javax.swing.JLabel[]
opacitySliderLabelsX
The labels below the opacity slider.private javax.swing.JLabel[]
opacitySliderLabelsY
The labels below the opacity slider.private javax.swing.JLabel[]
opacitySliderLabelsZ
The labels below the opacity slider.private javax.swing.JSlider
opacitySliderX
Opacity slider, not enabled yet.private javax.swing.JSlider
opacitySliderY
Opacity slider, not enabled yet.private javax.swing.JSlider
opacitySliderZ
Opacity slider, not enabled yet.private javax.swing.JScrollPane
scroller
The scroll pane holding the panel content.private JInterfaceBase.DrawingPanel
scrollPanel
Scroll panel that holding the all the control components.private static long
serialVersionUID
Use serialVersionUID for interoperability.boolean[]
sliceVisible
Flags indicating if the image slices are on or off.javax.swing.JSlider
sliderT
Sliders for the image planes.javax.swing.JSlider
sliderX
Sliders for the image planes.javax.swing.JSlider
sliderY
Sliders for the image planes.javax.swing.JSlider
sliderZ
Sliders for the image planes.private int
tDim
x, y, z and time dimension values.private javax.swing.JTextField
textT
Text fields that display the slice number next to the sliders.private javax.swing.JTextField
textX
Text fields that display the slice number next to the sliders.private javax.swing.JTextField
textY
Text fields that display the slice number next to the sliders.private javax.swing.JTextField
textZ
Text fields that display the slice number next to the sliders.int
tSlice
Which time slice is currently displayed.private int
xDim
x, y, z and time dimension values.private int
xOpacitySlice
x, y, z opacity slider values.private int
xProbe
Probe x, y, z position.int
xSlice
Which slice is currently displayed in the ZY plane.private int
yDim
x, y, z and time dimension values.private int
yOpacitySlice
x, y, z opacity slider values.private int
yProbe
Probe x, y, z position.int
ySlice
Which slice is currently displayed in the XZ plane.private int
zDim
x, y, z and time dimension values.private int
zOpacitySlice
x, y, z opacity slider values.private int
zProbe
Probe x, y, z position.int
zSlice
Which slice is currently displayed in the XY plane.-
Fields inherited from class gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
cancelButton, colorChooser, m_kVolumeViewer, mainPanel, OKButton, rayBasedRenderWM
-
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description JPanelSlices_WM(VolumeTriPlanarInterface kVolumeViewer)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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.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.private void
buildBoundingBox()
Build the boudning box for X, Y, Z slices.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.void
buildOpacityPanel()
Builds panel for opacity control change on the triplanar X, Y, Z.private void
buildTimeSlider()
Builds the time (4D) slider.private javax.swing.JLabel
createLabel(java.lang.String title)
Creates a label in the proper font and color.void
disposeLocal()
Dispose memory.javax.swing.JCheckBox
getBoxX()
Return the checkbox of X slider.javax.swing.JCheckBox
getBoxY()
Return the checkbox of Y slider.javax.swing.JCheckBox
getBoxZ()
Return the checkbox of Z slider.WildMagic.LibFoundation.Mathematics.Vector3f
getCenter()
Gets the three slider positions, representing the center point of the three orthogonal planes.java.awt.Color
getColor(int i)
int
getOpacity(int i)
javax.swing.JSlider
getOpacitySliderX()
Return the X opacity slider.javax.swing.JSlider
getOpacitySliderY()
Return the Y opacity slider.javax.swing.JSlider
getOpacitySliderZ()
Return the Z opacity slider.boolean
getShowBound(int i)
boolean
getShowSlice(int i)
int
getSlice(int orientation)
Get the current slider value for the slider that matches the orientation input parameter.javax.swing.JSlider
getSliderX()
Return the X slider.javax.swing.JSlider
getSliderY()
Return the Y slider.javax.swing.JSlider
getSliderZ()
Return the Z slider.boolean
getVisible(int orientation)
slice slider visible or not.int
getXOpacitySlice()
Get the x opacity slider value.int
getXProbePos()
Get the probe x coordinate.int
getXSlice()
Get the X slider value.int
getYOpacitySlice()
Get the y opacity slider value.int
getYProbePos()
Get the probe y coordinate.int
getYSlice()
Get the y slider value.int
getZOpacitySlice()
Get the z opacity slider value.int
getZProbePos()
Get the probe z coordinate.int
getZSlice()
Get the z slider value.void
init()
Initializes GUI components.void
resizePanel(int panelWidth, int frameHeight)
Resizing the control panel with ViewJFrameVolumeView's frame width and height.void
setButtonColor(javax.swing.JButton _button, java.awt.Color _color)
Set the color of the button.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.void
setColor(int i, java.awt.Color value)
void
setOpacity(int i, int value)
void
setOpacitySliderXEnabled(boolean flag)
Set the opacity slider X with given boolean value.void
setOpacitySliderYEnabled(boolean flag)
Set the opacity slider Y with given boolean value.void
setOpacitySliderZEnabled(boolean flag)
Set the opacity slider Z with given boolean value.void
setShowBound(int i, boolean value)
void
setShowSlice(int i, boolean value)
void
setXProbePos(int _xProbe)
Set probe x coordinate.private void
setXSlicePos(int _xSlice)
Set the current x slider move position.void
setXSliderEnabled(boolean flag)
Sets the x slider and the labels beside and beneath it to the state given byflag
.void
setYProbePos(int _yProbe)
Set probe y coordinate.private void
setYSlicePos(int _ySlice)
Set the current y slider move position.void
setYSliderEnabled(boolean flag)
Sets the y slider and the labels beside and beneath it to the state given byflag
.void
setZProbePos(int _zProbe)
Set probe z coordinate.private void
setZSlicePos(int _zSlice)
Set the current z slider move position.void
setZSliderEnabled(boolean flag)
Sets the z slider and the labels beside and beneath it to the state given byflag
.void
stateChanged(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.WildMagic.Interface.JInterfaceBase
buildCancelButton, buildOKButton, buildTitledBorder, getMainPanel, updateColorButton
-
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, setVisible, 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
-
-
-
-
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.
-
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.
-
controlPanel
private javax.swing.JPanel controlPanel
Main panel for sliders.
-
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 JInterfaceBase.DrawingPanel scrollPanel
Scroll panel that holding the all the control components.
-
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_WM
public JPanelSlices_WM(VolumeTriPlanarInterface kVolumeViewer)
Constructor.- Parameters:
kVolumeViewer
- parent frame.
-
-
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:
actionPerformed
in interfacejava.awt.event.ActionListener
- Parameters:
event
- Event that triggered function.
-
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.
-
disposeLocal
public void disposeLocal()
Dispose memory.
-
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.
-
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.
-
getOpacity
public int getOpacity(int i)
-
setOpacity
public void setOpacity(int i, int value)
-
getColor
public java.awt.Color getColor(int i)
-
setColor
public void setColor(int i, java.awt.Color value)
-
getShowSlice
public boolean getShowSlice(int i)
-
setShowSlice
public void setShowSlice(int i, boolean value)
-
getShowBound
public boolean getShowBound(int i)
-
setShowBound
public void setShowBound(int i, boolean value)
-
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.
-
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. *
-
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.
-
getVisible
public boolean getVisible(int orientation)
slice slider visible or not.- Returns:
- sliceVisible if
true
visible, otherwise invisible.
-
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
-
getXSlice
public int getXSlice()
Get the X slider value.- Returns:
- xSlice X slider value.
-
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.
-
resizePanel
public void resizePanel(int panelWidth, int frameHeight)
Resizing the control panel with ViewJFrameVolumeView's frame width and height.- Parameters:
panelWidth
- DOCUMENT ME!frameHeight
- DOCUMENT ME!
-
setButtonColor
public void setButtonColor(javax.swing.JButton _button, java.awt.Color _color)
Description copied from class:JInterfaceBase
Set the color of the button. Derived classes may also perform other functions.- Overrides:
setButtonColor
in classJInterfaceBase
- Parameters:
_button
- button._color
- color.
-
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
-
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
-
setXProbePos
public void setXProbePos(int _xProbe)
Set probe x coordinate.- Parameters:
_xProbe
- probe x 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
- iftrue
enable, otherwise disable.
-
setYProbePos
public void setYProbePos(int _yProbe)
Set probe y coordinate.- Parameters:
_yProbe
- probe y 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
- iftrue
enable, otherwise disable.
-
setZProbePos
public void setZProbePos(int _zProbe)
Set probe z coordinate.- Parameters:
_zProbe
- probe z 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
- iftrue
enable, 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:
stateChanged
in interfacejavax.swing.event.ChangeListener
- Parameters:
e
- Event that triggered this function.
-
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.
-
setXSlicePos
private void setXSlicePos(int _xSlice)
Set the current x slider move position.- Parameters:
_xSlice
- x slider position
-
setYSlicePos
private void setYSlicePos(int _ySlice)
Set the current y slider move position.- Parameters:
_ySlice
- y slider position
-
setZSlicePos
private void setZSlicePos(int _zSlice)
Set the current z slider move position.- Parameters:
_zSlice
- z slider position
-
-