netneurotools.freesurfer.apply_prob_atlas
- netneurotools.freesurfer.apply_prob_atlas(subject_id, gcs, hemi, *, orig='white', annot=None, ctab=None, subjects_dir=None, use_cache=True, quiet=False)[source]
Create an annotation file for subject_id by applying atlas in gcs.
Runs subprocess calling FreeSurfer’s “mris_ca_label” function; as such, FreeSurfer must be installed and accesible on the local system path.
- Parameters:
subject_id (str) – FreeSurfer subject ID
gcs (str) – Filepath to .gcs file containing classifier array
hemi ({'lh', 'rh'}) – Hemisphere corresponding to gcs file
orig (str, optional) – Original surface to which to apply classifer. Default: ‘white’
annot (str, optional) – Path to output annotation file to generate. If set to None, the name is created from the provided hemi and gcs. If provided as a relative path, it is assumed to stem from subjects_dir/subject_id. Default: None
ctab (str, optional) – Path to colortable corresponding to gcs. Default: None
subjects_dir (str, optional) – Path to FreeSurfer subject directory. If not set, will inherit from the environmental variable $SUBJECTS_DIR. Default: None
use_cache (bool, optional) – Whether to check for existence of annot in directory specified by `{subjects_dir}/{subject_id}/label’ and use that, if it exists. If False, will create a new annot file. Default: True
quiet (bool, optional) – Whether to restrict status messages. Default: False
- Returns:
annot – Path to generated annotation file
- Return type: