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,KeyListener,MouseListener,MouseMotionListener,MouseWheelListener,Serializable,EventListener,ChangeListener
- Direct Known Subclasses:
VolumeTriPlanarRender
public class VolumeTriPlanarRenderBase
extends GPURenderBase
implements com.jogamp.opengl.GLEventListener, KeyListener, MouseMotionListener, MouseListener, ChangeListener
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate LatticeModelprivate booleanprotected booleanprivate booleanprotected intnumber of annotate points along the specified path.protected Vector<WildMagic.LibFoundation.Mathematics.Vector3f> annotate path planning points listprivate WildMagic.LibFoundation.Mathematics.Vector3fprotected static com.jogamp.opengl.GLCapabilitiesmain container for this object, contains the scroll pane and the depth slider:protected floatsample rate when mouse is dragged.protected floatsample rate when mouse is released.protected static intprotected static intprotected static com.jogamp.opengl.GLProfileprotected static booleanprotected booleanis annotation mode is enabled or not.protected booleanis mouse control enabled or not.protected booleanis nagivation mode enabled or not.protected booleanis path planning mode enabled or not.protected WildMagic.LibGraphics.SceneGraph.Polylineprotected WildMagic.LibGraphics.SceneGraph.Polylineprotected WildMagic.LibGraphics.SceneGraph.Nodeprivate VOIVectorprotected booleanprotected WildMagic.LibFoundation.Mathematics.Vector3f[]protected WildMagic.LibFoundation.Mathematics.Box3fprotected float[]protected WildMagic.LibFoundation.Mathematics.Vector3fprotected float[]Arbitrary clip plane equation:protected float[]protected WildMagic.LibGraphics.Rendering.Texture[]protected WildMagic.LibFoundation.Mathematics.ColorRGB[]protected booleanEnable Arbitrary clip plane:protected booleanSet to true when cropping the volume in the shader.protected booleanprotected booleanEnables/Disables rendering the second pass.protected booleanprotected booleanprotected booleanprotected booleanThe first time the frame is rendererd use the shader to calculate the normals for the volume data.protected booleanGeodesic enabled on/off.protected booleanprotected booleanprotected booleanPainting parameters:protected booleanBrainSurfaceFlattener pick correspondence enabled on/off.protected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected floatprotected intprotected intprotected intIntensity level for GPU-surface extraction.protected intStereo on/off.protected WildMagic.LibFoundation.Mathematics.Vector4fprotected WildMagic.LibFoundation.Mathematics.Vector4fprotected VolumeDTIDTI renderer.protected WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBufferprotected FlyPathGraphCurveFly path curve.protected WildMagic.LibFoundation.Mathematics.Vector3fprotected WildMagic.LibFoundation.Mathematics.ColorRGBColor for the parts of the path that have not yet been visited (Dark Green)protected WildMagic.LibFoundation.Mathematics.ColorRGBAprotected Sculptor_WMNew sculpting object for WM-based sculpting.protected VolumeSlices3D Slice renderer.protected VolumeBoundingBoxVolume bounding box renderer.protected VolumeClipClipping planes rendererprotected VolumeOrientationCubeOrientation cube rendererprotected VolumeRayCastGPU-based ray cast renderer.protected WildMagic.LibGraphics.SceneGraph.TriMeshprotected WildMagic.LibGraphics.Rendering.Cameraprotected WildMagic.LibGraphics.Effects.ShaderEffectprotected static WildMagic.LibGraphics.Rendering.Texture[]protected static intprotected NavigationBehaviornavigation behavior.private JLabelprivate JSliderOpacity sliders for when this renderer is displayed as a stand-alone app.private WildMagic.LibGraphics.SceneGraph.TriMeshprivate Stringprivate VOI(package private) booleanprivate intprivate Vector<BufferedImage> private intprivate static final longprotected com.jogamp.opengl.GLOffscreenAutoDrawableprotected VolumeTriPlanarRenderprotected intprotected WildMagic.LibFoundation.Mathematics.Vector3fprotected floatprivate booleanFields 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, ZZDistanceStepFields 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, zCameraMoveFields inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication
m_acWindowTitle, m_eBuffering, m_eDepth, m_eFormat, m_eMultisampling, m_eStencil, m_iHeight, m_iWidth, m_iXPosition, m_iYPosition, m_kBackgroundColor, m_pkRenderer -
Constructor Summary
ConstructorsConstructorDescriptionDefault 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
Modifier and TypeMethodDescriptionvoidaddAnimationLattice(VOIVector latticeAnim) voidaddAnimationVOIs(VOIVector vois) voidaddGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kSurface, WildMagic.LibGraphics.SceneGraph.Geometry kNew, int iGroup) Add a new geodesic component to the surface.voidaddSphereVOIs(VOI annotations) voidaddSurface(SurfaceState kSurface) Add surfaces to the display list.voidaddSurface(SurfaceState kSurface, boolean isFileCoords) Add surfaces to the display list.voidaddSurface(SurfaceState kSurface, boolean computeSurfaceMask, boolean isFileCoords) voidaddTract(VOIContour kContour, WildMagic.LibGraphics.SceneGraph.Polyline kLine, int iGroup) Add tract into the DTI displayvoidaddVolumeVOI(VolumeVOI kVOI) protected voidapplyClipFilter(boolean clip) booleanapplySculpt(boolean bAll) Apply the sculpt region to the volume.voidSets blending between imageA and imageB.voidClear the sculpt region.protected booleanvoidCMPMode()Display the volume in Composite mode.private voidcreateContainer(com.jogamp.opengl.awt.GLCanvas canvas) Creates the containing JPanel that will display this object.protected voidCreateRenderTarget(com.jogamp.opengl.GLAutoDrawable kDrawable, int iWidth, int iHeight, boolean forceReload) Creates the three render-to-texture targets for rendering semi-transparent surfaces.private voidcreateSamplePlane(VOIBase box) protected voidCalled by the init() function.voidCrop the clipped volume.voiddeleteVOIs(VOIVector kVOIs) voiddisplay(com.jogamp.opengl.GLAutoDrawable arg0) voiddisplayArbitraryClipPlane(boolean bDisplay) Displays the arbitrary clip plane position.voiddisplayBoundingBox(boolean bDisplay) Called from JPanelDisplay.voiddisplayClipPlane(int iWhich, boolean bDisplay) Called from JPanelClip.voiddisplayClipPlane(int iWhich, boolean bDisplay, WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Called from JPanelClip.voiddisplayNode(WildMagic.LibGraphics.SceneGraph.Node kNode, boolean bDisplay) Toggle display of the scene-graphe node on/off.voiddisplayOrientationCube(boolean bDisplay) Called from JPanelDisplay.voiddisplaySurface(boolean bDisplay) Toggle surface display on/off.voiddisplayVOIs(boolean bDisplay) Toggle surface display on/off.voiddisplayVolumeRaycast(boolean bDisplay) Toggle volume display on/off.voiddisplayVolumeSlices(boolean bDisplay) Toggle 3D Slice display on/off.voiddispose(com.jogamp.opengl.GLAutoDrawable kDrawable) memory cleanup.protected voiddisposeShared(VolumeImage imageA, VolumeImage imageB) protected voiddoClip(boolean bEnable) Calculates the rotation for the arbitrary clip plane.booleandrawVOI(VOIBase kVOI, VolumeTriPlanarRenderBase kDisplay, VolumeImage kVolumeImage, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate) voidDRRMode()Display the volume in DDR mode.voidenableArbitraryClipPlane(boolean bEnable, boolean bDisplay, WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Enables the arbitrary clip plane position.voidenableClipPlane(int iWhich, boolean bEnable, boolean bDisplay) Enables the axis-aligned clipping planes.voidenableEyeClipPlane(boolean bEnable, boolean bDisplay, WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Enables the eye clip plane.voidenableEyeInvClipPlane(boolean bEnable, boolean bDisplay, WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Enables the inverse-eye clip plane.voidenableGeodesic(boolean bEnable) Enable geodesic curve calculations/display.voidenablePaint(WildMagic.LibFoundation.Mathematics.ColorRGBA kPaintColor, int iBrushSize, boolean bEnabled, boolean bPaint, boolean bDropper, boolean bPaintCan, boolean bErase) Enable painting on TriMesh surfaces.voidenableSculpt(boolean bSculpt) Enables and disables sculpting.voidErase all surface paint.voidExtract a TriMesh surface from the Volume Rendering.floatWildMagic.LibFoundation.Mathematics.Matrix3fbooleanWildMagic.LibFoundation.Mathematics.Vector3fgetClip()boolean[]Color[]boolean[]boolean[]WildMagic.LibFoundation.Mathematics.Vector3fboolean[]boolean[]Returns the container for this object.doublebooleanWildMagic.LibFoundation.Mathematics.ColorRGBgetGroupColor(int groupID) Get the group color with given group ID.static WildMagic.LibGraphics.Rendering.TexturegetHistogramLUTTexture(int index, boolean bReverse) static intgetHistogramLUTTextureIndex(String kCommand) floatgetIPD()Sets the inter-pupillary distance for stereo rendering.WildMagic.LibGraphics.Rendering.MaterialStategetMaterial(String kSurfaceName) Return the material properties of the given surface.floatgetOpacity(String kSurfaceName) Return the opacity properties of the given surface.getPolylines(int iGroup) booleanReturns true when sculpting is enabled.WildMagic.LibGraphics.SceneGraph.TriMeshgetSurface(String kSurfaceName) Return the TriMesh surface with the given name.floatgetSurfaceArea(String kSurfaceName) Return the surface area for the given TriMesh surface.getSurfaceAreaString(String kSurfaceName) Return the surface area for the given TriMesh surface.WildMagic.LibFoundation.Mathematics.Vector3fgetSurfaceCenter(String kSurfaceName) Return the center of the TriMesh surface.floatgetSurfaceVolume(String kSurfaceName) Return the volume of the TriMesh surface.getSurfaceVolumeString(String kSurfaceName) Return the volume of the TriMesh surface.WildMagic.LibFoundation.Mathematics.Vector3fgetTranslateSurface(String kSurfaceName) Return the translation vector for the surface with the given name.getVolumeSurface(String kSurfaceName) Return the TriMesh surface with the given name.voidinit()voidinit(com.jogamp.opengl.GLAutoDrawable arg0) Part of the GLEventListener interface.static booleanprivate voidprotected voidinitShared(VolumeTriPlanarInterface kParent) voidInvert the sculpt region.voidPart of the KeyListener interface.private voidvoidMIPMode()Display the volume in MIP mode.voidmouseClicked(MouseEvent arg0) voidRotates the object with a virtual trackball:voidRotates the object with a virtual trackball:voidRotates the object with a virtual trackball:protected voidMove()Updates the camera and displayed objects for rendering.voidMULTIHISTOMode(boolean bOn) Display the volume in Mullti-histo mode.com.jogamp.opengl.awt.GLCanvas(package private) voidNormalKernel(float[] a, float[] b, int width, int height, int depth, int color, int numElements) protected voidPick()Picking.voidpickCorrespondence(boolean bOn) Enables/disables picking correspondence points between the mesh and BrainSurfaceFlattener render.voidplay4D(boolean bOn) booleanvoidplay4DVOIs(boolean bOn) voidreCreateScene(VolumeImage image) Called by the init() function.voidreCreateScene(VolumeImage imageA, VolumeImage imageB) voidCauses the texture representation of all the surface meshes to be recalculated.protected voidvoidCalled by the ApplicationGUI.voidvoidremoveAllGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kSurface) Removes all geodesic components from the given surface.voidvoidremoveGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kSurface, int iNode, int iGroup) Removes the specific geodesic component from the given surface.voidremovePolyline(int iGroup) Removes the specified polyline tract group.voidremoveSurface(String kSurfaceName) Sets blending between imageA and imageB.protected voidRender(com.jogamp.opengl.GLAutoDrawable kDraw) Render the display list objects without the raycast volume.private voidRender the sculpt image.private voidRenderWithTransparency(boolean bPreRender, WildMagic.LibFoundation.Mathematics.Vector2d[] sortedList) Rendering multiple translucent surfaces is accomplished with the following steps: 1.voidreplaceGeodesic(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.voidvoidreshape(com.jogamp.opengl.GLAutoDrawable arg0, int iX, int iY, int iWidth, int iHeight) Part of the GLEventListener interface.voidRoll back the image back to center, reset the camera view close to original view.booleansave(FileWriteOptions options, int filterType) Save the sculpted volume.voidCopies the volume data from the texture representation into the ModelImage and writes it to disk.voidselfShadow(boolean bShadow) Enables/Disables self-shadowing in the Surface mode.voidsetABBlend(float fValue) Sets blending between imageA and imageB.voidsetAnimationSpeed(float fValue) voidsetAnimationSpeed(int value) voidsetAnnotationVOIColor(String name, WildMagic.LibFoundation.Mathematics.ColorRGB color) voidsetArbColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Sets the arbitrary clip plane color.voidsetArbitraryClipPlane(float f4, boolean bEnable, float thickness) Enables the arbitrary clip plane position.voidsetArbitratyClip(WildMagic.LibFoundation.Mathematics.Matrix3f kRotate) voidsetArbitratyClip(WildMagic.LibFoundation.Mathematics.Matrix3f kRotate, boolean on) voidsetBackface(String kSurfaceName, boolean bOn) Turn backface culling on/off for the given surface.voidsetBackgroundColor(WildMagic.LibFoundation.Mathematics.ColorRGBA kColor) Sets the background color.voidsetBoundingBoxColor(int i, WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Sets the color for the input slice frame.voidsetBoundingBoxColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Called from JPanelDisplay.voidsetCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter) Sets the position of the 3D slices.voidsetClipping(String kSurfaceName, boolean bClip) Enable clipping for the given surface.voidsetClipPlane(int iWhich, float fValue, boolean bEnable) Called from JPanelClip.voidsetClipPlaneColor(int iWhich, WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Sets the axis-aligned clip plane color.voidvoidSetCustomBlend(int iBlendEquation, int iLogicOp, int iSrcBlend, int iDstBlend, WildMagic.LibFoundation.Mathematics.ColorRGBA kColor) voidsetDisplayAllGlyphs(boolean bDisplay) Turns on/off displaying all the glyphs.voidsetDisplayArrows(boolean bDisplay) Turns on/off displaying the fiber bundle tracts with 3D arrows.voidsetDisplayCylinders(boolean bDisplay) Turns on/off displaying the fiber bundle tracts with ellipsoids.voidsetDisplayEllipsoids(boolean bDisplay) Turns on/off displaying the fiber bundle tracts with ellipsoids.voidsetDisplayTubes(boolean bDisplay) Turns on/off displaying the fiber bundle tracts with tubes.voidsetDrawingShape(int shape) Sets the sculpt drawing shape.voidsetDTIImage(ModelImage kDTIImage, ModelImage kEigenVectorImage, ModelImage kEigenValueImage) Sets the DTI Image for displaying the tensors as ellipsoids.voidsetEllipseMod(int iMod) Set the m_iEllipsoidMod value.voidsetEyeClipPlane(float f4, boolean bDisplay, boolean bEnable) Sets the eye clip plane position.voidsetEyeColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Sets the eye clip plane color.voidsetEyeInvClipPlane(float f4, boolean bDisplay, boolean bEnable) Sets the inverse-eye clip plane position.voidsetEyeInvColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Sets the inverse-eye clip plane color.voidsetGradientMagnitude(boolean bShow) Enables/Disables Gradient Magnitude filter.voidsetHyperStack(VolumeImage[] images, WildMagic.LibGraphics.Rendering.Texture colormap) voidsetImageB(VolumeImage imageB) voidsetImageNew(String kSurfaceName, ModelImage kImage) Sets the ModelImage to use as an alternative to the volume ModelImage for surface texturing.voidsetImageOn(int which, boolean on) voidsetImages(VolumeImage imageA) voidsetIntenstityLevel(int iLevel) Set intensity level for GPU-based surface extraction.voidsetIPD(float fIPD) Sets the inter-pupillary distance for stereo rendering.voidsetLatticeClip(boolean clip, WildMagic.LibFoundation.Mathematics.Vector3f pos, WildMagic.LibFoundation.Mathematics.Vector3f[] axes, float[] extents) voidsetLUTNew(String kSurfaceName, ModelStorageBase kLUT) Sets the LUT to use as an alternative to the volume lut for surface texturing.voidsetMaterial(String kSurfaceName, WildMagic.LibGraphics.Rendering.MaterialState kMaterial, boolean bUpdate) Sets the material for the given surface.voidsetMouseRotationSpeed(float rotationSpeed) Set the mouse rotation speed from the rotation control slidervoidsetMouseTranslationSpeed(float translationSpeed) Set the mouse translation speed from the translation control slidervoidsetMouseZoomSpeed(float zoomSpeed) Set the mouse zoom speed from the zoom control slidervoidsetPickable(String kSurfaceName, boolean bOn) Enable surface picking for the given surface.voidsetPlaneConstant(float constant) Set the VolumeRayCast front clipping plane constantvoidsetPolygonMode(String kSurfaceName, WildMagic.LibGraphics.Rendering.WireframeState.FillMode eMode) Set the polygon mode (FILL, LINE, POINT) for the given surface.voidsetPolylineColor(int iGroup, WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Sets the polyline color for the specified fiber bundle tract group.voidvoidvoidsetSliceOpacity(int i, float fAlpha) Set the transparency value for the slice.voidsetStereo(int iWhich) Enable/disable stereo rendering.voidsetSurfaceTexture(String kSurfaceName, boolean bOn, boolean bUseNewImage, boolean bUseNewLUT) Turns on surface texture display for the given surface.voidsetView(WildMagic.LibFoundation.Mathematics.Vector3f[] basisVectors) voidsetVolumeBlend(float fBlend) Sets the blend factor for displaying the ray-cast volume with other objects in the scene.voidsetVolumeColor(boolean flag) intsetVolumeSamplesMouseDragged(float fSample) Set the sampling rate when the mouse is Dragged.intsetVolumeSamplesMouseReleased(float fSample) Set the sampling rate when the mouse is released.voidshowBoundingBox(int i, boolean bShow) Turns on/off displaying the bounding box for the given plane.voidshowSlice(int i, boolean bShow) Turns on/off displaying the given plane.voidsmoothMesh(String kSurfaceName, int iteration, float alpha, boolean volumeLimit, float volumePercent) Smooth the given surface.voidsmoothThree(String kSurfaceName, int iteration, float lambda, float mu) Smooth the given surface.voidsmoothTwo(String kSurfaceName, int iteration, float fStiffness, boolean volumeLimit, float volumePercent) Smooth the given surface.voidvoidvoidstateChanged(ChangeEvent arg0) voidDisplay the volume in Surface mode.voidSURMode()Display the volume in Composite Surface mode.voidToggle Surface display on/off.voidToggle 3D VOI display on/off.voidToggle 3D Volume display on/off.voidToggle 3D Slice display on/off.voidtoggleGeodesicPathDisplay(String kSurfaceName, int iWhich) Switches between different ways of displaying the geodesic path (Euclidean, Geodesic, or Mesh).voidtoggleNavigation(boolean _isNavigationEnabled) Toggle navigation fly-thru tracking modevoidtranslateSurface(String kSurfaceName, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate) Changes the translation vector for the surface with the given name.voidundoSculpt(boolean bAll) Undo applying the sculpt region to the volume.protected voidupdate4D(boolean bForward) protected voidupdate4DVOIs(boolean bForward) protected voidvoidCauses the VolumeShader to update the copy of the ModelImage on the GPU.voidprotected voidUpdates the displayed objects based on any user mouse rotation.protected static voidupdateSphere(WildMagic.LibGraphics.SceneGraph.TriMesh sphere, float x, float y, float z, WildMagic.LibFoundation.Mathematics.ColorRGBA c) protected voidupdateVOIs(VOIVector kVOIs) private voidMethods 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, writeImageMethods 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, UpdateMouseRotationSpeedMethods inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication
GetAspectRatio, GetHeight, GetRenderer, GetWidth, GetWindowTitle, GetXPosition, GetYPosition, OnIdle, OnMove, OnPrecreate, OnResize, SetRendererMethods inherited from class WildMagic.LibApplications.OpenGLApplication.Application
TestStreamingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.awt.event.KeyListener
keyReleased, keyTypedMethods inherited from interface java.awt.event.MouseListener
mouseEntered, mouseExitedMethods inherited from interface java.awt.event.MouseMotionListener
mouseMoved
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
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 -
init
protected static boolean init -
m_kSculptor
New sculpting object for WM-based sculpting. -
m_afArbEquation
protected float[] m_afArbEquationArbitrary 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_bArbClipOnEnable Arbitrary clip plane: -
m_bDisplaySecond
protected boolean m_bDisplaySecondEnables/Disables rendering the second pass. When disabled, the back-facing polygons of the proxy-geometry are shown instead of the volume: -
m_kSlices
3D Slice renderer. -
m_akSlicesColor
protected WildMagic.LibFoundation.Mathematics.ColorRGB[] m_akSlicesColor -
m_kVolumeRayCast
GPU-based ray cast renderer. -
m_kVolumeClip
Clipping planes renderer -
m_kDTIDisplay
DTI renderer. -
m_kVolumeBox
Volume bounding box renderer. -
m_kVolumeCube
Orientation cube renderer -
m_bFirstRender
protected boolean m_bFirstRenderThe 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_bPaintEnabledPainting 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_bGeodesicEnabledGeodesic enabled on/off. -
m_iStereo
protected int m_iStereoStereo on/off. -
m_bPickCorrespondence
protected boolean m_bPickCorrespondenceBrainSurfaceFlattener pick correspondence enabled on/off. -
m_bCrop
protected boolean m_bCropSet to true when cropping the volume in the shader. -
m_iExtractLevel
protected int m_iExtractLevelIntensity level for GPU-surface extraction. -
fSample_mouseReleased
protected float fSample_mouseReleasedsample rate when mouse is released. -
fSample_mouseDragged
protected float fSample_mouseDraggedsample 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
main container for this object, contains the scroll pane and the depth slider: -
annotatePtsCounter
protected int annotatePtsCounternumber of annotate points along the specified path. -
annotatePtsList
annotate path planning points list -
m_kNormalColorPathUnvisited
protected WildMagic.LibFoundation.Mathematics.ColorRGB m_kNormalColorPathUnvisitedColor for the parts of the path that have not yet been visited (Dark Green) -
m_kFlyPathGraphCurve
Fly path curve. -
isPathPlanningEnabled
protected boolean isPathPlanningEnabledis path planning mode enabled or not. -
isMouseControlEnabled
protected boolean isMouseControlEnabledis mouse control enabled or not. -
isAnnotateEnabled
protected boolean isAnnotateEnabledis 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
Opacity sliders for when this renderer is displayed as a stand-alone app. -
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
-
lattice
-
planeVOI
-
segmentIndex
private int segmentIndex -
plane
private WildMagic.LibGraphics.SceneGraph.TriMesh plane -
planeName
-
screenShots
-
-
Constructor Details
-
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:
kAnimator- animator used to display the canvas.kVolumeImageA- volume data and textures for ModelImage A.kVolumeImageB- volume data and textures for ModelImage B.kParent- parent user-interface and frame.
-
VolumeTriPlanarRenderBase
public VolumeTriPlanarRenderBase(VolumeTriPlanarRenderBase kShared, com.jogamp.opengl.awt.GLCanvas kCanvas, 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.kParent- parent user-interface and frame.kAnimator- animator used to display the canvas.
-
-
Method Details
-
initClass
public static boolean initClass() -
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
Add surfaces to the display list.- Parameters:
akSurfaces-
-
addSurface
Add surfaces to the display list.- Parameters:
akSurfaces-
-
addSurface
-
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
-
applySculpt
public boolean applySculpt(boolean bAll) Apply the sculpt region to the volume. -
blend
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:GPURenderBaseUpdates the camera and displayed objects for rendering.- Overrides:
Movein classGPURenderBase
-
display
public void display(com.jogamp.opengl.GLAutoDrawable arg0) - Specified by:
displayin 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:GPURenderBasememory cleanup.- Specified by:
disposein interfacecom.jogamp.opengl.GLEventListener- Overrides:
disposein classGPURenderBase
-
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
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
Return the material properties of the given surface.- Parameters:
kSurfaceName- the surface to query.- Returns:
- the material properties of the surface.
-
getOpacity
Return the opacity properties of the given surface.- Parameters:
kSurfaceName- the surface to query.- Returns:
- the opacity value of the surface.
-
getSculpt
-
getSculptEnabled
public boolean getSculptEnabled()Returns true when sculpting is enabled.- Returns:
- true when sculpting is enabled, false otherwise.
-
getSurface
Return the TriMesh surface with the given name.- Parameters:
kSurfaceName- the name of the surface.- Returns:
- TriMesh.
-
getVolumeSurface
Return the TriMesh surface with the given name.- Parameters:
kSurfaceName- the name of the surface.- Returns:
- TriMesh.
-
getSurfaceArea
Return the surface area for the given TriMesh surface.- Parameters:
kSurfaceName- the surface name.- Returns:
- the surface-area of the mesh.
-
getSurfaceAreaString
Return the surface area for the given TriMesh surface.- Parameters:
kSurfaceName- the surface name.- Returns:
- the surface-area of the mesh.
-
getSurfaceCenter
Return the center of the TriMesh surface.- Parameters:
kSurfaceName- the surface name.- Returns:
- the calculated center.
-
getSurfaceVolume
Return the volume of the TriMesh surface.- Parameters:
kSurfaceName- the surface name.- Returns:
- the calculated volume.
-
getSurfaceVolumeString
Return the volume of the TriMesh surface.- Parameters:
kSurfaceName- the surface name.- Returns:
- the calculated volume.
-
getTranslateSurface
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:
initin 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
Part of the KeyListener interface. Pressing 'b' toggles displaying the proxy-geometry versus the ray-traced volume.- Specified by:
keyPressedin interfaceKeyListener- Overrides:
keyPressedin classGPURenderBase- Parameters:
e- the key event.
-
MIPMode
public void MIPMode()Display the volume in MIP mode. -
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener- Overrides:
mouseClickedin classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D
-
mouseDragged
Rotates the object with a virtual trackball:- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D- Parameters:
e- the MouseEvent
-
mousePressed
Rotates the object with a virtual trackball:- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classGPURenderBase- Parameters:
e- the MouseEvent
-
mouseReleased
Rotates the object with a virtual trackball:- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin 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
-
play4DVOIs
public void play4DVOIs(boolean bOn) -
play4DVOIs
public boolean play4DVOIs() -
startStopVOIAnimation
public void startStopVOIAnimation() -
startRecording
public void startRecording() -
setAnnotationVOIColor
-
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:
reloadShadersin 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
-
removePolyline
public void removePolyline(int iGroup) Removes the specified polyline tract group.- Parameters:
iGroup- the group of polylines to remove.
-
removeSurface
Sets blending between imageA and imageB.- Parameters:
fValue- the blend value (0-1)
-
removeAll
-
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:GPURenderBasePart of the GLEventListener interface. Called when the GLCanvas is resized.- Specified by:
reshapein interfacecom.jogamp.opengl.GLEventListener- Overrides:
reshapein 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
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
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
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
-
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(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
-
setImageB
-
setHyperStack
-
setImageOn
public void setImageOn(int which, boolean on) -
setImageNew
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
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(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
Enable surface picking for the given surface.- Parameters:
kSurfaceName- surface name.bOn- picking on/off.
-
setPolygonMode
public void setPolygonMode(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
-
setRGBTB
-
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(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(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
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(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
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(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
-
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:
iWidth-iHeight-arg0-
-
CreateScene
protected void CreateScene()Called by the init() function. Creates and initialized the scene-graph. -
reCreateScene
Called by the init() function. Creates and initialized the scene-graph. -
reCreateScene
-
doClip
protected void doClip(boolean bEnable) Calculates the rotation for the arbitrary clip plane.- Parameters:
bEnable- arbitrary clip plane on/off.
-
getHistogramLUTTextureIndex
-
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) -
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
-
deleteVOIs
-
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:GPURenderBaseUpdates the displayed objects based on any user mouse rotation.- Overrides:
UpdateSceneRotationin 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
- Specified by:
stateChangedin interfaceChangeListener
-
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
-
addAnimationLattice
-
createSamplePlane
-
addSphereVOIs
-
writeData
-