Special Volume on Magnetic Resonance Imaging in R

The special volume on “Magnetic Resonance Imaging in R ” features articles and packages related to a variety of imaging modalities: functional MRI, diﬀusion-weighted MRI, dynamic contrast-enhanced MRI, dynamic susceptibility-contrast MRI and structural MRI. The papers describe the methodology, software implementation and provide comprehensive examples and data.


Introduction
In 2003 the Nobel Prize in Physiology or Medicine went to Paul Lauterbur (State University of New York) and Peter Mansfield (University of Nottingham) for their "discoveries concerning magnetic resonance imaging," where the original research took place in the 1970s. It was Lauterbur's insight into using magnetic field gradients for the spatial localization of the magnetic resonance signal that enabled the rapid acquisition of two-dimensional images. The mathematical formalism and fast imaging techniques introduced by Mansfield, in combination with Lauterbur's work, started the scientific development of magnetic resonance imaging (MRI).
The field of MRI has expanded in the decades since those initial experiments to be a major imaging modality for both clinical diagnostics and medical research. Non-invasive assessment of the physiological state of a subject is provided by MRI without the use of ionizing radiation that is common in other modalities. A wide variety of signals are provided via the physics of MRI using endogenous or exogenous contrast mechanisms. Relaxation times, specifically the longitudinal (T1) and transverse (T2), are most often manipulated in order to generate endogenous signal between tissue types. Altering acquisition parameters on the MR scanner can weight the signal intensities towards T1, where water is darker and fat is brighter, or towards T2, where water is brighter and fat is darker. Scans that are T1-weighted or T2weighted are used for the structural assessment of tissue, along with proton density weighted acquisitions where both T1 and T2 decay is suppressed to achieve contrast.
In the early 1990s several groups converged on the concept of blood oxygen level dependence (BOLD), where MRI contrast is achieved by differences between oxyhemoglobin and deoxyhemoglobin in the blood (Ogawa et al. 1990). The rapid progress of research in the neuroscience and neuroimaging fields can be partly attributed to the use of non-invasive MRI techniques. This advancement has been accompanied by the development of many excellent analysis software tools. Depending on user preferences and the strengths/weaknesses of each computing environment a variety of computer languages and programming environments, such as Matlab, IDL, Python and C/C++ are used for these tools. Many of them are freely available, like SPM (Ashburner et al. 2008), AFNI (Cox 1996), FSL (Smith et al. 2004), NIPY (Millman and Brett 2007), FreeSurfer, or BrainVISA, and some are commercial like BrainVoyager and Analyze.
However, the usage of R (R Development Core Team 2011) for functional neuroimaging is still not very familiar to the neuroscience community despite the fact that analysis in neuroscience is typically statistical. Actually, A Language and Environment for Statistical Computing seems to be perfectly suited for the field. R is the free and platform-independent quasistandard computational environment within the statistics community. R grants access to many well-developed statistical tools needed for the analysis of neuroimaging data and is highly extensible. Packages developed in R generally come with an user-friendly license.
The use of R for neuroimaging analysis was first reported by . However, there is much more activity in the field of functional and structural MRI and we feel the time has come to highlight some of the high-quality research and software implementations by members of the R community. It is our hope that this Special Volume on "Magnetic Resonance Imaging in R" makes existing tools more known and triggers new developments in the field.

