separate_cifti_wrapper: 'separate_cifti' wrapper

View source: R/separate_cifti.R

separate_cifti_wrapperR Documentation

separate_cifti wrapper

Description

Calls separate_cifti using the file names listed in the argument sep_fnames.

Usage

separate_cifti_wrapper(
  cifti_fname,
  brainstructures = NULL,
  ROI_brainstructures = NULL,
  sep_fnames = NULL,
  write_dir = NULL
)

Arguments

cifti_fname

File path to a CIFTI file (ending in ".d*.nii").

brainstructures

Character vector indicating which brain structure(s) to obtain: "left" (left cortex), "right" (right cortex) and/or "subcortical" (subcortex and cerebellum). Can also be "all" (obtain all three brain structures). Default: "all".

If a brain structure is indicated but does not exist in the CIFTI file, a warning will occur and that brain structure will be skipped.

ROI_brainstructures

Character vector indicating which ROIs should be obtained. NULL (default) to not get any ROIs. Otherwise, this should be a subset of the brainstructures argument.

ROIs are typically the medial wall masks for the left and right cortex, and the subcortical mask for the subcortex.

sep_fnames

Where to write the separated files (override their default file names). This is a named list where each entry's name is a file type label, and each entry's value is a file name indicating where to write the corresponding separated file. The recognized file type labels are: "cortexL", "cortexR", "ROIcortexL", "ROIcortexR", "subcortVol", and "subcortLabs".

Entry values can be NULL, in which case a default file name will be used: see cifti_component_suffix. Default file names will also be used for files that need to be separated/written but without a corresponding entry in sep_fnames.

Entries in sep_fnames will be ignored if they are not needed based on [ROI_]brainstructures. For example, if brainstructures="left", then sep_fnames$cortexR will be ignored if specified.

The write_dir argument can be used to place each separated file in the same directory.

write_dir

Where should the separate files be placed? NULL (default) will write them to the current working directory.

write_dir must already exist, or an error will occur.

Details

Currently used by read_cifti and resample_cifti.

Value

The return value of the separate_cifti call


ciftiTools documentation built on Oct. 4, 2024, 1:12 a.m.