View source: R/read_cifti_flat.R
read_cifti_flat | R Documentation |
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 \times G
matrix (T
measurements, G
non-empty
grayordinates). 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,
idx = NULL,
write_dir = NULL
)
cifti_fname |
File path to a CIFTI file (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 |
gifti_fname |
File path of GIFTI-format data to save the CIFTI as. Should end with ".func.gii" for dscalar and dtseries CIFTI, and ".label.gii" for dlabel CIFTI. Default: the CIFTI_fname but with the CIFTI extension replaced with the appropriate GIFTI extension. |
idx |
Numeric vector indicating the data indices (columns) to read. If
For high-resolution CIFTI files, reading in only a subset of the data saves memory, but will be slower than reading in the entire file due to the required intermediate steps. |
write_dir |
The directory in which to save the GIFTI, if it is being
kept. If |
A T \times G
matrix, where T
is the number of measurements
and G
is the number of grayordinates in the CIFTI file.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.