Read only the data matrix in a CIFTI file
Reads the CIFTI data matrix by converting it to a GIFTI using the
-cifti-convert -to-gifti-ext Connectome Workbench command. The result
will be a \(T x G\) matrix (\(T\) measurements, \(G\) non-empty
greyordinates). All brainstructures in the CIFTI will be obtained, with no
indication for which brainstructure each brainordinate corresponds to.
Medial wall vertices and voxels outside the subcortical mask will not be
included. No spatial information is included. This is the fastest way to
read in CIFTI data.
read_cifti_flat( cifti_fname, keep = FALSE, gifti_fname = NULL, write_dir = NULL, wb_path = NULL )
File path of CIFTI-format data (ending in ".d*.nii").
This function works by converting the CIFTI file to a GIFTI file and then reading it in. Should the GIFTI file be kept? If
FALSE(default), write it in a temporary directory regardless of
File path of GIFTI-format data to save the CIFTI as. Default: the CIFTI_fname but with the extension replaced with "flat.gii".
The directory in which to save the GIFTI, if it is being kept. If
NULL(default), use the current working directory.
(Optional) Path to Connectome Workbench folder or executable. If not provided, should be set with
A \(T x G\) matrix, where \(T\) is the number of measurements and \(G\) is the number of greyordinates in the CIFTI file.
Connectome Workbench Requirement
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 .
wb_path argument is the full file path to the Connectome
Workbench folder. (The full file path to the 'wb_cmd' executable also