Visualize DTI tensor image

Hello,

I have a NIFTI file with estimated DTI tensors consisting of 6 volumes (for each element of the diffusion tensor). I used “vtkNIFTIImageReader” with “TimeAsVectorOn” and received the image data, whereby the point data has 6 components.

How can I use “vtkStreamTracer” to show some fibers? I know that I need a vector field, but I could not figure out how to create it from from the data I have.

Any ideas?

Thank you!

Hello,

You might want to have a look at the existing VTK filters that compute the tensors eigenvectors:
https://gitlab.kitware.com/vtk/vtk/-/blob/master/Filters/Core/vtkTensorGlyph.cxx#L279

The HyperStreamlines example might also be of interest to you: https://examples.vtk.org/site/Cxx/VisualizationAlgorithms/HyperStreamline/

Note also that vtkMath offers functions to convert symmetric tensors (6-components) to 9-component tensors.

Hth,
Lucas