Hi Mohammad,

I am surprised that the workflow you described did not work. In MITK, we use 
the itk::DiffusionTensor3D< float > as datatype for the tensor images, which 
indeed is an 6-element array. So the stored 6 components are mapped directly to 
the array.

Also for the reconstruction of the full (symmetrical) matrix, you did chose the 
right ordering. There is a note in the ITK Documentation for the method 
::GetTrace() of the diffusion tensor which reads:

/**
* Get the Trace, specialized version for 3D.
*
* Note that the indices are related to the fact
* that we store only the upper-right triangle of
* the matrix. Like
*
*       | 0  1  2  |
*       | X  3  4  |
*       | X  X  5  |
*
* The trace is therefore the sum of the components
* M[0], M[3] and M[5].
*
*/

And I also took look into the operator()(row,column) of the 
itk::SymmetricTensor3D class which allows a ‘matrix-like’ access to the 
internal array and it makes the same mapping of the elements.

How did you found out that this ordering is not working in your code?

Best,
Jan

From: Mohammad Bajammal [mailto:msbajam...@gmail.com]
Sent: Freitag, 4. September 2015 06:56
To: mitk-users@lists.sourceforge.net
Subject: [mitk-users] MitkTensorReconstruction output data structure

Hi,

I'm using the MitkTensorReconstruction command line tool to generate a dti 
(nrrd) file. I have successfully read the dti file tensors into another piece 
of code I'm writing.

The tensors in the dti file have the following form: [volume width x volume 
height x volume depth x 6], where 6 is the number of scalars necessary to 
completely define the diffusion tensor.

My question is: what sequence should I use to reconstruct the full 3x3 
diffusion tensor back from the 6 elements vector?

I have tried the following order:
[1 2 3]
[2 4 5]
[3 5 6]

but it's not working. This was based on checking the source code of the tensor 
reconstruction miniapps to reverse the tensor serialization.

Your help is greatly appreciated.

Mohammad

------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to