make_subcort {ciftiTools} | R Documentation |
Make the subcortical components of a "xifti"
Description
Coerce subcortical data into valid entries for xifti$data$subcort
and xifti$meta$subcort
. The data arguments can be matrices/arrays or
NIFTI file paths. If the mask is not provided, it will be inferred from the
labels.
Usage
make_subcort(vol, labs, mask = NULL, idx = NULL, validate_mask = FALSE)
Arguments
vol |
represents the data values of the subcortex. It is either a NIFTI
file path, 3D/4D data array ( |
labs |
represents the brainstructure labels of each voxel: see
|
mask |
is a NIFTI file path or logical 3D data array ( |
idx |
Only applies if |
validate_mask |
If |
Details
To read in the labels as the primary data, use the labels NIFTI for both
vol
and labs
.
Value
A list with components "data", "labels", "mask", and "trans_mat". The first two will be vectorized and ordered spatially.
The volume can be recovered using:
vol <- unvec_vol(data, mask, fill=NA)
labs <- unvec_vol(labels, mask, fill=0)
Label Levels
xifti$meta$subcort$labels
is a factor with the following levels:
Cortex-L
Cortex-R
Accumbens-L
Accumbens-R
Amygdala-L
Amygdala-R
Brain Stem
Caudate-L
Caudate-R
Cerebellum-L
Cerebellum-R
Diencephalon-L
Diencephalon-R
Hippocampus-L
Hippocampus-R
Pallidum-L
Pallidum-R
Putamen-L
Putamen-R
Thalamus-L
Thalamus-R
These correspond to the same structures as given by
ft_read_cifti
in the cifti-matlab
MATLAB toolbox. Note that
the first two levels (left and right cortex) are not used.