Hello all,
What could go wrong if the mrmetric
outputs -nan
? This happens with some of my FA maps so I’m guessing something should be wrong with FA maps.
For one of the FA maps that even gives -nan
when I compare it to itself (image1 and image2 are the same FA map), the mrstats
output is as follows:
mrstats FA.templatespace.mif
volume mean median stdev min max count
[ 0 ] 0.0247897 0 0.0743169 -0.094143 1.04482 1965849
I appreciate any hints that help me figure out what is going wrong here.
Thank you,
Mahmoud
Which metric and space did you use? Voxel-space operations can become NAN if any voxel is nan, the others should not. Do you have NANs in the image? (mrcalc FA.templatespace.mif -finite - | mrstats -
)
Have you tried giving FA.templatespace.mif
as image1 and image2 to mrmetric?
Hi Max,
Thanks for your advice. I’m running the following command:
cc=`mrmetric -mask1 ${mask1} -mask2 ${mask2} ${image1} ${image2} -quiet`
Please see below:
$ mrcalc FA.templatespace.mif -finite - | mrstats -
mrcalc: [100%] computing: finite (FA.templatespace.mif)
volume mean median stdev min max count
[ 0 ] 0.999984 1 0.00397099 0 1 1965880
$ mrcalc FA.templatespace.mif -isnan - | mrstats -
mrcalc: [100%] computing: isnan (FA.templatespace.mif)
volume mean median stdev min max count
[ 0 ] 1.5769e-05 0 0.00397099 0 1 1965880
Also,
$ mrmetric -mask1 dwi_mask_in_template_space.mif -mask2 dwi_mask_in_template_space.mif FA.templatespace.mif FA.templatespace.mif
mrmetric: [100%] preloading data for "FA.templatespace.mif"
mrmetric: [100%] preloading data for "FA.templatespace.mif"
-nan
Thank you,
Mahmoud