Skip to contents

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.

Note

This function does not write a GIFTI file that is valid according to the specification: it stores extra color data in the Label nodes, and there is more than one Label in the LabelTable node.

Examples

if (FALSE) { # \dontrun{
# 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)
} # }