annot_to_gifti: Convert FreeSurfer annotation to GIFTI

View source: R/image-utils.R

annot_to_giftiR Documentation

Convert FreeSurfer annotation to GIFTI

Description

Reads a FreeSurfer .annot file and writes a GIFTI label file.

Usage

annot_to_gifti(annot_path, output_path = NULL)

Arguments

annot_path

Path to FreeSurfer .annot file.

output_path

Output GIFTI path. If NULL, replaces the extension with .label.gii.

Value

The output file path (invisibly).

References

Markello RD et al. (2022) Nature Methods 19:1472-1480. doi:10.1038/s41592-022-01625-w

Examples

## Not run: 
annot_to_gifti("lh.aparc.annot")
annot_to_gifti("lh.aparc.annot", "lh.aparc.label.gii")

## End(Not run)

neuromapr documentation built on Feb. 27, 2026, 5:08 p.m.