Hi, Maya-
Well, you could just keep listing each region you *don't* want to have in that comma-separated list within the angle bracket. The benefit of that is you can clearly check and doublecheck your list.
Though, I think that the FreeSurfer ROI labelling might help this. If I am not mistaken, the numbering 1-255 within both of their default parcellations covers the non-cortex and is the same. The cortical numbers differ in their two parcellations (what are referred to as the "2000" and "2009" in the AFNI translation). In the afni_fs_aparc+aseg_2009.txt file, it looks like you want to keep all ROIs with value >48---is that right? (These are the FS ROIs the values >11100.)
If so, then you could do this:
# keep only ROIs with value >48
3dcalc \
-a aparc.a2009s+aseg_REN_gmrois.nii.gz \
-expr 'a*step(a-48)' \
-prefix aparc.a2009s+aseg_REN_gmrois_CORT_ONLY.nii.gz
3drefit -copytables aparc.a2009s+aseg_REN_gmrois.nii.gz \
aparc.a2009s+aseg_REN_gmrois_CORT_ONLY.nii.gz
3drefit -cmap INT_CMAP aparc.a2009s+aseg_REN_gmrois_CORT_ONLY.nii.gz
... and that should provide the cortex-only ROIs for that parcellation?
--pt