separate_cifti_files: Separate CIFTI: file names

View source: R/separate_cifti.R

separate_cifti_filesR Documentation

Separate CIFTI: file names

Description

File paths for writing GIFTI and NIFTI files from a CIFTI or "xifti"

Usage

separate_cifti_files(
  bs_present,
  intent = 3006,
  brainstructures = NULL,
  cortexL_fname = NULL,
  cortexR_fname = NULL,
  subcortVol_fname = NULL,
  subcortLabs_fname = NULL,
  ROI_brainstructures = "all",
  ROIcortexL_fname = NULL,
  ROIcortexR_fname = NULL,
  ROIsubcortVol_fname = NULL,
  write_dir = NULL
)

Arguments

bs_present

The brain structures actually present in the CIFTI or "xifti" object.

intent

3002 (default), 3006, or 3007

brainstructures

(Optional) character vector indicating a subset of brain structure(s) to write: "left" cortex, "right" cortex, and/or "subcortical" structures. Can also be "all" to write out all existing brain structures. Default: "all".

cortexL_fname, cortexR_fname

(Optional) GIFTI file names (*.[func/label].gii) to save the [left/right] cortex data to. dtseries and dscalar files should use "func", whereas dlabel files should use "label".

If NULL and write_dir is provided, defaults to "*[L/R].\[func/label\].gii", where * is the file name component of cifti_fname.

subcortVol_fname, subcortLabs_fname

(Optional) NIFTI file names to save the subcortical [volume/labels] to. Provide both or neither.

If NULL and write_dir is provided, defaults to "*[/.labels].nii", where * is the file name component of cifti_fname.

ROI_brainstructures

Which ROIs should be obtained? "all" (default) to obtain ROIs for each of the brainstructures. NULL to not obtain any ROIs. This should be a subset of brainstructures.

ROIcortexL_fname, ROIcortexR_fname

(Optional) GIFTI file names (*.[func/label].gii) to save the [left/right] cortex ROI to. dtseries and dscalar files should use "func", whereas dlabel files should use "label".

If NULL and write_dir is provided, defaults to "*ROI_[L/R].\[func/label\].gii", where * is the file name component of cifti_fname.

The cortical ROIs typically represent the medial wall mask, with values of 1 for in-ROI (non-medial wall) vertices and 0 for out-of-ROI (medial wall) vertices. Will be written in write_dir.

ROIsubcortVol_fname

(Optional) NIFTI file names to save the subcortical ROI to.

If NULL and write_dir is provided, defaults to "*ROI.nii", where * is the file name component of cifti_fname.

The subcortical ROI typically represents the volumetric mask for the entire subcortical structure, with values of 1 for in-ROI (in subcortex) voxels and 0 for out-of-ROI (not in subcortex) voxels. Will be written in write_dir.

write_dir

(Optional) A path to an existing directory. If provided, every component in the "xifti" will be written to this directory, using automatically-generated names if their *_fname argument was not provided. Otherwise if write_dir is NULL, only the components for which their *_fname was provided will be written.

Details

If write_dir is NULL, only components with provided file names will be written. If write_dir is not NULL, files for all existing brain components will be written to that directory.

Value

List of three: do, ROI_do, and sep_fnames


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