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