0th

Percentile

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

Keywords
internal
##### Usage
read_cifti_flat(
cifti_fname,
keep = FALSE,
write_dir = NULL,
wb_path = NULL
)
##### Arguments
cifti_fname

File path of CIFTI-format data (ending in ".d*.nii").

keep

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

File path of GIFTI-format data to save the CIFTI as. Default: the CIFTI_fname but with the extension replaced with "flat.gii".

write_dir

The directory in which to save the GIFTI, if it is being kept. If NULL (default), use the current working directory.

wb_path

(Optional) Path to Connectome Workbench folder or executable. If not provided, should be set with ciftiTools.setOption("wb_path", "path/to/workbench").

##### Value

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