Class SurfaceRender
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.SurfaceRender
- All Implemented Interfaces:
com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback,ViewImageUpdateInterface,ActionListener,KeyListener,ImageObserver,MenuContainer,PropertyChangeListener,Serializable,EventListener,Accessible,ChangeListener
- Direct Known Subclasses:
FlythruRender,SurfaceView
Frame that holds the surface renderer. This frame is only possible to activate if a three dimensional image is
loaded. The image shows up in the frame as the three planes, with an axial view, a coronal view, and a sagittal view.
The user can slide these planes up and down and can turn them on and off. The user can also load in surfaces created
from the original image. These 3D surfaces will appear in the proper place within the three image planes. There are
many options for viewing the surfaces. Additionally, the user can change the view mode, so that the mouse causes the
view to "fly". The user can then record the different mouse actions and play them back.
- 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 TypeFieldDescriptionstatic final intValue which indicates a voxel that is part of the arterial vasculature tree.static final intValue which indicates a bone in the image.private JPanelDisplayDialog to turn bounding box of surface renderer on and off, and to change the color of the frame.private final ViewJComponentBoxSlice[]The frame around the AXIAL, CORONAL, SAGITTAL slices:private javax.vecmath.Vector3f[][]The transformed boxSlices frames used to sample the volume data along diagonal slices:private JPanelClipDialog to turn the clipping palne box on and off.private ViewJComponentSurfaceVolumeVolume image object.private javax.media.j3d.BranchGroupThe cubic roational behavior branch group.private javax.media.j3d.BranchGroupCubic branch group.private com.sun.j3d.utils.behaviors.mouse.MouseRotateCubic mouse rotation behavior.private javax.media.j3d.TransformGroupCubic transform group.private javax.media.j3d.Transform3DCurrent transform matrix.private intCurrent transform changes type.static final intValue which indicates the probe entry point color.private booleanflag indicate the first time 6 clipping plane branch switch.private booleanflag indicate the first time arbitrary clipping plane branch switch.private JPanelGeodesicGeodesic panel.private ModelImageCurrent image A.private ModelImageCurrent image B.private float[]Buffer that holds image A volume data.private float[]Buffer that holds image B volume data.private booleanFlag indicates that probe rotate around the entry point or not.(package private) booleanMode is tri-planar volume view or not.protected booleanFlag to indicate whether the view volume texture is aligned or not.private booleanFlag set when texture volume is being rendered using lights.private doubleZoomfactor, zooming in screen scale space, and is relative to original position, this stores that original position:.private final javax.media.j3d.TransformGroup[]TransformGroup[] used to rotate the AXIAL, CORONAL, SAGITTAL slice BOXES:private final javax.media.j3d.TransformGroup[]TransformGroup[] used to rotate the AXIAL, CORONAL, SAGITTAL slice PLANES:private javax.media.j3d.Transform3DThe Transform3D used to position the planes based on the Probe position and angle.(package private) javax.vecmath.Vector4f[][]Texture mapping for the RFA probe rotation:private SoftwareLightSetUsed to compute software lighting of composite texture volume.private SoftwareMaterialDOCUMENT ME!private floatNumbers dicatating the sizes of the planes based on the extents and resolutions of the image.private JPanelMouseDialog for recording and playing back mouse events.private MouseRotateExtMouse Rotate behavior.private com.sun.j3d.utils.behaviors.mouse.MouseTranslateMouse Translate behavior.private com.sun.j3d.utils.behaviors.mouse.MouseZoomMouse Zoom behavior.private final javax.vecmath.Point3dInitial center viewing point of the image.private final javax.media.j3d.BranchGroup[]BranchGroup[] containing the slice BOXES:private final javax.media.j3d.BranchGroup[]BranchGroup[] containing the image planes.private final javax.media.j3d.TransformGroup[]Group dictating how the XY plane is translated.private booleanParallel rotation flag.private javax.media.j3d.Transform3DTransformation matrix.private ViewJFrameBaseControls for the image.private JPanelProbeDialog for loading and displaying probes.protected VolumeRendererRaycast based renderer reference, raycast renderer or shear warp renderer.private float[]Resolutions of image A.private javax.media.j3d.Alphaprivate intfix one bug from threading.private JPanelSculptorSculptor panel.private ModelImageImage with areas marked with values indicating that they are special tissue types (vessels, etc).private static final longUse serialVersionUID for interoperability.private final javax.media.j3d.ImageComponent2D[]Each Texture2D adds a ImageComponent2D:private JPanelSlicesDialog to turn the slices control box on and off.private final javax.media.j3d.Texture2D[]ViewJComponentTriSliceImages -> Texture2D to display the image slices:private final javax.media.j3d.TransparencyAttributes[]ViewJComponentTriSliceImages -> Texture2D transparency values:private JPanelSurfaceDialog for loading and displaying surfaces.private JPanelSurfaceTexturePanel for displaying the SurfaceTexture interface:private javax.media.j3d.SwitchTri planar view and the 3D texture volume view switch group.private intDimensions of image A.private VolumeTextureReference to 3D texture node for the volume.private javax.media.j3d.Transform3DCubic tansform3D.private javax.media.j3d.Transform3DSetup the initial position of the image, added to ScenerootTG transform group.private final javax.media.j3d.Shape3D[]private final ViewJComponentTriSliceImage[]ImageRenderers for the AXIAL, CORONAL, SAGITTAL slices:static final intValue which indicates a voxel in the segmenation image that is part of the tumor.static final intValue which indicates a voxel in the segmenation image that is part of the vasculature (arterial or veinous).static final intValue which indicates a voxel in the segmenation image that is part of the veinous vasculature tree.private javax.media.j3d.ViewView object in rendering a three dimensional scene from one viewpoint.private javax.media.j3d.BranchGroupVolume branch group.private JPanelVolumeOpacityVolume opacity control dialog.private javax.media.j3d.BranchGroupVolume render branch group.private NodeVolumeTextureRenderAdd here.private javax.media.j3d.OrderedGroupVolume render order group, specify the rendering order.private booleanIf true display 3D volume as a 3D texture map or 2D array of texture maps.private floatNumbers dicatating the sizes of the planes based on the extents and resolutions of the image.private intDimensions of image A.private floatNumbers dicatating the sizes of the planes based on the extents and resolutions of the image.private intDimensions of image A.private floatNumbers dicatating the sizes of the planes based on the extents and resolutions of the image.private intDimensions of image A.Fields inherited from class gov.nih.mipav.view.renderer.J3D.RenderViewBase
background, bounds, boxFrame, canvas, captureFrame, captureImage, config, displayMode, IMAGE_A, IMAGE_B, LUTa, LUTb, objBehaviorBG, objBoxFrameBG, objRootBG, rotationAngle, rotationAxis, rotationControlPanel, rotationTimes, rotationTotal, sceneRootTG, sliderEvents, 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
ConstructorsConstructorDescriptionSurfaceRender(ModelImage _imageA, ModelImage _imageB, GraphicsConfiguration _config) Constructor called by the VirtualEndoscopyView.SurfaceRender(ModelImage _imageA, ModelLUT _LUTa, ModelImage _imageB, ModelLUT _LUTb, ViewJFrameBase _parent, GraphicsConfiguration _config, ViewJProgressBar _pBar) Makes a frame and puts the three image planes into it. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Calls various methods depending on the action.private voidaddBoxSlice(int orientation) Adds the slice frame for slice of the given orientation to the scene graph.voidAttach cubic control branch group.voidOverrides the parent autoCapture method.private com.sun.j3d.utils.geometry.BoxCreate the rotation control cubic box.private voidBuild the cubic branch under the objRootBG.voidClean mouse recorder for any existing event items.voidclose()Closes the image.private voidConstructs main frame structures for 3 image planes.voidConstructs main frame structures for 3 image planes.private voidCreates the scene graph, made up of a branch group parent, a transform group under that which applies mouse behavior and lights to the scene, and three branch groups under the transform group for each of the three image planes.voidCrop the region of the clipped volume.voidDetach volume render branch group.voidDiable all the six clipping planes at a time.voiddispatchSavedEvent(EventObject event) Dispatches event to appropriate object.voiddisposeLocal(boolean flag) Sets all variables to null, disposes, and garbage collects.voiddrawRFAPoint(javax.vecmath.Point3f kPoint) Called from the parent class when the Probe Entry Point is selected in the PlaneRender object.voidenableEntryPoint(boolean flag) Set entry point rotation flag.voidenableObjBehavior(boolean flag) Enable objBehavior branch group.private voidGenerates the texture coord map vectors for the three orthogonal slices.private javax.vecmath.Vector4fgenerateRFACoordMaps(int orientation, int texCoord) create texture coordmaps for the texture-mapped planes displaying the triSliceImages.private voidgetBoxSliceInScreen(javax.vecmath.Vector3f[] screenBoxPoints, int[] boxSliceConstants) sets up the values for the ViewJComponentBoxSlice array.Get the rotation control dialog box.Return clipPanel from parent frame.Return the diaplay dialog.booleanReturn the current volume display mode.Get the geodesic control panel.Accessor that returns the reference to image A.Accessor that returns the reference to image B.Return mousePanel from parent frame.intGets the mouse pointer mode - standard or fly - from the view dialog.javax.media.j3d.BranchGroupgetObjBoxSlice_BG(int orientation) Return the X box color frame.javax.media.j3d.BranchGroupgetObjPlane_BG(int orientation) Gets the objXYPlaneBG branch group.doubleReturn the original ScreenScale for orthographic projection:Return the parent frame.Return probePanel from parent frame.float[]Returns the ModelImage resolutions.Gets the current scene state, in terms of what numbers the slices are on and whether or not they are visible.Return the sculptor panel.Return the segmentation region map image which contains info on where the vascualture, etc are located.return the current active slicePanel interface.floatRetrieve the current "coarse" spacing between slices.floatRetrieve the current "fine" spacing between slices.Return surfacePanel from parent frame.Returns the surface texture panel interface.Returns the surface texture panel mainPanel interface.Return the viewPanel from parent frame.Return volume opacity control Dialog from parent frame.javax.media.j3d.BranchGroupReturn volume render Branch Group.javax.media.j3d.OrderedGroupReturn volume render Order Group.Return texture, the VolumeTexture member variable.javax.media.j3d.GroupgetVolumeTextureCopy(int iView) Returns the left of right eye copy of the NodeVolumeTextureRender:voidMakes the box frame invisible.voidEnable the six clipping planes at a time.booleanCheck is volume view frame or not.voidkeyPressed(KeyEvent arg0) voidkeyReleased(KeyEvent arg0) voidvoidModelToScreen(javax.vecmath.Vector3f model, javax.vecmath.Vector3f screen) Translate from Model coordinates to normalized plane coordinates:voidvoidConstructs main frame structures for 3 image planes.voidremoveBoxSlice(int orientation) Detaches the slice frame on the slice for the given orientation.voidDetach cubic control branch group.voidOverrides the parent resetImage method.voidOverrides the parent resetImage method.voidOverrides the parent resetImage method.voidOverrides the rotateImage to rotate the surface volume.voidSave crop region with the clipped volume.private voidScreenToModel(javax.vecmath.Vector3f screen, javax.vecmath.Vector3f model) Translate from normalized plane coordinates to Model coordinates:voidsetAlphaBlend(int value) Sets the alpha blending of parameter for two image displays.voidsetCenter(javax.vecmath.Vector3f center) Sets the values for JPanelSlices, based on the positions in the PlaneRender class for the AXIAL, CORONAL, and SAGITTAL views.voidSet the texture renderer to render in composite mode.voidsetDisplayMode3D(boolean flag) Hack.voidSets the GUI components to their proper state before the action is dispatched from the player.voidSet the texture render to render in lighting mode.voidAccessor that sets the LUT for image A.voidAccessor that sets the LUT for image B.voidsetMaterialShininess(float value) Set the texture material shininess value.voidsetMouseMode(int mode) Sets the mouse pointer mode - standard or fly - in the view dialog.voidsetMouseRotateEnable(boolean bEnable) Allow disabling or enabling mouse rotation:voidsetParallelRotation(boolean flag) Set the parallel rotation flag from the viewJFrameVolumeView.voidsetProbeTG(javax.media.j3d.Transform3D kTransform, boolean bTwist) Sets the Transform3D for the slices based on the Probe Transform.voidsetRayBasedRender(VolumeRenderer _rayBasedRender) Set the reference to ray based renderer, raycast renderer or shear warp renderer.voidsetRenderPerspective(boolean bEnable) Enable perspective projection rendering; otherwise use orthographic projection.voidSets the RGB table for image A.voidSets the RGB table for image B.voidSet the image which we can check to see if the probe is hitting anything important (such as vessels, etc).voidsetSlice(int slice) Does nothing but must instantiate for this to implements ViewImageUpdateInterface.voidsetSliceColor(Color color, int orientation) Sets the color of the x slice frame.voidsetSliceSpacingCoarse(float fSpacing) Set the desired "coarse" spacing between slices.voidsetSliceSpacingFine(float fSpacing) Set the desired "fine" spacing between slices.voidsetTimeSlice(int slice) Sets the time slice to be displayed and changes the image planes displayed.private voidsetupEye()Set up the center point of the red line boxframe.voidsetViewTextureAligned(boolean flag) Switch between the volume texture mode and the regular volume texture mode.voidsetVolumeDisplayMode(boolean volDisplayMode) Accessor that sets the volumeDisplayMode flag.voidsetVolView(boolean flag) Set the volume view mode to true from the ViewJFrameVolumeView During mouse recorder displaying, the flag control the updating of the opacity histogram.voidMakes the box frame visible.voidshowBoxSlice(int orientation) Makes the box slice for the given orientation visible.voidSets how the image plane should be displayed depending on value of slider.voidswitchToSliceView(boolean firstTime) Perform some actions required when switching to the slice renderer.voidswitchToVolView(boolean firstTime) Perform some actions required when switching to the volume renderer.private voidtransformBoxSlices(javax.media.j3d.Transform3D kTransform) transform the points used to render the triSliceImages textures.voidtransformChanged(int type, javax.media.j3d.Transform3D transform) Tells the mouse dialog that the transform has changed.voidtransformUpdate(int type, javax.media.j3d.Transform3D transform) The raybased renderer invokes this method when a mouse release event occurs.voidUndo crop region with the clipped volume.booleanupdate3DTriplanar(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow) This methods calls the componentImage's update method to redraw the screen.voidupdateBoxSlicePos(boolean bParentUpdate) Update the X, Y, Z box frame positions.voidSets new frame around slice x based on the new position.voidupdateCubicTransform(double[] mat) Update the transform3D for the cubic.voidupdateCubicTransform(javax.media.j3d.Transform3D transform) Update the transform3D for the cubic.voidCalled when the underlying data has changed, due to sculpting.booleanThis methods calls the componentImage's REPAINT method to redraw the screen.voidBuild a image with the current rotational transformation matrix.booleanThis methods calls the componentImage's update method to redraw the screen - fastest of the three update methods.booleanupdateImages(boolean flag) This methods calls the componentImage's update method to redraw the screen.booleanupdateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode) This methods calls the componentImage's update method to redraw the screen.voidThis method is normally called by JPanelLights when a light bulb property changes.voidupdateOpacityOfOthrogPlanes(int opX, int opY, int opZ) Updates the 3 orthogonal 2D texture maps' opacities.voidvoidupdateProbe(boolean forceShow, boolean bInterpolate, boolean bReset) Updates the slice textures based on the Probe position and rotation angle.voidNot used now.voidUpdate the raycast based renderer.voidupdateShininess(float value) Update the shininess from the JPanelLights.private voidDetermine the current viewing transformation and pass it to the texture volume renderer so that it can update itself.voidTells the mouse dialog that the transform has changed.private voidupdateViewScreenScale(javax.media.j3d.Transform3D kTransform) This function calculates the scale factor for zooming in parallel projection.booleanupdateVolume(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow) This methods calls the componentImage's update method to redraw the screen.voidSelect the "coarse" slice sampling for rendering.voidRetrieves whether the "fine" slice sampling is currently selected.intwhichTissue(float x, float y, float z) Check the given voxel belong to which segmentation.Methods inherited from class gov.nih.mipav.view.renderer.J3D.RenderViewBase
calcImageNormals, createBoxFrame, disableCamera, disposeLocal, getBehaviorGroup, getBound, getBranchGroup, getCanvas, getNormals, getRGBTA, getRGBTB, getSceneRootTG, getSliderEvents, getTriPlanarViewBG, getUniverse, recordMouse, setBackgroundColor, setBoxColor, setRotationAngle, setRotationAxis, 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, setEnabled, 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:
-
ARTERIAL_SEG
public static final int ARTERIAL_SEGValue which indicates a voxel that is part of the arterial vasculature tree.- See Also:
-
VEINOUS_SEG
public static final int VEINOUS_SEGValue which indicates a voxel in the segmenation image that is part of the veinous vasculature tree.- See Also:
-
VASCULATURE_SEG
public static final int VASCULATURE_SEGValue which indicates a voxel in the segmenation image that is part of the vasculature (arterial or veinous).- See Also:
-
TUMOR_SEG
public static final int TUMOR_SEGValue which indicates a voxel in the segmenation image that is part of the tumor.- See Also:
-
BONE_SEG
public static final int BONE_SEGValue which indicates a bone in the image.- See Also:
-
ENTRY_POINT
public static final int ENTRY_POINTValue which indicates the probe entry point color.- See Also:
-
isViewTextureAligned
protected boolean isViewTextureAlignedFlag to indicate whether the view volume texture is aligned or not. -
rayBasedRender
Raycast based renderer reference, raycast renderer or shear warp renderer. -
isTriPlanarVolView
boolean isTriPlanarVolViewMode is tri-planar volume view or not. -
boxPanel
Dialog to turn bounding box of surface renderer on and off, and to change the color of the frame. -
boxSlices
The frame around the AXIAL, CORONAL, SAGITTAL slices: -
boxSliceVertices
private javax.vecmath.Vector3f[][] boxSliceVerticesThe transformed boxSlices frames used to sample the volume data along diagonal slices: -
clipPanel
Dialog to turn the clipping palne box on and off. -
triSliceImages
ImageRenderers for the AXIAL, CORONAL, SAGITTAL slices: -
triSliceGeometry
private final javax.media.j3d.Shape3D[] triSliceGeometry -
componentVolImage
Volume image object. -
cubicBehaviorBG
private javax.media.j3d.BranchGroup cubicBehaviorBGThe cubic roational behavior branch group. -
cubicBG
private javax.media.j3d.BranchGroup cubicBGCubic branch group. -
cubicRotate
private com.sun.j3d.utils.behaviors.mouse.MouseRotate cubicRotateCubic mouse rotation behavior. -
cubicTG
private javax.media.j3d.TransformGroup cubicTGCubic transform group. -
currentTransform
private javax.media.j3d.Transform3D currentTransformCurrent transform matrix. -
currentTransformType
private int currentTransformTypeCurrent transform changes type. -
first6ClipPlane
private boolean first6ClipPlaneflag indicate the first time 6 clipping plane branch switch. -
firstClipArbi
private boolean firstClipArbiflag indicate the first time arbitrary clipping plane branch switch. -
geodesicPanel
Geodesic panel. -
imageA
Current image A. -
imageB
Current image B. -
imageVolBufferA
private float[] imageVolBufferABuffer that holds image A volume data. -
imageVolBufferB
private float[] imageVolBufferBBuffer that holds image B volume data. -
isEntryPoint
private boolean isEntryPointFlag indicates that probe rotate around the entry point or not. -
m_bRenderModeLighting
private boolean m_bRenderModeLightingFlag set when texture volume is being rendered using lights. -
m_dOriginalScreenScale
private double m_dOriginalScreenScaleZoomfactor, zooming in screen scale space, and is relative to original position, this stores that original position:. -
m_kObjBoxSliceProbe_TG
private final javax.media.j3d.TransformGroup[] m_kObjBoxSliceProbe_TGTransformGroup[] used to rotate the AXIAL, CORONAL, SAGITTAL slice BOXES: -
m_kObjPlaneProbe_TG
private final javax.media.j3d.TransformGroup[] m_kObjPlaneProbe_TGTransformGroup[] used to rotate the AXIAL, CORONAL, SAGITTAL slice PLANES: -
m_kProbeTransform
private javax.media.j3d.Transform3D m_kProbeTransformThe Transform3D used to position the planes based on the Probe position and angle. The planes are rotates about the intersection between the probe and the plane, which may or may not be in the center of the plane. This transform allows non-origin rotations by conactenating the translation to the origin, rotation, and translation matricies into one transform, which is used to set the Transforms for the TransformGroups above and also to sample the ModelImage data on the diagonal slice: -
m_kSoftwareLightSet
Used to compute software lighting of composite texture volume. -
m_kSoftwareMaterial
DOCUMENT ME! -
mousePanel
Dialog for recording and playing back mouse events. -
mouseRotateBehavior
Mouse 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 final javax.vecmath.Point3d myEyePointInitial center viewing point of the image. -
objBoxSlices_BG
private final javax.media.j3d.BranchGroup[] objBoxSlices_BGBranchGroup[] containing the slice BOXES: -
objTransSlices_TG
private final javax.media.j3d.TransformGroup[] objTransSlices_TGGroup dictating how the XY plane is translated. -
objPlane_BG
private final javax.media.j3d.BranchGroup[] objPlane_BGBranchGroup[] containing the image planes. -
parallelRotation
private boolean parallelRotationParallel rotation flag. -
parallelScaleT3D
private javax.media.j3d.Transform3D parallelScaleT3DTransformation matrix. -
parent
Controls for the image. ViewJFrameVolumeView -
probePanel
Dialog for loading and displaying probes. -
resols
private float[] resolsResolutions of image A. -
rotationCount
private int rotationCountfix one bug from threading. -
sculptorPanel
Sculptor panel. -
segmentationImage
Image with areas marked with values indicating that they are special tissue types (vessels, etc). -
slicePanel
Dialog to turn the slices control box on and off. -
surfacePanel
Dialog for loading and displaying surfaces. -
surfaceTexturePanel
Panel for displaying the SurfaceTexture interface: -
switchGroup
private javax.media.j3d.Switch switchGroupTri planar view and the 3D texture volume view switch group. -
rotationAlpha
private javax.media.j3d.Alpha rotationAlpha -
sliceTransparency
private final javax.media.j3d.TransparencyAttributes[] sliceTransparencyViewJComponentTriSliceImages -> Texture2D transparency values: -
texture
Reference to 3D texture node for the volume. -
sliceTextures
private final javax.media.j3d.Texture2D[] sliceTexturesViewJComponentTriSliceImages -> Texture2D to display the image slices: -
sliceImageComponent2D
private final javax.media.j3d.ImageComponent2D[] sliceImageComponent2DEach Texture2D adds a ImageComponent2D: -
m_kRFACoordMaps
javax.vecmath.Vector4f[][] m_kRFACoordMapsTexture mapping for the RFA probe rotation: -
transformCubic
private javax.media.j3d.Transform3D transformCubicCubic tansform3D. -
transformNode3d
private javax.media.j3d.Transform3D transformNode3dSetup the initial position of the image, added to ScenerootTG transform group. -
view
private javax.media.j3d.View viewView object in rendering a three dimensional scene from one viewpoint. -
volBG
private javax.media.j3d.BranchGroup volBGVolume branch group. -
volOpacityPanel
Volume opacity control dialog. -
volRenderBG
private javax.media.j3d.BranchGroup volRenderBGVolume render branch group. -
volRenderNode
Add here. -
volRenderOG
private javax.media.j3d.OrderedGroup volRenderOGVolume render order group, specify the rendering order. -
volumeDisplayMode3D
private boolean volumeDisplayMode3DIf true display 3D volume as a 3D texture map or 2D array of texture maps. If false display 3 orthogonal image planes. -
xBox
private float xBoxNumbers dicatating the sizes of the planes based on the extents and resolutions of the image. -
yBox
private float yBoxNumbers dicatating the sizes of the planes based on the extents and resolutions of the image. -
zBox
private float zBoxNumbers dicatating the sizes of the planes based on the extents and resolutions of the image. -
maxBox
private float maxBoxNumbers dicatating the sizes of the planes based on the extents and resolutions of the image. -
xDim
private int xDimDimensions of image A. -
yDim
private int yDimDimensions of image A. -
zDim
private int zDimDimensions of image A. -
tDim
private int tDimDimensions of image A.
-
-
Constructor Details
-
SurfaceRender
Constructor called by the VirtualEndoscopyView. Used for instantiation.- Parameters:
_imageA- ModelImage imageA_imageB- ModelImage imageB always null_config- GraphicsConfiguration graphics configuration
-
SurfaceRender
public SurfaceRender(ModelImage _imageA, ModelLUT _LUTa, ModelImage _imageB, ModelLUT _LUTb, ViewJFrameBase _parent, GraphicsConfiguration _config, ViewJProgressBar _pBar) Makes a frame and puts the three image planes into it. Creates the scene graph which dictates the behavior of the image planes and surfaces. Initializes the surface dialog and the mouse recorder dialog, so that this original view is saved. When the user opens these dialogs, they have already been created; they are just set to visible.- Parameters:
_imageA- First image to display, cannot be null._LUTa- LUT of the imageA (if null grayscale LUT is constructed)._imageB- Second loaded image, may be null._LUTb- LUT of the imageB, may be null._parent- Frame base reference._config- configuration reference._pBar- progress bar
-
-
Method Details
-
actionPerformed
Calls various methods depending on the action.- Surface - opens the surface dialog
- View - opens the view control dialog
- Mouse - opens the mouse recorder dialog
- About - displays a message about this renderer
- Exit - sets variables to null and disposes of this frame
- X, Y, Z checkboxes - toggles the appropriate image planes on or off
- Specified by:
actionPerformedin interfaceActionListener- Parameters:
event- Event that triggered function.
-
addBoxSlice
private void addBoxSlice(int orientation) Adds the slice frame for slice of the given orientation to the scene graph. It is necessary to make a new branch group and transform group because otherwise there is a RestrictedAccessException.- Parameters:
orientation- the slice to add: AXIAL, CORONAL, or SAGITTAL
-
addCubicControl
public void addCubicControl()Attach cubic control branch group. -
autoCapture
public void autoCapture()Overrides the parent autoCapture method. Camera use this method to take snapshot automatically.- Overrides:
autoCapturein classRenderViewBase
-
cleanMouseRecorder
public void cleanMouseRecorder()Clean mouse recorder for any existing event items. -
close
public void close()Closes the image. -
configureVolumeFrame
public void configureVolumeFrame()Constructs main frame structures for 3 image planes. Makes the LUT if necessary, then sets up the buffer arrays appropriately and calls the constructors for the three image planes. -
cropClipVolume
public void cropClipVolume()Crop the region of the clipped volume. -
detachVolRender
public void detachVolRender()Detach volume render branch group. -
disableClipping
public void disableClipping()Diable all the six clipping planes at a time. -
dispatchSavedEvent
Dispatches event to appropriate object.- Parameters:
event- Event to dispatch.
-
disposeLocal
public void disposeLocal(boolean flag) Sets all variables to null, disposes, and garbage collects.- Parameters:
flag- DOCUMENT ME!
-
drawRFAPoint
public void drawRFAPoint(javax.vecmath.Point3f kPoint) Called from the parent class when the Probe Entry Point is selected in the PlaneRender object.- Parameters:
kPoint- probe entry point in ModelStorageBase Coordinates
-
enableEntryPoint
public void enableEntryPoint(boolean flag) Set entry point rotation flag.- Parameters:
flag- boolean
-
enableObjBehavior
public void enableObjBehavior(boolean flag) Enable objBehavior branch group.- Parameters:
flag-truemeans turn on,falsemeans turn off.
-
getCameraControl
Get the rotation control dialog box.- Returns:
- rotationControlDialog rotation control dialog
-
getClipDialog
Return clipPanel from parent frame.- Returns:
- clipPanel Clip Dialog box.
-
getDisplayDialog
Return the diaplay dialog.- Returns:
- boxPanel Display dialog.
-
getDisplayMode3D
public boolean getDisplayMode3D()Return the current volume display mode.- Returns:
- volumeDisplayMode3D volume 3D diaplay mode.
-
getGeodesicPanel
Get the geodesic control panel.- Returns:
- JPanelGeodesic geodesic control panel.
-
getImageA
Accessor that returns the reference to image A.- Overrides:
getImageAin classRenderViewBase- Returns:
- Image A.
-
getImageB
Accessor that returns the reference to image B.- Overrides:
getImageBin classRenderViewBase- Returns:
- Image B.
-
getMouseDialog
Return mousePanel from parent frame.- Returns:
- mousePanel Mouse Dialog box.
-
getMouseMode
public int getMouseMode()Gets the mouse pointer mode - standard or fly - from the view dialog.- Returns:
- The mouse pointer mode.
-
getObjBoxSlice_BG
public javax.media.j3d.BranchGroup getObjBoxSlice_BG(int orientation) Return the X box color frame.- Returns:
- objBoxSliceX_BG Called be the JDialogSliceBox
-
getObjPlane_BG
public javax.media.j3d.BranchGroup getObjPlane_BG(int orientation) Gets the objXYPlaneBG branch group.- Returns:
- objXYPlaneBG called by JDialogSliceBox
-
getOriginalScreenScale
public double getOriginalScreenScale()Return the original ScreenScale for orthographic projection:- Returns:
- DOCUMENT ME!
-
getParentFrame
Return the parent frame.- Returns:
- ViewJFrameVolumeView parent frame
-
getProbeDialog
Return probePanel from parent frame.- Returns:
- probePanel Probe Dialog box.
-
getSceneState
Gets the current scene state, in terms of what numbers the slices are on and whether or not they are visible.- Specified by:
getSceneStatein classRenderViewBase- Returns:
- A SceneState object with the variables set appropriately.
-
getSculptorPanel
Return the sculptor panel.- Returns:
- JPanelSculptor sculptor control panel.
-
getSegmentationImage
Return the segmentation region map image which contains info on where the vascualture, etc are located.- Returns:
- (vessel, etc) segmentation image
-
getSlicePanel
return the current active slicePanel interface.- Returns:
- slicePanel called by JDialogMouseRecorder
-
getSliceSpacingCoarse
public float getSliceSpacingCoarse()Retrieve the current "coarse" spacing between slices.- Returns:
- float Current "coarse" spacing between slices.
-
getSliceSpacingFine
public float getSliceSpacingFine()Retrieve the current "fine" spacing between slices.- Returns:
- float Current "fine" spacing between slices.
-
getSurfaceDialog
Return surfacePanel from parent frame.- Returns:
- surfacePanel Surface Dialog box.
-
getSurfaceTexture
Returns the surface texture panel interface.- Returns:
- surface texture panel.
-
getSurfaceTexturePanel
Returns the surface texture panel mainPanel interface.- Returns:
- surface texture mainPanel.
-
getViewDialog
Return the viewPanel from parent frame.- Returns:
- viewPanel View Dialog box.
-
getVolOpacityPanel
Return volume opacity control Dialog from parent frame.- Returns:
- volOpacityPanel volume opacity dialog box.
-
getVolRenderBG
public javax.media.j3d.BranchGroup getVolRenderBG()Return volume render Branch Group.- Returns:
- volRenderBG volume render branch group.
-
getVolRenderOG
public javax.media.j3d.OrderedGroup getVolRenderOG()Return volume render Order Group.- Returns:
- volRenderOG volume render order group.
-
getVolumeTexture
Return texture, the VolumeTexture member variable.- Returns:
- DOCUMENT ME!
-
getVolumeTextureCopy
public javax.media.j3d.Group getVolumeTextureCopy(int iView) Returns the left of right eye copy of the NodeVolumeTextureRender:- Parameters:
iView- determines which view to return, 0 for left and 1 for right:- Returns:
- the NodeVolumeTextureRender for displaying the volume texture in the stereo window.
-
getResolutions
public float[] getResolutions()Returns the ModelImage resolutions.- Returns:
- ModelImage resolutions
-
hideBoxFrame
public void hideBoxFrame()Makes the box frame invisible. -
invokeClipping
public void invokeClipping()Enable the six clipping planes at a time. -
isVolViewMode
public boolean isVolViewMode()Check is volume view frame or not.- Returns:
- boolean
truemeans mode on,falsemeans mode off.
-
reConfigureVolumeFrame
public void reConfigureVolumeFrame()Constructs main frame structures for 3 image planes. Makes the LUT if necessary, then sets up the buffer arrays appropriately and calls the constructors for the three image planes. Used by the switch between aligned volume texture rendering and the volume texture rendering. Changed to public to allow updating after the volume is sculpted. -
removeBoxSlice
public void removeBoxSlice(int orientation) Detaches the slice frame on the slice for the given orientation.- Parameters:
orientation- the slice to add: AXIAL, CORONAL, or SAGITTAL
-
removeCubicControl
public void removeCubicControl()Detach cubic control branch group. -
resetAxisX
public void resetAxisX()Overrides the parent resetImage method. This method reset the surface volume to the original position.- Overrides:
resetAxisXin classRenderViewBase
-
resetAxisY
public void resetAxisY()Overrides the parent resetImage method. This method reset the surface volume to the original position.- Overrides:
resetAxisYin classRenderViewBase
-
resetImage
public void resetImage()Overrides the parent resetImage method. This method reset the surface volume to the original position.- Overrides:
resetImagein classRenderViewBase
-
rotateImage
public void rotateImage()Overrides the rotateImage to rotate the surface volume.- Overrides:
rotateImagein classRenderViewBase
-
saveCropVolume
public void saveCropVolume()Save crop region with the clipped volume. -
setAlphaBlend
public void setAlphaBlend(int value) Sets the alpha blending of parameter for two image displays.- Specified by:
setAlphaBlendin classRenderViewBase- Parameters:
value- Amount [0,100] that is the percentage of Image A to be displayed.
-
setCompositeMode
public void setCompositeMode()Set the texture renderer to render in composite mode. -
setDisplayMode3D
public void setDisplayMode3D(boolean flag) Hack. Set the update 3D texture volume win-level flag.- Parameters:
flag- true update 3D texture volume with win-level, false not update.
-
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.
-
setLightingMode
public void setLightingMode()Set the texture render to render in lighting mode. -
setLUTa
Accessor that sets the LUT for image A.- Parameters:
LUT- The LUT.
-
setLUTb
Accessor that sets the LUT for image B.- Parameters:
LUT- The LUT
-
setMaterialShininess
public void setMaterialShininess(float value) Set the texture material shininess value.- Parameters:
value- shininess value.
-
setMouseMode
public void setMouseMode(int mode) Sets the mouse pointer mode - standard or fly - in the view dialog.- Parameters:
mode- Mode to set to.
-
setMouseRotateEnable
public void setMouseRotateEnable(boolean bEnable) Allow disabling or enabling mouse rotation:- Parameters:
bEnable- DOCUMENT ME!
-
setParallelRotation
public void setParallelRotation(boolean flag) Set the parallel rotation flag from the viewJFrameVolumeView.- Parameters:
flag-trueset all the renderer to parallel rotation,falseparallel rotation mode off.
-
setProbeTG
public void setProbeTG(javax.media.j3d.Transform3D kTransform, boolean bTwist) Sets the Transform3D for the slices based on the Probe Transform. To allow rotation about the probe position, and not just the center of the slices, the probe translation and rotation protions of the matrix are separated. First the center of the slice is translated from the probe position to the origin, then rotated, then translated back to the probe position. The three transformations are concatenated into one Transform3D, which is used to display the slices, boxes, and to sample the ModelImage on the diagonal:- Parameters:
kTransform- current probe transformbTwist- true if there is twist about the probe axis
-
setRayBasedRender
Set the reference to ray based renderer, raycast renderer or shear warp renderer. This method set the clipping dialog to control the both the 3D texture renderer and raycast based renderer.- Parameters:
_rayBasedRender- VolumeRenderer reference
-
setRenderPerspective
public void setRenderPerspective(boolean bEnable) Enable perspective projection rendering; otherwise use orthographic projection.- Parameters:
bEnable- true to enable perspective projection
-
setRGBTA
Sets the RGB table for image A.- Specified by:
setRGBTAin classRenderViewBase- Parameters:
RGBT- New RGB table for image A.
-
setRGBTB
Sets the RGB table for image B.- Specified by:
setRGBTBin classRenderViewBase- Parameters:
RGBT- New RGB table for image B.
-
setSegmentationImage
Set the image which we can check to see if the probe is hitting anything important (such as vessels, etc).- Parameters:
img- segmentation image
-
setCenter
public void setCenter(javax.vecmath.Vector3f center) Sets the values for JPanelSlices, based on the positions in the PlaneRender class for the AXIAL, CORONAL, and SAGITTAL views.- Parameters:
center- the three slider values in File Coordinates
-
setSlice
public void setSlice(int slice) Does nothing but must instantiate for this to implements ViewImageUpdateInterface.- Specified by:
setSlicein interfaceViewImageUpdateInterface- Parameters:
slice- DOCUMENT ME!
-
setSliceSpacingCoarse
public void setSliceSpacingCoarse(float fSpacing) Set the desired "coarse" spacing between slices.- Parameters:
fSpacing- float Desired "coarse" spacing between slices.
-
setSliceSpacingFine
public void setSliceSpacingFine(float fSpacing) Set the desired "fine" spacing between slices.- Parameters:
fSpacing- float Desired "fine" spacing between slices.
-
setSliceColor
Sets the color of the x slice frame.- Parameters:
color- Color to set to.
-
setTimeSlice
public void setTimeSlice(int slice) Sets the time slice to be displayed and changes the image planes displayed.- Specified by:
setTimeSlicein interfaceViewImageUpdateInterface- Parameters:
slice- Indicates image time-slice (4th dimension) to be displayed.
-
setViewTextureAligned
public void setViewTextureAligned(boolean flag) Switch between the volume texture mode and the regular volume texture mode.- Parameters:
flag- texture aligned view enabled or not
-
setVolumeDisplayMode
public void setVolumeDisplayMode(boolean volDisplayMode) Accessor that sets the volumeDisplayMode flag. If true image is displayed as a volume. If false image is displayed as three orthogonal planes.- Parameters:
volDisplayMode- if true image is displayed as a volume ( 3D texture or 2D array Texture).
-
setVolView
public void setVolView(boolean flag) Set the volume view mode to true from the ViewJFrameVolumeView During mouse recorder displaying, the flag control the updating of the opacity histogram.- Parameters:
flag-truemeans mode on,falsemeans mode off.
-
showBoxFrame
public void showBoxFrame()Makes the box frame visible. -
showBoxSlice
public void showBoxSlice(int orientation) Makes the box slice for the given orientation visible.- Parameters:
orientation- : AXIAL, CORONAL, or SAGITTAL
-
stateChanged
Sets how the image plane should be displayed depending on value of slider.- Specified by:
stateChangedin interfaceChangeListener- Parameters:
e- Event that triggered this function.
-
switchToSliceView
public void switchToSliceView(boolean firstTime) Perform some actions required when switching to the slice renderer.- Parameters:
firstTime- perform special actions required when switching for the first time
-
switchToVolView
public void switchToVolView(boolean firstTime) Perform some actions required when switching to the volume renderer.- Parameters:
firstTime- perform special actions required when switching for the first time
-
transformChanged
public void transformChanged(int type, javax.media.j3d.Transform3D transform) Tells the mouse dialog that the transform has changed. Does not use the type parameter.- Specified by:
transformChangedin interfacecom.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback- Parameters:
type- Type of transform.transform- Transform that was changed to.
-
transformUpdate
public void transformUpdate(int type, javax.media.j3d.Transform3D transform) The raybased renderer invokes this method when a mouse release event occurs.- Parameters:
type- Type of transform.transform- Transform that was changed to.
-
undoCropVolume
public void undoCropVolume()Undo crop region with the clipped volume. -
update3DTriplanar
This methods calls the componentImage's update method to redraw the screen.- Parameters:
LUTa- LUT used to update imageA.LUTb- LUT used to update imageB.forceShow- Forces show to reimport image and calculate java image.- Returns:
- Confirms successful update.
-
transformBoxSlices
private void transformBoxSlices(javax.media.j3d.Transform3D kTransform) transform the points used to render the triSliceImages textures.- Parameters:
kTransform- the Transform3D used to rotate the boxes.
-
ScreenToModel
private void ScreenToModel(javax.vecmath.Vector3f screen, javax.vecmath.Vector3f model) Translate from normalized plane coordinates to Model coordinates:- Parameters:
screen- the input point to be transformed from normalized plane coordinatesmodel- the output point in Model coordinates
-
ModelToScreen
public void ModelToScreen(javax.vecmath.Vector3f model, javax.vecmath.Vector3f screen) Translate from Model coordinates to normalized plane coordinates:- Parameters:
model- the input point in Model coordinatesscreen- the output point in normalized plane coordinates
-
getBoxSliceInScreen
private void getBoxSliceInScreen(javax.vecmath.Vector3f[] screenBoxPoints, int[] boxSliceConstants) sets up the values for the ViewJComponentBoxSlice array. Reorders the three boxSlice (x,y,z) coordinates and mode value into local ModelCoordinates.- Parameters:
boxSliceConstants- the reordered mode value (X_SLICE, Y_SLICE, Z_SLICE) remapped into ModelCoordinatesVector3f- [] the reordered (x,y,z) coordinates for each boxSlice remapped into ModelCoordinates.
-
updateBoxSlicePos
public void updateBoxSlicePos(boolean bParentUpdate) Update the X, Y, Z box frame positions.- Parameters:
bParentUpdate- if true, update the positions in the ParentFrame.
-
updateBoxSlices
public void updateBoxSlices()Sets new frame around slice x based on the new position. -
updateCubicTransform
public void updateCubicTransform(double[] mat) Update the transform3D for the cubic.- Parameters:
transform- Transform3D
-
updateCubicTransform
public void updateCubicTransform(javax.media.j3d.Transform3D transform) Update the transform3D for the cubic.- Parameters:
transform- Transform3D
-
updateData
public void updateData()Called when the underlying data has changed, due to sculpting. Calls the ViewJFrameVolumeView updateSliceData function to update the data in the slices. -
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!
-
updateImageFromRotation
public void updateImageFromRotation()Build a image with the current rotational transformation matrix. Step.1 convert the java3D transform matrix into a quaternion component. Step.2 convert the quaternion into image( our world ) coordinate system. Step.3 convert the quaternion into a rotatin matrix. Quaternion q ( w, x, y, z ): rotation of w around the vector ( x, y, z ); Convert the quaternion into a rotation matrix. / \ | 1-2*y^2-2*z^2 2*x*y-2*w*z 2*x*z+2*w*y | | 2*xy+2*w*z 1-2*x^2-2*z^2 2*y*z-2*w*x | | 2*x*z-2*w*y 2*y*z+2*w*x 1-2*x^2-2*y^2 | \ / Step.4 Calling the transform algorithm to extract the image. -
updateImages
public 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:
- Confirms successful update.
-
updateImages
public boolean updateImages(boolean flag) This methods calls the componentImage's update method to redraw the screen. Without LUT changes.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
flag- 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. Without LUT changes.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
LUTa- DOCUMENT ME!LUTb- DOCUMENT ME!forceShow- Forces show to reimport image and calculate java image.interpMode- DOCUMENT ME!- Returns:
- Confirms successful update.
-
updateLighting
public void updateLighting()This method is normally called by JPanelLights when a light bulb property changes. It is up to this instance to decide how to update the rendering. -
updateOpacityOfOthrogPlanes
public void updateOpacityOfOthrogPlanes(int opX, int opY, int opZ) Updates the 3 orthogonal 2D texture maps' opacities.- Parameters:
opX- the opacity of the x plane, range [0,100] and -1 if no updating is requiredopY- the opacity of the y plane, range [0,100] and -1 if no updating is requiredopZ- the opacity of the z plane, range [0,100] and -1 if no updating is required
-
updateProbe
public void updateProbe(boolean forceShow, boolean bInterpolate, boolean bReset) Updates the slice textures based on the Probe position and rotation angle. The ModelImage data is sampled along the diagonal, not axis-aligned. bInterpolate indicates whether to use nearest-neighbors or to interpolate the data.- Parameters:
forceShow- Forces triSliceImages[i].show to re-calculate the image texture.bInterpolate- uses nearest-neighbors when false, interpolates data when truebReset- when true indicates that the probe navigation has been reset and the slice bounding boxes should be displayed, when false the probe is no axis-aligned and the slice bounding boxes are not displayed
-
updateProbePos
public void updateProbePos()Not used now. Might be used later on. -
updateRaycastRender
public void updateRaycastRender()Update the raycast based renderer. JPanelSurface mouse release event invokes this method call. -
updateShininess
public void updateShininess(float value) Update the shininess from the JPanelLights.- Parameters:
value- shininess value.
-
updateTransform
public void updateTransform()Tells the mouse dialog that the transform has changed. Does not use the type parameter.- Parameters:
transform- Transform that was changed to.
-
updateVolume
This methods calls the componentImage's update method to redraw the screen.- Parameters:
LUTa- LUT used to update imageA.LUTb- LUT used to update imageB.forceShow- Forces show to reimport image and calculate java image.- Returns:
- Confirms successful update.
-
useSliceSpacingCoarse
public void useSliceSpacingCoarse()Select the "coarse" slice sampling for rendering. -
useSliceSpacingFine
public void useSliceSpacingFine()Retrieves whether the "fine" slice sampling is currently selected. -
whichTissue
public int whichTissue(float x, float y, float z) Check the given voxel belong to which segmentation.- Parameters:
x- float given voxel x coordinatey- float given voxel y coordinatez- float given voxel z coordinate- Returns:
- int segmentation component type
-
buildCubicBox
private com.sun.j3d.utils.geometry.Box buildCubicBox()Create the rotation control cubic box.- Returns:
- A cube representing the image orientation, with labels painted on the cube faces showing which axis corresponds to which axis in patient coordinates.
-
buildCubicBranch
private void buildCubicBranch()Build the cubic branch under the objRootBG. -
configureSliceFrame
private void configureSliceFrame()Constructs main frame structures for 3 image planes. Makes the LUT if necessary, then sets up the buffer arrays appropriately and calls the constructors for the three image planes. -
generateRFACoordMaps
private void generateRFACoordMaps()Generates the texture coord map vectors for the three orthogonal slices. -
generateRFACoordMaps
private javax.vecmath.Vector4f generateRFACoordMaps(int orientation, int texCoord) create texture coordmaps for the texture-mapped planes displaying the triSliceImages.- Parameters:
orientation- the orientation of the plane for which the texture coordinates are generated (AXIAL, CORONAL, or SAGITTAL)texCoord- the dimension along which the texture coordinate varies
-
createImageSceneGraph
private void createImageSceneGraph()Creates the scene graph, made up of a branch group parent, a transform group under that which applies mouse behavior and lights to the scene, and three branch groups under the transform group for each of the three image planes. The surfaces that can be added would be children of the transform group. Each image plane has a transform group associated with it and beneath that, a box shape where the texture maps are applied. The shape is what is actually displayed. -
setupEye
private void setupEye()Set up the center point of the red line boxframe. -
updateTextureVolumeRender
private void updateTextureVolumeRender()Determine the current viewing transformation and pass it to the texture volume renderer so that it can update itself. -
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().
-
updateParent
public void updateParent() -
keyPressed
- Specified by:
keyPressedin interfaceKeyListener
-
keyReleased
- Specified by:
keyReleasedin interfaceKeyListener
-
keyTyped
- Specified by:
keyTypedin interfaceKeyListener
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-