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

Description Usage Arguments Note See Also Examples

View source: R/write_fs_annot.R

Description

Write an annotation to a GIFTI XML file.

Usage

1
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.

See Also

Other atlas functions: colortable.from.annot(), read.fs.annot(), read.fs.colortable(), write.fs.annot(), write.fs.colortable()

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
   # 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);


## End(Not run)

freesurferformats documentation built on Feb. 11, 2022, 5:06 p.m.