View source: R/write_cifti_axes.R
| cifti.axis.from.template | R Documentation |
Read the axes of an existing CIFTI-2 file, so that a new file can be written with the same mapping. This is the recommended way to write a file for real data: the mapping of an HCP grayordinates file (which vertices are in the file, and which volume voxels) can not be invented, it has to come from the file the data was derived from.
cifti.axis.from.template(x, dim = NULL)
x |
character string (the path of a CIFTI-2 file), an |
dim |
integer or |
the axis of the requested dimension (a named list, see
cifti.axis.brain.models), or a list of axes (one per dimension; note
that a file whose dimensions share a single XML mapping returns the same axis for
both, as two entries).
Other cifti functions:
cifti.axis.brain.models(),
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()
cifti_file <- system.file("extdata", "cifti", "tiny.dscalar.nii", package = "freesurferformats")
axes <- cifti.axis.from.template(cifti_file)
length(axes)
axes[[2L]]$type
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.