Read a CIFTI file by exporting it as a single GIFTI
using -cifti-convert -to-gifti-ext
(read_cifti_flat
),
and obtaining the brainordinate mapping using
-cifti-export-dense-mapping
(info_cifti
).
read_cifti_convert(
cifti_fname,
surfL_fname = NULL,
surfR_fname = NULL,
brainstructures = c("left", "right"),
mwall_values = c(NA, NaN),
wb_path = NULL,
verbose = FALSE,
...
)
File path of CIFTI-format data (ending in ".d*.nii").
(Optional) File path of GIFTI surface geometry file representing the left cortex.
(Optional) File path of GIFTI surface geometry file representing the right cortex.
Character vector indicating which brain structure(s)
to obtain: "left"
(left cortical surface), "right"
(right
cortical surface) and/or "subcortical"
(subcortical and cerebellar
gray matter). Can also be "all"
(obtain all three brain structures).
Default: c("left","right")
(cortical surface only).
If a brain structure is indicated but does not exist, a warning will be raised and that brain structure will be skipped.
(Optional) Path to Connectome Workbench folder or executable.
If not provided, should be set with
ciftiTools.setOption("wb_path", "path/to/workbench")
.
Should occasional updates be printed? Default: FALSE
.
Additional arguments to read_cifti_flat
.
A "xifti"
object. See is.xifti
.
This function uses a system wrapper for the 'wb_command' executable. The
user must first download and install the Connectome Workbench, available
from https://www.humanconnectome.org/software/get-connectome-workbench .
The wb_path
argument is the full file path to the Connectome
Workbench folder. (The full file path to the 'wb_cmd' executable also
works.)