External Email - Use Caution
Hi there
I am new to Freesurfer and I would like some help with best practices for exporting binary GM, WM and CSF masks.
I have run recon-all (FS v7.1) on some T1w images. I would now like to create binary GM, WM and CSF masks from the recon-all results. I have an existing adapted script that uses AFNI’s *3dcalc* to match certain label values in *aparc+aseg.mgz* and output binary masks (I have since realized I can also use *mri_binarize* for that), see below for the exact label values that are matched and added together per tissue segmentation. However, I have also seen the output files such as *brainmask.mgz*, *ribbon.mgz*, *wm.mgz*; so I am uncertain about what the standard practices are for creating binary masks for GM, WM and CSF from freesurfer’s output.
I’ve searched a bit on the mailing list and found two similar questions: https://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg46545.html and https://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg11365.html. However, these suggest different approaches (e.g. inverting WM and VCSF to get GM, vs matching several structures and adding them together), and I am unsure whether these will end up covering the same voxels.
*So, my main question is:* is there a standard best practice for generating binary masks for GM, WM and CSF, i.e. which labels should be included or excluded? Or which standard outputs of freesurfer should be used?
Additionally I would also like to get a binary mask of the amygdala and the Brodmann areas 4a, 4p and 6. The amygdala seems to work fine. For the motor areas, I have tried my standard route of matching the label values (404, 405, 406 respectively) in aparc+aseg.mgz, but this doesn’t seem to yield any matches, i.e. all voxels in the resulting mask image have value zero. *My second question:* can you perhaps think of a reason for this error? *And question 2, part 2:* I assume BA 4a, 4p and 6 are all bilateral, since I didn’t see them being specified as LH or RH, is there a quick way to get only the LH?
Best regards,
Stephan Heunis
--------------------
GM, WM and CSF labels used in current script:
# Grey matter: # Subcortical nuclei: # - 10: Left-Thalamus-Proper # - 11: Left-Caudate # - 12: Left-Putamen # - 49: Right-Thalamus-Proper # - 50: Right-Caudate # - 51: Right-Putamen # Cerebellum: # - 8: Left-Cerebellum-Cortex # - 47: Right-Cerebellum-Cortex # Hippocampus and amygdala # - 17: Left-Hippocampus # - 18: Left-Amygdala # - 53: Right-Hippocampus # - 54: Right-Amygdala # Cortical ribbon: # - within(a,1000,3000): ctx-lh-[all], ctx-rh-[all]
# White Matter: # - 2: Left-Cerebral-White-Matter # - 7: Left-Cerebellum-White-Matter # - 41: Right-Cerebral-White-Matter # - 46: Right-Cerebellum-White-Matter # - 251: CC_Posterior # - 252: CC_Mid_Posterior # - 253: CC_Central # - 254: CC_Mid_Anterior # - 255: CC_Anterior
# CSF: # - 4: Left-Lateral-Ventricle # - 14: 3rd-Ventricle # - 43: Right-Lateral-Ventricle