Class SurfacePlotter
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Canvas
-
- javax.media.j3d.Canvas3D
-
- gov.nih.mipav.view.renderer.J3D.VolumeCanvas3D
-
- gov.nih.mipav.view.renderer.J3D.RenderViewBase
-
- gov.nih.mipav.view.renderer.J3D.surfaceview.plotterview.SurfacePlotter
-
- All Implemented Interfaces:
com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback
,ViewImageUpdateInterface
,java.awt.event.ActionListener
,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 SurfacePlotter extends RenderViewBase implements java.awt.event.MouseListener
Frame that holds the surface plotter. The surface plotter takes a 2D image and renders it into a 3D object that is similar to a relief map. Higher intensities are peaks, lower intensities are valleys. The colors are the same as those used in the LUT, and when the LUT for the image is updated, so is the LUT for the plotted surface. The image itself is also a part of the scene, and it can be slid along so that the peaks of the intensity levels match the image.- See Also:
ViewJComponentSurface
, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nih.mipav.view.renderer.J3D.RenderViewBase
RenderViewBase.Matrix
-
-
Field Summary
Fields Modifier and Type Field Description private JPanelSurfaceBox
boxDialog
Dialog for recording and playing back mouse events.private ViewJComponentSurface
componentImageXY
Main component found in this frame.private javax.swing.JPanel
controlPanel
the control panel that hold the z slider.private int
current
Current event vector index.private int[]
extents
Extents of image.private javax.media.j3d.BranchGroup
imageBranch
Branch parent of the image in the scene, needed so image can be made invisible when another surface is loaded.private boolean
isVisible
Flag indicating if the image is currently visible.private javax.swing.JCheckBoxMenuItem
itemLine
Check box menu item indicating if surface should be in line mode or full mode.private javax.swing.JLabel
label1
Label for slider, "1".private javax.swing.JLabel
label100
Label for slider, "100".private javax.swing.JLabel
label50
Label for slider, "50".private javax.swing.JLabel
labelZ
Label that says "Z (1-100)".private ModelLUT
LUTa
LUT that dictates how the vertices of the quad mesh are colored.private javax.swing.JPanel
mainPanel
The main control panel.private JPanelMousePlotter
mouseDialog
Mouse recorder dialog associated with surface plotter.private com.sun.j3d.utils.behaviors.mouse.MouseRotate
mouseRotateBehavior
Mouse Rotate behavior.private com.sun.j3d.utils.behaviors.mouse.MouseTranslate
mouseTranslateBehavior
Mouse Translate behavior.private com.sun.j3d.utils.behaviors.mouse.MouseZoom
mouseZoomBehavior
Mouse Zoom behavior.private javax.vecmath.Point3d
myEyePoint
Initial center viewing point of the image.private javax.media.j3d.TransformGroup
objTransXY
Transform group guiding how image is displayed.private javax.swing.JMenuBar
openingMenuBar
Menu bar.private javax.swing.JPanel
panelToolbar
Panel that holds the toolbars.private javax.media.j3d.Transform3D
parallelScaleT3D
Transformation matrix.private static long
serialVersionUID
Use serialVersionUID for interoperability.private boolean
setSliderFlag
Flag to indicate the first time slider name changes.private int
slice
Current slice of 3D image, used to figure out XY plane to plot.private MouseEventVectorPlotter
sliderEvents
Slider events used by the mouse recorder.private javax.swing.JSlider
sliderFrame
Slider for frame/slice of image.private javax.swing.JSlider
sliderZ
3, 1-100%, dictating where the image in the surface should be displayed.private javax.media.j3d.Transform3D
t3d_XY_t
Actual transform of the image.private javax.swing.JTextField
textZ
Text field displaying the percentage of the slider.private javax.media.j3d.TextureUnitState[]
texUnitStateBXY
Texture creating appearance for the "back" of the image.private javax.media.j3d.TextureUnitState[]
texUnitStateFXY
Texture creating appearance for the "front" of the image.private javax.swing.JCheckBox
visibleBox
Check box for whether or not the image should be visible.private float
xRes
X and Y resolution.private float
yRes
X and Y resolution.private int
zSlice
Z slice, which image of 1-100 are we showing.-
Fields inherited from class gov.nih.mipav.view.renderer.J3D.RenderViewBase
background, bounds, boxFrame, canvas, captureFrame, captureImage, config, displayMode, IMAGE_A, IMAGE_B, imageA, imageB, LUTb, objBehaviorBG, objBoxFrameBG, objRootBG, rotationAngle, rotationAxis, rotationControlPanel, rotationTimes, rotationTotal, sceneRootTG, transRotation, transRotationMatrix, triPlanarViewBG, universe, viewPanel
-
Fields inherited from class gov.nih.mipav.view.renderer.J3D.VolumeCanvas3D
m_dAccumulatedTime, m_dFrameRate, m_dLastTime, m_iAccumulatedFrameCount, m_iFrameCount, m_iMaxTimer, m_iTimer
-
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description SurfacePlotter(ModelImage _imageA, ModelLUT _LUTa, int slice, java.awt.GraphicsConfiguration _config)
Makes a frame and puts the image and the plotted quad mesh into it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
Calls various methods depending on the action: Load in menu - calls a file chooser and loads the quad surface Save in menu - calls a file chooser and saves the quad surface Exit in menu - exits this frame View in menu - opens view dialog Mouse in menu - opens mouse recorder dialog Line checkbox in menu - toggles polygon mode between fill and line Visible checkbox on panel - toggles image on and offvoid
autoCapture()
Override the parent autoCapture method to capture MIP image volume.private javax.swing.JPanel
buildControlPanel()
Panel that has a slider for the image.private void
buildMenu()
Builds menus for the frame.private void
buildToolBar()
Builds the toolbar for the volume render frame.private void
configureFrame()
Constructs main frame structures for the surface.private void
createImageSceneGraph()
Creates the scene graph.void
disableCamera()
Set the captureFrame to null.void
dispatchSavedEvent(java.util.EventObject event)
Dispatches event to appropriate object.void
disposeLocal()
Dispose memory.void
finalize()
Finalize to free memory.JPanelCamera
getCameraPanel()
Get the camera control panel.javax.swing.JPanel
getControlPanel()
Get the main control panel.ModelImage
getImageA()
Accessor that returns the reference to imageA.ModelImage
getImageB()
Does nothing but must instantiate for this to be a subclass of RenderViewBase.JPanelMousePlotter
getMouseControl()
Return mouseDialog from parent frame.int
getMouseMode()
Gets the mouse pointer mode - standard or fly - from the view dialog.JPanelMousePlotter
getMousePanel()
Get the mouse recorder control panel.int
getSampleSize()
Get the sample factor.java.lang.Object
getSceneState()
Gets the current scene state, in terms of what number the slice is on and if it is visible.JPanelSurfaceBox
getSurfaceBoxPanel()
Get the surface box control ???JPanelView
getViewPanel()
Get the view control panel.void
hideBoxFrame()
Makes the box frame invisible.private void
load()
Calls a file chooser then loads the quad mesh from that file.private javax.swing.JButton
makeSeparator()
Makes a separator for the use in the toolbars.void
mouseClicked(java.awt.event.MouseEvent event)
Unchanged.void
mouseEntered(java.awt.event.MouseEvent event)
Unchanged.void
mouseExited(java.awt.event.MouseEvent event)
Unchanged.void
mousePressed(java.awt.event.MouseEvent event)
Unchanged.void
mouseReleased(java.awt.event.MouseEvent event)
Used in MouseRecorder to stop one series of slide moves.void
resample(java.lang.String selectedValue)
Call by the plotter render frame to resample.void
resetMouseDialog()
Reset mouseDialog box.void
rotateImage()
Override the parent rotateImage method to rotate the MIP image volume.private void
save()
Calls a file chooser then writes the quad mesh to that file.void
setAlphaBlend(int value)
Does nothing but must instantiate for this to be a subclass of RenderViewBase.void
setEnabled(boolean flag)
Does nothing but must instantiate for this to be a subclass of RenderViewBase.void
setGUI(java.lang.Object scene)
Sets the GUI components to their proper state before the action is dispatched from the player.void
setLUTa(ModelLUT LUT)
Accessor that sets the LUT.void
setMouseMode(int mode)
Sets the mouse pointer mode - standard or fly - in the view dialog.void
setPolygonMode(boolean flag)
Set the polygonal render mode.void
setRenderPerspective(boolean bEnable)
Enable perspective projection rendering; otherwise use orthographic projection.void
setRGBTA(ModelRGB RGBT)
Does nothing but must instantiate for this to be a subclass of RenderViewBase.void
setRGBTB(ModelRGB RGBT)
Does nothing but must instantiate for this to be a subclass of RenderViewBase.void
setRotationAngle(int value)
Set the rotation angel for the camera control.void
setRotationAxis(int axis)
Set the rotation axis for the camera control.void
setSceneState(java.lang.Object scene)
Sets the scene state appropriately.void
setSlice(int slice)
Does nothing but must instantiate for this to be a subclass of RenderViewBase.private void
setSliderEnabled(boolean flag)
Sets the slider, the label "Z (1-100)" and the labels underneath the slider to enabled or disabled, depending on flag.void
setTimeSlice(int slice)
Does nothing but must instantiate for this to be a subclass of RenderViewBase.private void
setupEye()
Set up the center point of the red line boxframe.void
showBoxFrame()
Makes the box frame visible.void
stateChanged(javax.swing.event.ChangeEvent e)
Sets where image is in scene based on knob along slider.void
transformChanged(int type, javax.media.j3d.Transform3D transform)
Does nothing but must instantiate for this to be a subclass of ViewJFrameSurface.private void
translateImage()
DOCUMENT ME!boolean
updateImageExtents()
This methods calls the componentImage's REPAINT method to redraw the screen.boolean
updateImages()
This methods calls the componentImage's update method to redraw the screen - fastest of the three update methods.boolean
updateImages(boolean forceShow)
This methods calls the componentImage's update method to redraw the screen.boolean
updateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode)
This methods calls the componentImage's update method to redraw the screen.private void
updateViewScreenScale(javax.media.j3d.Transform3D kTransform)
This function calculates the scale factor for zooming in parallel projection.-
Methods inherited from class gov.nih.mipav.view.renderer.J3D.RenderViewBase
calcImageNormals, createBoxFrame, getBehaviorGroup, getBound, getBranchGroup, getCanvas, getNormals, getRGBTA, getRGBTB, getSceneRootTG, getSliderEvents, getTriPlanarViewBG, getUniverse, recordMouse, resetAxisX, resetAxisY, resetImage, setBackgroundColor, setBoxColor, writeImage, writeImageAuto
-
Methods inherited from class gov.nih.mipav.view.renderer.J3D.VolumeCanvas3D
GetTestFrameRate, MeasureTime, paint, postSwap, ResetTime, SetTestFrameRate, supportsTexture3D, update, UpdateFrameCount
-
Methods inherited from class javax.media.j3d.Canvas3D
addNotify, getCenterEyeInImagePlate, getDoubleBufferAvailable, getDoubleBufferEnable, getGraphics2D, getGraphicsContext3D, getImagePlateToVworld, getInverseVworldProjection, getLeftEyeInImagePlate, getLeftManualEyeInImagePlate, getLocationOnScreen, getMonoscopicViewPolicy, getOffScreenBuffer, getOffScreenLocation, getOffScreenLocation, getPhysicalHeight, getPhysicalWidth, getPixelLocationFromImagePlate, getPixelLocationInImagePlate, getPixelLocationInImagePlate, getRightEyeInImagePlate, getRightManualEyeInImagePlate, getSceneAntialiasingAvailable, getScreen3D, getStereoAvailable, getStereoEnable, getView, getVworldProjection, getVworldToImagePlate, isOffScreen, isRendererRunning, isShadingLanguageSupported, postRender, preRender, queryProperties, removeNotify, renderField, renderOffScreenBuffer, setDoubleBufferEnable, setLeftManualEyeInImagePlate, setMonoscopicViewPolicy, setOffScreenBuffer, setOffScreenLocation, setOffScreenLocation, setRightManualEyeInImagePlate, setStereoEnable, startRenderer, stopRenderer, swap, waitForOffScreenRendering
-
Methods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
boxDialog
private JPanelSurfaceBox boxDialog
Dialog for recording and playing back mouse events.
-
componentImageXY
private ViewJComponentSurface componentImageXY
Main component found in this frame.
-
controlPanel
private javax.swing.JPanel controlPanel
the control panel that hold the z slider.
-
current
private int current
Current event vector index.
-
extents
private int[] extents
Extents of image.
-
imageBranch
private javax.media.j3d.BranchGroup imageBranch
Branch parent of the image in the scene, needed so image can be made invisible when another surface is loaded.
-
isVisible
private boolean isVisible
Flag indicating if the image is currently visible.
-
itemLine
private javax.swing.JCheckBoxMenuItem itemLine
Check box menu item indicating if surface should be in line mode or full mode.
-
label1
private javax.swing.JLabel label1
Label for slider, "1".
-
label100
private javax.swing.JLabel label100
Label for slider, "100".
-
label50
private javax.swing.JLabel label50
Label for slider, "50".
-
labelZ
private javax.swing.JLabel labelZ
Label that says "Z (1-100)".
-
LUTa
private ModelLUT LUTa
LUT that dictates how the vertices of the quad mesh are colored.
-
mainPanel
private javax.swing.JPanel mainPanel
The main control panel.
-
mouseDialog
private JPanelMousePlotter mouseDialog
Mouse recorder dialog associated with surface plotter.
-
mouseRotateBehavior
private com.sun.j3d.utils.behaviors.mouse.MouseRotate mouseRotateBehavior
Mouse Rotate behavior.
-
mouseTranslateBehavior
private com.sun.j3d.utils.behaviors.mouse.MouseTranslate mouseTranslateBehavior
Mouse Translate behavior.
-
mouseZoomBehavior
private com.sun.j3d.utils.behaviors.mouse.MouseZoom mouseZoomBehavior
Mouse Zoom behavior.
-
myEyePoint
private javax.vecmath.Point3d myEyePoint
Initial center viewing point of the image.
-
objTransXY
private javax.media.j3d.TransformGroup objTransXY
Transform group guiding how image is displayed.
-
openingMenuBar
private javax.swing.JMenuBar openingMenuBar
Menu bar.
-
panelToolbar
private javax.swing.JPanel panelToolbar
Panel that holds the toolbars.
-
parallelScaleT3D
private javax.media.j3d.Transform3D parallelScaleT3D
Transformation matrix.
-
setSliderFlag
private boolean setSliderFlag
Flag to indicate the first time slider name changes.
-
slice
private int slice
Current slice of 3D image, used to figure out XY plane to plot.
-
sliderEvents
private MouseEventVectorPlotter sliderEvents
Slider events used by the mouse recorder.
-
sliderFrame
private javax.swing.JSlider sliderFrame
Slider for frame/slice of image.
-
sliderZ
private javax.swing.JSlider sliderZ
3, 1-100%, dictating where the image in the surface should be displayed.
-
t3d_XY_t
private javax.media.j3d.Transform3D t3d_XY_t
Actual transform of the image.
-
textZ
private javax.swing.JTextField textZ
Text field displaying the percentage of the slider.
-
texUnitStateBXY
private javax.media.j3d.TextureUnitState[] texUnitStateBXY
Texture creating appearance for the "back" of the image. Needs to be array even though there will be only 1 item.
-
texUnitStateFXY
private javax.media.j3d.TextureUnitState[] texUnitStateFXY
Texture creating appearance for the "front" of the image. Needs to be array even though there will be only 1 item.
-
visibleBox
private javax.swing.JCheckBox visibleBox
Check box for whether or not the image should be visible.
-
xRes
private float xRes
X and Y resolution.
-
yRes
private float yRes
X and Y resolution.
-
zSlice
private int zSlice
Z slice, which image of 1-100 are we showing.
-
-
Constructor Detail
-
SurfacePlotter
public SurfacePlotter(ModelImage _imageA, ModelLUT _LUTa, int slice, java.awt.GraphicsConfiguration _config)
Makes a frame and puts the image and the plotted quad mesh into it.- Parameters:
_imageA
- First image to display_LUTa
- LUT of the imageA (if null grayscale LUT is constructed).slice
- Slice of 3D image that we're going to plot; 0 if 2D._config
- Graphics configuration.
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Calls various methods depending on the action:- Load in menu - calls a file chooser and loads the quad surface
- Save in menu - calls a file chooser and saves the quad surface
- Exit in menu - exits this frame
- View in menu - opens view dialog
- Mouse in menu - opens mouse recorder dialog
- Line checkbox in menu - toggles polygon mode between fill and line
- Visible checkbox on panel - toggles image on and off
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Parameters:
event
- Event that triggered function.
-
autoCapture
public void autoCapture()
Override the parent autoCapture method to capture MIP image volume.- Overrides:
autoCapture
in classRenderViewBase
-
disableCamera
public void disableCamera()
Set the captureFrame to null.- Overrides:
disableCamera
in classRenderViewBase
-
dispatchSavedEvent
public void dispatchSavedEvent(java.util.EventObject event)
Dispatches event to appropriate object.- Parameters:
event
- Event to dispatch.
-
disposeLocal
public void disposeLocal()
Dispose memory.- Overrides:
disposeLocal
in classRenderViewBase
-
finalize
public void finalize() throws java.lang.Throwable
Finalize to free memory.- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
- DOCUMENT ME!
-
getCameraPanel
public JPanelCamera getCameraPanel()
Get the camera control panel.- Returns:
- JPanelCamera camera control panel
-
getControlPanel
public javax.swing.JPanel getControlPanel()
Get the main control panel.- Returns:
- JPanel the main control panel
-
getImageA
public ModelImage getImageA()
Accessor that returns the reference to imageA.- Overrides:
getImageA
in classRenderViewBase
- Returns:
- image
-
getImageB
public ModelImage getImageB()
Does nothing but must instantiate for this to be a subclass of RenderViewBase.- Overrides:
getImageB
in classRenderViewBase
- Returns:
- null
-
getMouseControl
public JPanelMousePlotter getMouseControl()
Return mouseDialog from parent frame.- Returns:
- mouseDialog Mouse Dialog box.
-
getMouseMode
public int getMouseMode()
Gets the mouse pointer mode - standard or fly - from the view dialog.- Returns:
- The mouse pointer mode.
-
getMousePanel
public JPanelMousePlotter getMousePanel()
Get the mouse recorder control panel.- Returns:
- JPanelMousePlotter mouse control panel
-
getSampleSize
public int getSampleSize()
Get the sample factor.- Returns:
- int return the sample factor
-
getSceneState
public java.lang.Object getSceneState()
Gets the current scene state, in terms of what number the slice is on and if it is visible.- Specified by:
getSceneState
in classRenderViewBase
- Returns:
- A SceneState object with the variables set appropriately.
-
getSurfaceBoxPanel
public JPanelSurfaceBox getSurfaceBoxPanel()
Get the surface box control ???- Returns:
- JPanelSurfaceBox
-
getViewPanel
public JPanelView getViewPanel()
Get the view control panel.- Returns:
- JPanelView the view control
-
hideBoxFrame
public void hideBoxFrame()
Makes the box frame invisible.
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent event)
Unchanged.- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
- Parameters:
event
- Original mouse event.
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent event)
Unchanged.- Specified by:
mouseEntered
in interfacejava.awt.event.MouseListener
- Parameters:
event
- Original mouse event.
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent event)
Unchanged.- Specified by:
mouseExited
in interfacejava.awt.event.MouseListener
- Parameters:
event
- Original mouse event.
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent event)
Unchanged.- Specified by:
mousePressed
in 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:
mouseReleased
in interfacejava.awt.event.MouseListener
- Parameters:
event
- Original mouse event.
-
resample
public void resample(java.lang.String selectedValue)
Call by the plotter render frame to resample.- Parameters:
selectedValue
- resample factor
-
resetMouseDialog
public void resetMouseDialog()
Reset mouseDialog box.
-
rotateImage
public void rotateImage()
Override the parent rotateImage method to rotate the MIP image volume. This method manully rotate the image volume during the camera snapshooting.- Overrides:
rotateImage
in classRenderViewBase
-
setAlphaBlend
public void setAlphaBlend(int value)
Does nothing but must instantiate for this to be a subclass of RenderViewBase.- Specified by:
setAlphaBlend
in classRenderViewBase
- Parameters:
value
- DOCUMENT ME!
-
setEnabled
public void setEnabled(boolean flag)
Does nothing but must instantiate for this to be a subclass of RenderViewBase.- Overrides:
setEnabled
in classjava.awt.Component
- Parameters:
flag
- DOCUMENT ME!
-
setGUI
public void setGUI(java.lang.Object scene)
Sets the GUI components to their proper state before the action is dispatched from the player.- Specified by:
setGUI
in classRenderViewBase
- Parameters:
scene
- The state of the scene.
-
setLUTa
public void setLUTa(ModelLUT LUT)
Accessor that sets the LUT.- Parameters:
LUT
- the LUT
-
setMouseMode
public void setMouseMode(int mode)
Sets the mouse pointer mode - standard or fly - in the view dialog.- Parameters:
mode
- Mode to set to.
-
setPolygonMode
public void setPolygonMode(boolean flag)
Set the polygonal render mode.- Parameters:
flag
- mode is on or not
-
setRenderPerspective
public void setRenderPerspective(boolean bEnable)
Enable perspective projection rendering; otherwise use orthographic projection.- Parameters:
bEnable
- true to enable perspective projection
-
setRGBTA
public void setRGBTA(ModelRGB RGBT)
Does nothing but must instantiate for this to be a subclass of RenderViewBase.- Specified by:
setRGBTA
in classRenderViewBase
- Parameters:
RGBT
- DOCUMENT ME!
-
setRGBTB
public void setRGBTB(ModelRGB RGBT)
Does nothing but must instantiate for this to be a subclass of RenderViewBase.- Specified by:
setRGBTB
in classRenderViewBase
- Parameters:
RGBT
- DOCUMENT ME!
-
setRotationAngle
public void setRotationAngle(int value)
Set the rotation angel for the camera control.- Overrides:
setRotationAngle
in classRenderViewBase
- Parameters:
value
- int
-
setRotationAxis
public void setRotationAxis(int axis)
Set the rotation axis for the camera control.- Overrides:
setRotationAxis
in classRenderViewBase
- Parameters:
axis
- rotation axis x, y, z
-
setSceneState
public void setSceneState(java.lang.Object scene)
Sets the scene state appropriately.- Parameters:
scene
- The state of the scene.
-
setSlice
public void setSlice(int slice)
Does nothing but must instantiate for this to be a subclass of RenderViewBase.- Specified by:
setSlice
in interfaceViewImageUpdateInterface
- Parameters:
slice
- DOCUMENT ME!
-
setTimeSlice
public void setTimeSlice(int slice)
Does nothing but must instantiate for this to be a subclass of RenderViewBase.- Specified by:
setTimeSlice
in interfaceViewImageUpdateInterface
- Parameters:
slice
- DOCUMENT ME!
-
showBoxFrame
public void showBoxFrame()
Makes the box frame visible.
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
Sets where image is in scene based on knob along slider.- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
- Parameters:
e
- Event that triggered this function
-
transformChanged
public void transformChanged(int type, javax.media.j3d.Transform3D transform)
Does nothing but must instantiate for this to be a subclass of ViewJFrameSurface.- Specified by:
transformChanged
in interfacecom.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback
- Parameters:
type
- DOCUMENT ME!transform
- DOCUMENT ME!
-
updateImageExtents
public boolean updateImageExtents()
This methods calls the componentImage's REPAINT method to redraw the screen. The extents on this image have changed, so the extents need to be read in again and menus, panes and slide bars adjusted accordingly.- Specified by:
updateImageExtents
in interfaceViewImageUpdateInterface
- Returns:
- DOCUMENT ME!
-
updateImages
public final boolean updateImages()
This methods calls the componentImage's update method to redraw the screen - fastest of the three update methods.- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Returns:
- boolean confirming successful update
-
updateImages
public final boolean updateImages(boolean forceShow)
This methods calls the componentImage's update method to redraw the screen. Without LUT changes.- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Parameters:
forceShow
- forces show to re import image and calc. java image- Returns:
- boolean confirming successful update
-
updateImages
public final boolean updateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode)
This methods calls the componentImage's update method to redraw the screen.- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Parameters:
LUTa
- LUT used to update imageALUTb
- LUT used to update imageB (not used in the plotter)forceShow
- forces show to re import image and calc. java imageinterpMode
- image interpolation method (Nearest or Smooth)- Returns:
- boolean confirming successful update
-
buildControlPanel
private javax.swing.JPanel buildControlPanel()
Panel that has a slider for the image.- Returns:
- DOCUMENT ME!
-
buildMenu
private void buildMenu()
Builds menus for the frame.
-
buildToolBar
private void buildToolBar()
Builds the toolbar for the volume render frame.
-
configureFrame
private void configureFrame()
Constructs main frame structures for the surface.
-
createImageSceneGraph
private void createImageSceneGraph()
Creates the scene graph.
-
load
private void load()
Calls a file chooser then loads the quad mesh from that file. Removes the image and disables the visible check box, so the user may not see the image associated with the original quad mesh once a new one has been loaded.
-
makeSeparator
private javax.swing.JButton makeSeparator()
Makes a separator for the use in the toolbars.- Returns:
- Separator for the toolbar.
-
save
private void save()
Calls a file chooser then writes the quad mesh to that file.
-
setSliderEnabled
private void setSliderEnabled(boolean flag)
Sets the slider, the label "Z (1-100)" and the labels underneath the slider to enabled or disabled, depending on flag.- Parameters:
flag
-true
means enable,false
means disable.
-
setupEye
private void setupEye()
Set up the center point of the red line boxframe.
-
translateImage
private void translateImage()
DOCUMENT ME!
-
updateViewScreenScale
private void updateViewScreenScale(javax.media.j3d.Transform3D kTransform)
This function calculates the scale factor for zooming in parallel projection. The scenario is to calculate the distance between the origin boxframe center and tranformed boxframe center. This distance is used to compute the screen scale factor.- Parameters:
kTransform
- The tranformation matrix from tranformChanged().
-
-