About this special volume
This special volume of the Journal of Statistical Software contains 13 papers on the use of R in structural and functional applications of MRI. Roughly speaking the papers mainly cover medical imaging data handling, functional MRI (fMRI), diffusion-weighted MRI (dMRI), dynamic contrast-enhanced MRI (DCE-MRI), dynamic susceptibility-contrast MRI (DSC-MRI) and structural MRI. In most cases R packages are introduced that implement sophisticated methodology side-by-side with standard data processing pipelines.
Many of the packages discussed in this special issue provide their own data handling functions. Some of them rely on the oro.dicom and oro.nifti packages , that have been developed in order to create a standardized approach for manipulating medical imaging in standard data formats. It should be noted, that there are more packages written in R for reading and writing the well-established NIfTI format; e.g., the package Rniftilib (Granert 2010) uses the C reference library provided by the Neuroimaging Informatics Technology Initiative (NIfTI; http://nifti.nimh.nih.gov/). Feng and Tierney (2011) introduces the package mritc for tissue classification in MRI and utilizes a variety of Bayesian methods that rely on MCMC to differentiate gray mat-ter from white matter from cerebral spinal fluid (CSF) in the brain. The input data for mritc are assumed to be high-resolution T1-weighted acquisitions with (roughly) isotropic voxel dimensions, such as those obtained by spoiled gradient echo recall (SPGR) or magnetization prepared rapid acquisition gradient echo (MPRAGE) sequences. The FIAR package (Roelstraete and Rosseel 2011) has been created for the analysis of functional integration in the brain; i.e., the distributed interactions among functionally-segregated regions. Functional integration attempts to establish connections between brain regions through specifically-designed fMRI experiments that stimulate specific functional networks. Techniques that are currently provided in FIAR include structural equations models, Granger causality and dynamic causal models.

The paper by
Five papers consider fMRI in this volume. The package AnalyzeFMRI (Bordier et al. 2011) implements spatial and temporal independent component analysis (ICA) for the data. This approach can be used complementary to the general linear model (GLM) approach and has been proven to be particularly useful for resting state data. Contrary to this, the fmri package described in  uses the GLM together with structural adaptive smoothing methods for noise reduction and signal detection. The package arf3DS4 (Weeda et al. 2011) also relies on the GLM but implements an approach called activated region fitting. Within this method, fMRI data are modeled by multiple Gaussian-shaped regions. The method increases the power of activation detection. The cudaBayesreg (Ferreira da Silva 2011) package uses a Bayesian multilevel model for fMRI analysis and implements it on a graphical processing unit (GPU) to reduce the high computational burden of the Markov Chain Monte Carlo (MCMC) simulations. Finally, for testing new approaches for fMRI analysis it is useful to start with simulated data, preferably with properties close to reality. Such data may be generated under a wide variety of settings using the package neuRosim (Welvaert et al. 2011).
The next group of papers considers dMRI data and its analysis. The dti package  implements the standard diffusion tensor model, and also includes models for high angular resolution diffusion imaging (HARDI). As noise is an important issue for dMRI data due to the signal attenuation by diffusion weighting, the dti package also focuses on the application of structural adaptive smoothing to dMRI data similar to the fmri package for fMRI. The TractoR project is mainly concerned with tractography based on dMRI data ) and implements several algorithms for fiber tracking. Finally, we mention that the dcemriS4 package (Whitcher and Schmid 2011) also provides basic functionality for the analysis of dMRI data in an oncology context using the apparent diffusion coefficient (ADC), where the quantification of isotropy versus anisotropy is not directionally specific.
Three papers consider perfusion MRI, where an exogenous contrast agent (typically a gadolinium chelate) is injected during a dynamic acquisition. The package dcemriS4 provides a complete set of data analysis tools for the quantitative assessment of DCE-MRI in oncology. Parametric models for the transfer rate constants in a single tissue compartment model are provided along with a variety of estimation procedures, both frequentist and Bayesian. The package DATforDCEMRI (Ferl 2011) implements a numerical deconvolution analysis on the smoothed contrast agent concentration and arterial input function in order to provide non-compartmental parameter estimates, such as the area under the curve (AUC) and mean residence time (MRT). King et al. (2011) introduces the BRugs interface for random effects analysis using MCMC with application to dynamic susceptibility-contrast MRI (DSC-MRI) for the assessment of brain perfusion. Low signal-to-noise and low perfusion in tissue are com-mon features of DSC-MRI data and motivate the use of information-borrowing techniques.
The computational demand in MRI is large due to the high-dimensional data sets involved and the increasing level of sophistication in methodology. This motivates the need for efficient implementation, and also for the use of modern parallelization techniques on CPUs as well as GPUs. The cudaBayesreg package describes a CUDA implementation, mritc uses OpenMP, while dcemriS4 has an option to use the multicore package for parallel computing. We are confident that more packages utilizing parallel programming techniques, whether on the CPU or GPU, are certain to follow.

Outlook
We hope to provide with this Special Volume of Journal of Statistical Software a worthwhile collection of activity in the field of magnetic resonance imaging in R. More tools would be desirable to enable users in the neurosciences to perform their analyses within R. For example, there is currently only one R package to perform image registration, namely the RNiftyReg package (Clayden 2011) which is a wrapper for the open-source NiftyReg software library. We are, however, not aware of any tool in R to perform non-linear registration (spatial normalization) of data sets to a standard brain atlas.
At http://CRAN.R-project.org/view=MedicalImaging one can find the "Medical Imaging Task View" (Whitcher 2010) on the Comprehensive R Archive Network (CRAN) that maintains an overview of R packages belonging to the medical imaging field and may be considered as a further source of information on the topic.