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

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

Examples

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