Masking niml.dset file on the surface from the FreeSurfer label file.

AFNI version info (afni -ver):
Precompiled binary macos_13_ARM_clang: May 22 2024 (Version AFNI_24.1.10 'Publius Septimius Geta')

I suspect that the surface generated by @SUMA_Make_Spec_FS includes not only the cortex but also other regions.
Since FreeSurfer’s recon-all output contains a label file (lh/rh.cortex.label) that defines the cortex, can we use this label file to mask the BOLD signals in the surface dataset (niml.dset) so that only the cortical vertices remain?

The label file is a data table and looks like below:
| Index of Cortex | x coordinate | y coordinate | z coordinate | color code(?) |

The FreeSurfer surfaces are defined for cortical surfaces with some nodes left undefined by the output annotation labels. Here, the undefined nodes have the value 0, so the annotation label file like std.141.lh.aparc.a2009s.annot.niml.dset may be used as a mask.

Yes, that's great idea. Maybe I can use 3dcalc -a {annot.niml.dset file} -expr "step(a)" for making cortex masking niml.dset file.
Thanks!

1 Like