
Image Analysis and Statistical Inference in Neuroimaging with R K. Tabelowa,∗, J.D. Claydenb, P. Lafaye de Micheauxc, J. Polzehla, V.J. Schmidd, B. Whitchere aWeierstrass Institute for Applied Analysis and Stochastics, Berlin, Germany bInstitute of Child Health, University College London, London, United Kingdom cMathematics and Statistics Department, Universit´ede Montr´eal,Canada dDepartment of Statistics, Ludwig-Maximilians-Universit¨at,Munich, Germany eGlaxoSmithKline, Clinical Imaging Centre, London, United Kingdom Abstract R is a free software environment for statistical computing and graphics. It compiles and runs on almost every UNIX platform, Windows, and Mac OS. In this paper, we report on several R packages built for the analysis of neuroimaging data in the context of functional Magnetic Resonance Imaging, Diffusion Tensor Imaging, and Dynamic Contrast-Enhanced Magnetic Resonance Imaging. We will review their methodology and give an overview over their capabilities for neuroimaging. Finally, we summarize some of the current activities in the area of neuroimaging software in R in general. Introduction is in addition to a complete set of open-access manuals about the R language. The rapid progress of research in the neuroscience and neu- Why is it worthwhile to consider just another programming roimaging fields has been accompanied by the development of environment for neuroimaging? R is the free and platform- many excellent analysis software tools. These are implemented independent quasi-standard computational environment within in a variety of computer languages and programming environ- the statistics community. R grants access to many well- ments, such as Matlab, IDL, Python, C/C++ and others. This developed statistical tools needed for the analysis of neuroimag- diversity has developed over time through a combination of ing data. R easily integrates, other software can be used from user preferences and the strengths/weaknesses of the computing within R and R can be used within a more general workflow. environments. Many of these software tools are freely avail- Finally, special R packages for neuroimaging provide enhanced able, like SPM (Ashburner et al., 2008), AFNI (Cox, 1996), functionality which is not available elsewhere. FSL (Smith et al., 2004), Freesurfer, or BrainVISA, some are In this paper, we report on several R packages built for the commercial like BrainVoyager, and Analyze. Typically, the analysis of neuroimaging data in various context. We will software tools can be extended by the user to fit their needs in shortly review the methodology of each package to give an im- the data analysis. The NIPY (Millman and Brett, 2007) project pression of their capabilities for neuroimaging. The paper is e.g. is written in Python and a explicitely allows for the inte- organized by the type of data which is to be analyzed and cov- gration, modification and extension of code. ers functional Magnetic Resonance Imaging (fMRI), Diffusion R is a free software environment for statistical computing Tensor Imaging (DTI), and Dynamic Contrast-Enhanced MRI and graphics (R Development Core Team, 2010). It com- (DCE-MRI). In the discussion we want to summarize some of piles and runs on almost every UNIX platform, Windows, the activities in the area of neuroimaging software in R in gen- R and Mac OS. Access to is provided via the Comprehensive eral. R Archive Network (CRAN, http://cran.r-project.org) and R-Forge (http://r-forge.r-project.org). R pro- vides a wide range of statistical (linear and nonlinear regres- On features of R sion modelling, classical statistical tests, time-series analysis, classification, clustering, etc...) and graphical techniques, and R is a high-level programming environment which is typ- is highly extensible. As of November 2010, the CRAN package ically used by its command-line interface (though Graphical repository features over 2600 separate packages contributed by User Interfaces (GUI) do also exist). It allows for interactive R users. A recent community website (http://crantastic. data analysis as well as easy creation of scripts for bulk data org) provides the facilities to search for, review and tag CRAN processing. R is the quasi-standard environment for the devel- packages. Several mailing lists are maintained in order to pro- opment of new statistical methods, often overtaking commer- vide updates and access to literally thousands of R users. This cial statistical packages. Yet its matrix computational capabili- ties also compare well with those e.g. in Matlab. ∗Corresponding author The concept of packages as extensions to the R base system is Email address: [email protected] (K. Tabelow) one of its greatest strengths. R easily integrates compiled code Preprint submitted to Elsevier December 2, 2010 written in low-level languages like C/C++, or FORTRAN pro- the same name) at the Mayo Foundation (Biomedical Imaging viding the ground for efficient programming of computationally Resource, 2001). An Analyze (7.5) format image is comprised expensive algorithms combined with an easy-to-use interface at of two files, the “img” and “hdr” files, that contain the data and the scripting level. information about the acquisition itself. A more recent adaption One of the major difficulties when using R with neuroimag- of this format is known as NIfTI-1 and is a product of the Data ing datasets is R’s memory usage. By default R stores data in Format Working Group (DFWG) from the Neuroimaging Infor- computer main memory. Data are usually retained in double matics Technology Initiative (NIfTI). The NIfTI-1 data format precision. R has no reference type, and therefore usually gen- is almost identical to the ANALYZE format, but offers a few erates a copy of the data every time a function is called. This improvements: merging of the header and image information can, in case of inefficient programming, lead to several copies into one file (.nii), re-organization of the 348-byte fixed header of the data in memory and a situation where demand exceeds into more relevant categories and the possibility of extending the available memory. This can be avoided by calls to low-level the header information. languages. The packages AnalyzeFMRI (Marchini and Lafaye de Regardless of largely increased memory in recent years, there Micheaux, 2010), fmri, tractor.base, and dcemriS4 (Whitcher are also several projects and packages for R to overcome the et al., 2010a) all provide functions that read/write ANALYZE limitations for huge datasets and grant access to it as fast and and NIfTI files. easy as in memory. One of them is the ff (Adler et al., 2010) Additionally fmri provides capabilities to read and write AF- which provides flexible data structures that are stored on disk NIs HEAD/BRIK files. but behave (almost) as if they were in RAM by transparently mapping only a section (pagesize) in main memory. Another Functional MRI project is the BigMemory project (http://www.bigmemory. org) which supports the creation, storage, access, and manip- Functional Magnetic Resonance Imaging (fMRI) has become ulation of massive matrices. On mid-term these technologies the most informative tool for in-vivo examination of human will be included in the packages described in this paper. brain function on small spatial scales. It is nowadays utilized R supports modern concepts like object-oriented program- both in research as well as in clinical applications such as diag- ming, which is provided as implementation of so-called S4- nosis and treatment of brain lesions. classes and methods (Chambers, 2008). While not as strict as in low-level languages like C/C++ it allows for class/method Package AnalyzeFMRI definition, data encapsulation, polymorphism, etc. The analysis of huge datasets with sophisticated methodol- AnalyzeFMRI is a package originally written by J. Mar- ogy comes at the cost of large computational expenses. R pro- chini (Marchini, 2002) for the processing and analysis of vides the possibility to parallelize code natively in R, or within large structural and functional MRI data sets under the ANA- the C/C++ code. It is also possible to include computation on a LYZE format. It has been updated to include new functional- graphic card (GPU) instead of CPU, which in appropriate cases ity: conversion from ANALYZE to NIfTI, complete NIfTI in- may benefit by orders of magnitude from the speed of modern put/output, functions to obtain spatial coordinates from voxel GPU’s. indices and vice-versa, various geometrical utilities, cross- platform visualization based on Tcl/Tk components, and spa- tial/temporal ICA (Independent Component Analysis) via a Data Input/Output graphical user interface (GUI), see figure 1. Independent component analysis is a statistical technique The industry standard format, for data coming off a clinical that can recover hidden underlying source signals from an ob- imaging device, is DICOM (Digital Imaging and Communica- served mixture of these sources. The only hypothesis made to tions in Medicine). The DICOM “standard” is very broad and solve this problem (known as the blind source separation prob- very complicated. Roughly speaking each DICOM-compliant lem) is that the sources are statistically mutually independent file is a collection of fields organized into two four-byte se- and not Gaussian. ICA is now used to analyze fMRI data since quences (group,element) that are represented as hexadecimal the late 1990’s (McKeown et al., 1998) and has been detailed numbers and form a tag. The (group,element) combination an- in many papers (see e.g. Stone, 2002; Thomas et al., 2002). nounces what type of information is coming next. There is no Note that ICA can be defined in two dual approaches: spatial fixed number of bytes for a DICOM header. ICA (sICA) and temporal ICA (tICA), the latter being not really The packages oro.dicom (Whitcher, 2010), fmri (Tabelow used in fMRI studies due to computational difficulties in diag- and Polzehl, 2010c) and tractor.base (Clayden, 2010b) provide onalizing the huge data correlation matrix in this case.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages9 Page
-
File Size-