Tensor2metric works not well to give negative RD, AD and RD inside the brain

Hi, mrtrix experts:

I am using dwi2tensor and tensor2metric to generate the DTI maps (FA, MD, RD, AD) with my diffusion data with quite low resolution in one direction: 1.3672 x 1.3672 x 2.7.

So after i fit it with tensor2metric, and I visualized it in freeview and just to show the negative value,

we can see that several voxels inside the brain gave negative values, this is worse after I register the individual DTI maps onto a template with interpolation, which makes the negative regions bigger.

Do you have encountered the similar issues???
Thanks in advance

Good night

Hi @Junhao_Wen,

This is not so surprising, as the dwi2tensor implementation isn’t constrained to produce tensors with positive eigenvalues. Once one or more eigenvalues are negative, the FA, MD, RD and AD metrics can go beyond their intended physically sensible range, e.g. MR, RD and AD values below 0 or FA values beyond 1. The most straightforward (yet naive) way to deal with this, if these values cause you trouble, is to cap them to a sensible range; i.e. make the negative values zero.

Interpolation will indeed “spread” the problem slightly (potentially). Depending on the type of interpolation, even an image with only positive values (though some zeros) may introduce negative values. To avoid this, stick to linear interpolation (not cubic and beyond).

Cheers,
Thijs

Hi all,

Posting in this old discussion but I encountered a similar issue.

I generated tensor maps (FA, MD, AD and RD) with tensor2metric from dwi. files and registered the DTI maps to a template. When doing the coregistration, I used normalised mutual information for estimation options, the default histogram smoothing [7 7] and 4-th degree B-spline interpolation as this was the default in the programme I used (SPM).

Later on I wanted to compare the values of the diffusion metrics along white matter streamlines that were generated from a predictive algorhitm/simulator I use which utilised the lesion volumes from ischemic stroke patients as input: and it came up with an output containing the white matter streamlines that will be damaged for each lesion. Afterwards, I inverse-normalised these simulator output files back to native space to do statistics for each patient.

I further created an overall diffusion mask by multiplying the generated fa, md, ad and rd masks and then multiplied the inverse-normalised simulator output images to the created overall diffusion mask to generate my final ROI (white matter streamlines predicted by the simulator along which I want to measure fa, md, ad and rd). When inverse-normalising the output files from the simulator, I tried doing it with both 4th degree B-spline and nearest neighbour interpolation to restrict the neighbouring voxels a bit, and in both scenarios, I receive negative values for the md, ad and rd.

Perhaps it is important to mention that I also performed mrcalc -finite on the masks because I wanted to avoid obtaining NaNs or negative values, for that matter. Still, the final values I obtain are negative for the diffusion parameters. By the way, my b is 800s/mm² if that is relevant.

So I wonder whether the issue can be the interpolation, but also whether it is the interpolation when inverse-normalising the simulator output (nii.) images, or when coregistering the fa, md, ad and rd maps to the template.

I know this is a bit lengthy and confusing, but any help would be very much appreciated! :nerd_face: :exploding_head:

Thanks a lot for this great tool and advice page!

Best wishes,
Ivana

Hi Ivana,

You’ve got a fair bit going on there, but it sounds to me like you’re stuck staring at a counter-intuitive final result, and what’s needed is to simplify things a bit by looking at the raw data and the individual steps.

Despite your transformation of DWI data from subject to template space and transformation of a calculated mask in template space to subject space, ultimately all you’ve got is DWI data in subject space, which has undergone no spatial transformation and no interpolation, and you’re sampling values of tensor metrics within specific voxels. If that’s indeed the case, then for the sake of diagnosing any issue, we can actually ignore much of the details you’ve provided. You’re simply getting negative values for MD / AD / RD somewhere in your DWIs and want to know why.

So probably the first step would be to visualise those maps in a manner that allows you to see just how much of the brain white matter contains negative values. For instance, if MD is negative throughout the entire image, then the vast majority of your exhaustive experimental detail is a red herring. If it’s specific regions of the brain, maybe look at the raw DWI data and see if there is anything obviously unusual going on.

I’ll add a few more replies to specific details that may or may not be relevant but I still want to flag them:

I generated tensor maps (FA, MD, AD and RD) with tensor2metric from dwi. files and registered the DTI maps to a template.

You don’t want to be individually registering these different contrasts to templates. There should be a single transformation estimated that maps from subject to template space, and you should then be applying that transformation to all quantitative maps.

and it came up with an output containing the white matter streamlines that will be damaged for each lesion.
(white matter streamlines predicted by the simulator along which I want to measure fa, md, ad and rd).

Is it true that the output of the simulation is actually “streamlines”, i.e. ordered sets of 3D vertices? Because if so, some of the subsequent description seems to be either lacking or outright incorrect; e.g. transforming such data from template space back to subject space does not necessitate the use of interpolation (well technically the non-linear warp image is interpolated, but I hope you see what I mean nevertheless).

Would it be more accurate to say that the output of the simulation is a binary mask image? Or maybe in the more general case an image containing values between 0 and 1? That seems more likely to me given the rest of your description, but it would mean that use of the word “streamlines” here is erroneous and misleading.

I further created an overall diffusion mask by multiplying the generated fa, md, ad and rd masks and then multiplied the inverse-normalised simulator output images to the created overall diffusion mask to generate my final ROI

I need to try to disentangle this. It sounds like you have four separate binary mask images, corresponding in some way to FA, MD, AD and RD. However it’s unclear what the source of these images is. Intuitively, one would expect that, regardless of whether you’re talking about a while brain analysis mask, or a focal mask corresponding to lesion volumes / simulator output, there should be only one resulting binary mask that is applicable to any quantitative map. You’re performing an explicit step here in an attempt to have such a unified mask, but it’s not clear what you have done upstream that has necessitated such a step.

Perhaps it is important to mention that I also performed mrcalc -finite on the masks because I wanted to avoid obtaining NaNs or negative values, for that matter.

Given a “mask” is a binary image that can contain only the values 0 and 1, and therefore can’t contain infinite values, I am guessing that this comment is actually supposed to be in reference to the quantitative parameter maps? If you have non-finite values in those parameter maps, that is worth interrogating more closely manually, just as is the case for negative values. But as previously, this should be checked in the subject-space DWI data that has not gone through any kind of transformation or interpolation process.

Hopefully that gives you enough to come back with some more specific information for us to look at :+1:
Rob

1 Like