Class VolumeDTI
java.lang.Object
gov.nih.mipav.view.renderer.WildMagic.Render.VolumeObject
gov.nih.mipav.view.renderer.WildMagic.Render.VolumeDTI
Displays the Diffusion Tensor tracts in the VolumeViewer.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionRandomly add group color.private booleanflag to indicate to use volume color or notprivate booleanWhen true display the DTI volume with glyphs:private booleanWhen true display the fiber tracts with arrows instead of lines:private booleanWhen true display the fiber tracts with cylinders instead of lines:private booleanWhen true display the fiber tracts with ellipsoids instead of lines:private booleanWhen true display the fiber tracts with tubes instead of lines:private floatEllipsoids scale factor, based on the DTI volume:private intThe DTI volume extents:private intThe DTI volume extents:private intThe DTI volume extents:private intIn the display all ellipsoids mode the ellipsoids are displayed every m_iEllipsoidMod steps.private intmaximum number of fiber tracts currently displayed.private WildMagic.LibGraphics.SceneGraph.Nodearrow glyphsprivate WildMagic.LibFoundation.Mathematics.ColorRGBVolume-based color for the ellipsoids:private WildMagic.LibGraphics.SceneGraph.TriMeshCylinders is a sphere with a non-uniform scale based on the eigen vectors and values.(package private) ModelImage(package private) ModelImageEigenVector values for displaying ellipsoids.private WildMagic.LibGraphics.Rendering.MaterialStateMaterial properties of the ellipsoids.private HashMap<Integer, Vector<VOIContour>> Hashmap for multiple fiber bundles:private SurfaceLightingEffectprivate WildMagic.LibGraphics.Rendering.MaterialStateMaterial properties of the tract lines.private HashMap<Integer, VolumePreRenderEffect[]> Hashmap for multiple fiber bundles:private WildMagic.LibGraphics.SceneGraph.TriMeshEllipsoids is a sphere with a non-uniform scale based on the eigen vectors and values.Hashmap for multiple fiber bundles:Hashmap for multiple tube type fiber bundles:private WildMagic.LibGraphics.Rendering.MaterialStateMaterial properties of the Tubes.Fields inherited from class gov.nih.mipav.view.renderer.WildMagic.Render.VolumeObject
m_bDisplay, m_bPickable, m_bTransparent, m_fVolumeDiv, m_fVolumeMult, m_fX, m_fY, m_fZ, m_kAlpha, m_kAlphaTransparency, m_kCull, m_kDeleteList, m_kLocalScale, m_kPolygonOffset, m_kResolutions, m_kScene, m_kTranslate, m_kVolumeImageA, m_kVolumeImageB, m_kVolumeScale, m_kVolumeTrans, m_kWireframe, m_kZBuffer, m_kZBufferTransparency -
Constructor Summary
ConstructorsConstructorDescriptionVolumeDTI(VolumeImage kVolumeImage, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ) Creates a new VolumeDTI object. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPolyline(VOIContour kContour, WildMagic.LibGraphics.SceneGraph.Polyline kLine, int iGroup) Add a polyline to the display.private voidWildMagic.LibGraphics.Surfaces.TubeSurfacecreateTube(WildMagic.LibGraphics.SceneGraph.Polyline kTract) Generate the tube streamline from the given polyline.private voidDisplayGlyphs(ModelImage kImage, WildMagic.LibGraphics.Rendering.Renderer kRenderer, boolean bPreRender) Display a fiber bundle tract with a Glyph.private voidDisplayTract(WildMagic.LibGraphics.Rendering.Renderer kRenderer, boolean bPreRender, boolean bSolid) Displays a polyline fiber bundle tract with the given shader attached.private voidDisplayTubes(ModelImage kImage, WildMagic.LibGraphics.Rendering.Renderer kRenderer, boolean bPreRender) Displays a tube fiber bundle tract with the given shader attached.voiddispose()memory cleanup.booleanReturns if there are tracts to display.WildMagic.LibFoundation.Mathematics.ColorRGBgetGroupColor(int iGroup) Get the group color with given group ID.getPolylines(int iGroup) private voidvoidremovePolyline(int iGroup) Removes the specified polyline tract group.voidRender(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller, boolean bPreRender, boolean bSolid) Render the object.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 cylinders.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.voidsetDTIImage(ModelImage kDTIImage, ModelImage kEigenVectorImage, ModelImage kEigenValueImage, WildMagic.LibGraphics.Rendering.Renderer kRenderer) Sets the DTI Image for displaying the tensors as ellipsoids.voidsetEllipseMod(int iMod) Set the m_iEllipsoidMod value.voidSets the light for the EllipsoidsShader.voidsetPolylineColor(int iGroup, WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Sets the polyline color for the specified fiber bundle tract group.voidsetVolumeColor(boolean flag) Set the flag to using volume color or notMethods inherited from class gov.nih.mipav.view.renderer.WildMagic.Render.VolumeObject
Blend, dispose, Dropper, Erase, GetBackface, getDepth, GetDisplay, GetMesh, GetName, GetPickable, GetPolygonMode, GetScene, getTexCoord, GetTranslate, localToScannerCoords, localToVolumeCoords, Paint, PostRender, scale, SetBackface, SetColor, SetDisplay, SetFrontface, setImageB, SetPickable, SetPolygonMode, SetTranslate, Translate, volumeToLocalCoords
-
Field Details
-
m_kTracts
Hashmap for multiple fiber bundles: -
m_kTubes
Hashmap for multiple tube type fiber bundles: -
m_kShaders
Hashmap for multiple fiber bundles: -
m_kGlyphs
Hashmap for multiple fiber bundles: -
m_bDisplayEllipsoids
private boolean m_bDisplayEllipsoidsWhen true display the fiber tracts with ellipsoids instead of lines: -
m_bDisplayAllGlyphs
private boolean m_bDisplayAllGlyphsWhen true display the DTI volume with glyphs: -
m_iEllipsoidMod
private int m_iEllipsoidModIn the display all ellipsoids mode the ellipsoids are displayed every m_iEllipsoidMod steps. -
m_bDisplayCylinders
private boolean m_bDisplayCylindersWhen true display the fiber tracts with cylinders instead of lines: -
m_bDisplayTubes
private boolean m_bDisplayTubesWhen true display the fiber tracts with tubes instead of lines: -
m_bDisplayArrows
private boolean m_bDisplayArrowsWhen true display the fiber tracts with arrows instead of lines: -
m_kLightShader
-
m_kEllipseMaterial
private WildMagic.LibGraphics.Rendering.MaterialState m_kEllipseMaterialMaterial properties of the ellipsoids. -
m_kTubesMaterial
private WildMagic.LibGraphics.Rendering.MaterialState m_kTubesMaterialMaterial properties of the Tubes. -
m_kLinesMaterial
private WildMagic.LibGraphics.Rendering.MaterialState m_kLinesMaterialMaterial properties of the tract lines. -
m_kEigenVector
ModelImage m_kEigenVectorEigenVector values for displaying ellipsoids. -
m_kEigenValue
ModelImage m_kEigenValue -
m_kSphere
private WildMagic.LibGraphics.SceneGraph.TriMesh m_kSphereEllipsoids is a sphere with a non-uniform scale based on the eigen vectors and values. -
m_kCylinder
private WildMagic.LibGraphics.SceneGraph.TriMesh m_kCylinderCylinders is a sphere with a non-uniform scale based on the eigen vectors and values. -
m_iDimX
private int m_iDimXThe DTI volume extents: -
m_iDimY
private int m_iDimYThe DTI volume extents: -
m_iDimZ
private int m_iDimZThe DTI volume extents: -
m_fScale
private float m_fScaleEllipsoids scale factor, based on the DTI volume: -
m_kColorEllipse
private WildMagic.LibFoundation.Mathematics.ColorRGB m_kColorEllipseVolume-based color for the ellipsoids: -
m_iMaxGroups
private int m_iMaxGroupsmaximum number of fiber tracts currently displayed. -
isUsingVolumeColor
private boolean isUsingVolumeColorflag to indicate to use volume color or not -
m_kArrow
private WildMagic.LibGraphics.SceneGraph.Node m_kArrowarrow glyphs -
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
-
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:
Renderin classVolumeObject- 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
Sets the light for the EllipsoidsShader.- Overrides:
SetLightin classVolumeObject- 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()
-