write.fs.label.gii: Write a binary surface label in GIFTI format.

Description Usage Arguments Value See Also Examples

View source: R/write_fs_label.R

Description

The data will be written with intent 'NIFTI_INTENT_LABEL' and as datatype 'NIFTI_TYPE_INT32'. The label table will include entries 'positive' (label value 0), and 'negative' (label value 1).

Usage

1
write.fs.label.gii(filepath, vertex_indices, num_vertices_in_surface)

Arguments

filepath

string, the full path of the output GIFTI file.

vertex_indices

integer vector, the vertex indices which are part of the label (positive). All others not listed, up to num_vertices_in_surface, will be set to be negative.

num_vertices_in_surface

integer, the total number of vertices in the surface mesh. A GIFTI label is more like a mask/an annotation, so we need to know the number of vertices.

Value

format, string. The format that was used to write the data: "gii".

See Also

Other morphometry functions: fs.get.morph.file.ext.for.format(), fs.get.morph.file.format.from.filename(), read.fs.curv(), read.fs.mgh(), read.fs.morph.gii(), read.fs.morph(), read.fs.volume(), read.fs.weight(), write.fs.curv(), write.fs.mgh(), write.fs.morph.asc(), write.fs.morph.gii(), write.fs.morph.ni1(), write.fs.morph.ni2(), write.fs.morph.smp(), write.fs.morph.txt(), write.fs.morph(), write.fs.weight.asc(), write.fs.weight()

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

Examples

1
2
3
  label = c(1L, 23L, 44L); # the positive vertex indices
  outfile = tempfile(fileext=".gii");
  write.fs.label.gii(outfile, label, 50L);

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