separate_cifti
wrapperCalls separate_cifti
using the file names listed in the
argument sep_fnames
.
separate_cifti_wrapper(
cifti_fname,
brainstructures = "existing",
ROI_brainstructures = "all",
sep_fnames = NULL,
write_dir = NULL
)
The return value of the separate_cifti
call
File path to a CIFTI file (ending in ".d*.nii").
Character vector indicating which brain structure(s)
to read in: "left"
(left cortex), "right"
(right cortex)
and/or "subcortical"
(subcortex and cerebellum). Can also be
"all"
(read all three brain structures), or "existing"
(read all brain structures in the file). Default: "existing"
.
If a brain structure is indicated but does not exist, a warning will be raised and that brain structure will be skipped.
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.
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.
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.
Currently used by read_cifti
and resample_cifti
.