Handling Negative Values After mrdegibbs and Tensor Estimation

Hello MRtrix3 community,

I’ve been running my preprocessing pipeline without technical errors, but I’ve encountered an issue regarding negative values in my diffusion tensor and MD images, and I’d appreciate your insights based on your experience.

After applying mrdegibbs, I noticed that small negative values were introduced into the data. I continued with the pipeline (including dwi2tensor and tensor2metric), but negative values persisted in the output MD image. To address this, I decided to threshold the MD map by setting all negative values to zero after tensor2metric.

Based on this, I have a few questions:

  1. What is the recommended approach for handling negative values in diffusion metrics like MD? Is it appropriate to threshold these values to zero? I’ve seen some studies adopt this approach, but others suggest it may not be ideal.
  2. If thresholding is indeed acceptable, should it be applied to the tensor image itself (before computing metrics), or only to the derived metrics like MD? or maybe after the mrdegibbs output?
  3. I tried using linear interpolation in all subsequent image transformations (as recommended to avoid introducing negative values through resampling), but the negatives remained—hence my decision to threshold the MD image.

I’d really appreciate your feedback on best practices here. Many thanks in advance!

Best regards,
Javier

Here are the codes:

for_each * : dwidenoise IN/dwi.mif IN/dwi_denoised.mif -noise IN/noise.mif

for_each * : mrdegibbs IN/dwi_denoised.mif IN/dwi_denoised_unringed.mif -axes 0,1

for_each * : dwifslpreproc IN/dwi_denoised_unringed.mif IN/dwi_denoised_unringed_preproc.mif -rpe_none -pe_dir j -eddy_options " --repol --cnr_maps --slm=linear" -eddyqc_all eddyQC

for_each * : dwibiascorrect ants IN/dwi_denoised_unringed_preproc.mif IN/dwi_denoised_unringed_preproc_unbiased.mif -bias IN/bias.mif

for_each * : mrconvert IN/dwi_denoised_unringed_preproc_unbiased.mif IN/dwi_denoised_unringed_preproc_unbiased.nii.gz

Here, I generated (in Neurodesk) the DWI mask using SynthStrip, everything went perfect

mri_synthstrip -i input_nii -o output_stripped -m output_mask

for_each * : mrmath IN/dwi_brain_mask.nii.gz max -axis 3 IN/dwi_brain_mask_3D.mif

Next Step: DWI to tensor

for_each * : dwi2tensor -mask IN/dwi_brain_mask_3D.mif IN/dwi_denoised_unringed_preproc_unbiased.mif IN/tensor.mif

for_each * : tensor2metric IN/tensor.mif -fa IN/FA.mif -adc IN/MD.mif -ad IN/AD.mif -rd IN/RD.mif

for_each * : mrcalc IN/MD.mif 0 -max IN/MD_corrected.mif # Here, I replaced negative values to zero

Finally, based on previous approaches (Tijssen 2019, van Norden 2012), negative eigenvalues of the tensor were set to zero prior to MD computation to avoid physically implausible values.

Code:
for_each * : tensor2metric IN/tensor.mif -value IN/eigenvalues.mif -num 1,2,3
for_each * : mrcalc IN/eigenvalues.mif 0 -max IN/eigenvalues_pos.mif
for_each * : mrmath IN/eigenvalues_pos.mif mean -axis 3 IN/MD.mif

for_each * : tensor2metric IN/tensor.mif -value IN/eigenvalues.mif -num 1,2,3
for_each * : mrcalc IN/eigenvalues.mif 0 -max IN/eigenvalues_pos.mif
for_each * : mrmath IN/eigenvalues_pos.mif mean -axis 3 IN/MD.mif

I compared the numerical outputs with my previous approach, and the results were practically the same. However, this new approach appears to be more consistent and it is the method used in published studies.

Regards.

Tijssen RHN, Jansen JFA, Backes WH. Assessing and minimizing the effects of noise and motion in clinical DTI at 3 T. Hum Brain Mapp. 2009 Aug;30(8):2641–55.

van Norden AGW, de Laat KF, Fick I, van Uden IWM, van Oudheusden LJB, Gons RAR, et al. Diffusion tensor imaging of the hippocampus and verbal memory performance: the RUN DMC study. Hum Brain Mapp. 2012 Mar;33(3):542–51.