Class VolumeTriPlanarRenderBase
- 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
-
- All Implemented Interfaces:
com.jogamp.opengl.GLEventListener
,SpaceNavigatorListener
,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:
VolumeTriPlanarRender
public class VolumeTriPlanarRenderBase extends GPURenderBase implements com.jogamp.opengl.GLEventListener, java.awt.event.KeyListener, java.awt.event.MouseMotionListener, java.awt.event.MouseListener, javax.swing.event.ChangeListener
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
VolumeTriPlanarRenderBase.JPanelGPU
-
Field Summary
Fields Modifier and Type Field Description private boolean
animateCurve
private LatticeModel
animateLatticeModel
private boolean
animateLattices
protected boolean
animateSlice
private boolean
animateStop
protected int
annotatePtsCounter
number of annotate points along the specified path.protected java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f>
annotatePtsList
annotate path planning points listprivate WildMagic.LibFoundation.Mathematics.Vector3f
cameraPosition
protected static com.jogamp.opengl.GLCapabilities
caps
private VolumeTriPlanarRenderBase.JPanelGPU
container
main container for this object, contains the scroll pane and the depth slider:protected float
fSample_mouseDragged
sample rate when mouse is dragged.protected float
fSample_mouseReleased
sample rate when mouse is released.protected static int
gl_height
protected static int
gl_width
protected static com.jogamp.opengl.GLProfile
glp
protected static boolean
init
protected boolean
isAnnotateEnabled
is annotation mode is enabled or not.protected boolean
isMouseControlEnabled
is mouse control enabled or not.protected boolean
isNavigationEnabled
is nagivation mode enabled or not.protected boolean
isPathPlanningEnabled
is path planning mode enabled or not.protected WildMagic.LibGraphics.SceneGraph.Polyline
kGeometryBranchPath
protected WildMagic.LibGraphics.SceneGraph.Polyline
kPoly
protected WildMagic.LibGraphics.SceneGraph.Node
kPolyNode
private VOIVector
lattice
protected boolean
latticeClip
protected WildMagic.LibFoundation.Mathematics.Vector3f[]
latticeClipAxes
protected WildMagic.LibFoundation.Mathematics.Box3f
latticeClipBox
protected float[]
latticeClipExtents
protected WildMagic.LibFoundation.Mathematics.Vector3f
latticeClipPos
protected float[]
m_afArbEquation
Arbitrary clip plane equation:protected float[]
m_afArbEquationInv
protected WildMagic.LibGraphics.Rendering.Texture[]
m_akSceneTarget
protected WildMagic.LibFoundation.Mathematics.ColorRGB[]
m_akSlicesColor
protected boolean
m_bArbClipOn
Enable Arbitrary clip plane:protected boolean
m_bCrop
Set to true when cropping the volume in the shader.protected boolean
m_bDisplay
protected boolean
m_bDisplaySecond
Enables/Disables rendering the second pass.protected boolean
m_bDropper
protected boolean
m_bErase
protected boolean
m_bFirstDisplay
protected boolean
m_bFirstRender
The first time the frame is rendererd use the shader to calculate the normals for the volume data.protected boolean
m_bGeodesicEnabled
Geodesic enabled on/off.protected boolean
m_bPaint
protected boolean
m_bPaintCan
protected boolean
m_bPaintEnabled
Painting parameters:protected boolean
m_bPickCorrespondence
BrainSurfaceFlattener pick correspondence enabled on/off.protected boolean
m_bPlay4D
protected boolean
m_bPlay4DVOIs
protected boolean
m_bResetImages
protected boolean
m_bUpdateCenterOnDisplay
protected boolean
m_bWriteImage
protected float
m_fAnimateRate
protected int
m_iAnimateCount
protected int
m_iBrushSize
protected int
m_iExtractLevel
Intensity level for GPU-surface extraction.protected int
m_iStereo
Stereo on/off.protected WildMagic.LibFoundation.Mathematics.Vector4f
m_kArbitraryClip
protected WildMagic.LibFoundation.Mathematics.Vector4f
m_kArbitraryClipInv
protected VolumeDTI
m_kDTIDisplay
DTI renderer.protected WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer
m_kFBO
protected FlyPathGraphCurve
m_kFlyPathGraphCurve
Fly path curve.protected WildMagic.LibFoundation.Mathematics.Vector3f
m_kNewCenter
protected WildMagic.LibFoundation.Mathematics.ColorRGB
m_kNormalColorPathUnvisited
Color for the parts of the path that have not yet been visited (Dark Green)protected WildMagic.LibFoundation.Mathematics.ColorRGBA
m_kPaintColor
protected Sculptor_WM
m_kSculptor
New sculpting object for WM-based sculpting.protected VolumeSlices
m_kSlices
3D Slice renderer.protected VolumeBoundingBox
m_kVolumeBox
Volume bounding box renderer.protected VolumeClip
m_kVolumeClip
Clipping planes rendererprotected VolumeOrientationCube
m_kVolumeCube
Orientation cube rendererprotected VolumeRayCast
m_kVolumeRayCast
GPU-based ray cast renderer.protected WildMagic.LibGraphics.SceneGraph.TriMesh
m_pkPlane
protected WildMagic.LibGraphics.Rendering.Camera
m_pkScreenCamera
protected WildMagic.LibGraphics.Effects.ShaderEffect
m_spkPlaneEffect
protected static WildMagic.LibGraphics.Rendering.Texture[]
ms_akLUTTexture
protected static int
ms_NumHistogramLUTs
protected NavigationBehavior
navigationBehavior
navigation behavior.private javax.swing.JLabel
opacityLabel
private javax.swing.JSlider
opacitySlider
Opacity sliders for when this renderer is displayed as a stand-alone app.private WildMagic.LibGraphics.SceneGraph.TriMesh
plane
private java.lang.String
planeName
private VOI
planeVOI
(package private) boolean
profile
private int
screenShotRotateCount
private java.util.Vector<java.awt.image.BufferedImage>
screenShots
private int
segmentIndex
private static long
serialVersionUID
protected com.jogamp.opengl.GLOffscreenAutoDrawable
sharedDrawable
protected VolumeTriPlanarRender
sharedRenderer
protected int
sliceDir
protected WildMagic.LibFoundation.Mathematics.Vector3f
sphereClip
protected float
sphereRadius
private boolean
takeScreenShot
-
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 VolumeTriPlanarRenderBase()
Default Constructor.VolumeTriPlanarRenderBase(com.jogamp.opengl.util.Animator kAnimator, VolumeImage kVolumeImageA, VolumeImage kVolumeImageB)
Construct the Volume/Surface/Tri-Planar renderer.VolumeTriPlanarRenderBase(VolumeTriPlanarRenderBase kShared, com.jogamp.opengl.awt.GLCanvas kCanvas, VolumeImage kVolumeImageA, VolumeImage kVolumeImageB)
Construct the Volume/Surface/Tri-Planar renderer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAnimationLattice(VOIVector latticeAnim)
void
addAnimationVOIs(VOIVector vois)
void
addGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kSurface, WildMagic.LibGraphics.SceneGraph.Geometry kNew, int iGroup)
Add a new geodesic component to the surface.void
addSphereVOIs(VOI annotations)
void
addSurface(SurfaceState kSurface)
Add surfaces to the display list.void
addSurface(SurfaceState kSurface, boolean isFileCoords)
Add surfaces to the display list.void
addSurface(SurfaceState kSurface, boolean computeSurfaceMask, boolean isFileCoords)
void
addTract(VOIContour kContour, WildMagic.LibGraphics.SceneGraph.Polyline kLine, int iGroup)
Add tract into the DTI displayvoid
addVolumeVOI(VolumeVOI kVOI)
protected void
applyClipFilter(boolean clip)
boolean
applySculpt(boolean bAll)
Apply the sculpt region to the volume.void
blend(java.lang.String kSurfaceName, float fValue)
Sets blending between imageA and imageB.void
clearSculpt()
Clear the sculpt region.protected boolean
clipAnnotations(VOIWormAnnotation text)
void
CMPMode()
Display the volume in Composite mode.private void
createContainer(com.jogamp.opengl.awt.GLCanvas canvas)
Creates the containing JPanel that will display this object.protected void
CreateRenderTarget(com.jogamp.opengl.GLAutoDrawable kDrawable, int iWidth, int iHeight, boolean forceReload)
Creates the three render-to-texture targets for rendering semi-transparent surfaces.private void
createSamplePlane(VOIBase box)
protected void
CreateScene()
Called by the init() function.void
cropClipVolume()
Crop the clipped volume.void
deleteVOIs(VOIVector kVOIs)
void
display(com.jogamp.opengl.GLAutoDrawable arg0)
void
displayArbitraryClipPlane(boolean bDisplay)
Displays the arbitrary clip plane position.void
displayBoundingBox(boolean bDisplay)
Called from JPanelDisplay.void
displayClipPlane(int iWhich, boolean bDisplay)
Called from JPanelClip.void
displayClipPlane(int iWhich, boolean bDisplay, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Called from JPanelClip.void
displayNode(WildMagic.LibGraphics.SceneGraph.Node kNode, boolean bDisplay)
Toggle display of the scene-graphe node on/off.void
displayOrientationCube(boolean bDisplay)
Called from JPanelDisplay.void
displaySurface(boolean bDisplay)
Toggle surface display on/off.void
displayVOIs(boolean bDisplay)
Toggle surface display on/off.void
displayVolumeRaycast(boolean bDisplay)
Toggle volume display on/off.void
displayVolumeSlices(boolean bDisplay)
Toggle 3D Slice display on/off.void
dispose(com.jogamp.opengl.GLAutoDrawable kDrawable)
memory cleanup.protected void
disposeShared(VolumeImage imageA, VolumeImage imageB)
protected void
doClip(boolean bEnable)
Calculates the rotation for the arbitrary clip plane.boolean
drawVOI(VOIBase kVOI, VolumeTriPlanarRenderBase kDisplay, VolumeImage kVolumeImage, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate)
void
DRRMode()
Display the volume in DDR mode.void
enableArbitraryClipPlane(boolean bEnable, boolean bDisplay, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Enables the arbitrary clip plane position.void
enableClipPlane(int iWhich, boolean bEnable, boolean bDisplay)
Enables the axis-aligned clipping planes.void
enableEyeClipPlane(boolean bEnable, boolean bDisplay, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Enables the eye clip plane.void
enableEyeInvClipPlane(boolean bEnable, boolean bDisplay, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Enables the inverse-eye clip plane.void
enableGeodesic(boolean bEnable)
Enable geodesic curve calculations/display.void
enablePaint(WildMagic.LibFoundation.Mathematics.ColorRGBA kPaintColor, int iBrushSize, boolean bEnabled, boolean bPaint, boolean bDropper, boolean bPaintCan, boolean bErase)
Enable painting on TriMesh surfaces.void
enableSculpt(boolean bSculpt)
Enables and disables sculpting.void
eraseAllPaint()
Erase all surface paint.void
extractMeshFromVolume()
Extract a TriMesh surface from the Volume Rendering.float
getABBlend()
WildMagic.LibFoundation.Mathematics.Matrix3f
getArbitratyClip()
boolean
getArbitratyClipOn()
WildMagic.LibFoundation.Mathematics.Vector3f
getClip()
boolean[]
getClipAEEnable()
java.awt.Color[]
getClipColor()
boolean[]
getClipDisplay()
boolean[]
getClipEnable()
WildMagic.LibFoundation.Mathematics.Vector3f
getClipInv()
boolean[]
getClipInvDisplay()
boolean[]
getClipInvEnable()
javax.swing.JPanel
getContainingPanel()
Returns the container for this object.double
getDPIScale()
boolean
getGradientMagnitude()
WildMagic.LibFoundation.Mathematics.ColorRGB
getGroupColor(int groupID)
Get the group color with given group ID.static WildMagic.LibGraphics.Rendering.Texture
getHistogramLUTTexture(int index, boolean bReverse)
static int
getHistogramLUTTextureIndex(java.lang.String kCommand)
float
getIPD()
Sets the inter-pupillary distance for stereo rendering.WildMagic.LibGraphics.Rendering.MaterialState
getMaterial(java.lang.String kSurfaceName)
Return the material properties of the given surface.float
getOpacity(java.lang.String kSurfaceName)
Return the opacity properties of the given surface.java.util.Vector<VOIContour>
getPolylines(int iGroup)
Sculptor_WM
getSculpt()
boolean
getSculptEnabled()
Returns true when sculpting is enabled.WildMagic.LibGraphics.SceneGraph.TriMesh
getSurface(java.lang.String kSurfaceName)
Return the TriMesh surface with the given name.float
getSurfaceArea(java.lang.String kSurfaceName)
Return the surface area for the given TriMesh surface.java.lang.String
getSurfaceAreaString(java.lang.String kSurfaceName)
Return the surface area for the given TriMesh surface.WildMagic.LibFoundation.Mathematics.Vector3f
getSurfaceCenter(java.lang.String kSurfaceName)
Return the center of the TriMesh surface.float
getSurfaceVolume(java.lang.String kSurfaceName)
Return the volume of the TriMesh surface.java.lang.String
getSurfaceVolumeString(java.lang.String kSurfaceName)
Return the volume of the TriMesh surface.WildMagic.LibFoundation.Mathematics.Vector3f
getTranslateSurface(java.lang.String kSurfaceName)
Return the translation vector for the surface with the given name.VolumeSurface
getVolumeSurface(java.lang.String kSurfaceName)
Return the TriMesh surface with the given name.void
init()
void
init(com.jogamp.opengl.GLAutoDrawable arg0)
Part of the GLEventListener interface.static boolean
initClass()
private void
initLUT(WildMagic.LibGraphics.Rendering.Texture[] m_akLUTTexture, ModelLUT kLUT, int index)
protected void
initShared(VolumeTriPlanarInterface kParent)
void
invertSculpt()
Invert the sculpt region.void
keyPressed(java.awt.event.KeyEvent e)
Part of the KeyListener interface.private void
loadShared()
void
MIPMode()
Display the volume in MIP mode.void
mouseClicked(java.awt.event.MouseEvent arg0)
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:protected void
Move()
Updates the camera and displayed objects for rendering.void
MULTIHISTOMode(boolean bOn)
Display the volume in Mullti-histo mode.com.jogamp.opengl.awt.GLCanvas
newSharedCanvas()
(package private) void
NormalKernel(float[] a, float[] b, int width, int height, int depth, int color, int numElements)
protected void
Pick()
Picking.void
pickCorrespondence(boolean bOn)
Enables/disables picking correspondence points between the mesh and BrainSurfaceFlattener render.void
play4D(boolean bOn)
boolean
play4DVOIs()
void
play4DVOIs(boolean bOn)
void
reCreateScene(VolumeImage image)
Called by the init() function.void
reCreateScene(VolumeImage imageA, VolumeImage imageB)
void
redrawSurfaceTexture()
Causes the texture representation of all the surface meshes to be recalculated.protected void
releaseShared()
void
reloadShaders()
Called by the ApplicationGUI.void
removeAll(java.lang.String kSurfaceName)
void
removeAllGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kSurface)
Removes all geodesic components from the given surface.void
removeAllSurfaces()
void
removeGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kSurface, int iNode, int iGroup)
Removes the specific geodesic component from the given surface.void
removePolyline(int iGroup)
Removes the specified polyline tract group.void
removeSurface(java.lang.String kSurfaceName)
Sets blending between imageA and imageB.protected void
Render(com.jogamp.opengl.GLAutoDrawable kDraw)
Render the display list objects without the raycast volume.private void
RenderSculpt()
Render the sculpt image.private void
RenderWithTransparency(boolean bPreRender, WildMagic.LibFoundation.Mathematics.Vector2d[] sortedList)
Rendering multiple translucent surfaces is accomplished with the following steps: 1.void
replaceGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kOld, WildMagic.LibGraphics.SceneGraph.TriMesh kNew)
When the Geodesic object cuts the mesh along an open curve, the old mesh changes, but does not need to be deleted and no new mesh needs to be added.void
resetView()
void
reshape(com.jogamp.opengl.GLAutoDrawable arg0, int iX, int iY, int iWidth, int iHeight)
Part of the GLEventListener interface.void
rollbackToCenter()
Roll back the image back to center, reset the camera view close to original view.boolean
save(FileWriteOptions options, int filterType)
Save the sculpted volume.void
saveCroppedImage()
Copies the volume data from the texture representation into the ModelImage and writes it to disk.void
selfShadow(boolean bShadow)
Enables/Disables self-shadowing in the Surface mode.void
setABBlend(float fValue)
Sets blending between imageA and imageB.void
setAnimationSpeed(float fValue)
void
setAnimationSpeed(int value)
void
setAnnotationVOIColor(java.lang.String name, WildMagic.LibFoundation.Mathematics.ColorRGB color)
void
setArbColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the arbitrary clip plane color.void
setArbitraryClipPlane(float f4, boolean bEnable, float thickness)
Enables the arbitrary clip plane position.void
setArbitratyClip(WildMagic.LibFoundation.Mathematics.Matrix3f kRotate)
void
setArbitratyClip(WildMagic.LibFoundation.Mathematics.Matrix3f kRotate, boolean on)
void
setBackface(java.lang.String kSurfaceName, boolean bOn)
Turn backface culling on/off for the given surface.void
setBackgroundColor(WildMagic.LibFoundation.Mathematics.ColorRGBA kColor)
Sets the background color.void
setBoundingBoxColor(int i, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the color for the input slice frame.void
setBoundingBoxColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Called from JPanelDisplay.void
setCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
Sets the position of the 3D slices.void
setClipping(java.lang.String kSurfaceName, boolean bClip)
Enable clipping for the given surface.void
setClipPlane(int iWhich, float fValue, boolean bEnable)
Called from JPanelClip.void
setClipPlaneColor(int iWhich, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the axis-aligned clip plane color.void
setColor(java.lang.String kSurfaceName, WildMagic.LibFoundation.Mathematics.ColorRGB kColor, boolean bUpdate)
void
SetCustomBlend(int iBlendEquation, int iLogicOp, int iSrcBlend, int iDstBlend, WildMagic.LibFoundation.Mathematics.ColorRGBA kColor)
void
setDisplayAllGlyphs(boolean bDisplay)
Turns on/off displaying all the glyphs.void
setDisplayArrows(boolean bDisplay)
Turns on/off displaying the fiber bundle tracts with 3D arrows.void
setDisplayCylinders(boolean bDisplay)
Turns on/off displaying the fiber bundle tracts with ellipsoids.void
setDisplayEllipsoids(boolean bDisplay)
Turns on/off displaying the fiber bundle tracts with ellipsoids.void
setDisplayTubes(boolean bDisplay)
Turns on/off displaying the fiber bundle tracts with tubes.void
setDrawingShape(int shape)
Sets the sculpt drawing shape.void
setDTIImage(ModelImage kDTIImage, ModelImage kEigenVectorImage, ModelImage kEigenValueImage)
Sets the DTI Image for displaying the tensors as ellipsoids.void
setEllipseMod(int iMod)
Set the m_iEllipsoidMod value.void
setEyeClipPlane(float f4, boolean bDisplay, boolean bEnable)
Sets the eye clip plane position.void
setEyeColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the eye clip plane color.void
setEyeInvClipPlane(float f4, boolean bDisplay, boolean bEnable)
Sets the inverse-eye clip plane position.void
setEyeInvColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the inverse-eye clip plane color.void
setGradientMagnitude(boolean bShow)
Enables/Disables Gradient Magnitude filter.void
setHyperStack(VolumeImage[] images, WildMagic.LibGraphics.Rendering.Texture colormap)
void
setImageB(VolumeImage imageB)
void
setImageNew(java.lang.String kSurfaceName, ModelImage kImage)
Sets the ModelImage to use as an alternative to the volume ModelImage for surface texturing.void
setImageOn(int which, boolean on)
void
setImages(VolumeImage imageA)
void
setIntenstityLevel(int iLevel)
Set intensity level for GPU-based surface extraction.void
setIPD(float fIPD)
Sets the inter-pupillary distance for stereo rendering.void
setLatticeClip(boolean clip, WildMagic.LibFoundation.Mathematics.Vector3f pos, WildMagic.LibFoundation.Mathematics.Vector3f[] axes, float[] extents)
void
setLUTNew(java.lang.String kSurfaceName, ModelStorageBase kLUT)
Sets the LUT to use as an alternative to the volume lut for surface texturing.void
setMaterial(java.lang.String kSurfaceName, WildMagic.LibGraphics.Rendering.MaterialState kMaterial, boolean bUpdate)
Sets the material for the given surface.void
setMouseRotationSpeed(float rotationSpeed)
Set the mouse rotation speed from the rotation control slidervoid
setMouseTranslationSpeed(float translationSpeed)
Set the mouse translation speed from the translation control slidervoid
setMouseZoomSpeed(float zoomSpeed)
Set the mouse zoom speed from the zoom control slidervoid
setPickable(java.lang.String kSurfaceName, boolean bOn)
Enable surface picking for the given surface.void
setPlaneConstant(float constant)
Set the VolumeRayCast front clipping plane constantvoid
setPolygonMode(java.lang.String kSurfaceName, WildMagic.LibGraphics.Rendering.WireframeState.FillMode eMode)
Set the polygon mode (FILL, LINE, POINT) for the given surface.void
setPolylineColor(int iGroup, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the polyline color for the specified fiber bundle tract group.void
setRGBTA(ModelRGB RGBT)
void
setRGBTB(ModelRGB RGBT)
void
setSliceOpacity(int i, float fAlpha)
Set the transparency value for the slice.void
setStereo(int iWhich)
Enable/disable stereo rendering.void
setSurfaceTexture(java.lang.String kSurfaceName, boolean bOn, boolean bUseNewImage, boolean bUseNewLUT)
Turns on surface texture display for the given surface.void
setView(WildMagic.LibFoundation.Mathematics.Vector3f[] basisVectors)
void
setVolumeBlend(float fBlend)
Sets the blend factor for displaying the ray-cast volume with other objects in the scene.void
setVolumeColor(boolean flag)
int
setVolumeSamplesMouseDragged(float fSample)
Set the sampling rate when the mouse is Dragged.int
setVolumeSamplesMouseReleased(float fSample)
Set the sampling rate when the mouse is released.void
showBoundingBox(int i, boolean bShow)
Turns on/off displaying the bounding box for the given plane.void
showSlice(int i, boolean bShow)
Turns on/off displaying the given plane.void
smoothMesh(java.lang.String kSurfaceName, int iteration, float alpha, boolean volumeLimit, float volumePercent)
Smooth the given surface.void
smoothThree(java.lang.String kSurfaceName, int iteration, float lambda, float mu)
Smooth the given surface.void
smoothTwo(java.lang.String kSurfaceName, int iteration, float fStiffness, boolean volumeLimit, float volumePercent)
Smooth the given surface.void
startRecording()
void
startStopVOIAnimation()
void
stateChanged(javax.swing.event.ChangeEvent arg0)
void
SURFASTMode()
Display the volume in Surface mode.void
SURMode()
Display the volume in Composite Surface mode.void
toggleDisplaySurface()
Toggle Surface display on/off.void
toggleDisplayVOI()
Toggle 3D VOI display on/off.void
toggleDisplayVolume()
Toggle 3D Volume display on/off.void
toggleDisplayVolumeSlices()
Toggle 3D Slice display on/off.void
toggleGeodesicPathDisplay(java.lang.String kSurfaceName, int iWhich)
Switches between different ways of displaying the geodesic path (Euclidean, Geodesic, or Mesh).void
toggleNavigation(boolean _isNavigationEnabled)
Toggle navigation fly-thru tracking modevoid
translateSurface(java.lang.String kSurfaceName, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate)
Changes the translation vector for the surface with the given name.void
undoSculpt(boolean bAll)
Undo applying the sculpt region to the volume.protected void
update4D(boolean bForward)
protected void
update4DVOIs(boolean bForward)
protected void
updateCenterOnDisplay()
void
updateData()
Causes the VolumeShader to update the copy of the ModelImage on the GPU.void
updateLevWidgetState(java.util.Vector<ClassificationWidget> kLWS)
protected void
UpdateSceneRotation()
Updates the displayed objects based on any user mouse rotation.protected static void
updateSphere(WildMagic.LibGraphics.SceneGraph.TriMesh sphere, float x, float y, float z, WildMagic.LibFoundation.Mathematics.ColorRGBA c)
protected void
updateVOIs(VOIVector kVOIs)
private void
writeData(java.lang.String fileName)
-
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, writeImage
-
Methods inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
DrawFrameRate, getCameraLocation, getCameraParameters, getObjectParameters, getObjectRotation, InitializeCameraMotion, InitializeCameraMotion, InitializeObjectMotion, keyReleased, 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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
glp
protected static com.jogamp.opengl.GLProfile glp
-
caps
protected static com.jogamp.opengl.GLCapabilities caps
-
gl_width
protected static int gl_width
-
gl_height
protected static int gl_height
-
sharedRenderer
protected VolumeTriPlanarRender sharedRenderer
-
sharedDrawable
protected com.jogamp.opengl.GLOffscreenAutoDrawable sharedDrawable
-
init
protected static boolean init
-
m_kSculptor
protected Sculptor_WM m_kSculptor
New sculpting object for WM-based sculpting.
-
m_afArbEquation
protected float[] m_afArbEquation
Arbitrary clip plane equation:
-
m_afArbEquationInv
protected float[] m_afArbEquationInv
-
m_kArbitraryClip
protected WildMagic.LibFoundation.Mathematics.Vector4f m_kArbitraryClip
-
m_kArbitraryClipInv
protected WildMagic.LibFoundation.Mathematics.Vector4f m_kArbitraryClipInv
-
m_bArbClipOn
protected boolean m_bArbClipOn
Enable Arbitrary clip plane:
-
m_bDisplaySecond
protected boolean m_bDisplaySecond
Enables/Disables rendering the second pass. When disabled, the back-facing polygons of the proxy-geometry are shown instead of the volume:
-
m_kSlices
protected VolumeSlices m_kSlices
3D Slice renderer.
-
m_akSlicesColor
protected WildMagic.LibFoundation.Mathematics.ColorRGB[] m_akSlicesColor
-
m_kVolumeRayCast
protected VolumeRayCast m_kVolumeRayCast
GPU-based ray cast renderer.
-
m_kVolumeClip
protected VolumeClip m_kVolumeClip
Clipping planes renderer
-
m_kDTIDisplay
protected VolumeDTI m_kDTIDisplay
DTI renderer.
-
m_kVolumeBox
protected VolumeBoundingBox m_kVolumeBox
Volume bounding box renderer.
-
m_kVolumeCube
protected VolumeOrientationCube m_kVolumeCube
Orientation cube renderer
-
m_bFirstRender
protected boolean m_bFirstRender
The first time the frame is rendererd use the shader to calculate the normals for the volume data.
-
m_bFirstDisplay
protected boolean m_bFirstDisplay
-
m_bResetImages
protected boolean m_bResetImages
-
m_bPaintEnabled
protected boolean m_bPaintEnabled
Painting parameters:
-
m_bPaint
protected boolean m_bPaint
-
m_bErase
protected boolean m_bErase
-
m_bDropper
protected boolean m_bDropper
-
m_bPaintCan
protected boolean m_bPaintCan
-
m_kPaintColor
protected WildMagic.LibFoundation.Mathematics.ColorRGBA m_kPaintColor
-
m_iBrushSize
protected int m_iBrushSize
-
m_bGeodesicEnabled
protected boolean m_bGeodesicEnabled
Geodesic enabled on/off.
-
m_iStereo
protected int m_iStereo
Stereo on/off.
-
m_bPickCorrespondence
protected boolean m_bPickCorrespondence
BrainSurfaceFlattener pick correspondence enabled on/off.
-
m_bCrop
protected boolean m_bCrop
Set to true when cropping the volume in the shader.
-
m_iExtractLevel
protected int m_iExtractLevel
Intensity level for GPU-surface extraction.
-
fSample_mouseReleased
protected float fSample_mouseReleased
sample rate when mouse is released.
-
fSample_mouseDragged
protected float fSample_mouseDragged
sample rate when mouse is dragged.
-
m_bPlay4D
protected boolean m_bPlay4D
-
m_bPlay4DVOIs
protected boolean m_bPlay4DVOIs
-
m_fAnimateRate
protected float m_fAnimateRate
-
m_iAnimateCount
protected int m_iAnimateCount
-
m_kFBO
protected WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer m_kFBO
-
m_spkPlaneEffect
protected WildMagic.LibGraphics.Effects.ShaderEffect m_spkPlaneEffect
-
m_pkPlane
protected WildMagic.LibGraphics.SceneGraph.TriMesh m_pkPlane
-
m_pkScreenCamera
protected WildMagic.LibGraphics.Rendering.Camera m_pkScreenCamera
-
m_bUpdateCenterOnDisplay
protected boolean m_bUpdateCenterOnDisplay
-
m_kNewCenter
protected WildMagic.LibFoundation.Mathematics.Vector3f m_kNewCenter
-
m_bDisplay
protected boolean m_bDisplay
-
m_akSceneTarget
protected WildMagic.LibGraphics.Rendering.Texture[] m_akSceneTarget
-
m_bWriteImage
protected boolean m_bWriteImage
-
ms_NumHistogramLUTs
protected static int ms_NumHistogramLUTs
-
ms_akLUTTexture
protected static WildMagic.LibGraphics.Rendering.Texture[] ms_akLUTTexture
-
container
private VolumeTriPlanarRenderBase.JPanelGPU container
main container for this object, contains the scroll pane and the depth slider:
-
isNavigationEnabled
protected boolean isNavigationEnabled
is nagivation mode enabled or not.
-
navigationBehavior
protected NavigationBehavior navigationBehavior
navigation behavior.
-
annotatePtsCounter
protected int annotatePtsCounter
number of annotate points along the specified path.
-
annotatePtsList
protected java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f> annotatePtsList
annotate path planning points list
-
m_kNormalColorPathUnvisited
protected WildMagic.LibFoundation.Mathematics.ColorRGB m_kNormalColorPathUnvisited
Color for the parts of the path that have not yet been visited (Dark Green)
-
m_kFlyPathGraphCurve
protected FlyPathGraphCurve m_kFlyPathGraphCurve
Fly path curve.
-
isPathPlanningEnabled
protected boolean isPathPlanningEnabled
is path planning mode enabled or not.
-
isMouseControlEnabled
protected boolean isMouseControlEnabled
is mouse control enabled or not.
-
isAnnotateEnabled
protected boolean isAnnotateEnabled
is annotation mode is enabled or not.
-
kPolyNode
protected WildMagic.LibGraphics.SceneGraph.Node kPolyNode
-
kPoly
protected WildMagic.LibGraphics.SceneGraph.Polyline kPoly
-
kGeometryBranchPath
protected WildMagic.LibGraphics.SceneGraph.Polyline kGeometryBranchPath
-
cameraPosition
private WildMagic.LibFoundation.Mathematics.Vector3f cameraPosition
-
profile
boolean profile
-
opacitySlider
private javax.swing.JSlider opacitySlider
Opacity sliders for when this renderer is displayed as a stand-alone app.
-
opacityLabel
private javax.swing.JLabel opacityLabel
-
sphereClip
protected WildMagic.LibFoundation.Mathematics.Vector3f sphereClip
-
sphereRadius
protected float sphereRadius
-
latticeClip
protected boolean latticeClip
-
latticeClipPos
protected WildMagic.LibFoundation.Mathematics.Vector3f latticeClipPos
-
latticeClipAxes
protected WildMagic.LibFoundation.Mathematics.Vector3f[] latticeClipAxes
-
latticeClipExtents
protected float[] latticeClipExtents
-
latticeClipBox
protected WildMagic.LibFoundation.Mathematics.Box3f latticeClipBox
-
animateLattices
private boolean animateLattices
-
animateStop
private boolean animateStop
-
takeScreenShot
private boolean takeScreenShot
-
screenShotRotateCount
private int screenShotRotateCount
-
animateCurve
private boolean animateCurve
-
animateSlice
protected boolean animateSlice
-
sliceDir
protected int sliceDir
-
animateLatticeModel
private LatticeModel animateLatticeModel
-
lattice
private VOIVector lattice
-
planeVOI
private VOI planeVOI
-
segmentIndex
private int segmentIndex
-
plane
private WildMagic.LibGraphics.SceneGraph.TriMesh plane
-
planeName
private java.lang.String planeName
-
screenShots
private java.util.Vector<java.awt.image.BufferedImage> screenShots
-
-
Constructor Detail
-
VolumeTriPlanarRenderBase
public VolumeTriPlanarRenderBase()
Default Constructor.
-
VolumeTriPlanarRenderBase
public VolumeTriPlanarRenderBase(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.
-
VolumeTriPlanarRenderBase
public VolumeTriPlanarRenderBase(VolumeTriPlanarRenderBase kShared, com.jogamp.opengl.awt.GLCanvas kCanvas, 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.
-
-
Method Detail
-
initClass
public static boolean initClass()
-
newSharedCanvas
public com.jogamp.opengl.awt.GLCanvas newSharedCanvas()
-
addGeodesic
public void addGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kSurface, WildMagic.LibGraphics.SceneGraph.Geometry kNew, int iGroup)
Add a new geodesic component to the surface.- Parameters:
kSurface
- the surface the geodesic component is added to.kNew
- the new geodesic component.iGroup
- the display group to add to.
-
addSurface
public void addSurface(SurfaceState kSurface)
Add surfaces to the display list.- Parameters:
akSurfaces
-
-
addSurface
public void addSurface(SurfaceState kSurface, boolean isFileCoords)
Add surfaces to the display list.- Parameters:
akSurfaces
-
-
addSurface
public void addSurface(SurfaceState kSurface, boolean computeSurfaceMask, boolean isFileCoords)
-
addTract
public void addTract(VOIContour kContour, WildMagic.LibGraphics.SceneGraph.Polyline kLine, int iGroup)
Add tract into the DTI display- Parameters:
kLine
- polylineiGroup
- counter numbercenterIndex
- center index color
-
addVolumeVOI
public void addVolumeVOI(VolumeVOI kVOI)
-
applySculpt
public boolean applySculpt(boolean bAll)
Apply the sculpt region to the volume.
-
blend
public void blend(java.lang.String kSurfaceName, float fValue)
Sets blending between imageA and imageB.- Parameters:
fValue
- the blend value (0-1)
-
clearSculpt
public void clearSculpt()
Clear the sculpt region.
-
CMPMode
public void CMPMode()
Display the volume in Composite mode.
-
cropClipVolume
public void cropClipVolume()
Crop the clipped volume.
-
Move
protected void Move()
Description copied from class:GPURenderBase
Updates the camera and displayed objects for rendering.- Overrides:
Move
in classGPURenderBase
-
display
public void display(com.jogamp.opengl.GLAutoDrawable arg0)
- Specified by:
display
in interfacecom.jogamp.opengl.GLEventListener
-
displayArbitraryClipPlane
public void displayArbitraryClipPlane(boolean bDisplay)
Displays the arbitrary clip plane position.- Parameters:
bDisplay
- on/off.
-
displayBoundingBox
public void displayBoundingBox(boolean bDisplay)
Called from JPanelDisplay. Sets the bounding box display on/off.- Parameters:
bDisplay
- on/off.
-
displayClipPlane
public void displayClipPlane(int iWhich, boolean bDisplay)
Called from JPanelClip. Sets the axis-aligned clip plane display on/off.- Parameters:
iWhich
- the clip plane to set.bDisplay
- on/off.
-
displayClipPlane
public void displayClipPlane(int iWhich, boolean bDisplay, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Called from JPanelClip. Sets the axis-aligned clip plane display on/off and color.- Parameters:
iWhich
- the clip plane to set.bDisplay
- on/off.kColor
- the clipping plane color.
-
displayNode
public void displayNode(WildMagic.LibGraphics.SceneGraph.Node kNode, boolean bDisplay)
Toggle display of the scene-graphe node on/off.- Parameters:
kNode
- the node to toggle.bDisplay
- on/off.
-
displayOrientationCube
public void displayOrientationCube(boolean bDisplay)
Called from JPanelDisplay. Sets the orientation cube display on/off.- Parameters:
bDisplay
- on/off.
-
displaySurface
public void displaySurface(boolean bDisplay)
Toggle surface display on/off.- Parameters:
bDisplay
-
-
displayVOIs
public void displayVOIs(boolean bDisplay)
Toggle surface display on/off.- Parameters:
bDisplay
-
-
displayVolumeRaycast
public void displayVolumeRaycast(boolean bDisplay)
Toggle volume display on/off.- Parameters:
bDisplay
-
-
displayVolumeSlices
public void displayVolumeSlices(boolean bDisplay)
Toggle 3D Slice display on/off.- Parameters:
bDisplay
-
-
toggleDisplayVolumeSlices
public void toggleDisplayVolumeSlices()
Toggle 3D Slice display on/off.
-
toggleDisplaySurface
public void toggleDisplaySurface()
Toggle Surface display on/off.
-
toggleDisplayVOI
public void toggleDisplayVOI()
Toggle 3D VOI display on/off.
-
toggleDisplayVolume
public void toggleDisplayVolume()
Toggle 3D Volume display on/off.
-
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 classGPURenderBase
-
initShared
protected void initShared(VolumeTriPlanarInterface kParent)
-
releaseShared
protected void releaseShared()
-
disposeShared
protected void disposeShared(VolumeImage imageA, VolumeImage imageB)
-
drawVOI
public boolean drawVOI(VOIBase kVOI, VolumeTriPlanarRenderBase kDisplay, VolumeImage kVolumeImage, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate)
-
DRRMode
public void DRRMode()
Display the volume in DDR mode.
-
enableArbitraryClipPlane
public void enableArbitraryClipPlane(boolean bEnable, boolean bDisplay, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Enables the arbitrary clip plane position.- Parameters:
bEnable
- clipping enabledbDisplay
- on/off.kColor
- the arbitrary clip plane color.
-
enableClipPlane
public void enableClipPlane(int iWhich, boolean bEnable, boolean bDisplay)
Enables the axis-aligned clipping planes.- Parameters:
iWhich
- the clip plane to enable.bEnable
- clipping enabledbDisplay
- on/off.
-
enableEyeClipPlane
public void enableEyeClipPlane(boolean bEnable, boolean bDisplay, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Enables the eye clip plane.- Parameters:
bEnable
- clipping enabledbDisplay
- on/off.kColor
- the eye clip plane color.
-
enableEyeInvClipPlane
public void enableEyeInvClipPlane(boolean bEnable, boolean bDisplay, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Enables the inverse-eye clip plane.- Parameters:
bEnable
- clipping enabledbDisplay
- on/off.kColor
- the inverse-eye clip plane color.
-
enableGeodesic
public void enableGeodesic(boolean bEnable)
Enable geodesic curve calculations/display.- Parameters:
bEnable
-
-
enablePaint
public void enablePaint(WildMagic.LibFoundation.Mathematics.ColorRGBA kPaintColor, int iBrushSize, boolean bEnabled, boolean bPaint, boolean bDropper, boolean bPaintCan, boolean bErase)
Enable painting on TriMesh surfaces.- Parameters:
kPaintColor
- paint color.iBrushSize
- brush size.bEnabled
- painting on/off.bPaint
- when true apply paint.bDropper
- when true do dropper mode.bPaintCan
- when true do paint can mode.bErase
- when true erase.
-
enableSculpt
public void enableSculpt(boolean bSculpt)
Enables and disables sculpting.- Parameters:
bSculpt
- true to enable sculpting, false to disable.
-
eraseAllPaint
public void eraseAllPaint()
Erase all surface paint.
-
extractMeshFromVolume
public void extractMeshFromVolume()
Extract a TriMesh surface from the Volume Rendering.
-
getABBlend
public float getABBlend()
-
getArbitratyClip
public WildMagic.LibFoundation.Mathematics.Matrix3f getArbitratyClip()
-
getArbitratyClipOn
public boolean getArbitratyClipOn()
-
getContainingPanel
public javax.swing.JPanel getContainingPanel()
Returns the container for this object. The container has a scroll pane and slider for the depth.- Returns:
-
getDPIScale
public double getDPIScale()
-
getGroupColor
public WildMagic.LibFoundation.Mathematics.ColorRGB getGroupColor(int groupID)
Get the group color with given group ID.- Parameters:
groupID
- given group id- Returns:
- ColorRGB group color
-
getIPD
public float getIPD()
Sets the inter-pupillary distance for stereo rendering.- Parameters:
fIPD
- the IPD value.
-
getMaterial
public WildMagic.LibGraphics.Rendering.MaterialState getMaterial(java.lang.String kSurfaceName)
Return the material properties of the given surface.- Parameters:
kSurfaceName
- the surface to query.- Returns:
- the material properties of the surface.
-
getOpacity
public float getOpacity(java.lang.String kSurfaceName)
Return the opacity properties of the given surface.- Parameters:
kSurfaceName
- the surface to query.- Returns:
- the opacity value of the surface.
-
getSculpt
public Sculptor_WM getSculpt()
-
getSculptEnabled
public boolean getSculptEnabled()
Returns true when sculpting is enabled.- Returns:
- true when sculpting is enabled, false otherwise.
-
getSurface
public WildMagic.LibGraphics.SceneGraph.TriMesh getSurface(java.lang.String kSurfaceName)
Return the TriMesh surface with the given name.- Parameters:
kSurfaceName
- the name of the surface.- Returns:
- TriMesh.
-
getVolumeSurface
public VolumeSurface getVolumeSurface(java.lang.String kSurfaceName)
Return the TriMesh surface with the given name.- Parameters:
kSurfaceName
- the name of the surface.- Returns:
- TriMesh.
-
getSurfaceArea
public float getSurfaceArea(java.lang.String kSurfaceName)
Return the surface area for the given TriMesh surface.- Parameters:
kSurfaceName
- the surface name.- Returns:
- the surface-area of the mesh.
-
getSurfaceAreaString
public java.lang.String getSurfaceAreaString(java.lang.String kSurfaceName)
Return the surface area for the given TriMesh surface.- Parameters:
kSurfaceName
- the surface name.- Returns:
- the surface-area of the mesh.
-
getSurfaceCenter
public WildMagic.LibFoundation.Mathematics.Vector3f getSurfaceCenter(java.lang.String kSurfaceName)
Return the center of the TriMesh surface.- Parameters:
kSurfaceName
- the surface name.- Returns:
- the calculated center.
-
getSurfaceVolume
public float getSurfaceVolume(java.lang.String kSurfaceName)
Return the volume of the TriMesh surface.- Parameters:
kSurfaceName
- the surface name.- Returns:
- the calculated volume.
-
getSurfaceVolumeString
public java.lang.String getSurfaceVolumeString(java.lang.String kSurfaceName)
Return the volume of the TriMesh surface.- Parameters:
kSurfaceName
- the surface name.- Returns:
- the calculated volume.
-
getTranslateSurface
public WildMagic.LibFoundation.Mathematics.Vector3f getTranslateSurface(java.lang.String kSurfaceName)
Return the translation vector for the surface with the given name.- Parameters:
kSurfaceName
- the surface to move.- Returns:
- the translation vector
-
init
public void init(com.jogamp.opengl.GLAutoDrawable arg0)
Part of the GLEventListener interface. Init is called once when the GLCanvas is first displayed. Called again if the GLCanvas is removed from the frame and added to another window or panel. Initializes the display.- Specified by:
init
in interfacecom.jogamp.opengl.GLEventListener
- Parameters:
arg0
- GLCanvas
-
setView
public void setView(WildMagic.LibFoundation.Mathematics.Vector3f[] basisVectors)
-
resetView
public void resetView()
-
init
public void init()
-
invertSculpt
public void invertSculpt()
Invert the sculpt region.
-
rollbackToCenter
public void rollbackToCenter()
Roll back the image back to center, reset the camera view close to original view.
-
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 classGPURenderBase
- Parameters:
e
- the key event.
-
MIPMode
public void MIPMode()
Display the volume in MIP mode.
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent arg0)
- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
- Overrides:
mouseClicked
in classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D
-
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 classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D
- Parameters:
e
- the MouseEvent
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
Rotates the object with a virtual trackball:- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
- Overrides:
mousePressed
in classGPURenderBase
- Parameters:
e
- the MouseEvent
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
Rotates the object with a virtual trackball:- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
- Overrides:
mouseReleased
in classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D
- Parameters:
e
- the MouseEvent
-
MULTIHISTOMode
public void MULTIHISTOMode(boolean bOn)
Display the volume in Mullti-histo mode.
-
pickCorrespondence
public void pickCorrespondence(boolean bOn)
Enables/disables picking correspondence points between the mesh and BrainSurfaceFlattener render.- Parameters:
bOn
-
-
play4D
public void play4D(boolean bOn)
-
addAnimationVOIs
public void addAnimationVOIs(VOIVector vois)
-
play4DVOIs
public void play4DVOIs(boolean bOn)
-
play4DVOIs
public boolean play4DVOIs()
-
startStopVOIAnimation
public void startStopVOIAnimation()
-
startRecording
public void startRecording()
-
setAnnotationVOIColor
public void setAnnotationVOIColor(java.lang.String name, WildMagic.LibFoundation.Mathematics.ColorRGB color)
-
redrawSurfaceTexture
public void redrawSurfaceTexture()
Causes the texture representation of all the surface meshes to be recalculated.
-
reloadShaders
public void reloadShaders()
Called by the ApplicationGUI. Causes the current shader to be reloaded from file, compiled and applied to the proxy-geometry.- Overrides:
reloadShaders
in classWildMagic.LibApplications.OpenGLApplication.Application
-
removeAllGeodesic
public void removeAllGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kSurface)
Removes all geodesic components from the given surface.- Parameters:
kSurface
-
-
removeGeodesic
public void removeGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kSurface, int iNode, int iGroup)
Removes the specific geodesic component from the given surface.- Parameters:
kSurface
-iNode
-iGroup
-
-
getPolylines
public java.util.Vector<VOIContour> getPolylines(int iGroup)
-
removePolyline
public void removePolyline(int iGroup)
Removes the specified polyline tract group.- Parameters:
iGroup
- the group of polylines to remove.
-
removeSurface
public void removeSurface(java.lang.String kSurfaceName)
Sets blending between imageA and imageB.- Parameters:
fValue
- the blend value (0-1)
-
removeAll
public void removeAll(java.lang.String kSurfaceName)
-
removeAllSurfaces
public void removeAllSurfaces()
-
replaceGeodesic
public void replaceGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kOld, WildMagic.LibGraphics.SceneGraph.TriMesh kNew)
When the Geodesic object cuts the mesh along an open curve, the old mesh changes, but does not need to be deleted and no new mesh needs to be added. This function allows the Geodesic object to replace the original mesh with the sliced mesh in the surface renderer. ReplaceMesh is also used to undo cutting operations.- Parameters:
kOld
- TriMesh old surface meshkNew
- TriMesh new surface mesh
-
reshape
public void reshape(com.jogamp.opengl.GLAutoDrawable arg0, int iX, int iY, int iWidth, int iHeight)
Description copied from class:GPURenderBase
Part of the GLEventListener interface. Called when the GLCanvas is resized.- Specified by:
reshape
in interfacecom.jogamp.opengl.GLEventListener
- Overrides:
reshape
in classGPURenderBase
- Parameters:
arg0
- the GLCanvasiX
- the new x-position in screen coordinates.iY
- the new y-position in screen coordinates.iWidth
- the new widthiHeight
- the new height
-
save
public boolean save(FileWriteOptions options, int filterType)
Save the sculpted volume.- Parameters:
options
- file writing optionsfiltertype
-- Returns:
- boolean, true on sucess.
-
saveCroppedImage
public void saveCroppedImage()
Copies the volume data from the texture representation into the ModelImage and writes it to disk.
-
selfShadow
public void selfShadow(boolean bShadow)
Enables/Disables self-shadowing in the Surface mode.- Parameters:
bShadow
- shadow on/off.
-
setABBlend
public void setABBlend(float fValue)
Sets blending between imageA and imageB.- Parameters:
fValue
- the blend value (0-1)
-
setAnimationSpeed
public void setAnimationSpeed(float fValue)
-
setAnimationSpeed
public void setAnimationSpeed(int value)
-
setArbColor
public void setArbColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the arbitrary clip plane color.- Parameters:
kColor
- the new color.
-
setArbitraryClipPlane
public void setArbitraryClipPlane(float f4, boolean bEnable, float thickness)
Enables the arbitrary clip plane position.- Parameters:
f4
- clip position (same value as aSlice in JPanelClip)
-
setArbitratyClip
public void setArbitratyClip(WildMagic.LibFoundation.Mathematics.Matrix3f kRotate)
-
setArbitratyClip
public void setArbitratyClip(WildMagic.LibFoundation.Mathematics.Matrix3f kRotate, boolean on)
-
setBackface
public void setBackface(java.lang.String kSurfaceName, boolean bOn)
Turn backface culling on/off for the given surface.- Parameters:
kSurfaceName
- surface name.bOn
-
-
setBackgroundColor
public void setBackgroundColor(WildMagic.LibFoundation.Mathematics.ColorRGBA kColor)
Sets the background color.- Parameters:
kColor
- new background color.
-
setBoundingBoxColor
public void setBoundingBoxColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Called from JPanelDisplay. Sets the bounding box color.- Parameters:
kColor
- bounding box color.
-
setBoundingBoxColor
public void setBoundingBoxColor(int i, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the color for the input slice frame.- Parameters:
i
- , the slice bounding frame.color
- the new color.
-
setCenter
public void setCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
Sets the position of the 3D slices.- Parameters:
kCenter
- the intersection point of the three slices.
-
setClipping
public void setClipping(java.lang.String kSurfaceName, boolean bClip)
Enable clipping for the given surface.- Parameters:
kSurfaceName
- the surface to modify.bClip
- true enables clipping, false disables clipping.
-
getClip
public WildMagic.LibFoundation.Mathematics.Vector3f getClip()
-
getClipEnable
public boolean[] getClipEnable()
-
getClipAEEnable
public boolean[] getClipAEEnable()
-
getClipDisplay
public boolean[] getClipDisplay()
-
getClipInv
public WildMagic.LibFoundation.Mathematics.Vector3f getClipInv()
-
getClipInvEnable
public boolean[] getClipInvEnable()
-
getClipInvDisplay
public boolean[] getClipInvDisplay()
-
getClipColor
public java.awt.Color[] getClipColor()
-
setClipPlane
public void setClipPlane(int iWhich, float fValue, boolean bEnable)
Called from JPanelClip. Sets the axis-aligned clip plane.- Parameters:
iWhich
- the clip plane to set.fValue
- the new position of the clip plane (the same value as the slider in JPanelClip).
-
setClipPlaneColor
public void setClipPlaneColor(int iWhich, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the axis-aligned clip plane color.- Parameters:
iWhich
- one of the 6 clip planeskColor
- the new color.
-
setColor
public void setColor(java.lang.String kSurfaceName, WildMagic.LibFoundation.Mathematics.ColorRGB kColor, boolean bUpdate)
- Parameters:
kSurfaceName
-kColor
-bUpdate
-
-
SetCustomBlend
public void SetCustomBlend(int iBlendEquation, int iLogicOp, int iSrcBlend, int iDstBlend, WildMagic.LibFoundation.Mathematics.ColorRGBA kColor)
-
setDisplayAllGlyphs
public void setDisplayAllGlyphs(boolean bDisplay)
Turns on/off displaying all the glyphs.- Parameters:
bDisplay
- when true display all the glyphs in the volume.
-
setDisplayArrows
public void setDisplayArrows(boolean bDisplay)
Turns on/off displaying the fiber bundle tracts with 3D arrows.- Parameters:
bDisplay
- when true display the tracts with 3D arrows.
-
setDisplayCylinders
public void setDisplayCylinders(boolean bDisplay)
Turns on/off displaying the fiber bundle tracts with ellipsoids.- Parameters:
bDisplay
- when true display the tracts with Cylinders.
-
setDisplayEllipsoids
public void setDisplayEllipsoids(boolean bDisplay)
Turns on/off displaying the fiber bundle tracts with ellipsoids.- Parameters:
bDisplay
- when true display the tracts with ellipsods.
-
setDisplayTubes
public void setDisplayTubes(boolean bDisplay)
Turns on/off displaying the fiber bundle tracts with tubes.- Parameters:
bDisplay
- when true display the tracts with tubes.
-
setDrawingShape
public void setDrawingShape(int shape)
Sets the sculpt drawing shape.- Parameters:
shape
- (0 = free-hand, 1 = rectangular)
-
setDTIImage
public void setDTIImage(ModelImage kDTIImage, ModelImage kEigenVectorImage, ModelImage kEigenValueImage)
Sets the DTI Image for displaying the tensors as ellipsoids.- Parameters:
kDTIImage
- .
-
setEllipseMod
public void setEllipseMod(int iMod)
Set the m_iEllipsoidMod value.- Parameters:
iMod
- new m_iEllipsoidMod value.
-
setEyeClipPlane
public void setEyeClipPlane(float f4, boolean bDisplay, boolean bEnable)
Sets the eye clip plane position.- Parameters:
f4
- clip position (same value as sSlice in JPanelClip)bDisplay
- on/off.
-
setEyeColor
public void setEyeColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the eye clip plane color.- Parameters:
kColor
- the new color.
-
setEyeInvClipPlane
public void setEyeInvClipPlane(float f4, boolean bDisplay, boolean bEnable)
Sets the inverse-eye clip plane position.- Parameters:
f4
- clip position (same value as sSliceInv in JPanelClip)bDisplay
- on/off.
-
setEyeInvColor
public void setEyeInvColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the inverse-eye clip plane color.- Parameters:
kColor
- the new color.
-
getGradientMagnitude
public boolean getGradientMagnitude()
-
setGradientMagnitude
public void setGradientMagnitude(boolean bShow)
Enables/Disables Gradient Magnitude filter.- Parameters:
bShow
- gradient magnitude filter on/off
-
setImages
public void setImages(VolumeImage imageA)
-
setImageB
public void setImageB(VolumeImage imageB)
-
setHyperStack
public void setHyperStack(VolumeImage[] images, WildMagic.LibGraphics.Rendering.Texture colormap)
-
setImageOn
public void setImageOn(int which, boolean on)
-
setImageNew
public void setImageNew(java.lang.String kSurfaceName, ModelImage kImage)
Sets the ModelImage to use as an alternative to the volume ModelImage for surface texturing.- Parameters:
kSurfaceName
- the surface to modify.kImage
- the alternate ModelImage to use for the surface texture.
-
setIntenstityLevel
public void setIntenstityLevel(int iLevel)
Set intensity level for GPU-based surface extraction.- Parameters:
iLevel
-
-
setIPD
public void setIPD(float fIPD)
Sets the inter-pupillary distance for stereo rendering.- Parameters:
fIPD
- the IPD value.
-
setLUTNew
public void setLUTNew(java.lang.String kSurfaceName, ModelStorageBase kLUT)
Sets the LUT to use as an alternative to the volume lut for surface texturing.- Parameters:
kSurfaceName
- the surface to modify.kLUT
- the new LUT.kRGBT
- the new ModelRGB (for color images).
-
setMaterial
public void setMaterial(java.lang.String kSurfaceName, WildMagic.LibGraphics.Rendering.MaterialState kMaterial, boolean bUpdate)
Sets the material for the given surface.- Parameters:
kSurfaceName
- the surface to update.kMaterial
- the new material.
-
setPickable
public void setPickable(java.lang.String kSurfaceName, boolean bOn)
Enable surface picking for the given surface.- Parameters:
kSurfaceName
- surface name.bOn
- picking on/off.
-
setPolygonMode
public void setPolygonMode(java.lang.String kSurfaceName, WildMagic.LibGraphics.Rendering.WireframeState.FillMode eMode)
Set the polygon mode (FILL, LINE, POINT) for the given surface.- Parameters:
kSurfaceName
- the surface to modify.eMode
- FILL, LINE, or POINT.
-
setPolylineColor
public void setPolylineColor(int iGroup, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the polyline color for the specified fiber bundle tract group.- Parameters:
iGroup
- the fiber bundle group to set.kColor
- the new polyline color for the specified fiber bundle tract group.
-
setRGBTA
public void setRGBTA(ModelRGB RGBT)
-
setRGBTB
public void setRGBTB(ModelRGB RGBT)
-
setSliceOpacity
public void setSliceOpacity(int i, float fAlpha)
Set the transparency value for the slice.- Parameters:
i
- the slice to modify.fAlpha
- the new transparency value.
-
setStereo
public void setStereo(int iWhich)
Enable/disable stereo rendering.- Parameters:
bEnable
-
-
setSurfaceTexture
public void setSurfaceTexture(java.lang.String kSurfaceName, boolean bOn, boolean bUseNewImage, boolean bUseNewLUT)
Turns on surface texture display for the given surface. The user can use a separate ModelImage and LUT than the one displayed in the volume renderer.- Parameters:
kSurfaceName
- the name of the surface to texture.bOn
- texture on/off.bUseNewImage
- when false use the current ModelImage, when true the user specifies the model image.bUseNewLUT
- when false use the current LUT, when true the user specifies the LUT.
-
setVolumeBlend
public void setVolumeBlend(float fBlend)
Sets the blend factor for displaying the ray-cast volume with other objects in the scene.- Parameters:
fBlend
- the blend factor for the ray-cast volume.
-
setVolumeColor
public void setVolumeColor(boolean flag)
-
setVolumeSamplesMouseDragged
public int setVolumeSamplesMouseDragged(float fSample)
Set the sampling rate when the mouse is Dragged.
-
setVolumeSamplesMouseReleased
public int setVolumeSamplesMouseReleased(float fSample)
Set the sampling rate when the mouse is released.
-
setMouseTranslationSpeed
public void setMouseTranslationSpeed(float translationSpeed)
Set the mouse translation speed from the translation control slider- Parameters:
translationSpeed
- mouse translation speedrotationSpeed
- mouse rotation speed
-
setMouseRotationSpeed
public void setMouseRotationSpeed(float rotationSpeed)
Set the mouse rotation speed from the rotation control slider- Parameters:
rotationSpeed
- mouse rotation speed
-
setMouseZoomSpeed
public void setMouseZoomSpeed(float zoomSpeed)
Set the mouse zoom speed from the zoom control slider- Parameters:
zoomSpeed
- mouse zoom speed
-
showBoundingBox
public void showBoundingBox(int i, boolean bShow)
Turns on/off displaying the bounding box for the given plane.- Parameters:
i
- the plane index (0-3) in file coordinates.bShow
- when true, the bounding box is displayed.
-
showSlice
public void showSlice(int i, boolean bShow)
Turns on/off displaying the given plane.- Parameters:
i
- the plane index (0-3) in file coordinates.bShow
- when true, the plane is displayed.
-
smoothMesh
public void smoothMesh(java.lang.String kSurfaceName, int iteration, float alpha, boolean volumeLimit, float volumePercent)
Smooth the given surface.- Parameters:
kSurfaceName
- the name of the surface to smooth.iteration
- smooth iterations.alpha
- smooth factor.volumeLimit
- whether to use a volume % change limit.volumePercent
- the % volume change limiting factor
-
smoothThree
public void smoothThree(java.lang.String kSurfaceName, int iteration, float lambda, float mu)
Smooth the given surface.- Parameters:
kSurfaceName
- the name of the surface to smooth.iteration
- smooth iterations.lambda
- smooth factor.mu
- smooth factor.
-
smoothTwo
public void smoothTwo(java.lang.String kSurfaceName, int iteration, float fStiffness, boolean volumeLimit, float volumePercent)
Smooth the given surface.- Parameters:
kSurfaceName
- the name of the surface to smooth.iteration
- smooth iterations.fStiffness
- stiffness factor.volumeLimit
- whether to use a volume % change limit.volumePercent
- the % volume change limiting factor.
-
SURFASTMode
public void SURFASTMode()
Display the volume in Surface mode.
-
SURMode
public void SURMode()
Display the volume in Composite Surface mode.
-
toggleGeodesicPathDisplay
public void toggleGeodesicPathDisplay(java.lang.String kSurfaceName, int iWhich)
Switches between different ways of displaying the geodesic path (Euclidean, Geodesic, or Mesh).- Parameters:
kSurfaceName
- the surface the path is on.iWhich
- the type of display.
-
translateSurface
public void translateSurface(java.lang.String kSurfaceName, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate)
Changes the translation vector for the surface with the given name.- Parameters:
kSurfaceName
- the surface to move.kTranslate
- the new translation vector
-
undoSculpt
public void undoSculpt(boolean bAll)
Undo applying the sculpt region to the volume.
-
updateData
public void updateData()
Causes the VolumeShader to update the copy of the ModelImage on the GPU.- Parameters:
kImage
- the new image.
-
updateLevWidgetState
public void updateLevWidgetState(java.util.Vector<ClassificationWidget> kLWS)
-
CreateRenderTarget
protected void CreateRenderTarget(com.jogamp.opengl.GLAutoDrawable kDrawable, int iWidth, int iHeight, boolean forceReload)
Creates the three render-to-texture targets for rendering semi-transparent surfaces. Creates the screen-space polygon and OrderIndTransparencyEffect that display the final result. The first render target is for the solid objects. Second render target is for translucent objects. Third render target is for accumulating the count of translucent objects per-pixel.- Parameters:
arg0
-iWidth
-iHeight
-
-
CreateScene
protected void CreateScene()
Called by the init() function. Creates and initialized the scene-graph.
-
reCreateScene
public void reCreateScene(VolumeImage image)
Called by the init() function. Creates and initialized the scene-graph.
-
reCreateScene
public void reCreateScene(VolumeImage imageA, VolumeImage imageB)
-
doClip
protected void doClip(boolean bEnable)
Calculates the rotation for the arbitrary clip plane.- Parameters:
bEnable
- arbitrary clip plane on/off.
-
getHistogramLUTTextureIndex
public static int getHistogramLUTTextureIndex(java.lang.String kCommand)
-
getHistogramLUTTexture
public static WildMagic.LibGraphics.Rendering.Texture getHistogramLUTTexture(int index, boolean bReverse)
-
initLUT
private void initLUT(WildMagic.LibGraphics.Rendering.Texture[] m_akLUTTexture, ModelLUT kLUT, int index)
-
loadShared
private void loadShared()
-
Render
protected void Render(com.jogamp.opengl.GLAutoDrawable kDraw)
Render the display list objects without the raycast volume.
-
RenderSculpt
private void RenderSculpt()
Render the sculpt image.
-
RenderWithTransparency
private void RenderWithTransparency(boolean bPreRender, WildMagic.LibFoundation.Mathematics.Vector2d[] sortedList)
Rendering multiple translucent surfaces is accomplished with the following steps: 1. A FrameBuffer Object (FBO) is created with three render-to-texture targets, and a depth buffer. 2. The first render target is activated. Solid objects are rendered: writing color and depth information to the FBO target1. The color information displays the solid objects, the depth information enables the solid objects to properly occlude the translucent objects. 3. The second and third render targets are activated. Translucent objects are rendered: writing accumulated color and alpha to the second target and the number of overlapping surfaces per pixel to the third target. In this pass the depth buffer is read-only. 4. Rendering to the three texture targets is disabled. 5. A screen-space polygon is rendered, it reads the three textures generated in the previous pass. The first texture contains the color from the solid objects, the next two textures contain the color information and weighted-average for rendering the translucent textures.- Parameters:
bPreRender
- when true rendering into the VolumeRayCast back-image texture for compositing with the VolumeRayCast rendering.
-
update4D
protected void update4D(boolean bForward)
-
update4DVOIs
protected void update4DVOIs(boolean bForward)
-
updateCenterOnDisplay
protected void updateCenterOnDisplay()
-
updateVOIs
protected void updateVOIs(VOIVector kVOIs)
-
deleteVOIs
public void deleteVOIs(VOIVector kVOIs)
-
Pick
protected void Pick()
Picking. If a display list object has picking enabled, find the picked polygon based on the mouse position.
-
UpdateSceneRotation
protected void UpdateSceneRotation()
Description copied from class:GPURenderBase
Updates the displayed objects based on any user mouse rotation.- Overrides:
UpdateSceneRotation
in classGPURenderBase
-
NormalKernel
void NormalKernel(float[] a, float[] b, int width, int height, int depth, int color, int numElements)
-
createContainer
private void createContainer(com.jogamp.opengl.awt.GLCanvas canvas)
Creates the containing JPanel that will display this object. The JPanel contains a scroll pane with both horizontal and vertical scroll bars and a horizontal slider for changing where the slice plane intersects the volume in depth.- Parameters:
imageComponent
-
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent arg0)
- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
-
toggleNavigation
public void toggleNavigation(boolean _isNavigationEnabled)
Toggle navigation fly-thru tracking mode- Parameters:
_isNavigationEnabled
- is Navigation checkbox selected or not.
-
setPlaneConstant
public void setPlaneConstant(float constant)
Set the VolumeRayCast front clipping plane constant- Parameters:
constant
- front clipping plane constant
-
updateSphere
protected static void updateSphere(WildMagic.LibGraphics.SceneGraph.TriMesh sphere, float x, float y, float z, WildMagic.LibFoundation.Mathematics.ColorRGBA c)
-
applyClipFilter
protected void applyClipFilter(boolean clip)
-
setLatticeClip
public void setLatticeClip(boolean clip, WildMagic.LibFoundation.Mathematics.Vector3f pos, WildMagic.LibFoundation.Mathematics.Vector3f[] axes, float[] extents)
-
clipAnnotations
protected boolean clipAnnotations(VOIWormAnnotation text)
-
addAnimationLattice
public void addAnimationLattice(VOIVector latticeAnim)
-
createSamplePlane
private void createSamplePlane(VOIBase box)
-
addSphereVOIs
public void addSphereVOIs(VOI annotations)
-
writeData
private void writeData(java.lang.String fileName)
-
-