A brain model axis describes which surface vertices and volume voxels a
matrix dimension of a CIFTI-2 file contains, in the order in which they appear in the
matrix. This is the mapping of a dense file (.dscalar, .dtseries, .dlabel,
.dconn), and of the files that mix dense and parcellated data.
The index ranges of the models are computed from the index lists, so the models cover the dimension without gaps, which the format requires. A structure may appear in several models (e.g. as a surface and as a volume part in a grayordinates file), and the order of the models is the order of the matrix indices.
Arguments
- models
list of brain model entries, as created by
cifti.brain.model.surfaceandcifti.brain.model.volume.- surfaces
named integer vector or
NULL, the number of vertices of the complete surfaces the file refers to, named by brain structure (e.g.c(CORTEX_LEFT = 32492, CORTEX_RIGHT = 32492)). This is written as the optionalSurfaceelements of the axis. Connectome Workbench does not write them, and the surface size is then taken from the brain model entries only, so this can be left atNULLunless the file has to state the surface sizes explicitly.- volume
a volume, see
cifti.volume, orNULL. Required if any of the models is a volume model, because the voxel indices of a model can not be interpreted without the voxel grid and the transformation matrix.
Value
a named list with the entries 'type', 'brain_models', 'surfaces' and 'volumes',
an axis to be passed to cifti.header.from.axes or
write.cifti.
See also
Other cifti functions:
cifti.axis.from.template(),
cifti.axis.labels(),
cifti.axis.parcels(),
cifti.axis.parcels.from.annot(),
cifti.axis.scalars(),
cifti.axis.series(),
cifti.brain.model.surface(),
cifti.brain.model.volume(),
cifti.dim.labels(),
cifti.file.type.for.axes(),
cifti.grayordinates(),
cifti.header.from.axes(),
cifti.label.table(),
cifti.parcel(),
cifti.parcels(),
cifti.series.info(),
cifti.structure.data(),
cifti.structures(),
cifti.volume(),
print.fs.cifti(),
print.fs.cifti.data(),
print.fs.connectome(),
read.cifti(),
read.cifti.header(),
read.cifti.rows(),
read.fs.connectome.cifti(),
write.cifti(),
write.fs.connectome.cifti(),
write.fs.morph.cifti(),
write.fs.parcellated.cifti(),
write.fs.parcellation.cifti(),
write.fs.series.cifti()
Examples
axis <- cifti.axis.brain.models(list(
cifti.brain.model.surface("lh", 10L),
cifti.brain.model.surface("rh", 12L)))
axis$type
#> [1] "CIFTI_INDEX_TYPE_BRAIN_MODELS"