How to isolate/visualize -nan values in mrview?

Hello all,

Is there any way to isolate/visualize problematic pixels (-nan) in mrview?

For example, I have some FA maps created by these commands:

dwi2tensor -mask mask.mif -predicted_signal predict.mif dwi_denoised_unringed_preproc_upsampled.mif tensor.mif

tensor2metric -fa FA.mif  -mask mask.mif tensor.mif

Later I realized that there are some -nan values in FA.mif but finding their spot by visual inspection was not easy. I was wondering if someone knows a way to isolate those -nan values for faster visual detection?

Following screenshot shows the spot of -nan values in an FA map:

To view NaNs in mrview, you could simply aggressively change the brightness of the image. NaN voxels will remain black no matter how bright the rest of the image is.

Another option is to pipe the image through mrcalc first, e.g.:

mrcalc fa.mif -isnan - | mrview -
1 Like