Threshold for gray matter mask in `compute_brain_mask`

Hello,

I am trying to create a gray matter mask using Nilearn’s compute_brain_mask method. I found that the default threshold (0.5) does not work well. In fact, any values above 0.2 look quite aggressive. I wonder if there are recommended threshold values for gray matter?

Thanks,
Shaoyun

Dear Shaoyun,
No there is no general recipe, it’s more trial-and-error process. Your images may have some bias in the upper slices.
On thing: if your images are in MNI space, I would advise you to use the standard MNI GM mask, which makes your mask subject-independent and eases comparison across studies.
Best,
Bertrand