Learn R Programming

freesurferformats (version 1.1.0)

cifti.parcels: Get the parcel table of a CIFTI-2 file.

Description

Get the parcels for one matrix dimension of a parcellated CIFTI-2 file. A parcel is a named set of surface vertices and/or volume voxels; its index is its position in the list (CIFTI-2 parcels have no index attribute). The vertex lists themselves are in the field 'vertices' of the fs.cifti object, see read.cifti.header.

Usage

cifti.parcels(cii, dim = 0L)

Value

a data.frame with one row per parcel and the columns 'index' (integer, 0-based parcel index), 'name' (character string, the parcel name), 'num_vertices' (integer, the total number of surface vertices in this parcel) and 'num_voxels' (integer, the number of volume voxels in this parcel). The result is ordered by parcel index.

Arguments

cii

an fs.cifti instance, see read.cifti.header.

dim

integer, the matrix dimension to get the brain models for. CIFTI-2 files have two dimensions, so this is usually 0 (Workbench calls it the ROW dimension) or 1 (the COLUMN dimension). See read.cifti.header for details on the dimensions.

See Also

Other cifti functions: cifti.axis.brain.models(), 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.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

Run this code
cifti_file <- system.file("extdata", "cifti", "tiny.ptseries.nii", package = "freesurferformats")
cii <- read.cifti.header(cifti_file)
cifti.parcels(cii, dim = 1L)

Run the code above in your browser using DataLab