Learn R Programming

freesurferformats (version 1.0.2)

write.fs.annot.gii: Write annotation to GIFTI file.

Description

Write an annotation to a GIFTI XML file.

Usage

write.fs.annot.gii(filepath, annot)

Arguments

filepath

string, path to the output file.

annot

fs.annot instance, an annotation.

See Also

Other atlas functions: atlas.from.lut.and.csv(), colortable.from.annot(), read.fs.annot(), read.fs.colortable(), write.atlas.to.lut.and.csv(), write.fs.annot(), write.fs.colortable()

Other gifti writers: write.fs.label.gii(), write.fs.morph.gii(), write.fs.surface.gii()

Examples

Run this code
if (FALSE) {
# Load annotation
annot_file <- system.file("extdata", "lh.aparc.annot.gz",
  package = "freesurferformats",
  mustWork = TRUE
)
annot <- read.fs.annot(annot_file)
# New method: write the annotation instance:
write.fs.annot.gii(tempfile(fileext = ".annot"), annot)
}

Run the code above in your browser using DataLab