  There is significant interest in adopting surface- and grayordinate-based
analysis of MR data for a number of reasons, including improved whole-cortex
visualization, the ability to perform surface smoothing to avoid issues
associated with volumetric smoothing, improved inter-subject alignment, and
reduced dimensionality. The CIFTI grayordinate file format introduced by the
Human Connectome Project further advances grayordinate-based analysis by
combining gray matter data from the left and right cortical hemispheres with
gray matter data from the subcortex and cerebellum into a single file. Analyses
performed in grayordinate space are well-suited to leverage information shared
across the brain and across subjects through both traditional analysis
techniques and more advanced statistical methods, including Bayesian methods.
The R statistical environment facilitates use of advanced statistical
techniques, yet little support for grayordinates analysis has been previously
available in R. Indeed, few comprehensive programmatic tools for working with
CIFTI files have been available in any language. Here, we present the
ciftiTools R package, which provides a unified environment for reading,
writing, visualizing, and manipulating CIFTI files and related data formats. We
illustrate ciftiTools' convenient and user-friendly suite of tools for working
with grayordinates and surface geometry data in R, and we describe how
ciftiTools is being utilized to advance the statistical analysis of
grayordinate-based functional MRI data.
