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,ActionListener,MouseListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class gov.nih.mipav.view.renderer.J3D.RenderViewBase
RenderViewBase.MatrixNested classes/interfaces inherited from class java.awt.Canvas
Canvas.AccessibleAWTCanvasNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JPanelSurfaceBoxDialog for recording and playing back mouse events.private ViewJComponentSurfaceMain component found in this frame.private JPanelthe control panel that hold the z slider.private intCurrent event vector index.private int[]Extents of image.private javax.media.j3d.BranchGroupBranch parent of the image in the scene, needed so image can be made invisible when another surface is loaded.private booleanFlag indicating if the image is currently visible.private JCheckBoxMenuItemCheck box menu item indicating if surface should be in line mode or full mode.private JLabelLabel for slider, "1".private JLabelLabel for slider, "100".private JLabelLabel for slider, "50".private JLabelLabel that says "Z (1-100)".private ModelLUTLUT that dictates how the vertices of the quad mesh are colored.private JPanelThe main control panel.private JPanelMousePlotterMouse recorder dialog associated with surface plotter.private com.sun.j3d.utils.behaviors.mouse.MouseRotateMouse Rotate behavior.private com.sun.j3d.utils.behaviors.mouse.MouseTranslateMouse Translate behavior.private com.sun.j3d.utils.behaviors.mouse.MouseZoomMouse Zoom behavior.private javax.vecmath.Point3dInitial center viewing point of the image.private javax.media.j3d.TransformGroupTransform group guiding how image is displayed.private JMenuBarMenu bar.private JPanelPanel that holds the toolbars.private javax.media.j3d.Transform3DTransformation matrix.private static final longUse serialVersionUID for interoperability.private booleanFlag to indicate the first time slider name changes.private intCurrent slice of 3D image, used to figure out XY plane to plot.private MouseEventVectorPlotterSlider events used by the mouse recorder.private JSliderSlider for frame/slice of image.private JSlider3, 1-100%, dictating where the image in the surface should be displayed.private javax.media.j3d.Transform3DActual transform of the image.private JTextFieldText field displaying the percentage of the slider.private javax.media.j3d.TextureUnitState[]Texture creating appearance for the "back" of the image.private javax.media.j3d.TextureUnitState[]Texture creating appearance for the "front" of the image.private JCheckBoxCheck box for whether or not the image should be visible.private floatX and Y resolution.private floatX and Y resolution.private intZ 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, viewPanelFields inherited from class gov.nih.mipav.view.renderer.J3D.VolumeCanvas3D
m_dAccumulatedTime, m_dFrameRate, m_dLastTime, m_iAccumulatedFrameCount, m_iFrameCount, m_iMaxTimer, m_iTimerFields inherited from class javax.media.j3d.Canvas3D
FIELD_ALL, FIELD_LEFT, FIELD_RIGHTFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback
ROTATE, TRANSLATE, ZOOM -
Constructor Summary
ConstructorsConstructorDescriptionSurfacePlotter(ModelImage _imageA, ModelLUT _LUTa, int slice, GraphicsConfiguration _config) Makes a frame and puts the image and the plotted quad mesh into it. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(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 offvoidOverride the parent autoCapture method to capture MIP image volume.private JPanelPanel that has a slider for the image.private voidBuilds menus for the frame.private voidBuilds the toolbar for the volume render frame.private voidConstructs main frame structures for the surface.private voidCreates the scene graph.voidSet the captureFrame to null.voiddispatchSavedEvent(EventObject event) Dispatches event to appropriate object.voidDispose memory.voidfinalize()Finalize to free memory.Get the camera control panel.Get the main control panel.Accessor that returns the reference to imageA.Does nothing but must instantiate for this to be a subclass of RenderViewBase.Return mouseDialog from parent frame.intGets the mouse pointer mode - standard or fly - from the view dialog.Get the mouse recorder control panel.intGet the sample factor.Gets the current scene state, in terms of what number the slice is on and if it is visible.Get the surface box control ???Get the view control panel.voidMakes the box frame invisible.private voidload()Calls a file chooser then loads the quad mesh from that file.private JButtonMakes a separator for the use in the toolbars.voidmouseClicked(MouseEvent event) Unchanged.voidmouseEntered(MouseEvent event) Unchanged.voidmouseExited(MouseEvent event) Unchanged.voidmousePressed(MouseEvent event) Unchanged.voidmouseReleased(MouseEvent event) Used in MouseRecorder to stop one series of slide moves.voidCall by the plotter render frame to resample.voidReset mouseDialog box.voidOverride the parent rotateImage method to rotate the MIP image volume.private voidsave()Calls a file chooser then writes the quad mesh to that file.voidsetAlphaBlend(int value) Does nothing but must instantiate for this to be a subclass of RenderViewBase.voidsetEnabled(boolean flag) Does nothing but must instantiate for this to be a subclass of RenderViewBase.voidSets the GUI components to their proper state before the action is dispatched from the player.voidAccessor that sets the LUT.voidsetMouseMode(int mode) Sets the mouse pointer mode - standard or fly - in the view dialog.voidsetPolygonMode(boolean flag) Set the polygonal render mode.voidsetRenderPerspective(boolean bEnable) Enable perspective projection rendering; otherwise use orthographic projection.voidDoes nothing but must instantiate for this to be a subclass of RenderViewBase.voidDoes nothing but must instantiate for this to be a subclass of RenderViewBase.voidsetRotationAngle(int value) Set the rotation angel for the camera control.voidsetRotationAxis(int axis) Set the rotation axis for the camera control.voidsetSceneState(Object scene) Sets the scene state appropriately.voidsetSlice(int slice) Does nothing but must instantiate for this to be a subclass of RenderViewBase.private voidsetSliderEnabled(boolean flag) Sets the slider, the label "Z (1-100)" and the labels underneath the slider to enabled or disabled, depending on flag.voidsetTimeSlice(int slice) Does nothing but must instantiate for this to be a subclass of RenderViewBase.private voidsetupEye()Set up the center point of the red line boxframe.voidMakes the box frame visible.voidSets where image is in scene based on knob along slider.voidtransformChanged(int type, javax.media.j3d.Transform3D transform) Does nothing but must instantiate for this to be a subclass of ViewJFrameSurface.private voidDOCUMENT ME!booleanThis methods calls the componentImage's REPAINT method to redraw the screen.final booleanThis methods calls the componentImage's update method to redraw the screen - fastest of the three update methods.final booleanupdateImages(boolean forceShow) This methods calls the componentImage's update method to redraw the screen.final booleanupdateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode) This methods calls the componentImage's update method to redraw the screen.private voidupdateViewScreenScale(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, writeImageAutoMethods inherited from class gov.nih.mipav.view.renderer.J3D.VolumeCanvas3D
GetTestFrameRate, MeasureTime, paint, postSwap, ResetTime, SetTestFrameRate, supportsTexture3D, update, UpdateFrameCountMethods 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, waitForOffScreenRenderingMethods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategyMethods 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 Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
boxDialog
Dialog for recording and playing back mouse events. -
componentImageXY
Main component found in this frame. -
controlPanel
the control panel that hold the z slider. -
current
private int currentCurrent event vector index. -
extents
private int[] extentsExtents of image. -
imageBranch
private javax.media.j3d.BranchGroup imageBranchBranch parent of the image in the scene, needed so image can be made invisible when another surface is loaded. -
isVisible
private boolean isVisibleFlag indicating if the image is currently visible. -
itemLine
Check box menu item indicating if surface should be in line mode or full mode. -
label1
Label for slider, "1". -
label100
Label for slider, "100". -
label50
Label for slider, "50". -
labelZ
Label that says "Z (1-100)". -
LUTa
LUT that dictates how the vertices of the quad mesh are colored. -
mainPanel
The main control panel. -
mouseDialog
Mouse recorder dialog associated with surface plotter. -
mouseRotateBehavior
private com.sun.j3d.utils.behaviors.mouse.MouseRotate mouseRotateBehaviorMouse Rotate behavior. -
mouseTranslateBehavior
private com.sun.j3d.utils.behaviors.mouse.MouseTranslate mouseTranslateBehaviorMouse Translate behavior. -
mouseZoomBehavior
private com.sun.j3d.utils.behaviors.mouse.MouseZoom mouseZoomBehaviorMouse Zoom behavior. -
myEyePoint
private javax.vecmath.Point3d myEyePointInitial center viewing point of the image. -
objTransXY
private javax.media.j3d.TransformGroup objTransXYTransform group guiding how image is displayed. -
openingMenuBar
Menu bar. -
panelToolbar
Panel that holds the toolbars. -
parallelScaleT3D
private javax.media.j3d.Transform3D parallelScaleT3DTransformation matrix. -
setSliderFlag
private boolean setSliderFlagFlag to indicate the first time slider name changes. -
slice
private int sliceCurrent slice of 3D image, used to figure out XY plane to plot. -
sliderEvents
Slider events used by the mouse recorder. -
sliderFrame
Slider for frame/slice of image. -
sliderZ
3, 1-100%, dictating where the image in the surface should be displayed. -
t3d_XY_t
private javax.media.j3d.Transform3D t3d_XY_tActual transform of the image. -
textZ
Text field displaying the percentage of the slider. -
texUnitStateBXY
private javax.media.j3d.TextureUnitState[] texUnitStateBXYTexture 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[] texUnitStateFXYTexture creating appearance for the "front" of the image. Needs to be array even though there will be only 1 item. -
visibleBox
Check box for whether or not the image should be visible. -
xRes
private float xResX and Y resolution. -
yRes
private float yResX and Y resolution. -
zSlice
private int zSliceZ slice, which image of 1-100 are we showing.
-
-
Constructor Details
-
SurfacePlotter
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 Details
-
actionPerformed
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:
actionPerformedin interfaceActionListener- Parameters:
event- Event that triggered function.
-
autoCapture
public void autoCapture()Override the parent autoCapture method to capture MIP image volume.- Overrides:
autoCapturein classRenderViewBase
-
disableCamera
public void disableCamera()Set the captureFrame to null.- Overrides:
disableCamerain classRenderViewBase
-
dispatchSavedEvent
Dispatches event to appropriate object.- Parameters:
event- Event to dispatch.
-
disposeLocal
public void disposeLocal()Dispose memory.- Overrides:
disposeLocalin classRenderViewBase
-
finalize
Finalize to free memory. -
getCameraPanel
Get the camera control panel.- Returns:
- JPanelCamera camera control panel
-
getControlPanel
Get the main control panel.- Returns:
- JPanel the main control panel
-
getImageA
Accessor that returns the reference to imageA.- Overrides:
getImageAin classRenderViewBase- Returns:
- image
-
getImageB
Does nothing but must instantiate for this to be a subclass of RenderViewBase.- Overrides:
getImageBin classRenderViewBase- Returns:
- null
-
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
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
Gets the current scene state, in terms of what number the slice is on and if it is visible.- Specified by:
getSceneStatein classRenderViewBase- Returns:
- A SceneState object with the variables set appropriately.
-
getSurfaceBoxPanel
Get the surface box control ???- Returns:
- JPanelSurfaceBox
-
getViewPanel
Get the view control panel.- Returns:
- JPanelView the view control
-
hideBoxFrame
public void hideBoxFrame()Makes the box frame invisible. -
mouseClicked
Unchanged.- Specified by:
mouseClickedin interfaceMouseListener- Parameters:
event- Original mouse event.
-
mouseEntered
Unchanged.- Specified by:
mouseEnteredin interfaceMouseListener- Parameters:
event- Original mouse event.
-
mouseExited
Unchanged.- Specified by:
mouseExitedin interfaceMouseListener- Parameters:
event- Original mouse event.
-
mousePressed
Unchanged.- Specified by:
mousePressedin interfaceMouseListener- Parameters:
event- Original mouse event.
-
mouseReleased
Used in MouseRecorder to stop one series of slide moves.- Specified by:
mouseReleasedin interfaceMouseListener- Parameters:
event- Original mouse event.
-
resample
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:
rotateImagein classRenderViewBase
-
setAlphaBlend
public void setAlphaBlend(int value) Does nothing but must instantiate for this to be a subclass of RenderViewBase.- Specified by:
setAlphaBlendin 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:
setEnabledin classComponent- Parameters:
flag- DOCUMENT ME!
-
setGUI
Sets the GUI components to their proper state before the action is dispatched from the player.- Specified by:
setGUIin classRenderViewBase- Parameters:
scene- The state of the scene.
-
setLUTa
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
Does nothing but must instantiate for this to be a subclass of RenderViewBase.- Specified by:
setRGBTAin classRenderViewBase- Parameters:
RGBT- DOCUMENT ME!
-
setRGBTB
Does nothing but must instantiate for this to be a subclass of RenderViewBase.- Specified by:
setRGBTBin classRenderViewBase- Parameters:
RGBT- DOCUMENT ME!
-
setRotationAngle
public void setRotationAngle(int value) Set the rotation angel for the camera control.- Overrides:
setRotationAnglein classRenderViewBase- Parameters:
value- int
-
setRotationAxis
public void setRotationAxis(int axis) Set the rotation axis for the camera control.- Overrides:
setRotationAxisin classRenderViewBase- Parameters:
axis- rotation axis x, y, z
-
setSceneState
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:
setSlicein 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:
setTimeSlicein interfaceViewImageUpdateInterface- Parameters:
slice- DOCUMENT ME!
-
showBoxFrame
public void showBoxFrame()Makes the box frame visible. -
stateChanged
Sets where image is in scene based on knob along slider.- Specified by:
stateChangedin interfaceChangeListener- 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:
transformChangedin 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:
updateImageExtentsin 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:
updateImagesin 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:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
forceShow- forces show to re import image and calc. java image- Returns:
- boolean confirming successful update
-
updateImages
This methods calls the componentImage's update method to redraw the screen.- Specified by:
updateImagesin 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
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
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-truemeans enable,falsemeans 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().
-