Read a label from a GIFTI label/annotation file.
read.fs.label.gii(filepath, label_value = 1L, element_index = 1L)
filepath | string. Full path to the input label file. |
---|---|
label_value | integer, the label value of interest to extract from the annotation: the indices of the vertices with this value will be returned. See the note for details.. It is important to set this correctly, otherwise you may accidently load the vertices which are *not* part of the label. |
element_index | positive integer, the index of the data array to return. Ignored unless the file contains several data arrays. |
integer vector, the vertex indices of the label
A GIFTI label is more like a FreeSurfer annotation, as it assigns a label integer (region code) to each vertex of the surface instead of listing only the set of 'positive' vertex indices. If you are not sure about the contents of the label file, it is recommended to read it with read.fs.annot.gii
instead. The `read.fs.label.gii` function only extracts one of the regions from the annotation as a label, while read.fs.annot.gii
reads the whole annotation and gives you access to the label table, which should assign region names to each region, making it clearer which 'label_value' you want.
Other label functions:
read.fs.label.native()
,
read.fs.label()
,
write.fs.label()
Other gifti readers:
read.fs.annot.gii()
,
read.fs.morph.gii()
,
read.fs.surface.gii()