Hi Ivana,
To confirm, you are asking specifically about changing the NaN values present in the FA / MD images to some other finite value?
(I want to clarify as there’s been prior discussion about the exclusion of implausible values in the DWIs when performing the tensor fit; so this would be influencing whether or not the outcome of the tensor fit is reasonable, rather than trying to mitigate the effects of an unreasonable tensor fit after the fact)
If that is the case, then there’s nothing specifically within tensor2metric
, but you can replace non-finite values with some other value after the fact:
mrcalc FA.mif -finite FA.mif 0.0 -if FA_nonan.mif
This places the value 0.0 in any voxel where the value of image FA.mif
is not finite. For MD you however have the issue of determining an appropriate replacement value; it’s not a matter of “excluding non-numerical values” so much as substituting.
Rob