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:
  • 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
    • 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

      main container for this object, contains the scroll pane and the depth slider:
    • isNavigationEnabled

      protected boolean isNavigationEnabled
      is nagivation mode enabled or not.
    • annotatePtsCounter

      protected int annotatePtsCounter
      number of annotate points along the specified path.
    • annotatePtsList

      protected 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 JSlider opacitySlider
      Opacity sliders for when this renderer is displayed as a stand-alone app.
    • opacityLabel

      private 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 String planeName
    • screenShots

      private Vector<BufferedImage> 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()
    • 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 - polyline
      iGroup - counter number
      centerIndex - 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(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 class GPURenderBase
    • display

      public void display(com.jogamp.opengl.GLAutoDrawable arg0)
      Specified by:
      display in interface com.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 interface com.jogamp.opengl.GLEventListener
      Overrides:
      dispose in class GPURenderBase
    • 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 enabled
      bDisplay - 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 enabled
      bDisplay - on/off.
    • enableEyeClipPlane

      public void enableEyeClipPlane(boolean bEnable, boolean bDisplay, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
      Enables the eye clip plane.
      Parameters:
      bEnable - clipping enabled
      bDisplay - 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 enabled
      bDisplay - 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 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(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(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(String kSurfaceName)
      Return the TriMesh surface with the given name.
      Parameters:
      kSurfaceName - the name of the surface.
      Returns:
      TriMesh.
    • getVolumeSurface

      public VolumeSurface getVolumeSurface(String kSurfaceName)
      Return the TriMesh surface with the given name.
      Parameters:
      kSurfaceName - the name of the surface.
      Returns:
      TriMesh.
    • getSurfaceArea

      public float getSurfaceArea(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 String getSurfaceAreaString(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(String kSurfaceName)
      Return the center of the TriMesh surface.
      Parameters:
      kSurfaceName - the surface name.
      Returns:
      the calculated center.
    • getSurfaceVolume

      public float getSurfaceVolume(String kSurfaceName)
      Return the volume of the TriMesh surface.
      Parameters:
      kSurfaceName - the surface name.
      Returns:
      the calculated volume.
    • getSurfaceVolumeString

      public String getSurfaceVolumeString(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(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 interface com.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(KeyEvent e)
      Part of the KeyListener interface. Pressing 'b' toggles displaying the proxy-geometry versus the ray-traced volume.
      Specified by:
      keyPressed in interface KeyListener
      Overrides:
      keyPressed in class GPURenderBase
      Parameters:
      e - the key event.
    • MIPMode

      public void MIPMode()
      Display the volume in MIP mode.
    • mouseClicked

      public void mouseClicked(MouseEvent arg0)
      Specified by:
      mouseClicked in interface MouseListener
      Overrides:
      mouseClicked in class WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
    • mouseDragged

      public void mouseDragged(MouseEvent e)
      Rotates the object with a virtual trackball:
      Specified by:
      mouseDragged in interface MouseMotionListener
      Overrides:
      mouseDragged in class WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
      Parameters:
      e - the MouseEvent
    • mousePressed

      public void mousePressed(MouseEvent e)
      Rotates the object with a virtual trackball:
      Specified by:
      mousePressed in interface MouseListener
      Overrides:
      mousePressed in class GPURenderBase
      Parameters:
      e - the MouseEvent
    • mouseReleased

      public void mouseReleased(MouseEvent e)
      Rotates the object with a virtual trackball:
      Specified by:
      mouseReleased in interface MouseListener
      Overrides:
      mouseReleased in class WildMagic.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(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 class WildMagic.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 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(String kSurfaceName)
      Sets blending between imageA and imageB.
      Parameters:
      fValue - the blend value (0-1)
    • removeAll

      public void removeAll(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 mesh
      kNew - 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 interface com.jogamp.opengl.GLEventListener
      Overrides:
      reshape in class GPURenderBase
      Parameters:
      arg0 - the GLCanvas
      iX - the new x-position in screen coordinates.
      iY - the new y-position in screen coordinates.
      iWidth - the new width
      iHeight - the new height
    • save

      public boolean save(FileWriteOptions options, int filterType)
      Save the sculpted volume.
      Parameters:
      options - file writing options
      filtertype -
      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(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(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 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 planes
      kColor - 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

      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(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(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(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(String kSurfaceName, boolean bOn)
      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

      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(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 speed
      rotationSpeed - 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

      public void smoothThree(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(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(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(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(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:
      iWidth -
      iHeight -
      arg0 -
    • 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(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 class GPURenderBase
    • 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(ChangeEvent arg0)
      Specified by:
      stateChanged in interface 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(String fileName)