java.lang.Object
gov.nih.mipav.view.renderer.WildMagic.Render.VolumeObject
gov.nih.mipav.view.renderer.WildMagic.Render.VolumeDTI

public class VolumeDTI extends VolumeObject
Displays the Diffusion Tensor tracts in the VolumeViewer.
See Also:
  • invalid reference
    VolumeObject.java
  • invalid reference
    GPUVolumeRender.java
  • Field Details

    • m_kTracts

      private HashMap<Integer,WildMagic.LibGraphics.SceneGraph.Node> m_kTracts
      Hashmap for multiple fiber bundles:
    • m_kTubes

      private HashMap<Integer,WildMagic.LibGraphics.SceneGraph.Node> m_kTubes
      Hashmap for multiple tube type fiber bundles:
    • m_kShaders

      private HashMap<Integer,VolumePreRenderEffect[]> m_kShaders
      Hashmap for multiple fiber bundles:
    • m_kGlyphs

      private HashMap<Integer,Vector<VOIContour>> m_kGlyphs
      Hashmap for multiple fiber bundles:
    • m_bDisplayEllipsoids

      private boolean m_bDisplayEllipsoids
      When true display the fiber tracts with ellipsoids instead of lines:
    • m_bDisplayAllGlyphs

      private boolean m_bDisplayAllGlyphs
      When true display the DTI volume with glyphs:
    • m_iEllipsoidMod

      private int m_iEllipsoidMod
      In the display all ellipsoids mode the ellipsoids are displayed every m_iEllipsoidMod steps.
    • m_bDisplayCylinders

      private boolean m_bDisplayCylinders
      When true display the fiber tracts with cylinders instead of lines:
    • m_bDisplayTubes

      private boolean m_bDisplayTubes
      When true display the fiber tracts with tubes instead of lines:
    • m_bDisplayArrows

      private boolean m_bDisplayArrows
      When true display the fiber tracts with arrows instead of lines:
    • m_kLightShader

      private SurfaceLightingEffect m_kLightShader
    • m_kEllipseMaterial

      private WildMagic.LibGraphics.Rendering.MaterialState m_kEllipseMaterial
      Material properties of the ellipsoids.
    • m_kTubesMaterial

      private WildMagic.LibGraphics.Rendering.MaterialState m_kTubesMaterial
      Material properties of the Tubes.
    • m_kLinesMaterial

      private WildMagic.LibGraphics.Rendering.MaterialState m_kLinesMaterial
      Material properties of the tract lines.
    • m_kEigenVector

      ModelImage m_kEigenVector
      EigenVector values for displaying ellipsoids.
    • m_kEigenValue

      ModelImage m_kEigenValue
    • m_kSphere

      private WildMagic.LibGraphics.SceneGraph.TriMesh m_kSphere
      Ellipsoids is a sphere with a non-uniform scale based on the eigen vectors and values.
    • m_kCylinder

      private WildMagic.LibGraphics.SceneGraph.TriMesh m_kCylinder
      Cylinders is a sphere with a non-uniform scale based on the eigen vectors and values.
    • m_iDimX

      private int m_iDimX
      The DTI volume extents:
    • m_iDimY

      private int m_iDimY
      The DTI volume extents:
    • m_iDimZ

      private int m_iDimZ
      The DTI volume extents:
    • m_fScale

      private float m_fScale
      Ellipsoids scale factor, based on the DTI volume:
    • m_kColorEllipse

      private WildMagic.LibFoundation.Mathematics.ColorRGB m_kColorEllipse
      Volume-based color for the ellipsoids:
    • m_iMaxGroups

      private int m_iMaxGroups
      maximum number of fiber tracts currently displayed.
    • isUsingVolumeColor

      private boolean isUsingVolumeColor
      flag to indicate to use volume color or not
    • m_kArrow

      private WildMagic.LibGraphics.SceneGraph.Node m_kArrow
      arrow glyphs
    • constantColor

      private HashMap<Integer,WildMagic.LibFoundation.Mathematics.ColorRGB> constantColor
      Randomly add group color.
  • Constructor Details

    • VolumeDTI

      public VolumeDTI(VolumeImage kVolumeImage, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ)
      Creates a new VolumeDTI object.
      Parameters:
      kTranslate - translation in the scene-graph for this object.
      fX - the size of the volume in the x-dimension (extent * resolutions)
      fY - the size of the volume in the y-dimension (extent * resolutions)
      fZ - the size of the volume in the z-dimension (extent * resolutions)
      kImageA - the VolumeImage containing shared data and textures for rendering.
  • Method Details

    • addPolyline

      public void addPolyline(VOIContour kContour, WildMagic.LibGraphics.SceneGraph.Polyline kLine, int iGroup)
      Add a polyline to the display. Used to display an approximation fiber tract bundles.
      Parameters:
      kLine - new polyline to display.
      iGroup - the group the polyline belongs to.
    • createTube

      public WildMagic.LibGraphics.Surfaces.TubeSurface createTube(WildMagic.LibGraphics.SceneGraph.Polyline kTract)
      Generate the tube streamline from the given polyline.
      Parameters:
      kTract - polyline of the medial path.
      Returns:
      kTube Tube surface generated.
    • dispose

      public void dispose()
      memory cleanup.
    • GetDisplayTract

      public boolean GetDisplayTract()
      Returns if there are tracts to display.
      Returns:
      true if there are tracts currently loaded, false otherwise.
    • getGroupColor

      public WildMagic.LibFoundation.Mathematics.ColorRGB getGroupColor(int iGroup)
      Get the group color with given group ID.
      Parameters:
      groupID - given group id
      Returns:
      ColorRGB group color
    • 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.
    • Render

      public void Render(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller, boolean bPreRender, boolean bSolid)
      Render the object.
      Specified by:
      Render in class VolumeObject
      Parameters:
      kRenderer - the OpenGLRenderer object.
      kCuller - the Culler object.
    • 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 arrows.
    • setDisplayCylinders

      public void setDisplayCylinders(boolean bDisplay)
      Turns on/off displaying the fiber bundle tracts with cylinders.
      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.
    • setDTIImage

      public void setDTIImage(ModelImage kDTIImage, ModelImage kEigenVectorImage, ModelImage kEigenValueImage, WildMagic.LibGraphics.Rendering.Renderer kRenderer)
      Sets the DTI Image for displaying the tensors as ellipsoids.
      Parameters:
      kDTIImage - .
    • createScene

      private void createScene()
    • setEllipseMod

      public void setEllipseMod(int iMod)
      Set the m_iEllipsoidMod value.
      Parameters:
      iMod - new m_iEllipsoidMod value.
    • SetLight

      public void SetLight(String kLightType, float[] afType)
      Sets the light for the EllipsoidsShader.
      Overrides:
      SetLight in class VolumeObject
      Parameters:
      kLightType - the name of the light to set (Light0, Light1, etc.)
      afType - the type of light (Ambient = 0, Directional = 1, Point = 2, Spot = 3).
    • 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.
    • setVolumeColor

      public void setVolumeColor(boolean flag)
      Set the flag to using volume color or not
      Parameters:
      flag - true or false
    • DisplayGlyphs

      private void DisplayGlyphs(ModelImage kImage, WildMagic.LibGraphics.Rendering.Renderer kRenderer, boolean bPreRender)
      Display a fiber bundle tract with a Glyph.
    • DisplayTract

      private void DisplayTract(WildMagic.LibGraphics.Rendering.Renderer kRenderer, boolean bPreRender, boolean bSolid)
      Displays a polyline fiber bundle tract with the given shader attached.
      Parameters:
      kInputStader - shader to apply to the polyline.
    • DisplayTubes

      private void DisplayTubes(ModelImage kImage, WildMagic.LibGraphics.Rendering.Renderer kRenderer, boolean bPreRender)
      Displays a tube fiber bundle tract with the given shader attached.
      Parameters:
      kInputStader - shader to apply to the tube.
    • MakeArrow

      private void MakeArrow()