ADC from tensor2metric, error?


I have tried

tensor2metric -adc DTI_ADC.mif DTI.mif
tensor2metric -num 1 -value DTI_L11.mif DTI.mif
tensor2metric -num 2 -value DTI_L22.mif DTI.mif
tensor2metric -num 3 -value DTI_L33.mif DTI.mif

mrcalc DTI_L11.mif DTI_L22.mif -add DTI_L33.mif -add 3 -div DTI_ADC_manual.mif

mrcalc DTI_ADC.mif DTI_ADC_manual.mif -substract diff.mif
mrview diff.mif

I restrained the intensity values from 0 to 0.003. and check the values (lower left corner of the window). Values change a lot from -0.003 to +0.003.
I was expecting diff.mif at zero.

How are you computing ADC in tensor2metric -adc ?


Hi Cyril,

Not sure if I will be helpful here at all and whether you are struggling mostly with just obtaining the actual adc files but what I did was simply to:

dwi2tensor dwi_Exampledirectory.mif /home/Desktop/tensor_sub01.mif > just as an example at the end I specified the directory where I want the file to be saved to

Then I performed:

tensor2metric /home/Desktop/tensor_sub01.mif -adc /home/Desktop/md_sub01.nii

Using the file derived from the first command to extract the mean diffusivity information from it and saving the final output file in NIFTI format as this is the format I want to use. So it was pretty straightforward to obtain those files. Then I actually used an fsl command to compute the mean of all the adc files I had per subject where at the end I could specify to obtain a txt. file and see the actual numbers.

You may want to look into the -lt and -gt functions as using them within mrcalc can help you specify a threshold lesser than/larger than a certain numerical value, but since I am a beginner myself, I research the MRTrix help page for these functions and then see what I can do with them. :blush:

Good luck and regards,

This should work the way you describe it. I’ve just tried to reproduce this, and everything checks out on my end, to within floating-point precision:

$ mrstats diff.mif
      volume       mean     median        std        min        max      count
       [ 0 ] -4.21289e-14          0 2.43823e-11 -4.65661e-10 4.65661e-10     979047

I’m not sure why your results would be any different. What software version are you using?

I’m also not sure what you mean with this:

Does this mean you’ve clamped the values in some way?