Class VolumeTriPlanarRender
- java.lang.Object
-
- WildMagic.LibApplications.OpenGLApplication.Application
-
- WildMagic.LibApplications.OpenGLApplication.JavaApplication
-
- WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
-
- gov.nih.mipav.view.renderer.WildMagic.GPURenderBase
-
- gov.nih.mipav.view.renderer.WildMagic.VolumeTriPlanarRenderBase
-
- gov.nih.mipav.view.renderer.WildMagic.VolumeTriPlanarRender
-
- All Implemented Interfaces:
com.jogamp.opengl.GLEventListener
,SpaceNavigatorListener
,NavigationBehavior.Callback
,java.awt.event.KeyListener
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.event.MouseWheelListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.event.ChangeListener
- Direct Known Subclasses:
VolumeTriPlanerRenderDTI
public class VolumeTriPlanarRender extends VolumeTriPlanarRenderBase implements com.jogamp.opengl.GLEventListener, java.awt.event.KeyListener, java.awt.event.MouseMotionListener, java.awt.event.MouseListener, NavigationBehavior.Callback
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
altPressed
private int
animateStep
private JPanelAnnotationAnimation
annotationAnimationPanel
private java.util.HashMap<java.lang.String,java.lang.Float>
annotationDiameters
private java.util.HashMap<java.lang.String,java.lang.Boolean>
annotationLabelsDisplay
private java.lang.String[]
annotationNames
private VOIVector
annotationPositions
private java.util.HashMap<java.lang.String,VolumeSurface>
annotationSpheres
private java.util.HashMap<java.lang.String,WildMagic.LibFoundation.Mathematics.ColorRGB>
annotationSpheresColors
private java.util.HashMap<java.lang.String,java.lang.Boolean>
annotationSpheresDisplay
private int
annotationSpheresIndex
private java.util.HashMap<java.lang.String,VOI>
annotationVOIs
protected RendererListener
configuredListener
protected VolumeTriPlanarInterface
m_kParent
Parent user-interface and display frame.private VOILatticeManagerInterface
m_kVOIInterface
private java.util.HashMap<java.lang.String,java.lang.Boolean>
neuriteDisplay
private java.util.Vector<java.lang.String>
neuriteNames
private java.util.HashMap<java.lang.String,VolumeSurface[]>
neuriteSurfaces
private java.util.HashMap<java.lang.String,VOI[]>
neuriteVOIs
protected boolean
rightMousePressed
private static long
serialVersionUID
protected boolean
shiftPressed
private float
sphereScale
-
Fields inherited from class gov.nih.mipav.view.renderer.WildMagic.VolumeTriPlanarRenderBase
animateSlice, annotatePtsCounter, annotatePtsList, caps, fSample_mouseDragged, fSample_mouseReleased, gl_height, gl_width, glp, init, isAnnotateEnabled, isMouseControlEnabled, isNavigationEnabled, isPathPlanningEnabled, kGeometryBranchPath, kPoly, kPolyNode, latticeClip, latticeClipAxes, latticeClipBox, latticeClipExtents, latticeClipPos, m_afArbEquation, m_afArbEquationInv, m_akSceneTarget, m_akSlicesColor, m_bArbClipOn, m_bCrop, m_bDisplay, m_bDisplaySecond, m_bDropper, m_bErase, m_bFirstDisplay, m_bFirstRender, m_bGeodesicEnabled, m_bPaint, m_bPaintCan, m_bPaintEnabled, m_bPickCorrespondence, m_bPlay4D, m_bPlay4DVOIs, m_bResetImages, m_bUpdateCenterOnDisplay, m_bWriteImage, m_fAnimateRate, m_iAnimateCount, m_iBrushSize, m_iExtractLevel, m_iStereo, m_kArbitraryClip, m_kArbitraryClipInv, m_kDTIDisplay, m_kFBO, m_kFlyPathGraphCurve, m_kNewCenter, m_kNormalColorPathUnvisited, m_kPaintColor, m_kSculptor, m_kSlices, m_kVolumeBox, m_kVolumeClip, m_kVolumeCube, m_kVolumeRayCast, m_pkPlane, m_pkScreenCamera, m_spkPlaneEffect, ms_akLUTTexture, ms_NumHistogramLUTs, navigationBehavior, profile, sharedDrawable, sharedRenderer, sliceDir, sphereClip, sphereRadius
-
Fields inherited from class gov.nih.mipav.view.renderer.WildMagic.GPURenderBase
currentLocation, defaultVelocityRotational, defaultVelocityTranslational, dpiScale, hyperstack, hyperstackColormap, isSpaceNavCodeRunning, m_akLights, m_bDispose, m_bDoClip, m_bExtract, m_bFirstDrag, m_bInit, m_bModified, m_bMouseDrag, m_bPickPending, m_bShared, m_bSnapshot, m_bSurfaceMaskUpdate, m_bSurfaceUpdate, m_bTestFrameRate, m_bVisible, m_fMax, m_fX, m_fY, m_fZ, m_iCaptureFPS, m_iScreenCaptureCounter, m_iXPick, m_iYPick, m_kAnimator, m_kCuller, m_kDeleteList, m_kDisplayList, m_kPicker, m_kSceneToWorld, m_kTranslate, m_kVolumeImageA, m_kVolumeImageA_New, m_kVolumeImageA_Old, m_kVolumeImageB, m_kVolumeImageB_New, m_kVolumeImageB_Old, m_kWinLevel, m_kXRotate, m_kYRotate, m_kZRotate, m_spkCull, m_spkScene, mouseRot, nearPlane, rotPower, rotScalar, transPower, transScalar, updateBoundingCube, zVector, ZXDistanceStep, ZYDistanceStep, ZZDistanceStep
-
Fields inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
cameraParams, m_akWorldAxis, m_bCameraMoveable, m_bDArrowPressed, m_bEndPressed, m_bHomePressed, m_bLArrowPressed, m_bLInsertPressed, m_bObjectZoomed, m_bPgDnPressed, m_bPgUpPressed, m_bRArrowPressed, m_bRDeletePressed, m_bTrackBallDown, m_bUArrowPressed, m_bUseTrackBall, m_dAccumulatedTime, m_dFrameRate, m_dLastTime, m_fRotSpeed, m_fRotSpeedFactor, m_fTrnSpeed, m_fTrnSpeedFactor, m_fXDrag0, m_fXTrack0, m_fXTrack1, m_fYDrag0, m_fYTrack0, m_fYTrack1, m_fZoomSpeed, m_iAccumulatedFrameCount, m_iDoPitch, m_iDoRoll, m_iDoYaw, m_iFrameCount, m_iMaxTimer, m_iMouseButton, m_iTimer, m_kSaveRotate, m_mouseRotSpeed, m_spkCamera, m_spkMotionObject, pitchRotationAngle, rollRotationAngle, xCameraMove, xCameraTurn, yawRotationAngle, yCameraMove, yCameraTurn, zCameraMove
-
-
Constructor Summary
Constructors Constructor Description VolumeTriPlanarRender(VolumeImage[] images, WildMagic.LibGraphics.Rendering.Texture colormap)
VolumeTriPlanarRender(VolumeTriPlanarInterface kParent, com.jogamp.opengl.util.Animator kAnimator, VolumeImage kVolumeImageA, VolumeImage kVolumeImageB)
Construct the Volume/Surface/Tri-Planar renderer.VolumeTriPlanarRender(VolumeTriPlanarInterface kParent, VolumeImage kVolumeImageA, VolumeImage kVolumeImageB)
Construct the Volume/Surface/Tri-Planar renderer.VolumeTriPlanarRender(VolumeTriPlanarRender kShared, com.jogamp.opengl.awt.GLCanvas kCanvas, VolumeTriPlanarInterface kParent, VolumeImage kVolumeImageA, VolumeImage kVolumeImageB)
Construct the Volume/Surface/Tri-Planar renderer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add3DMarker(VOI textVOI, boolean automaticLabel, boolean multiSelect)
void
add3DMarker(VOI textVOI, boolean automaticLabel, boolean multiSelect, boolean isShift)
void
addAnimationVOIs(VOIVector vois, JPanelAnnotationAnimation annotationAnimationPanel)
void
addAnnotationPoint(WildMagic.LibFoundation.Mathematics.Vector3f point, WildMagic.LibFoundation.Mathematics.Vector3f scannerPt)
Add the annotation pointvoid
addConfiguredListener(RendererListener listener)
void
addNeurite(java.lang.String neuriteName, java.lang.String[] names, WildMagic.LibFoundation.Mathematics.ColorRGB color)
private void
addSphere(WildMagic.LibFoundation.Mathematics.Vector3f center, int index)
void
addSphereVOIs(VOI annotations)
private void
animateAlgorithm()
java.lang.String
annotationPrefix()
void
annotationVOIsUpdate(int value)
boolean
applySculpt(boolean bAll)
Apply the sculpt region to the volume.void
clear3DSelection()
void
clearPath()
Clear the annotated pathprivate void
createAnnotatePoint(WildMagic.LibFoundation.Mathematics.Vector3f kPosition)
Create a new Annotation point at the position specified.private WildMagic.LibGraphics.SceneGraph.Polyline
createBranchPathGeometryScaled(int iBranch)
Translate the path points from image coordinate to view volume coordinate.private WildMagic.LibGraphics.SceneGraph.TriMesh
createNeuriteSurface(VOIContour neurite, WildMagic.LibFoundation.Mathematics.ColorRGB color, float radius)
protected void
CreateScene()
Called by the init() function.private WildMagic.LibGraphics.Surfaces.TubeSurface
createTube(VOIContour neurite)
void
deleteSelectedPoint()
void
display(com.jogamp.opengl.GLAutoDrawable arg0)
private boolean
displayedNeurite(java.lang.String neuriteName)
void
displayNeurite(java.lang.String neuriteName, boolean display)
void
dispose(com.jogamp.opengl.GLAutoDrawable kDrawable)
memory cleanup.boolean
doAutomaticLabels()
void
generatePath()
Generate the path planning path.void
getAnnotationInfo(java.lang.String name, boolean[] display, java.awt.Color[] color, float[] diameter, boolean[] displayLabel, java.awt.Color[] labelColor)
WildMagic.LibFoundation.Mathematics.Vector3f
getPositionScaled(WildMagic.LibFoundation.Mathematics.Vector3f kPoint)
Scaled coordinates for the current position along the path for viewing.VOI
getSelectedVOI(java.lang.String name)
boolean
hasSelectedPoint()
boolean
is3DSelectionEnabled()
boolean
isEditAnnotations()
void
keyPressed(java.awt.event.KeyEvent e)
Part of the KeyListener interface.void
keyReleased(java.awt.event.KeyEvent e)
boolean
modify3DMarker(WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt)
void
mouseDragged(java.awt.event.MouseEvent e)
Rotates the object with a virtual trackball:void
mousePressed(java.awt.event.MouseEvent e)
Rotates the object with a virtual trackball:void
mouseReleased(java.awt.event.MouseEvent e)
Rotates the object with a virtual trackball:void
moveSelectedPoint(WildMagic.LibFoundation.Mathematics.Vector3f direction)
protected void
Pick()
Picking.private boolean
PickSlice3D(WildMagic.LibFoundation.Mathematics.Vector3f kPos, WildMagic.LibFoundation.Mathematics.Vector3f kDir, WildMagic.LibFoundation.Mathematics.Vector3f maxPt)
private void
PickVolume3D(WildMagic.LibFoundation.Mathematics.Vector3f kPos, WildMagic.LibFoundation.Mathematics.Vector3f kDir, WildMagic.LibFoundation.Mathematics.Vector3f maxPt)
void
play4DVOIs(boolean bOn)
private void
processRightMouseDrag(java.awt.event.MouseEvent kEvent)
If the right mouse button is pressed and dragged. processRightMouseDrag updates the HistoLUT window and level (contrast and brightness)void
reCreateScene(VolumeImage image)
Called by the init() function.boolean
select3DMarker(WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt, boolean rightMouse, boolean multiSelect)
void
setAnnotationDiameter(java.lang.String name, float diameter)
void
setAnnotationMode(boolean _isAnnotateEnabled)
void
setAnnotationVOIColor(java.lang.String name, WildMagic.LibFoundation.Mathematics.ColorRGB color)
void
setCameraCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
Update the camera in 3D view window.void
setCameraViewRotationDegree(int degree)
Set camera view rotation degreevoid
setDefaultCursor()
void
setDisplayAnnotation(java.lang.String name, boolean display)
void
setDisplayAnnotationLabel(java.lang.String name, boolean display)
void
setMouseControlFlythru(boolean _isMouseControl)
void
setNeuriteColor(java.lang.String neuriteName, WildMagic.LibFoundation.Mathematics.ColorRGB color)
void
setPathPlanningFlythru(boolean _isPathPlanning)
void
setupNavigationScenegraph()
Setup the Navigation scene graph view for debugging purposevoid
setVOILatticeManager(VOILatticeManagerInterface newVOIInterface)
private void
setWindowLevel(float fX, float fY, boolean first)
private WildMagic.LibFoundation.Curves.NaturalSpline3
smoothCurve(VOIContour curve, float[] time)
void
toggleNavigation(boolean _isNavigationEnabled)
Toggle Navigation mode.void
undoSculpt(boolean bAll)
Undo applying the sculpt region to the volume.protected void
update4D(boolean bForward)
protected void
update4DVOIs(boolean bForward)
private void
updateContour(VOIContour contour, VOI positions, java.lang.String[] names)
private void
updateNeurite(java.lang.String neuriteName, java.lang.String[] names, WildMagic.LibFoundation.Mathematics.ColorRGB color)
void
updateSceneNodePoint(java.lang.String name, WildMagic.LibFoundation.Mathematics.Vector3f position)
Currently only being used to update the picking pointprotected void
UpdateSceneRotation()
Updates the displayed objects based on any user mouse rotation.void
updateSlicesCenter(WildMagic.LibFoundation.Mathematics.Vector3f loc)
Update the bottom 3 planar view centervoid
updateVOIs()
protected void
updateVOIs(VOIVector kVOIs)
void
viewChanged(NavigationBehavior behavior, int iEvent)
Navigation behavior callback handlerboolean
writeImage()
Writes a the frame buffer as a .jpg image to disk.-
Methods inherited from class gov.nih.mipav.view.renderer.WildMagic.VolumeTriPlanarRenderBase
addAnimationLattice, addAnimationVOIs, addGeodesic, addSurface, addSurface, addSurface, addTract, addVolumeVOI, applyClipFilter, blend, clearSculpt, clipAnnotations, CMPMode, CreateRenderTarget, cropClipVolume, deleteVOIs, displayArbitraryClipPlane, displayBoundingBox, displayClipPlane, displayClipPlane, displayNode, displayOrientationCube, displaySurface, displayVOIs, displayVolumeRaycast, displayVolumeSlices, disposeShared, doClip, drawVOI, DRRMode, enableArbitraryClipPlane, enableClipPlane, enableEyeClipPlane, enableEyeInvClipPlane, enableGeodesic, enablePaint, enableSculpt, eraseAllPaint, extractMeshFromVolume, getABBlend, getArbitratyClip, getArbitratyClipOn, getClip, getClipAEEnable, getClipColor, getClipDisplay, getClipEnable, getClipInv, getClipInvDisplay, getClipInvEnable, getContainingPanel, getDPIScale, getGradientMagnitude, getGroupColor, getHistogramLUTTexture, getHistogramLUTTextureIndex, getIPD, getMaterial, getOpacity, getPolylines, getSculpt, getSculptEnabled, getSurface, getSurfaceArea, getSurfaceAreaString, getSurfaceCenter, getSurfaceVolume, getSurfaceVolumeString, getTranslateSurface, getVolumeSurface, init, init, initClass, initShared, invertSculpt, MIPMode, mouseClicked, Move, MULTIHISTOMode, newSharedCanvas, NormalKernel, pickCorrespondence, play4D, play4DVOIs, reCreateScene, redrawSurfaceTexture, releaseShared, reloadShaders, removeAll, removeAllGeodesic, removeAllSurfaces, removeGeodesic, removePolyline, removeSurface, Render, replaceGeodesic, resetView, reshape, rollbackToCenter, save, saveCroppedImage, selfShadow, setABBlend, setAnimationSpeed, setAnimationSpeed, setArbColor, setArbitraryClipPlane, setArbitratyClip, setArbitratyClip, setBackface, setBackgroundColor, setBoundingBoxColor, setBoundingBoxColor, setCenter, setClipping, setClipPlane, setClipPlaneColor, setColor, SetCustomBlend, setDisplayAllGlyphs, setDisplayArrows, setDisplayCylinders, setDisplayEllipsoids, setDisplayTubes, setDrawingShape, setDTIImage, setEllipseMod, setEyeClipPlane, setEyeColor, setEyeInvClipPlane, setEyeInvColor, setGradientMagnitude, setHyperStack, setImageB, setImageNew, setImageOn, setImages, setIntenstityLevel, setIPD, setLatticeClip, setLUTNew, setMaterial, setMouseRotationSpeed, setMouseTranslationSpeed, setMouseZoomSpeed, setPickable, setPlaneConstant, setPolygonMode, setPolylineColor, setRGBTA, setRGBTB, setSliceOpacity, setStereo, setSurfaceTexture, setView, setVolumeBlend, setVolumeColor, setVolumeSamplesMouseDragged, setVolumeSamplesMouseReleased, showBoundingBox, showSlice, smoothMesh, smoothThree, smoothTwo, startRecording, startStopVOIAnimation, stateChanged, SURFASTMode, SURMode, toggleDisplaySurface, toggleDisplayVOI, toggleDisplayVolume, toggleDisplayVolumeSlices, toggleGeodesicPathDisplay, translateSurface, updateCenterOnDisplay, updateData, updateLevWidgetState, updateSphere
-
Methods inherited from class gov.nih.mipav.view.renderer.WildMagic.GPURenderBase
AddNode, checkIfSpaceNavNeedsCalibration, dispose, drawText, fineMovement, GetCanvas, getCounter, getDisplayList, getImage, GetLights, getNearPlane, GetNode, getNormalizedXDim, getNormalizedYDim, getNormalizedZDim, getRotationCutoffValue, getRotationScaleFactor, GetSceneRotation, getSceneToWorldMatrix, getTranslate, getTranslationCutoffValue, getTranslationScaleFactor, getVolumeImage, getVolumeImageB, invertRX, invertRY, invertRZ, invertTX, invertTY, invertTZ, isUseMouseRotationCutoffs, isUseMouseTranslationCutoffs, isVisible, normalMovement, pauseAnimator, processSpaceNavEvent, processSpaceNavEvent, record, reInitialize, RemoveNode, RenderFrameRate, resetAxis, resetAxisX, resetAxisXInv, resetAxisY, saveAVIMovie, saveQuickTimeMovie, setCameraNearPlane, setDefaultLighting, setOrthographicProjection, setPerspectiveProjection, setRotationCutoffValue, setRotationScaleFactor, SetSceneRotation, setTranslationCutoffValue, setTranslationScaleFactor, setUseMouseRotationCutoffs, setUseMouseTranslationCutoffs, setVisible, startAnimator, updateImageFromRotation, updateLighting
-
Methods inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
DrawFrameRate, getCameraLocation, getCameraParameters, getObjectParameters, getObjectRotation, InitializeCameraMotion, InitializeCameraMotion, InitializeObjectMotion, keyTyped, LookDown, LookUp, MeasureTime, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved, MoveBackward, MoveCamera, MoveDown, MoveForward, MoveLeft, MoveObject, MoveRight, MoveUp, OnDisplay, OnInitialize, OnTerminate, ResetTime, RotateTrackBall, setCameraLocation, setCameraParameters, setObjectParameters, setObjectRotation, TurnLeft, TurnRight, UpdateCameraRotationSpeed, UpdateCameraTranslationSpeed, UpdateCameraZoomSpeed, UpdateFrameCount, UpdateMouseRotationSpeed
-
Methods inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication
GetAspectRatio, GetHeight, GetRenderer, GetWidth, GetWindowTitle, GetXPosition, GetYPosition, OnIdle, OnMove, OnPrecreate, OnResize, SetRenderer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
m_kParent
protected VolumeTriPlanarInterface m_kParent
Parent user-interface and display frame.
-
configuredListener
protected RendererListener configuredListener
-
rightMousePressed
protected boolean rightMousePressed
-
altPressed
protected boolean altPressed
-
shiftPressed
protected boolean shiftPressed
-
m_kVOIInterface
private VOILatticeManagerInterface m_kVOIInterface
-
animateStep
private int animateStep
-
annotationPositions
private VOIVector annotationPositions
-
annotationDiameters
private java.util.HashMap<java.lang.String,java.lang.Float> annotationDiameters
-
annotationSpheres
private java.util.HashMap<java.lang.String,VolumeSurface> annotationSpheres
-
annotationSpheresDisplay
private java.util.HashMap<java.lang.String,java.lang.Boolean> annotationSpheresDisplay
-
annotationSpheresIndex
private int annotationSpheresIndex
-
annotationVOIs
private java.util.HashMap<java.lang.String,VOI> annotationVOIs
-
neuriteVOIs
private java.util.HashMap<java.lang.String,VOI[]> neuriteVOIs
-
neuriteSurfaces
private java.util.HashMap<java.lang.String,VolumeSurface[]> neuriteSurfaces
-
neuriteDisplay
private java.util.HashMap<java.lang.String,java.lang.Boolean> neuriteDisplay
-
annotationSpheresColors
private java.util.HashMap<java.lang.String,WildMagic.LibFoundation.Mathematics.ColorRGB> annotationSpheresColors
-
annotationAnimationPanel
private JPanelAnnotationAnimation annotationAnimationPanel
-
annotationLabelsDisplay
private java.util.HashMap<java.lang.String,java.lang.Boolean> annotationLabelsDisplay
-
annotationNames
private java.lang.String[] annotationNames
-
sphereScale
private float sphereScale
-
neuriteNames
private java.util.Vector<java.lang.String> neuriteNames
-
-
Constructor Detail
-
VolumeTriPlanarRender
public VolumeTriPlanarRender(VolumeTriPlanarInterface kParent, com.jogamp.opengl.util.Animator kAnimator, VolumeImage kVolumeImageA, VolumeImage kVolumeImageB)
Construct the Volume/Surface/Tri-Planar renderer.- Parameters:
kParent
- parent user-interface and frame.kAnimator
- animator used to display the canvas.kVolumeImageA
- volume data and textures for ModelImage A.kVolumeImageB
- volume data and textures for ModelImage B.
-
VolumeTriPlanarRender
public VolumeTriPlanarRender(VolumeTriPlanarRender kShared, com.jogamp.opengl.awt.GLCanvas kCanvas, VolumeTriPlanarInterface kParent, VolumeImage kVolumeImageA, VolumeImage kVolumeImageB)
Construct the Volume/Surface/Tri-Planar renderer.- Parameters:
kParent
- parent user-interface and frame.kAnimator
- animator used to display the canvas.kVolumeImageA
- volume data and textures for ModelImage A.kVolumeImageB
- volume data and textures for ModelImage B.
-
VolumeTriPlanarRender
public VolumeTriPlanarRender(VolumeTriPlanarInterface kParent, VolumeImage kVolumeImageA, VolumeImage kVolumeImageB)
Construct the Volume/Surface/Tri-Planar renderer.- Parameters:
kVolumeImageA
- volume data and textures for ModelImage A.kVolumeImageB
- volume data and textures for ModelImage B.
-
VolumeTriPlanarRender
public VolumeTriPlanarRender(VolumeImage[] images, WildMagic.LibGraphics.Rendering.Texture colormap)
-
-
Method Detail
-
applySculpt
public boolean applySculpt(boolean bAll)
Apply the sculpt region to the volume.- Overrides:
applySculpt
in classVolumeTriPlanarRenderBase
-
display
public void display(com.jogamp.opengl.GLAutoDrawable arg0)
- Specified by:
display
in interfacecom.jogamp.opengl.GLEventListener
- Overrides:
display
in classVolumeTriPlanarRenderBase
-
addConfiguredListener
public void addConfiguredListener(RendererListener listener)
-
dispose
public void dispose(com.jogamp.opengl.GLAutoDrawable kDrawable)
Description copied from class:GPURenderBase
memory cleanup.- Specified by:
dispose
in interfacecom.jogamp.opengl.GLEventListener
- Overrides:
dispose
in classVolumeTriPlanarRenderBase
-
setVOILatticeManager
public void setVOILatticeManager(VOILatticeManagerInterface newVOIInterface)
-
clear3DSelection
public void clear3DSelection()
-
annotationPrefix
public java.lang.String annotationPrefix()
-
doAutomaticLabels
public boolean doAutomaticLabels()
-
is3DSelectionEnabled
public boolean is3DSelectionEnabled()
-
isEditAnnotations
public boolean isEditAnnotations()
-
deleteSelectedPoint
public void deleteSelectedPoint()
-
moveSelectedPoint
public void moveSelectedPoint(WildMagic.LibFoundation.Mathematics.Vector3f direction)
-
hasSelectedPoint
public boolean hasSelectedPoint()
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
Part of the KeyListener interface. Pressing 'b' toggles displaying the proxy-geometry versus the ray-traced volume.- Specified by:
keyPressed
in interfacejava.awt.event.KeyListener
- Overrides:
keyPressed
in classVolumeTriPlanarRenderBase
- Parameters:
e
- the key event.
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent e)
- Specified by:
keyReleased
in interfacejava.awt.event.KeyListener
- Overrides:
keyReleased
in classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
Description copied from class:VolumeTriPlanarRenderBase
Rotates the object with a virtual trackball:- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
- Overrides:
mousePressed
in classVolumeTriPlanarRenderBase
- Parameters:
e
- the MouseEvent
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
Description copied from class:VolumeTriPlanarRenderBase
Rotates the object with a virtual trackball:- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
- Overrides:
mouseReleased
in classVolumeTriPlanarRenderBase
- Parameters:
e
- the MouseEvent
-
setDefaultCursor
public void setDefaultCursor()
-
select3DMarker
public boolean select3DMarker(WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt, boolean rightMouse, boolean multiSelect)
-
modify3DMarker
public boolean modify3DMarker(WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt)
-
add3DMarker
public void add3DMarker(VOI textVOI, boolean automaticLabel, boolean multiSelect, boolean isShift)
-
add3DMarker
public void add3DMarker(VOI textVOI, boolean automaticLabel, boolean multiSelect)
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
Rotates the object with a virtual trackball:- Specified by:
mouseDragged
in interfacejava.awt.event.MouseMotionListener
- Overrides:
mouseDragged
in classVolumeTriPlanarRenderBase
- Parameters:
e
- the MouseEvent
-
processRightMouseDrag
private void processRightMouseDrag(java.awt.event.MouseEvent kEvent)
If the right mouse button is pressed and dragged. processRightMouseDrag updates the HistoLUT window and level (contrast and brightness)- Parameters:
kEvent
- the mouse event generated by a mouse drag
-
setWindowLevel
private void setWindowLevel(float fX, float fY, boolean first)
-
undoSculpt
public void undoSculpt(boolean bAll)
Undo applying the sculpt region to the volume.- Overrides:
undoSculpt
in classVolumeTriPlanarRenderBase
-
CreateScene
protected void CreateScene()
Called by the init() function. Creates and initialized the scene-graph.- Overrides:
CreateScene
in classVolumeTriPlanarRenderBase
-
reCreateScene
public void reCreateScene(VolumeImage image)
Description copied from class:VolumeTriPlanarRenderBase
Called by the init() function. Creates and initialized the scene-graph.- Overrides:
reCreateScene
in classVolumeTriPlanarRenderBase
-
Pick
protected void Pick()
Picking. If a display list object has picking enabled, find the picked polygon based on the mouse position.- Overrides:
Pick
in classVolumeTriPlanarRenderBase
-
PickVolume3D
private void PickVolume3D(WildMagic.LibFoundation.Mathematics.Vector3f kPos, WildMagic.LibFoundation.Mathematics.Vector3f kDir, WildMagic.LibFoundation.Mathematics.Vector3f maxPt)
-
PickSlice3D
private boolean PickSlice3D(WildMagic.LibFoundation.Mathematics.Vector3f kPos, WildMagic.LibFoundation.Mathematics.Vector3f kDir, WildMagic.LibFoundation.Mathematics.Vector3f maxPt)
-
update4D
protected void update4D(boolean bForward)
- Overrides:
update4D
in classVolumeTriPlanarRenderBase
-
updateVOIs
public void updateVOIs()
-
updateVOIs
protected void updateVOIs(VOIVector kVOIs)
- Overrides:
updateVOIs
in classVolumeTriPlanarRenderBase
-
addSphere
private void addSphere(WildMagic.LibFoundation.Mathematics.Vector3f center, int index)
-
toggleNavigation
public void toggleNavigation(boolean _isNavigationEnabled)
Toggle Navigation mode.- Overrides:
toggleNavigation
in classVolumeTriPlanarRenderBase
- Parameters:
isNavigationEnabled
- is navigation checkbox selected or not.
-
setPathPlanningFlythru
public void setPathPlanningFlythru(boolean _isPathPlanning)
-
setMouseControlFlythru
public void setMouseControlFlythru(boolean _isMouseControl)
-
setAnnotationMode
public void setAnnotationMode(boolean _isAnnotateEnabled)
-
setupNavigationScenegraph
public void setupNavigationScenegraph()
Setup the Navigation scene graph view for debugging purpose
-
viewChanged
public void viewChanged(NavigationBehavior behavior, int iEvent)
Navigation behavior callback handler- Specified by:
viewChanged
in interfaceNavigationBehavior.Callback
- Parameters:
behavior
- reference to this MjFlyPathBehavior in which the view changed.iEvent
- Bitmask identifies the event(s) which caused the view to change. Bitmask created from OR of EVENT_* defintions.
-
getPositionScaled
public WildMagic.LibFoundation.Mathematics.Vector3f getPositionScaled(WildMagic.LibFoundation.Mathematics.Vector3f kPoint)
Scaled coordinates for the current position along the path for viewing.- Parameters:
Point
- in normalized path coordinates.- Returns:
- Point3f A new instance created which contains the path position coordinates, scaled to match the TriMesh in JPanelSurface.
-
update4DVOIs
protected void update4DVOIs(boolean bForward)
- Overrides:
update4DVOIs
in classVolumeTriPlanarRenderBase
-
animateAlgorithm
private void animateAlgorithm()
-
addAnimationVOIs
public void addAnimationVOIs(VOIVector vois, JPanelAnnotationAnimation annotationAnimationPanel)
-
addSphereVOIs
public void addSphereVOIs(VOI annotations)
- Overrides:
addSphereVOIs
in classVolumeTriPlanarRenderBase
-
displayedNeurite
private boolean displayedNeurite(java.lang.String neuriteName)
-
updateNeurite
private void updateNeurite(java.lang.String neuriteName, java.lang.String[] names, WildMagic.LibFoundation.Mathematics.ColorRGB color)
-
updateContour
private void updateContour(VOIContour contour, VOI positions, java.lang.String[] names)
-
displayNeurite
public void displayNeurite(java.lang.String neuriteName, boolean display)
-
setNeuriteColor
public void setNeuriteColor(java.lang.String neuriteName, WildMagic.LibFoundation.Mathematics.ColorRGB color)
-
addNeurite
public void addNeurite(java.lang.String neuriteName, java.lang.String[] names, WildMagic.LibFoundation.Mathematics.ColorRGB color)
-
setAnnotationVOIColor
public void setAnnotationVOIColor(java.lang.String name, WildMagic.LibFoundation.Mathematics.ColorRGB color)
- Overrides:
setAnnotationVOIColor
in classVolumeTriPlanarRenderBase
-
setDisplayAnnotation
public void setDisplayAnnotation(java.lang.String name, boolean display)
-
getAnnotationInfo
public void getAnnotationInfo(java.lang.String name, boolean[] display, java.awt.Color[] color, float[] diameter, boolean[] displayLabel, java.awt.Color[] labelColor)
-
setAnnotationDiameter
public void setAnnotationDiameter(java.lang.String name, float diameter)
-
getSelectedVOI
public VOI getSelectedVOI(java.lang.String name)
-
setDisplayAnnotationLabel
public void setDisplayAnnotationLabel(java.lang.String name, boolean display)
-
smoothCurve
private WildMagic.LibFoundation.Curves.NaturalSpline3 smoothCurve(VOIContour curve, float[] time)
-
createTube
private WildMagic.LibGraphics.Surfaces.TubeSurface createTube(VOIContour neurite)
-
createNeuriteSurface
private WildMagic.LibGraphics.SceneGraph.TriMesh createNeuriteSurface(VOIContour neurite, WildMagic.LibFoundation.Mathematics.ColorRGB color, float radius)
-
play4DVOIs
public void play4DVOIs(boolean bOn)
- Overrides:
play4DVOIs
in classVolumeTriPlanarRenderBase
-
writeImage
public boolean writeImage()
Description copied from class:GPURenderBase
Writes a the frame buffer as a .jpg image to disk. The file name is captureImage + the image number.- Overrides:
writeImage
in classGPURenderBase
- Returns:
- true on successful write.
-
annotationVOIsUpdate
public void annotationVOIsUpdate(int value)
-
UpdateSceneRotation
protected void UpdateSceneRotation()
Description copied from class:GPURenderBase
Updates the displayed objects based on any user mouse rotation.- Overrides:
UpdateSceneRotation
in classVolumeTriPlanarRenderBase
-
updateSceneNodePoint
public void updateSceneNodePoint(java.lang.String name, WildMagic.LibFoundation.Mathematics.Vector3f position)
Currently only being used to update the picking point- Parameters:
name
- surface nameposition
- surface location
-
updateSlicesCenter
public void updateSlicesCenter(WildMagic.LibFoundation.Mathematics.Vector3f loc)
Update the bottom 3 planar view center
-
setCameraCenter
public void setCameraCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
Update the camera in 3D view window.- Parameters:
kCenter
- center in image space
-
addAnnotationPoint
public void addAnnotationPoint(WildMagic.LibFoundation.Mathematics.Vector3f point, WildMagic.LibFoundation.Mathematics.Vector3f scannerPt)
Add the annotation point- Parameters:
point
-
-
setCameraViewRotationDegree
public void setCameraViewRotationDegree(int degree)
Set camera view rotation degree- Parameters:
degree
-
-
generatePath
public void generatePath()
Generate the path planning path.
-
clearPath
public void clearPath()
Clear the annotated path
-
createBranchPathGeometryScaled
private WildMagic.LibGraphics.SceneGraph.Polyline createBranchPathGeometryScaled(int iBranch)
Translate the path points from image coordinate to view volume coordinate.- Parameters:
iBranch
-- Returns:
-
createAnnotatePoint
private void createAnnotatePoint(WildMagic.LibFoundation.Mathematics.Vector3f kPosition)
Create a new Annotation point at the position specified.- Parameters:
kPosition
- position of new annotation point.
-
-