Negative Values in MD, RD and AD

Hello everyone,

I am currently evaluating DWI data of the cervical and thoracic spine.
In the process, I have noticed several negative values in the evaluations of MD, RD and AD in multiple subjects.
However, no negative values appear in the histograms.
As I understand it, negative values should not be able to show up in AD, MD and RD either.

Do you have an idea what could be the reason for this?

I am using version 5.4 and have used the following command:

sct_extract_metric -i dti_MD.nii.gz -f label/atlas -l 4,5,51,53,54,55 -method map -vert 2:8 -vertfile label/template/PAM50_levels.nii.gz -perlevel 1 -o md_in_wm.csv

Thank you for your help.


Hi @sven,

Thank you for posting on the forum and reporting this issue! :slight_smile:

Would you be able to share examples of image files where this happens?

(Specifically, it would be helpful to have the original DWI data so that we could investigate what is happening within sct_dmri_compute_dti.)

Kind regards,

Hi Joshua,

thank you for your fast reply.

Here are some pictures of the results: MD, AD and RD of the same subjects. As you can see, the negative values differ from subject to subject as well as within the results of a single subject.

I will send you the original data in private message. Hope that is ok for you.

Again, thank you so much for looking into this!

Best regards


I will send you the original data in private message. Hope that is ok for you.

Of course! :slight_smile:

Kind regards,

Sorry, but I can’t find the message button. :sweat_smile:
Maybe this is not enabled, yet, because I just registered?

Hi @sven,

Thank you so much for sharing some example data in a private message! I was able to use your data and script to reproduce the issue.

I’ve since been investigating the data that you provided in GitHub Issue #3849, and I’ve managed to narrow down the problem to sct_dmri_compute_dti -method restore, which appears to be producing some spurious outlier values in the computed DTI measures.

I believe these outlier voxels are causing the sct_extract_metric -map calculation to produce negative values.

To test this, I then tried without -method restore in your script, and was able to produce all-positive DTI values in the CSV files. :slight_smile:

I want to continue investigating why -method restore is behaving this way. But, for now, could you please try rerunning your processing without -method restore to see if this addresses your issue?

Kind regards,

Thank you so much, Joshua!

I rerun two of my subjects with negative values and so far only positive values were created.
I am going to analyze the rest without the restore-flag and will keep you updated.

Thanks again!

Best regards


1 Like

Sorry for being late to the party, but @joshuacwnewton already did an excellent job addressing this issue. Indeed, RESTORE algorithm is known to have these issues. See notably

That is good to know! Thank you for the link.
So far the script is running smoothly. I guess Joshua just solved the problem :slight_smile:
So again, many thanks to both of you!

Best Sven