"gifti"Format a \(V \times T\) numeric matrix (V vertices, T measurements) or a length-T list
of length-V numeric vectors as a "gifti" using a template
"gifti". The brain hemisphere (left or right) must be indicated.
as.metric_gifti(
data,
hemisphere = c("left", "right"),
intent = "NONE",
data_type = NULL
)The "gifti"
\(V \times T\) numeric matrix, or length \(T\) list of length \(V\) numeric vectors
The side of the brain the data represents: "left"
(default) or "right". Used to fill the "AnatomicalStructurePrimary"
metadata field.
The NIFTI intent, with prefix "NIFTI_INTENT_*". Default:
"NONE". For a list of intents see
https://nifti.nimh.nih.gov/nifti-1/documentation/nifti1fields/nifti1fields_pages/group__NIFTI1__INTENT__CODES.html/document_view
The NIFTI type of data: "NIFTI_TYPE_INT32"
or "NIFTI_TYPE_FLOAT32". Can also be NULL (default), in which
case the NIFTI type will be inferred from data.
If data is already a "gifti", data$data will be
used and any metadata will be overwritten by the template or discarded.