How to generate gray matter mask from fmriprep outputs

Hello all,

My goal is to generate a binary GM mask to be used on MNI space (I’m doing my analyses on MNI space and all subjects’ data were transformed onto MNI space). I know that fmriprep outputs a *GM_probseg.nii.gz file for each subject on MNI. However, I do not know how to make this into a binary mask – Should I count all non-zero voxels as 1 and others 0 or is there some criteria i should follow? My thought is to generate a gray matter mask for each subject using the fmriprep output and then create a shared gray matter mask for all my subjects. If this is not the correct way to go, because I’m doing stuff on MNI space only, does FSL have a default MNI GM mask? Or is there a default one I could use?

Any insights would be really helpful. Thank you all in advance!

1 Like