Class FlythruRender
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
gov.nih.mipav.view.renderer.J3D.surfaceview.flythruview.FlythruRender
- All Implemented Interfaces:
com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback,FlyThroughRenderInterface,FlyPathBehavior.Callback,ViewImageUpdateInterface,ActionListener,KeyListener,MouseListener,MouseMotionListener,MouseWheelListener,ImageObserver,MenuContainer,PropertyChangeListener,Serializable,EventListener,Accessible,ChangeListener
public class FlythruRender
extends SurfaceRender
implements FlyThroughRenderInterface, FlyPathBehavior.Callback, com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback, MouseListener, MouseMotionListener, MouseWheelListener
Virtual colonoscopy viewer. This class contains the static 'main' method to launch the application. This class is an
Applet which means that it can be embedded in a browser or it can be attached to a MainFrame when executed as an
application. The Applet contains a Canvas3D used for the 3D rendering of the colon surface data and for using the
mouse and keyboard for maneuvering the view of the colon while moving through it.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classExtend the MouseRotate class so that we can override the processMouseEvent method to ignore any events which occur while the shift key is down.(package private) classMouse middle button wheel roller event handler.(package private) classRightMouse press event handler.(package private) classRight mouse button press down and drag event handler.static classDOCUMENT ME!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 TypeFieldDescription(package private) short[]DOCUMENT ME!(package private) intDOCUMENT ME!(package private) intDOCUMENT ME!(package private) longCurrent mouse press event time stamp.(package private) StringDOCUMENT ME!(package private) int[]DOCUMENT ME!(package private) StringDOCUMENT ME!private intDOCUMENT ME!(package private) JpegImagesToMovieDOCUMENT ME!private VolumeCanvas3DDOCUMENT ME!private ModelImageDOCUMENT ME!static intstatic intstatic intstatic intprivate int[]DOCUMENT ME!private int[]This is the range of path samples for each branch that are unvisited.private int[]DOCUMENT ME!private intKeep track of the last branch that was selected (at a branch point).private FlyPathAnnotateListThis is for the collection of annotation points.private javax.media.j3d.GroupDOCUMENT ME!private javax.media.j3d.Shape3DDOCUMENT ME!private javax.media.j3d.Shape3DThis is the Java3D geometry for the path.private JPanelVirtualEndoscopySetupThis is the control frame which may need to be updated as the view changes.private FlyPathBehaviorKeep track of the FlyPathBehavior because it knows about the view from the path.private FlyPathGraphCurveDOCUMENT ME!private FlyPathGraphSamplesThis is the path extracted from the skeletonization.private javax.media.j3d.GroupDOCUMENT ME!private ModelLUTDOCUMENT ME!private ModelTriangleMeshCurvaturesDOCUMENT ME!private com.sun.j3d.utils.behaviors.mouse.MouseRotateDOCUMENT ME!private javax.vecmath.Color3fDOCUMENT ME!private javax.vecmath.Color3fThese are the colors to use when rendering the normal/selected branch that is unvisited/visited.private FlythruRender.SetupOptionsThese are the setup options passed to the constructor which we need to keep track of in case we need to use them outside the constructor.private com.sun.j3d.utils.picking.PickCanvasUsed for picking.private javax.media.j3d.PointLightDOCUMENT ME!private javax.media.j3d.BranchGroupThese are part of the scene and view.private javax.vecmath.Color3fDOCUMENT ME!private javax.vecmath.Color3fDOCUMENT ME!private Skeleton3DThis it skeletonization of the binary volume.private ModelTriangleMeshThis is the surface geometry and its properties.private ModelTriangleMeshCurveSegmentsDOCUMENT ME!private javax.media.j3d.IndexedGeometryArrayDOCUMENT ME!private com.sun.j3d.utils.geometry.GeometryInfoThis is the Java3D geometry for the surface.private ModelTriangleMeshDOCUMENT ME!private javax.media.j3d.Shape3DDOCUMENT ME!private com.sun.j3d.utils.universe.SimpleUniverseThe simple universe contains a single canvas, a viewing platform, and a scene graph.private ModelImage3DLayoutDescribes the organization of the volume data in a linear array.(package private) MovieMakerDOCUMENT ME!private ViewJFrameVolumeViewDOCUMENT ME!(package private) int[]DOCUMENT ME!private booleanIf any of the mouse move button pressed.(package private) longPrevious mouse press event time stamp.(package private) JProgressBarA local reference to the volume renderer frame's progress bar.(package private) RobotDOCUMENT ME!private intDOCUMENT ME!private static final longUse serialVersionUID for interoperability.private longTime to wait for the next mouse event.Fields inherited from class gov.nih.mipav.view.renderer.J3D.surfaceview.SurfaceRender
ARTERIAL_SEG, BONE_SEG, ENTRY_POINT, isViewTextureAligned, rayBasedRender, TUMOR_SEG, VASCULATURE_SEG, VEINOUS_SEGFields 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
ConstructorsConstructorDescriptionFlythruRender(ModelImage _kImage, GraphicsConfiguration _config, ViewJFrameVolumeView _parentFrame) View which renders virtual endoscopy fly through of a binarized volume. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMesh(ModelTriangleMesh kOld, ModelTriangleMesh kNew) ReplaceMesh is used by the Geodesic when a mesh is cut.voidautoRun()Causes the FlyPathBehavior to fly down the current path from start to finish and back again.private javax.media.j3d.LineArraycreateBranchConnectGeometry(int iBranch) Get the geometry to be used for rendering the connection of the specified branch to its parent branch.private javax.media.j3d.LineStripArraycreateBranchPathGeometry(int iBranch) Get the geometry to be used for rendering the path of the specified branch.private javax.media.j3d.LineStripArraycreateBranchPathGeometryScaled(int iBranch) Get the geometry to be used for rendering the path of the specified branch.private voidCreate flythru directory to save the captured images from AVI recorder.voiddispose()Override called when window is closed.javax.media.j3d.Shape3DFor displaying the Path in the surface renderer:javax.media.j3d.Canvas3DAccessor for the canvas for this 3D object.intjavax.media.j3d.GroupReturn access to the Group data member m_kGeodesicGroup so Geodesic object can draw on the triangle mesh:intgetImage()Access the pseudocolor mapping specified to use when rendering the computed mean curvatures values for the specified surface.floatDOCUMENT ME!com.sun.j3d.utils.picking.PickCanvasGet the pick canvas.javax.vecmath.Point3fScaled coordinates for the current position along the path for viewing.javax.vecmath.Point3fReturn the interpolated sample coordinates in the volume of the current position along the path for viewing.Access the surface to be rendered when moving along the path.DOCUMENT ME!Access the computed curvatures for the specified triangle mesh surface.intgetWidth()voidPasses move command from the JPanelFlythruMove to the FlyPathBehavior class.voidmouseClicked(MouseEvent kMouseEvent) Implement MouseInterface abstract method.voidmouseDragged(MouseEvent event) The mouseDragged event is used when the right mouse button press down and dragged to adjust the camera viewing direction.voidmouseEntered(MouseEvent kMouseEvent) Implement MouseInterface abstract method.voidmouseExited(MouseEvent kMouseEvent) Implement MouseInterface abstract method.voidmouseMoved(MouseEvent kMouseEvent) voidmousePressed(MouseEvent event) Implement MouseInterface abstract method.voidmouseReleased(MouseEvent event) Implement MouseInterface abstract method.voidmouseWheelMoved(MouseWheelEvent event) Mouse wheel event invoked from the middle mouse button roller.booleanDOCUMENT ME!voidrecord(boolean bOn) Turn recording frames on/off.voidreplaceMesh(ModelTriangleMesh kOld, ModelTriangleMesh kNew) ReplaceMesh is used by the Geodesic when a mesh is cut.voidDOCUMENT ME!voidDOCUMENT ME!protected voidCalled any time a change has been made to a new branch so that the connection between the branch and its parent can be rendered.protected voidCalled any time the position along the current curve changes and the color of the curve needs to change to show what has been visited.protected voidCalled any time the scene needs to be regenerated.protected voidCalled whenever any of the rendering properties of the surface are modified.protected voidIf the color LUT defined for mean curvature pseudocolor mapping is defined, then use it to reset the colors.protected voidResets the portion of the surface to be rendered based on the current triangle connectivity information.voidsetCurrentState(Object _state) Set the current traversing branch.voidsetMeanCurvaturesLUT(ModelLUT kMeanCurvaturesLUT) Use the specified pseudocolors to render the computed mean curvatures for the previously specified mesh surface.voidsetRenderSurfaceColors(Color _color) If the color LUT defined for mean curvature pseudocolor mapping is defined, then use it to reset the colors.voidsetSurface(ModelTriangleMesh kSurface) Add the specified surface to the rendering.voidsetupRender(ModelImage _kImage, FlythruRender.SetupOptions kOptions) Setup flythru renderer.voidDOCUMENT ME!voidToggle between wireframe and filled polygon mode:voidtransformChanged(int iType, javax.media.j3d.Transform3D kTransform) MouseBehaviorCallback override.voidviewChanged(FlyPathBehavior kFlyPathBehavior, int iEvent) Implementation of the FlyPathBehavior.Callback interface.booleanWrite the image from the rendering frame into the camera capture frame.Methods inherited from class gov.nih.mipav.view.renderer.J3D.surfaceview.SurfaceRender
actionPerformed, addCubicControl, autoCapture, cleanMouseRecorder, close, configureVolumeFrame, cropClipVolume, detachVolRender, disableClipping, dispatchSavedEvent, disposeLocal, drawRFAPoint, enableEntryPoint, enableObjBehavior, getCameraControl, getClipDialog, getDisplayDialog, getDisplayMode3D, getGeodesicPanel, getImageA, getImageB, getMouseDialog, getMouseMode, getObjBoxSlice_BG, getObjPlane_BG, getOriginalScreenScale, getParentFrame, getProbeDialog, getResolutions, getSceneState, getSculptorPanel, getSegmentationImage, getSlicePanel, getSliceSpacingCoarse, getSliceSpacingFine, getSurfaceDialog, getSurfaceTexture, getSurfaceTexturePanel, getViewDialog, getVolOpacityPanel, getVolRenderBG, getVolRenderOG, getVolumeTexture, getVolumeTextureCopy, hideBoxFrame, invokeClipping, isVolViewMode, keyPressed, keyReleased, keyTyped, ModelToScreen, propertyChange, reConfigureVolumeFrame, removeBoxSlice, removeCubicControl, resetAxisX, resetAxisY, resetImage, rotateImage, saveCropVolume, setAlphaBlend, setCenter, setCompositeMode, setDisplayMode3D, setGUI, setLightingMode, setLUTa, setLUTb, setMaterialShininess, setMouseMode, setMouseRotateEnable, setParallelRotation, setProbeTG, setRayBasedRender, setRenderPerspective, setRGBTA, setRGBTB, setSegmentationImage, setSlice, setSliceColor, setSliceSpacingCoarse, setSliceSpacingFine, setTimeSlice, setViewTextureAligned, setVolumeDisplayMode, setVolView, showBoxFrame, showBoxSlice, stateChanged, switchToSliceView, switchToVolView, transformUpdate, undoCropVolume, update3DTriplanar, updateBoxSlicePos, updateBoxSlices, updateCubicTransform, updateCubicTransform, updateData, updateImageExtents, updateImageFromRotation, updateImages, updateImages, updateImages, updateLighting, updateOpacityOfOthrogPlanes, updateParent, updateProbe, updateProbePos, updateRaycastRender, updateShininess, updateTransform, updateVolume, useSliceSpacingCoarse, useSliceSpacingFine, whichTissueMethods inherited from class gov.nih.mipav.view.renderer.J3D.RenderViewBase
calcImageNormals, createBoxFrame, disableCamera, disposeLocal, getBehaviorGroup, getBound, getBranchGroup, getNormals, getRGBTA, getRGBTB, getSceneRootTG, getSliderEvents, getTriPlanarViewBG, getUniverse, recordMouse, setBackgroundColor, setBoxColor, setRotationAngle, setRotationAxis, 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, 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, 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:
-
buffer
short[] bufferDOCUMENT ME! -
capScreenWidth
int capScreenWidthDOCUMENT ME! -
capScreenHeight
int capScreenHeightDOCUMENT ME! -
directory
String directoryDOCUMENT ME! -
extents
int[] extentsDOCUMENT ME! -
fileType
String fileTypeDOCUMENT ME! -
imageToMovie
JpegImagesToMovie imageToMovieDOCUMENT ME! -
movieMake
MovieMaker movieMakeDOCUMENT ME! -
pixels
int[] pixelsDOCUMENT ME! -
rendererProgressBar
JProgressBar rendererProgressBarA local reference to the volume renderer frame's progress bar. -
robot
Robot robotDOCUMENT ME! -
imageCounter
private int imageCounterDOCUMENT ME! -
kCanvas
DOCUMENT ME! -
kImage
DOCUMENT ME! -
m_aiBranchIndexUnvisitedMax
private int[] m_aiBranchIndexUnvisitedMaxDOCUMENT ME! -
m_aiBranchIndexUnvisitedMin
private int[] m_aiBranchIndexUnvisitedMinThis is the range of path samples for each branch that are unvisited. -
m_aiMeshConnectivity
private int[] m_aiMeshConnectivityDOCUMENT ME! -
m_iLastSelectedBranchIndex
private int m_iLastSelectedBranchIndexKeep track of the last branch that was selected (at a branch point). -
m_kAnnotateList
This is for the collection of annotation points. -
m_kAnnotatePointGroup
private javax.media.j3d.Group m_kAnnotatePointGroupDOCUMENT ME! -
m_kBranchConnectShape
private javax.media.j3d.Shape3D m_kBranchConnectShapeDOCUMENT ME! -
m_kBranchPathShape
private javax.media.j3d.Shape3D m_kBranchPathShapeThis is the Java3D geometry for the path. -
m_kControlFrame
This is the control frame which may need to be updated as the view changes. -
m_kFlyPathBehavior
Keep track of the FlyPathBehavior because it knows about the view from the path. -
m_kFlyPathGraphCurve
DOCUMENT ME! -
m_kFlyPathGraphSamples
This is the path extracted from the skeletonization. -
m_kGeodesicGroup
private javax.media.j3d.Group m_kGeodesicGroupDOCUMENT ME! -
m_kMeanCurvaturesLUT
DOCUMENT ME! -
m_kMeshCurvatures
DOCUMENT ME! -
m_kMouseRotateBehavior
private com.sun.j3d.utils.behaviors.mouse.MouseRotate m_kMouseRotateBehaviorDOCUMENT ME! -
m_kNormalColorPathUnvisited
private javax.vecmath.Color3f m_kNormalColorPathUnvisitedDOCUMENT ME! -
m_kNormalColorPathVisited
private javax.vecmath.Color3f m_kNormalColorPathVisitedThese are the colors to use when rendering the normal/selected branch that is unvisited/visited. -
m_kOptions
These are the setup options passed to the constructor which we need to keep track of in case we need to use them outside the constructor. -
m_kPickCanvas
private com.sun.j3d.utils.picking.PickCanvas m_kPickCanvasUsed for picking. -
m_kPointLight
private javax.media.j3d.PointLight m_kPointLightDOCUMENT ME! -
m_kSceneRoot
private javax.media.j3d.BranchGroup m_kSceneRootThese are part of the scene and view. -
m_kSelectColorPathUnvisited
private javax.vecmath.Color3f m_kSelectColorPathUnvisitedDOCUMENT ME! -
m_kSelectColorPathVisited
private javax.vecmath.Color3f m_kSelectColorPathVisitedDOCUMENT ME! -
m_kSkeleton
This it skeletonization of the binary volume. -
m_kSurface
This is the surface geometry and its properties. -
m_kSurfaceCurveSegments
DOCUMENT ME! -
m_kSurfaceGeometry
private javax.media.j3d.IndexedGeometryArray m_kSurfaceGeometryDOCUMENT ME! -
m_kSurfaceGeometryInfo
private com.sun.j3d.utils.geometry.GeometryInfo m_kSurfaceGeometryInfoThis is the Java3D geometry for the surface. -
m_kSurfaceMesh
DOCUMENT ME! -
m_kSurfaceShape
private javax.media.j3d.Shape3D m_kSurfaceShapeDOCUMENT ME! -
m_kUniverse
private com.sun.j3d.utils.universe.SimpleUniverse m_kUniverseThe simple universe contains a single canvas, a viewing platform, and a scene graph. The scene graph will contain all objects involved in the rendering. -
m_kVolumeLayout
Describes the organization of the volume data in a linear array. -
parentFrame
DOCUMENT ME! -
saveCounter
private int saveCounterDOCUMENT ME! -
currEventTime
long currEventTimeCurrent mouse press event time stamp. -
prevEventTime
long prevEventTimePrevious mouse press event time stamp. -
pressed
private boolean pressedIf any of the mouse move button pressed. -
time
private long timeTime to wait for the next mouse event. -
lookup
public static int lookup -
lookdown
public static int lookdown -
lookright
public static int lookright -
lookleft
public static int lookleft
-
-
Constructor Details
-
FlythruRender
public FlythruRender(ModelImage _kImage, GraphicsConfiguration _config, ViewJFrameVolumeView _parentFrame) View which renders virtual endoscopy fly through of a binarized volume.- Parameters:
_kImage- ModelImage Contains the image data and its properties._config- Graphics configuration reference._parentFrame- ViewJFrameVolumeView reference. initial virtual endoscopy view.
-
-
Method Details
-
addMesh
ReplaceMesh is used by the Geodesic when a mesh is cut. The original mesh is changed, but not deleted and no new mesh is added. The orginal mesh, kOld, is replced by the new mesh, kNew:- Parameters:
kOld- DOCUMENT ME!kNew- DOCUMENT ME!
-
autoRun
public void autoRun()Description copied from interface:FlyThroughRenderInterfaceCauses the FlyPathBehavior to fly down the current path from start to finish and back again.- Specified by:
autoRunin interfaceFlyThroughRenderInterface
-
dispose
public void dispose()Override called when window is closed. -
getBranchPathShape
public javax.media.j3d.Shape3D getBranchPathShape()For displaying the Path in the surface renderer:- Returns:
- Shape3D, the scaled FlyPath
-
getBranchState
- Specified by:
getBranchStatein interfaceFlyThroughRenderInterface- Returns:
- the current BranchState from the FlyPatheBehavior class.
-
getCanvas
public javax.media.j3d.Canvas3D getCanvas()Description copied from class:RenderViewBaseAccessor for the canvas for this 3D object.- Specified by:
getCanvasin interfaceFlyThroughRenderInterface- Overrides:
getCanvasin classRenderViewBase- Returns:
- The canvas for the scene.
-
getGeodesicGroup
public javax.media.j3d.Group getGeodesicGroup()Return access to the Group data member m_kGeodesicGroup so Geodesic object can draw on the triangle mesh:- Returns:
- DOCUMENT ME!
-
getMeanCurvaturesLUT
Access the pseudocolor mapping specified to use when rendering the computed mean curvatures values for the specified surface.- Returns:
- ModelLUT Defines the mapping of mean curvatures values to pseudocolor values.
-
getPathDist
public float getPathDist()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getPickCanvas
public com.sun.j3d.utils.picking.PickCanvas getPickCanvas()Get the pick canvas.- Returns:
- pickCanvas pick canvas.
-
getPositionScaled
public javax.vecmath.Point3f getPositionScaled()Scaled coordinates for the current position along the path for viewing.- Returns:
- Point3f A new instance created which contains the path position coordinates, scaled to match the ModelTriangleMesh in JPanelSurface.
-
getSamplePosition
public javax.vecmath.Point3f getSamplePosition()Return the interpolated sample coordinates in the volume of the current position along the path for viewing.- Returns:
- Point3f A new instance created which contains the interpolated sample coordinates.
-
getSurface
Access the surface to be rendered when moving along the path.- Returns:
- ModelTriangleMesh Instance of the surface represented as a triangle mesh as specified in the setSurface method.
-
getSurfaceControl
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getSurfaceCurvatures
Access the computed curvatures for the specified triangle mesh surface.- Returns:
- ModelTriangleMeshCurvatures Instance of the computed curvatures associated with the triangle mesh specifed in the setSurface method.
-
makeMove
Description copied from interface:FlyThroughRenderInterfacePasses move command from the JPanelFlythruMove to the FlyPathBehavior class.- Specified by:
makeMovein interfaceFlyThroughRenderInterface- Parameters:
cmd- move command.
-
mouseClicked
Implement MouseInterface abstract method.- Specified by:
mouseClickedin interfaceMouseListener- Parameters:
kMouseEvent- MouseEvent Contains information about the particular mouse event.
-
mouseEntered
Implement MouseInterface abstract method.- Specified by:
mouseEnteredin interfaceMouseListener- Parameters:
kMouseEvent- MouseEvent Contains information about the particular mouse event.
-
mouseExited
Implement MouseInterface abstract method.- Specified by:
mouseExitedin interfaceMouseListener- Parameters:
kMouseEvent- MouseEvent Contains information about the particular mouse event.
-
mousePressed
Implement MouseInterface abstract method.- Specified by:
mousePressedin interfaceMouseListener- Parameters:
kMouseEvent- MouseEvent Contains information about the particular mouse event.
-
mouseDragged
The mouseDragged event is used when the right mouse button press down and dragged to adjust the camera viewing direction.- Specified by:
mouseDraggedin interfaceMouseMotionListener- Parameters:
event- MouseEvent right mouse button press down and drag
-
mouseMoved
- Specified by:
mouseMovedin interfaceMouseMotionListener
-
mouseReleased
Implement MouseInterface abstract method.- Specified by:
mouseReleasedin interfaceMouseListener- Parameters:
kMouseEvent- MouseEvent Contains information about the particular mouse event.
-
mouseWheelMoved
Mouse wheel event invoked from the middle mouse button roller. Rolling forward to track the fly-thru path in forward direction. Rolling backward to track the fly-thru path in backward direction.- Specified by:
mouseWheelMovedin interfaceMouseWheelListener- Parameters:
event- mouse middle mouse roller event.
-
readImage
public boolean readImage()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
replaceMesh
ReplaceMesh is used by the Geodesic when a mesh is cut. The original mesh is changed, but not deleted and no new mesh is added. The orginal mesh, kOld, is replced by the new mesh, kNew:- Parameters:
kOld- DOCUMENT ME!kNew- DOCUMENT ME!
-
resetCounter
public void resetCounter()DOCUMENT ME! -
resetRenderAnnotateList
public void resetRenderAnnotateList()DOCUMENT ME! -
setCurrentState
Set the current traversing branch.- Specified by:
setCurrentStatein interfaceFlyThroughRenderInterface- Parameters:
_state- Object
-
setMeanCurvaturesLUT
Use the specified pseudocolors to render the computed mean curvatures for the previously specified mesh surface.- Parameters:
kMeanCurvaturesLUT- ModelLUT Defines the mapping of mean curvatures values to pseudocolor values. This may be null which is used to indicated that the mean curvatures are not to be rendered.
-
setRenderSurfaceColors
If the color LUT defined for mean curvature pseudocolor mapping is defined, then use it to reset the colors.- Parameters:
_color- DOCUMENT ME!
-
setSurface
Add the specified surface to the rendering.- Parameters:
kSurface- ModelTriangleMesh Surface represented as a triagle mesh.
-
setupRender
Setup flythru renderer.- Parameters:
_kImage- original model image reference.kOptions- setup options reference.
-
setupRenderControl
DOCUMENT ME!- Parameters:
_control- DOCUMENT ME!
-
toggleWireframe
public void toggleWireframe()Toggle between wireframe and filled polygon mode: -
transformChanged
public void transformChanged(int iType, javax.media.j3d.Transform3D kTransform) MouseBehaviorCallback override. This method is called whenever any MouseBehavior-derived class causes a change to the transformation which it is controlling.- Specified by:
transformChangedin interfacecom.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback- Overrides:
transformChangedin classSurfaceRender- Parameters:
iType- will be one of ROTATE, TRANSLATE or ZOOMkTransform- the updated Transform3D controlled by the MouseBehavior
-
viewChanged
Implementation of the FlyPathBehavior.Callback interface.- Specified by:
viewChangedin interfaceFlyPathBehavior.Callback- Parameters:
kFlyPathBehavior- reference to the MjFlyPathBehavior for which the view changed.iEvent- Bitmask identifies the event(s) which caused the view to change. Bitmask created from OR of EVENT_* defintions.
-
writeImage
public boolean writeImage()Description copied from class:RenderViewBaseWrite the image from the rendering frame into the camera capture frame.- Specified by:
writeImagein interfaceFlyThroughRenderInterface- Overrides:
writeImagein classRenderViewBase- Returns:
- succeed
truemeans succeed,falsemeans unsucceed.
-
getCounter
public int getCounter()- Specified by:
getCounterin interfaceFlyThroughRenderInterface- Returns:
- the current frame counter.
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceFlyThroughRenderInterface- Overrides:
getHeightin classComponent- Returns:
- the frame height.
-
getWidth
public int getWidth()- Specified by:
getWidthin interfaceFlyThroughRenderInterface- Overrides:
getWidthin classComponent- Returns:
- the frame width.
-
resetRenderBranchConnect
protected void resetRenderBranchConnect()Called any time a change has been made to a new branch so that the connection between the branch and its parent can be rendered. -
resetRenderBranchPath
protected void resetRenderBranchPath()Called any time the position along the current curve changes and the color of the curve needs to change to show what has been visited. -
resetRenderScene
protected void resetRenderScene()Called any time the scene needs to be regenerated. -
resetRenderSurface
protected void resetRenderSurface()Called whenever any of the rendering properties of the surface are modified. -
resetRenderSurfaceColors
protected void resetRenderSurfaceColors()If the color LUT defined for mean curvature pseudocolor mapping is defined, then use it to reset the colors. -
resetRenderSurfaceConnectivity
protected void resetRenderSurfaceConnectivity()Resets the portion of the surface to be rendered based on the current triangle connectivity information. -
createBranchConnectGeometry
private javax.media.j3d.LineArray createBranchConnectGeometry(int iBranch) Get the geometry to be used for rendering the connection of the specified branch to its parent branch.- Parameters:
iBranch- Index which identifies the branch.- Returns:
- LineArray instance that can be attached to a Shape3D node for rendering
-
createBranchPathGeometry
private javax.media.j3d.LineStripArray createBranchPathGeometry(int iBranch) Get the geometry to be used for rendering the path of the specified branch.- Parameters:
iBranch- Index which identifies the branch.- Returns:
- LineStripArray instance that can be attached to a Shape3D node for rendering
-
createBranchPathGeometryScaled
private javax.media.j3d.LineStripArray createBranchPathGeometryScaled(int iBranch) Get the geometry to be used for rendering the path of the specified branch.- Parameters:
iBranch- Index which identifies the branch.- Returns:
- LineStripArray instance that can be attached to a Shape3D node for rendering.
The LineStripArray coordinates are scaled to match the ModelTriangleMesh in JPanelSurface.
-
createDirectory
private void createDirectory()Create flythru directory to save the captured images from AVI recorder. -
record
public void record(boolean bOn) Description copied from interface:FlyThroughRenderInterfaceTurn recording frames on/off.- Specified by:
recordin interfaceFlyThroughRenderInterface- Parameters:
bOn-
-
getImage
- Specified by:
getImagein interfaceFlyThroughRenderInterface- Returns:
- access to the ModelImage mask image used by the Fly-through renderer.
-