Function neuroformats::fs_annot::read_annot[][src]

pub fn read_annot<P: AsRef<Path> + Copy>(path: P) -> Result<FsAnnot>

Read a brain parcellation from a FreeSurfer annot file.

A parcellation assigns each vertex of a brain surface mesh to exactly one brain region. The colortable contains data on the regions, including the region’s name, an RGB display color, and a unique identifier. A parcellation is the result of applying a brain atlas to the brain surface reconstruction of a subject.

See also

One can use the functions FsAnnot::regions, FsAnnot::vertex_regions, and FsAnnot::region_vertices to perform common tasks related to brain surface parcellations.

Examples

let annot = neuroformats::read_annot("/path/to/subjects_dir/subject1/label/lh.aparc.annot").unwrap();
println!("Annotation assigns the {} brain mesh vertices to {} different regions.", annot.vertex_indices.len(), annot.regions().len());