Extraction 3*3 Matrix from DTI Image

Hi all,

I have a set of patients’ dti images. How do I extract the 3x3 diffusion tensor matrices per each voxel in C++ using VTK?

thank you

You can look at the vtkDiffusionTensorMathematics source code for examples.

1 Like

Hello,
thank you for the responce.
I have a vtkMRMLDiffusionTensorVolumeDisplayNode object, and i need to extract the 3*3 tensor matrix per each voxel.

after that, i can use the vtkDiffusionTensorMathematics to calculate the eigenvalues.
how do I extract for each voxel, the diffusion tensor matrix from a vtkMRMLDiffusionTensorVolumeDisplayNode object?

thank you

You’ll want the vtkMRMLDiffusionTensorVolumeNode, instance (with the image data) not the display node (which stores display parameters).

Once you have that, the vtkImageData has the actual array of tensor values and you can access like in the vtkDiffusionTensorMathematics or like this (in python, but could be converted to C++).

1 Like