Trying to create custom DTI volume

Hello,

I am trying to use the diffusion tractography capabilities of 3DSlicer to visualise some data I have collected from my PhD research. It is similar to diffusion weighted MRI but does not produce diffusion weighted images. My data is processed in such a way that I end up with vectors at various coordinates in 3D space (these vectors represent the directions of collagen fibre tracts).

Essentially what I would like to do is jump into the “diffusion mri analysis pipeline” so I start with a custom DTI volume in slicer. i.e. I would like to generate a custom version of slide 42/107 from: here .

My current approach has been to try and create a new volume following the process here but I cannot seem to find a way to input a custom tensor field. Does anyone know if this is possible or whether there is a better way of achieving what I’m trying to do?

Thank you, please let me know if anything needs clarifying,

Harry

You need to be sure to make a vtkMRMLDiffusionTensorVolumeNode and manipulate the array as described here. You’ll need to determine the best method to estimate tensors from the vectors you have.

Thank you, from a lot of fiddling I have managed to do it by creating a vtkFloatArray and adding it to imageData with the line imageData.GetPointData().SetTensors(tensorarray) and then volumeNode.SetAndObserveImageData(imageData). With most of the other steps the same as in the documentation you linked.

You can also visualize vector fields very nicely, without converting them to tensors. All you need to do is to select Description->Transform in the “Add data” window. You can then use the field using Transforms display infrastructure. You can also use the vector field to warp any nodes, invert the field, fit b-spline to it, etc.