You can use mri_binarize with the --match option using the aseg.mgz or aparc+aseg.mgz (the latter probably better but harder). You would specify the indices for all the GM segments (or WM or CSF). You can also try some of the predefined options, eg,
--ctx-wm : set match vals to 2, 41, 77, 251-255 (aseg for cerebral WM) --all-wm : set match vals to 2, 41, 77, 251-255, 7, and 46, (aseg for all WM) --ventricles : set match vals those for aseg ventricles+choroid (not 4th) --wm+vcsf : WM and ventricular CSF, including choroid (not 4th) --gm : match for all WM and VCSF and background, then invert --subcort-gm : subcortical gray matter
though Ihave not used them in a while and don't know whether they are still accurate
On 03/29/2016 06:06 AM, Mohamed Ali Bahri wrote:
Dear Freesurfer experts,
I am wondering if the gm/wm/csf binary masks (with of course the cerebellum) could be extracted from the recon-all freesurfer results. Any idea/suggestion will be very welcome.
Many thanks in advance,
Best regards,
Mohamed