ciftiTools (version 0.1.6.0)

read_cifti_convert: Read a CIFTI file quickly

Description

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

Usage

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

Arguments

cifti_fname

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

surfL_fname

(Optional) File path of GIFTI surface geometry file representing the left cortex.

surfR_fname

(Optional) File path of GIFTI surface geometry file representing the right cortex.

brainstructures

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.

wb_path

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

verbose

Should occasional updates be printed? Default: FALSE.

...

Additional arguments to read_cifti_flat.

Value

A "xifti" object. See is.xifti.

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