Resting-state fMRI (RS-fMRI) has been drawing more and more attention in recent years. However, a publicly available, systematically integrated and easy-to-use tool for RS-fMRI data processing is still lacking. We developed a toolkit for the analysis of RS-fMRI data, namely the RESting-state fMRI data analysis Toolkit (REST). REST was developed in MATLAB with graphical user interface (GUI). After data preprocessing with SPM or AFNI, a few analytic methods can be performed in REST, including functional connectivity analysis based on linear correlation, regional homogeneity, amplitude of low frequency fluctuation (ALFF), and fractional ALFF. A few additional functions were implemented in REST, including a DICOM sorter, linear trend removal, bandpass filtering, time course extraction, regression of covariates, image calculator, statistical analysis, and slice viewer (for result visualization, multiple comparison correction, etc.). REST is an open-source package and is freely available at http://www.restfmri.net.
Citation: Song X-W, Dong Z-Y, Long X-Y, Li S-F, Zuo X-N, Zhu C-Z, et al. (2011) REST: A Toolkit for Resting-State Functional Magnetic Resonance Imaging Data Processing. PLoS ONE 6(9): e25031. https://doi.org/10.1371/journal.pone.0025031
Editor: Ben J. Harrison, The University of Melbourne, Australia
Received: May 25, 2011; Accepted: August 23, 2011; Published: September 20, 2011
Copyright: © 2011 Song et al. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Funding: This work was funded by the National High Technology Program of China (863, No. 2008AA02Z405), the Natural Science Foundation of China (30770594, 81020108022), and the Program for Changjiang Scholars and Innovative Research Team in University (PCSIRT). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Competing interests: The authors have declared that no competing interests exist.
Most functional magnetic resonance imaging (fMRI) studies focus on task-state conditions. However, since the first paper of resting-state fMRI (RS-fMRI) , RS-fMRI has been drawing more and more attention, especially in recent years . A few studies have indicated that the RS-fMRI signal, i.e., the resting-state blood oxygenation level dependent (BOLD) signal, reflects spontaneous brain activity –. Compared with resting-state position emission tomography (PET) and single photon emission computerized tomography (SPECT), RS-fMRI has no ionizing radiation. Compared with task-state fMRI, RS-fMRI is easier to perform for both the investigators and participants. Together with recent studies showing promising reliability for RS-fMRI –, the evidence indicates that RS-fMRI may be very helpful in clinical studies. However, data processing toolkit specialized for RS-fMRI is still lacking. The current paper would introduce a novel and open source software package.
The analytical approaches for RS-fMRI can be divided into two categories. One is for measuring the functional relationship between distinct brain regions. This procedure is usually referred to as functional connectivity analysis, for which linear correlation  and independent component analysis (ICA)  are two frequently used methods. Several toolkits have been proposed for functional connectivity analysis, including the Group ICA of fMRI Toolbox (GIFT; http://icatb.sourceforge.net/groupica.htm) , Multivariate Exploratory Linear Optimized Decomposition into Independent Components (MELODIC) , the MATLAB Toolbox for Functional Connectivity , and the Functional Connectivity Toolbox (http://web.mit.edu/swg/software.htm). Functional connectivity measures the similarity or synchronization of the time courses between distinct brain regions. However, for clinical studies, a result of abnormal functional connectivity between two or more distinct brain regions could not provide direct information as to which brain region is abnormal, as functional connectivity assesses only the relationship between them.
Another category of analytical approaches for RS-fMRI is based on depicting local features of the spontaneous BOLD signal. Two examples are the measurements of regional homogeneity (ReHo)  and the amplitude of low frequency fluctuation (ALFF) , . By calculating the Kendall coefficient of concordance (KCC), ReHo measures the similarity or synchronization of the time courses within a cluster (e.g., 27 neighboring voxels) . For each single voxel, ALFF measures the magnitude of the fluctuation of the voxel . ReHo and ALFF have been used to study brain disorders including attention deficit hyperactivity disorder (ADHD) , , schizophrenia –, depression , , Alzheimer's disease (AD) –, mild cognitive impairment , Parkinson disease (PD) , epilepsy , and posttraumatic stress disorder . Accurate localization of the abnormal spontaneous brain activity is crucial in the clinical treatment of some specific diseases, e.g., focal resection of intractable epilepsy and deep brain stimulation (DBS) for PD and depression. To this end, a convenient toolkit is necessary and important for the analysis of RS-fMRI data for basic and clinical neuroscientists.
Previously, most procedures for data preprocessing and group level statistical analysis have been well implemented in freely available analysis packages such as Statistical Parametric Mapping (SPM) , Analysis of Functional NeuroImages (AFNI) , and the FMRIB Software Library (FSL) . Meanwhile, there exist implementations of RS-fMRI data analysis combining various commands from AFNI and FSL without an integrated graphical user interface (GUI), among which fcon_1000_script integrates both seed-based and ICA-based functional connectivity analyses and is publicly available .
Here we present a MATLAB package named REST (RESting-state fMRI data analysis Toolkit). It represents a publicly available, systematically integrated, and ease-to-use implementation of various RS-fMRI analyses. The software configures various parameters for data analysis easily and quickly with an integrated GUI and also supports batch jobs. Based on MATLAB, REST can exchange files/data with SPM, AFNI, and FSL under the NIfTI-1.1 or ANALYZE™ 7.5 formats. Two measures of local features for RS-fMRI signal analysis, ReHo and ALFF, were implemented as core features in the current version of REST. Given that the Pearson linear correlation is a widely used method in RS-fMRI analysis, it was also implemented in REST. Some additional functions were implemented in REST, including DICOM sorter, linear trend removal, bandpass filtering, regression of covariates, time course extraction, statistical analysis, image calculator, and slice viewer (for result visualization, multiple comparison correction, etc.).
In this section, we introduce the three main algorithms in REST: functional connectivity, ReHo, and ALFF.
1.1. Functional connectivity.
Since the seminal RS-fMRI study by , the Pearson linear correlation has been the most widely used algorithm to measure the functional connectivity in RS-fMRI studies. REST also uses the Pearson correlation to calculate functional connectivity between two time courses:(1)where is the Pearson correlation coefficient, and are the mean values of time course x and y, respectively.
In the literature , some covariates are usually regressed out before functional connectivity analysis, including the time courses of head motion (three for translation and three for rotation), mean time course of the entire brain (or global trend), white matter, and cerebrospinal fluid (CSF). REST supports these regression procedures with some predefined (user-defined or default) masks. The default masks in REST were made from the a priori templates found in SPM (http://www.fil.ion.ucl.ac.uk/spm) as follows: the whole brain mask (named BrainMask_05_61x73x61.img/hdr) was from brainmask.nii with a threshold at 50% probability, the white matter mask (named WhiteMask_09_61x73x61.img/hdr) was from white.nii with a threshold at 90% probability, and the CSF mask (named CsfMask_07_61x73x61.img/hdr) was from csf.nii with a threshold at 70% probability. Partial correlation will be performed if the aforementioned covariates are added. It should be noted that removal of the global mean signal is still controversial in RS-fMRI , . It has been proposed that the anti-correlation which has been widely reported (e.g., ) was most likely due to the removal of the global mean signal .
1.2. Regional homogeneity (ReHo).
The computation of ReHo in REST has been previously described in . Briefly, Kendall's coefficient of concordance (KCC) for the time course of a voxel with those of its nearest neighbors (6, 18, and 26, respectively) is calculated in a voxel-wise way as follows:(2)where W is the KCC of a cluster, ranging from 0 to 1; is the sum rank of the ith time point; = (K(n+1))/2 is the mean of the 's; K is the number of time courses within a measured cluster (here, K = 7, 19, and 27, respectively; one chosen voxel plus the number of its neighbors); and n is the number of ranks. From this equation, an individual ReHo map is obtained. For PET studies, an individual image is usually divided by the global mean value to minimize inter-individual variability . REST also includes this normalization procedure in the ReHo calculation. In the other words, an individual ReHo map could be divided by the mean ReHo value of voxels within a specific mask (whole brain mask or user-defined mask).
1.3. Amplitude of low frequency fluctuations (ALFF).
Many studies have suggested that the low frequency fluctuations found in RS-fMRI BOLD signals contain physiologically meaningful information and are closely related to spontaneous neuronal activities , , –. On the basis of the root mean square in the paper , Zang et. al.  used the average of the amplitude of the low frequency band (i.e., ALFF) as an index of magnitude for the spontaneous neuronal activity.
ALFF is defined as the mean square root of the power spectrum density over the low frequency band (usually 0.01∼0.08 Hz). After an individual ALFF map is obtained, a standardization procedure can be performed as done in the ReHo analysis, i.e., the individual ALFF map is divided by the mean ALFF value of voxels within a specific mask (whole brain mask or user-defined mask).
It has been suggested that ALFF reflects the intensity of regional spontaneous brain activity. However, it is sensitive to the physiological noise found in some brain regions, such as in the cistern areas . An improved ALFF approach, namely, fractional ALFF (fALFF) , is implemented in REST. fALFF is calculated as the ratio of the power spectrum of low-frequency signals (usually 0.01∼0.08 Hz) to that of the entire frequency range (e.g., 0∼0.25 Hz for TR = 2 s). This procedure has been used in near infrared spectroscopy study . fALFF could significantly suppress the high frequency noise found in the cistern areas. It has been shown that the brain areas within the default mode network, including the posterior cingulate cortex (PCC), precuneus, medial prefrontal cortex (MPFC), and bilateral inferior parietal lobule (IPL), have significantly higher fALFF than the global mean fALFF .
Users can also choose specific frequency bands for analysis. A recent study found that the amplitude over a frequency band of 0.027∼0.073 Hz is more specific to the basal ganglia than other frequency bands . It was found that the decreased ALFF in amnestic mild cognitive impairment was more prominent in a frequency band of 0.01∼0.027 Hz .
Installation of REST is quite easy: download the most recent version from http://www.restfmri.net, extract the compressed package to a predefined directory, and then add the full path to MATLAB's search path. REST is compatible with MATLAB version 6.5 or higher. And REST's compatibility has been tested under Windows Xp and Fedora 4. Almost all REST functions only need MATLAB basic run time environment.
Entering “rest” in the MATLAB command window will open REST's GUI (Fig. 1). The purple buttons seen in the GUI window allow access to the methods available for RS-fMRI data analysis. The “Help” button in REST will guide users to the RS-fMRI online forum (http://forum.restfmri.net) for more detailed information.
2.1. Functional connectivity.
Functional connectivity computation requires the user to define an ROI and optional covariates (such as the time courses of head motion, global mean, white matter, and CSF) as seen in the middle part of Fig. 2.
Two datasets were added. The linear trend removal and band-pass (0.01 Hz∼0.08 Hz) filtering options were then checked. A seed ROI will be set by clicking the “Voxel wise” button. The “Default mask” selection means that REST will automatically select the default mask. The usage of “Covariates” is not shown here.
After the user clicks the “Fun. Connectivity” button in Fig. 1, Fig. 2 will be displayed. The button marked “Voxel wise” allows the user to define parameters for calculating the linear correlation between a reference time course (from an ROI or elsewhere) and the time course of each voxel within the entire brain or within a predefined mask. The “ROI wise” button allows the definition of parameters for calculating the linear correlation between several ROIs, and pair-wise linear correlations will be calculated. The “Covariables” button allows the user to add covariates in a text file format.
If the option “Fisher Z-score transformation within the mask” is checked, the z map, in addition to the r map, will be generated.
After the user selects the “ReHo” button in the main interface (Fig. 1), the window illustrated in Fig. 3 will be available for ReHo analysis. In the center of the window, “cluster size” refers to the number of nearest neighbor voxels (7, 19, or 27) to be used in the analysis. In the lower part of the window, the option to “Divide ReHo brain by the mean within the mask…” will generate results with this additional data. Other parameters in the interface are similar to those found in the functional connectivity analysis.
2.3. ALFF and fALFF.
After the user clicks on the “ALFF” button in the main interface (Fig. 1), the window found in Fig. 4 will come up for ALFF analysis. To transform time domain data to the frequency domain, REST uses the fft (MATLAB version below 7.3) or fftw (MATLAB version 7.3 or higher) function found in MATLAB. The amount of zero padding for the FFT is the same as the amount used in AFNI's power spectrum calculation with the option “shortest FFT length”. This specific zero padding can avoid default FFT length variability across MATLAB versions. Other parameters in the interface are similar to those in the ReHo analysis. The calculation of fALFF is similar to that of ALFF, although bandpass filtering should not be performed. The fraction of the amplitude at low frequency (0.01∼0.08) to that of the full frequency spectrum is calculated.
3. An example of RS-fMRI data analysis using REST
3.1. Participants and data acquisition.
Twenty right-handed participants (11 males, aged 19–22 years) with no history of neurological or psychiatric disorders took part in this study. All participants were recruited from the campus of Beijing Normal University. The present study was approved by the Ethics Committee of State Key Laboratory of Cognitive Neuroscience and Learning, Beijing Normal University. Written informed consent was obtained from each participant.
MRI data were acquired using a SIEMENS TRIO 3-Tesla scanner in the Imaging Center for Brain Research, Beijing Normal University. Participants lay supine with their heads snugly fixed by a belt and foam pads to minimize head movement. The functional images were obtained by using an echo-planar imaging sequence with the following parameters: 33 axial slices, slice thickness/gap = 3/0.6 mm, in-plane resolution = 64×64, TR = 2000 ms, TE = 30 ms, flip angle = 90°, FOV = 200×200 mm2. In addition, a three-dimensional T1-weighted magnetization-prepared rapid gradient echo (MPRAGE) sagittal image was acquired covering the entire brain (128 slices, TR = 2530 ms, TE = 3.39 ms, slice thickness = 1.33 mm, flip angle = 7°, inversion time = 1100 ms, FOV = 256×256 mm, in-plane resolution = 256×192). During the fMRI scanning, participants were instructed to keep as motionless as possible and to not think systematically. After the scanning session, all participants reported that they did not fall asleep during scanning.
3.2. Data preprocessing.
The first ten volumes of each functional time course were discarded to allow for T1 equilibrium and to allow the participants to adapt. Slice timing, head motion correction, and spatial normalization were conducted by using SPM5 (http://www.fil.ion.ucl.ac.uk/spm). No participant had head motion with more than 2.0 mm maximum displacement in any direction or 2.0° of any angular motion throughout the course of the scan. REST was then used for linear trend removal and temporal band-pass filtering (0.01∼0.08 Hz) , .
3.3. Functional connectivity analysis.
The preprocessed data were spatially smoothed (full width at half maximum (FWHM) = 6 mm) by SPM5. In the REST window for functional connectivity analysis, a spherical region of interest (ROI) (radius = 10 mm) was defined, centered at a coordinate (0, −56, 30) within the PCC . For each participant, the mean time course within this ROI was used as the reference time course. A seed correlation analysis was then performed in a voxel-wise manner with the averaged time courses of the whole brain, the white matter, the CSF, and the six head motion parameters as covariates. Individual r-maps were normalized to Z-maps by using Fisher's Z transformation . All Fisher's Z-maps were entered into a two-sided one-sample t-test to detect the regions showing significant functional connectivity with the PCC.
3.4. ReHo analysis.
In this procedure, 27 nearest neighboring voxels were defined as a cluster and a KCC value (ranging from 0 to 1) was given to the voxel at the center of this cluster . In the window controlling ReHo analysis for REST, the individual ReHo map was generated and divided by that participant's global mean KCC value within the brain mask for standardization purpose. The ReHo maps were then spatially smoothed (FWHM = 6 mm) using SPM5. One-sided one-sample t-tests were performed to show where in the brain the standardized KCC value was significantly larger than one.
3.5. ALFF analysis and fALFF.
The preprocessed data were spatially smoothed (FWHM = 6 mm) by SPM5 before ALFF calculation. In the window for ALFF analysis within REST, the frequency band between 0.01 to 0.08 Hz was selected, and the individual ALFF map was generated . The individual ALFF map was normalized by the individual's global mean ALFF as done in the ReHo analysis. One-sided one-sample t-tests were performed to show where in the brain the standardized ALFF value was significantly larger than one. The calculation of fALFF was similar to that of ALFF, but bandpass filtering was not performed. The fraction of the amplitude of low frequency signals (0.01∼0.08) to that of the full frequency spectrum was calculated.
3.6. Statistical analysis.
One-sample t-tests were performed on the above functional connectivity Z-maps, ReHo maps, ALFF maps, and fALFF maps, respectively, by using the “Statistical Analysis” methodology as implemented in REST (See “Additional Functions”). The statistical result of each method was corrected for multiple comparisons using the “AlphaSim” implementation in REST (See “Slice Viewer” in “Additional Functions”). This function is based on the Monte Carlo simulation in AFNI (see the AlphaSim command description at http://afni.nimh.nih.gov/afni/doc/manual/AlphaSim). A combination threshold of voxels' P<0.001 and cluster size >351 mm3 was considered significant, which corresponded with a corrected P<0.05. All within-group statistical maps obtained from the above steps were superimposed on the anatomical template (Ch2.nii) originally found in MRIcro (http://www.cabiatl.com/mricro/) by using the “Slice Viewer” routine in REST for presentation purpose.
3.7. Primary Results of the Example.
As shown in Fig. 5, some brain areas including PCC, MPFC, and bilateral IPL showed significantly higher ReHo or ALFF than the global mean. Functional connectivity analysis showed that the PCC had significant positive functional connectivity with the default mode network and significant negative functional connectivity with the attention network. These results for functional connectivity, ReHo, ALFF, and fALFF were consistent with those reported in previous studies , , , , , , .
4. Additional functions
4.1. REST DICOM Sorter.
Most MRI scanners produce data in Digital Imaging and Communications in Medicine (DICOM) format. The “REST DICOM Sorter” reads DICOM files by using existing routines (dicominfo and dicomread) in the MATLAB distribution and then classifies the DICOM files participant by participant and session by session. There is an option to anonymize the participants' private information (name, ID, and birthday) within the DICOM files.
4.2. NIfTI.nii to NIfTI. Pairs.
This routine is for converting single NIfTI.nii (3D or 4D) file(s) to NIfTI 3D pair(s) (.hdr/.img) for the convenience of FSL users. This utility supports batch mode.
4.3. Reslice Image.
This routine is for reslicing images to a new voxel size and new bounding box. There are several options to keep the original space or to define the new target space with an input image. The new voxel size is specified by a 1×3 matrix (such as [3 3 3]). The interpolation method can be specified by 0, 1, 2, …, n (0: Nearest Neighbor. 1: Trilinear. 2, …, n: 2nd, …, nth degree B-spline). The nearest neighbor is applied on the mask file (only integer). The routine is based on SPM (http://www.fil.ion.ucl.ac.uk/spm/).
Previous studies have demonstrated that systematic signal increase or decrease occurs over time due to long-term physiological shifts, movement related noise remaining after realignment or instrumental instability , . The linear trend is usually removed in fMRI data preprocessing. In REST, the linear trend is estimated with a least-square fitting of a straight line and then is subtracted from the data. After that, the original mean value of each time course is added back.
4.5. Bandpass filtering.
REST uses an ideal rectangle window to do band-pass filtering as does the equivalent command in AFNI (3dFourier -retrend). The ideal filter transforms the time course into the frequency domain by using the discrete Fourier transform and adds zeros to extend the frequency coverage, then transforms back to the time domain by using the inverse discrete Fourier transform. If the user input for the lower limit of the band range is zero, REST will do a low-pass filtering and, similarly, if the input for higher limit of the band range is greater than the Nyquist frequency, REST will do a high-pass filtering.
4.6. Extract ROI Time Course.
This routine is for extracting the mean time course of the voxels within a specified ROI. It could be also used to extract the time course of a single voxel. This utility supports batch mode. The extracted time courses are written as both text files and mat files.
4.7. Regress out covariates.
This routine is for regressing out some nuisance covariates. The format for inputting the covariates should be in a text file. The text file must contain one or more columns, each representing a covariate.
4.8. REST Image Calculator.
Inspired by the “ImCalc” GUI in SPM and “3dcalc” command line in AFNI, we developed the “REST Image Calculator” to support simple computation on individual images (referred to as i1, i2, i3, …) and group images (g1, g2, g3, …). The expression can be a standard MATLAB expression such as the following examples (a–g) or one of the special functions (h and i):
4.8.1. g1-1: Subtract 1 from each image in group 1 (g1).
4.8.2. g1-g2: Subtract an image in group 2 (g2) from its corresponding image in group 1 (g1).
4.8.3. i1-i2: Subtract an image (i2) from another image (i1).
4.8.4. i1>100: Make a binary mask image at an intensity threshold of 100.
4.8.5. g1>100: Make binary mask images of g1 at an intensity threshold of 100.
4.8.6. g1.* (i1>100): Make a mask image from an image (i1) and then apply it to each image in group 1 (g1).
4.8.7. mean (g1): Generate a mean image of group 1 (g1).
(g) (i1-mean(g1))./std(g1): This example is for the comparison of an individual image with a large group of images, e.g., a patient image with a large group of normal images. The distribution for group 1 (g1) should be normal and the sample size must be large enough (e.g., >100). The resultant Z score map may indicate areas that may be considered to be ‘abnormal’.
4.8.8. corr (g1, g2, “temporal”): Calculate the temporal correlation between 2 4D-images g1 and g2. This can also be used to calculate the correlation between two groups of 3D images, e.g., the correlation between ReHo and ALFF across participants in a voxel-wise way. The output is a correlation coefficient map.
4.8.9. corr (g1, g2, “spatial”): Calculate the spatial correlation between two corresponding 3D images in two groups (number of images ranging from 1 to n). The output is a text file.
4.9. Statistical Analysis.
This section currently supports one-sample T-test, two sample T-test (covariates are optional), paired T-test, one-way ANOVA (or ANCOVA), and linear correlation analysis (covariates are optional). The covariates could be a group of images. For example, the gray matter density can be regressed out in a voxel-wise way when a two-sample T-test is performed between two groups of functional images . The covariates could also be text files. Each text covariate file must correspond to a group of images that are to be compared. The text files (e.g., two text files for two-sample T-test) will be concatenated during analysis. The correlation analysis supports correlation between a text file (e.g., IQ.txt) and a group of images (e.g., ReHo maps of a group of participants). If the covariates are added into the correlation analysis, a partial correlation will be performed. The “Statistical Analysis” portion of REST supports images as covariates in the same way as the function “voxel-dependent EVs” (explainable variables) in FSL (http://www.fmrib.ox.ac.uk/fsl/feat5/detail.html). An example for the “REST One-way ANOVA (or ANCOVA)” GUI is shown in Fig. 6 and the “REST Correlation Analysis” GUI is shown in Fig. 7.
This shows an example with covariates (ANCOVA).
4.10. REST Slice Viewer.
REST Slice Viewer is a routine for displaying results. The results can be overlaid on a structural image. A color-bar was designed to illustrate the threshold. By clicking the button “Click to Toggle hdr info”, miscellaneous information about the underlay image and the overlay image will be listed, including dimension, voxel size, and origin. It supports some common functions for image-displaying and image-processing, including yoking, montage, orthogonal views, threshold setting, and multiple comparison correction (false discovery rate and AlphaSim under the pulling menu “Misc”). For the false discovery rate, a one-tailed test (like that usually used in SPM, http://www.fil.ion.ucl.ac.uk/spm/) or a two-tailed test can be selected. We recommend using a two-tailed test in most cases. AlphaSim is the same as the command found in AFNI  also called ‘AlphaSim’ and is based on a Monte Carlo simulation. “REST Slice Viewer” also reports information about the clusters, including the number of voxels, peak coordinates (in MNI system), anatomical term of location, and peak intensity of each cluster. The cluster report is based on “xjview” (by Xu Cui, http://www.alivelearn.net/xjview/). The REST Slice Viewer GUI is shown in Fig. 8.
The underlay is the Ch2 image (from MRIcro) and the overlay is a result of a T-test (for illustration purpose). The P value is specified as 0.05 and the corresponding T is 2.093. Some common functions are presented by the buttons and other useful functions are listed under the pull-down menu labeled “Misc”.
4.11. Power Spectrum.
This utility presents a voxel's time course and its power spectrum. It can be used to help check the quality of the fMRI signal. Users need to specify the folder which contains the functional images. As shown in Fig. 9, the time course and the corresponding power spectrum will be shown (Fig. 9A) when a voxel is selected (Fig. 9B). There is an option to remove any linear trend in the time course before calculating the power spectrum.
MATLAB is the runtime engine of REST and therefore some shortcomings of MATLAB, such as inefficient memory management, also exist in REST. Because MATLAB allocates continuous memory for a large matrix, it is a common phenomenon to encounter the “out of memory” error. To reduce the possibility of such a fatal error, REST uses a “space exchanging time” strategy. REST cuts a whole brain 4D dataset into several smaller 4D datasets, and after some memory consuming calculations, REST rebuilds the whole brain 4D dataset. With this strategy, REST can deal with large fMRI dataset with more than 1000 time points on most personal computers.
RS-fMRI studies have provided a few useful computational methods (e.g., functional connectivity, ReHo, and ALFF) for understanding both the physiology and pathophysiology of the spontaneous activity of the human brain. However, the analytic toolkits for RS-fMRI still largely need to be improved. REST was developed as a specialized software package for processing RS-fMRI data. It integrates many calculation methods used in RS-fMRI studies such as functional connectivity, ReHo, and ALFF. It also implements additional functions. REST is an open-source package and provides a framework for implementing more methods. For example, fractional ALFF (fALFF)  was implemented in REST v1.3 by Dr. CHENG Wen-lian (See Acknowledgements). A processing pipeline named the Data Processing Assistant for Resting-State fMRI (DPARSF, http://www.restfmri.net, ) was implemented based on REST and SPM. A Granger causality analysis package named REST-GCA was developed (Abstract by ; See also http://www.restfmri.net). REST is freely available at http://www.restfmri.net. It has been used in RS-fMRI data analysis in a number of recent publications (e.g., , , , –).
Availability and Future Directions
REST is freely available at http://www.restfmri.net (previously at http://resting-fmri.sourceforge.net before 2008-12-01). The test dataset is available on request. The website http://www.restfmri.net is dedicated to resting-state fMRI research online forum. Users can ask questions and give comments on REST and anything about RS-fMRI. The modular source code analysis of REST based on m2html (http://www.artefact.tk/software/matlab/m2html/, by Guillaume Flandin) is also available (http://restfmri.net/pub/rest_20090422/doc/) to help researchers easily extend REST function or implement new algorithms. Any possible extensions of REST would be welcome and appreciated, since REST is open source in the RS-fMRI community. The full application programming interface (API) could be checked in each REST's script and all the GUI scripts in REST could be regarded as calling samples. Furthermore, DPARSF (http://www.restfmri.net) could be thought as a very good REST's API calling example. ReHo, ALFF/fALFF, functional connectivity computation could be done in scripts like command lines. Some examples could be found in http://restfmri.net/forum/REST_in_scripts.
The authors wish to thank Dr. CHENG Wen-Lian (Department of Medical Imaging, Jinling Hospital, Nanjing University) for her fALFF implementation.
Conceived and designed the experiments: Y-FZ X-WS C-GY C-ZZ YH Z-YD X-NZ. Performed the experiments: X-WS Z-YD C-GY X-YL S-FL YH X-NZ. Analyzed the data: X-WS X-YL S-FL Z-YD C-GY. Contributed reagents/materials/analysis tools: X-WS X-YL S-FL Z-YD C-GY. Wrote the paper: X-WS Z-YD C-GY X-YL S-FL X-NZ YH C-ZZ Y-FZ.
- 1. Biswal B, Yetkin FZ, Haughton VM, Hyde JS (1995) Functional connectivity in the motor cortex of resting human brain using echo-planar MRI. Magn Reson Med 34: 537–41.B. BiswalFZ YetkinVM HaughtonJS Hyde1995Functional connectivity in the motor cortex of resting human brain using echo-planar MRI.Magn Reson Med3453741
- 2. Biswal BB, Mennes M, Zuo X-N, Gohel S, Kelly C, et al. (2010) Toward discovery science of human brain function. Proceedings of the National Academy of Sciences 107: 4734–4739.BB BiswalM. MennesX-N ZuoS. GohelC. Kelly2010Toward discovery science of human brain function.Proceedings of the National Academy of Sciences10747344739
- 3. Logothetis NK, Pauls J, Augath M, Trinath T, Oeltermann A (2001) Neurophysiological investigation of the basis of the fMRI signal. Nature 412: 150–7.NK LogothetisJ. PaulsM. AugathT. TrinathA. Oeltermann2001Neurophysiological investigation of the basis of the fMRI signal.Nature4121507
- 4. Pelled G, Goelman G (2004) Different physiological MRI noise between cortical layers. Magn Reson Med 52: 913–6.G. PelledG. Goelman2004Different physiological MRI noise between cortical layers.Magn Reson Med529136
- 5. Rauch A, Rainer G, Logothetis NK (2008) The effect of a serotonin-induced dissociation between spiking and perisynaptic activity on BOLD functional MRI. Proc Natl Acad Sci U S A 105: 6759–64.A. RauchG. RainerNK Logothetis2008The effect of a serotonin-induced dissociation between spiking and perisynaptic activity on BOLD functional MRI.Proc Natl Acad Sci U S A105675964
- 6. Shehzad Z, Kelly AMC, Reiss PT, Gee DG, Gotimer K, et al. (2009) The Resting Brain: Unconstrained yet Reliable. Cerebral Cortex 19: 2209–2229.Z. ShehzadAMC KellyPT ReissDG GeeK. Gotimer2009The Resting Brain: Unconstrained yet Reliable.Cerebral Cortex1922092229
- 7. Zuo XN, Di Martino A, Kelly C, Shehzad ZE, Gee DG, et al. (2010) The oscillating brain: complex and reliable. Neuroimage 49: 1432–45.XN ZuoA. Di MartinoC. KellyZE ShehzadDG Gee2010The oscillating brain: complex and reliable.Neuroimage49143245
- 8. Zuo X-N, Kelly C, Adelstein JS, Klein DF, Castellanos FX, et al. (2010) Reliable intrinsic connectivity networks: Test-retest evaluation using ICA and dual regression approach. Neuro Image 49: 2163–2177.X-N ZuoC. KellyJS AdelsteinDF KleinFX Castellanos2010Reliable intrinsic connectivity networks: Test-retest evaluation using ICA and dual regression approach.Neuro Image4921632177
- 9. Kiviniemi V, Kantola JH, Jauhiainen J, Hyvarinen A, Tervonen O (2003) Independent component analysis of nondeterministic fMRI signal sources. Neuroimage 19: 253–60.V. KiviniemiJH KantolaJ. JauhiainenA. HyvarinenO. Tervonen2003Independent component analysis of nondeterministic fMRI signal sources.Neuroimage1925360
- 10. Calhoun VD, Adali T, Pearlson GD, Pekar JJ (2001) A method for making group inferences from functional MRI data using independent component analysis. Hum Brain Mapp 14: 140–51.VD CalhounT. AdaliGD PearlsonJJ Pekar2001A method for making group inferences from functional MRI data using independent component analysis.Hum Brain Mapp1414051
- 11. Beckmann CF, Smith SM (2004) Probabilistic independent component analysis for functional magnetic resonance imaging. IEEE Trans Med Imaging 23: 137–52.CF BeckmannSM Smith2004Probabilistic independent component analysis for functional magnetic resonance imaging.IEEE Trans Med Imaging2313752
- 12. Zhou D, Thompson WK, Siegle G (2009) MATLAB toolbox for functional connectivity. Neuroimage 47: 1590–607.D. ZhouWK ThompsonG. Siegle2009MATLAB toolbox for functional connectivity.Neuroimage471590607
- 13. Zang Y, Jiang T, Lu Y, He Y, Tian L (2004) Regional homogeneity approach to fMRI data analysis. Neuroimage 22: 394–400.Y. ZangT. JiangY. LuY. HeL. Tian2004Regional homogeneity approach to fMRI data analysis.Neuroimage22394400
- 14. Zang YF, He Y, Zhu CZ, Cao QJ, Sui MQ, et al. (2007) Altered baseline brain activity in children with ADHD revealed by resting-state functional MRI. Brain Dev 29: 83–91.YF ZangY. HeCZ ZhuQJ CaoMQ Sui2007Altered baseline brain activity in children with ADHD revealed by resting-state functional MRI.Brain Dev298391
- 15. Cao Q, Zang Y, Sun L, Sui M, Long X, et al. (2006) Abnormal neural activity in children with attention deficit hyperactivity disorder: a resting-state functional magnetic resonance imaging study. Neuroreport 17: 1033–6.Q. CaoY. ZangL. SunM. SuiX. Long2006Abnormal neural activity in children with attention deficit hyperactivity disorder: a resting-state functional magnetic resonance imaging study.Neuroreport1710336
- 16. Liu H, Liu Z, Liang M, Hao Y, Tan L, et al. (2006) Decreased regional homogeneity in schizophrenia: a resting state functional magnetic resonance imaging study. Neuroreport 17: 19–22.H. LiuZ. LiuM. LiangY. HaoL. Tan2006Decreased regional homogeneity in schizophrenia: a resting state functional magnetic resonance imaging study.Neuroreport171922
- 17. Hoptman MJ, Zuo X-N, Butler PD, Javitt DC, D'Angelo D, et al. (2010) Amplitude of low-frequency oscillations in schizophrenia: A resting state fMRI study. Schizophrenia Research 117: 13–20.MJ HoptmanX-N ZuoPD ButlerDC JavittD. D'Angelo2010Amplitude of low-frequency oscillations in schizophrenia: A resting state fMRI study.Schizophrenia Research1171320
- 18. Lui S, Li T, Deng W, Jiang L, Wu Q, et al. (2010) Short-term Effects of Antipsychotic Treatment on Cerebral Function in Drug-Naive First-Episode Schizophrenia Revealed by “Resting State” Functional Magnetic Resonance Imaging. Arch Gen Psychiatry 67: 783–792.S. LuiT. LiW. DengL. JiangQ. Wu2010Short-term Effects of Antipsychotic Treatment on Cerebral Function in Drug-Naive First-Episode Schizophrenia Revealed by “Resting State” Functional Magnetic Resonance Imaging.Arch Gen Psychiatry67783792
- 19. Yao ZJ, Wang L, Lu Q, Liu HY, Teng GJ (2009) Regional homogeneity in depression and its relationship with separate depressive symptom clusters: A resting-state fMRI study. JOURNAL OF AFFECTIVE DISORDERS 115: 430–438.ZJ YaoL. WangQ. LuHY LiuGJ Teng2009Regional homogeneity in depression and its relationship with separate depressive symptom clusters: A resting-state fMRI study.JOURNAL OF AFFECTIVE DISORDERS115430438
- 20. Yuan Y, Zhang Z, Bai F, Yu H, Shi Y, et al. (2008) Abnormal neural activity in the patients with remitted geriatric depression: a resting-state functional magnetic resonance imaging study. J Affect Disord 111: 145–52.Y. YuanZ. ZhangF. BaiH. YuY. Shi2008Abnormal neural activity in the patients with remitted geriatric depression: a resting-state functional magnetic resonance imaging study.J Affect Disord11114552
- 21. Bai F, Zhang ZJ, Yu H, Shi YM, Yuan YG, et al. (2008) Default-mode network activity distinguishes amnestic type mild cognitive impairment from healthy aging: A combined structural and resting-state functional MRI study. NEUROSCIENCE LETTERS 438: 111–115.F. BaiZJ ZhangH. YuYM ShiYG Yuan2008Default-mode network activity distinguishes amnestic type mild cognitive impairment from healthy aging: A combined structural and resting-state functional MRI study.NEUROSCIENCE LETTERS438111115
- 22. He Y, Wang L, Zang YF, Tian LX, Zhang XQ, et al. (2007) Regional coherence changes in the early stages of Alzheimer's disease: A combined structural and resting-state functional MRI study. NEUROIMAGE 35: 488–500.Y. HeL. WangYF ZangLX TianXQ Zhang2007Regional coherence changes in the early stages of Alzheimer's disease: A combined structural and resting-state functional MRI study.NEUROIMAGE35488500
- 23. Liu Y, Wang K, Yu CS, He Y, Zhou Y, et al. (2008) Regional homogeneity, functional connectivity and imaging markers of Alzheimer's disease: A review of resting-state fMRI studies. NEUROPSYCHOLOGIA 46: 1648–1656.Y. LiuK. WangCS YuY. HeY. Zhou2008Regional homogeneity, functional connectivity and imaging markers of Alzheimer's disease: A review of resting-state fMRI studies.NEUROPSYCHOLOGIA4616481656
- 24. Wang Z, Yan C, Zhao C, Qi Z, Zhou W, et al. (2010) Spatial patterns of intrinsic brain activity in mild cognitive impairment and alzheimer's disease: A resting-state functional MRI study. Hum Brain Mapp n/a–n/a.Z. WangC. YanC. ZhaoZ. QiW. Zhou2010Spatial patterns of intrinsic brain activity in mild cognitive impairment and alzheimer's disease: A resting-state functional MRI study.Hum Brain Mappn/an/a
- 25. Wu T, Long XY, Zang YF, Wang L, Hallett M, et al. (2009) Regional Homogeneity Changes in Patients With Parkinson's Disease. HUMAN BRAIN MAPPING 30: 1502–1510.T. WuXY LongYF ZangL. WangM. Hallett2009Regional Homogeneity Changes in Patients With Parkinson's Disease.HUMAN BRAIN MAPPING3015021510
- 26. Zhang Z, Lu G, Zhong Y, Tan Q, Yang Z, et al. (2009) Impaired attention network in temporal lobe epilepsy: A resting FMRI study. Neuroscience Letters 458: 97–101.Z. ZhangG. LuY. ZhongQ. TanZ. Yang2009Impaired attention network in temporal lobe epilepsy: A resting FMRI study.Neuroscience Letters45897101
- 27. Lui S, Huang X, Chen L, Tang H, Zhang T, et al. (2009) High-field MRI reveals an acute impact on brain function in survivors of the magnitude 8.0 earthquake in China. Proceedings of the National Academy of Sciences 106: 15412–15417.S. LuiX. HuangL. ChenH. TangT. Zhang2009High-field MRI reveals an acute impact on brain function in survivors of the magnitude 8.0 earthquake in China.Proceedings of the National Academy of Sciences1061541215417
- 28. Friston KJ, Holmes AP, Worsley KJ, Poline JB, Frith C, et al. (1995) Statistical Parametric Maps in Functional Imaging: A General Linear Approach. Human Brain Mapping 2: 189–210.KJ FristonAP HolmesKJ WorsleyJB PolineC. Frith1995Statistical Parametric Maps in Functional Imaging: A General Linear Approach.Human Brain Mapping2189210
- 29. Cox RW (1996) AFNI: software for analysis and visualization of functional magnetic resonance neuroimages. Comput. Biomed. Res 29: 162–173.RW Cox1996AFNI: software for analysis and visualization of functional magnetic resonance neuroimages. Comput. Biomed.Res29162173
- 30. Smith SM, Jenkinson M, Woolrich MW, Beckmann CF, Behrens TEJ, et al. (2004) Advances in functional and structural MR image analysis and implementation as FSL. NeuroImage 23: S208–S219.SM SmithM. JenkinsonMW WoolrichCF BeckmannTEJ Behrens2004Advances in functional and structural MR image analysis and implementation as FSL.NeuroImage23S208S219
- 31. Fox MD, Snyder AZ, Vincent JL, Corbetta M, Van Essen DC, et al. (2005) The human brain is intrinsically organized into dynamic, anticorrelated functional networks. Proc Natl Acad Sci U S A 102: 9673–8.MD FoxAZ SnyderJL VincentM. CorbettaDC Van Essen2005The human brain is intrinsically organized into dynamic, anticorrelated functional networks.Proc Natl Acad Sci U S A10296738
- 32. Fox MD, Zhang D, Snyder AZ, Raichle ME (2009) The Global Signal and Observed Anticorrelated Resting State Brain Networks. Journal of Neurophysiology 101: 3270–3283.MD FoxD. ZhangAZ SnyderME Raichle2009The Global Signal and Observed Anticorrelated Resting State Brain Networks.Journal of Neurophysiology10132703283
- 33. Murphy K, Birn RM, Handwerker DA, Jones TB, Bandettini PA (2009) The impact of global signal regression on resting state correlations: are anti-correlated networks introduced? Neuroimage 44: 893–905.K. MurphyRM BirnDA HandwerkerTB JonesPA Bandettini2009The impact of global signal regression on resting state correlations: are anti-correlated networks introduced?Neuroimage44893905
- 34. Raichle ME, MacLeod AM, Snyder AZ, Powers WJ, Gusnard DA, et al. (2001) A default mode of brain function. Proceedings of the National Academy of Sciences of the United States of America 98: 676–682.ME RaichleAM MacLeodAZ SnyderWJ PowersDA Gusnard2001A default mode of brain function.Proceedings of the National Academy of Sciences of the United States of America98676682
- 35. Goldman RI, Stern JM, Engel J, Cohen MS (2002) Simultaneous EEG and fMRI of the alpha rhythm. Neuroreport 13: 2487–2492.RI GoldmanJM SternJ. EngelMS Cohen2002Simultaneous EEG and fMRI of the alpha rhythm.Neuroreport1324872492
- 36. Lu H, Zuo Y, Gu H, Waltz JA, Zhan W, et al. (2007) Synchronized delta oscillations correlate with the resting-state functional MRI signal. Proceedings of the National Academy of Sciences 104: 18265–18269.H. LuY. ZuoH. GuJA WaltzW. Zhan2007Synchronized delta oscillations correlate with the resting-state functional MRI signal.Proceedings of the National Academy of Sciences1041826518269
- 37. Mantini D, Perrucci MG, Del Gratta C, Romani GL, Corbetta M (2007) Electrophysiological signatures of resting state networks in the human brain. Proceedings of the National Academy of Sciences 104: 13170–13175.D. MantiniMG PerrucciC. Del GrattaGL RomaniM. Corbetta2007Electrophysiological signatures of resting state networks in the human brain.Proceedings of the National Academy of Sciences1041317013175
- 38. Zou QH, Zhu CZ, Yang Y, Zuo XN, Long XY, et al. (2008) An improved approach to detection of amplitude of low-frequency fluctuation (ALFF) for resting-state fMRI: fractional ALFF. J Neurosci Methods 172: 137–41.QH ZouCZ ZhuY. YangXN ZuoXY Long2008An improved approach to detection of amplitude of low-frequency fluctuation (ALFF) for resting-state fMRI: fractional ALFF.J Neurosci Methods17213741
- 39. Schroeter ML, Bücheler MM, Müller K, Uludag K, Obrig H, et al. (2004) Towards a standard analysis for functional near-infrared imaging. Neuro Image 21: 283–290.ML SchroeterMM BüchelerK. MüllerK. UludagH. Obrig2004Towards a standard analysis for functional near-infrared imaging.Neuro Image21283290
- 40. Han Y, Wang J, Zhao Z, Min B, Lu J, et al. (2011) Frequency-dependent changes in the amplitude of low-frequency fluctuations in amnestic mild cognitive impairment: A resting-state fMRI study. Neuro Image 55: 287–295.Y. HanJ. WangZ. ZhaoB. MinJ. Lu2011Frequency-dependent changes in the amplitude of low-frequency fluctuations in amnestic mild cognitive impairment: A resting-state fMRI study.Neuro Image55287295
- 41. Lowe MJ, Mock BJ, Sorenson JA (1998) Functional connectivity in single and multislice echoplanar imaging using resting-state fluctuations. Neuroimage 7: 119–132.MJ LoweBJ MockJA Sorenson1998Functional connectivity in single and multislice echoplanar imaging using resting-state fluctuations.Neuroimage7119132
- 42. Fransson P (2005) Spontaneous low-frequency BOLD signal fluctuations: An fMRI investigation of the resting-state default mode of brain function hypothesis. Human Brain Mapping 26: 15–29.P. Fransson2005Spontaneous low-frequency BOLD signal fluctuations: An fMRI investigation of the resting-state default mode of brain function hypothesis.Human Brain Mapping261529
- 43. Press WH, Teukolsky SA, Vetterling WT, Flannery BP (1992) Numerical Recipes in C: The Art of Scientific Computing. Cambridge University Press. WH PressSA TeukolskyWT VetterlingBP Flannery1992Numerical Recipes in C: The Art of Scientific Computing. Cambridge University Press.Available: http://apps.nrbook.com/c/index.html. Available: http://apps.nrbook.com/c/index.html.
- 44. He Y, Zang Y, Jiang T, Liang M, Gong G (2004) Detecting Functional Connectivity of the Cerebellum Using Low Frequency Fluctuations (LFFs). pp. 907–915.Y. HeY. ZangT. JiangM. LiangG. Gong2004Detecting Functional Connectivity of the Cerebellum Using Low Frequency Fluctuations (LFFs).907915In: Medical Image Computing and Computer-Assisted Intervention – MICCAI 2004. Available: http://dx.doi.org/10.1007/978-3-540-30136-3_110. Accessed 22 Jul 2010. Available: http://dx.doi.org/10.1007/978-3-540-30136-3_110. Accessed 22 Jul 2010.
- 45. Long X-Y, Zuo X-N, Kiviniemi V, Yang Y, Zou Q-H, et al. (2008) Default mode network as revealed with multiple methods for resting-state functional MRI analysis. Journal of Neuroscience Methods 171: 349–355.X-Y LongX-N ZuoV. KiviniemiY. YangQ-H Zou2008Default mode network as revealed with multiple methods for resting-state functional MRI analysis.Journal of Neuroscience Methods171349355
- 46. Lowe MJ, Russell DP (1999) Treatment of baseline drifts in fMRI time series analysis. J Comput Assist Tomogr 23: 463–473.MJ LoweDP Russell1999Treatment of baseline drifts in fMRI time series analysis.J Comput Assist Tomogr23463473
- 47. Turner R (1997) Signal sources in bold contrast fMRI. Adv Exp Med Biol 413: 19–25.R. Turner1997Signal sources in bold contrast fMRI.Adv Exp Med Biol4131925
- 48. Oakes TR, Fox AS, Johnstone T, Chung MK, Kalin N, et al. (2007) Integrating VBM into the General Linear Model with voxelwise anatomical covariates. Neuro Image 34: 500–508.TR OakesAS FoxT. JohnstoneMK ChungN. Kalin2007Integrating VBM into the General Linear Model with voxelwise anatomical covariates.Neuro Image34500508
- 49. Chao-Gan Y, Yu-Feng Z (2010) DPARSF: a MATLAB toolbox for “pipeline” data analysis of resting-state fMRI. Front Syst Neurosci 4: 13.Y. Chao-GanZ. Yu-Feng2010DPARSF: a MATLAB toolbox for “pipeline” data analysis of resting-state fMRI.Front Syst Neurosci413
- 50. Zang ZX, Dong ZY, Huang J, Yan CG, Zang YF (2010) REST-GCA: a MATLAB toolkit for resting-state fMRI directional connectivity analysis. ZX ZangZY DongJ. HuangCG YanYF Zang2010REST-GCA: a MATLAB toolkit for resting-state fMRI directional connectivity analysis.The 16th Annual Meeting of the Organization for Human Brain Mapping. June 6–10, 2010 in Barcelona, Spain. The 16th Annual Meeting of the Organization for Human Brain Mapping. June 6–10, 2010 in Barcelona, Spain.
- 51. Yang T, Cheng Y, Li H, Jiang H, Luo C, et al. (2010) Abnormal regional homogeneity of drug-naı ¨ve obsessive-compulsive patients. Neuro Report 21: 786–790.T. YangY. ChengH. LiH. JiangC. Luo2010Abnormal regional homogeneity of drug-naı ¨ve obsessive-compulsive patients.Neuro Report21786790
- 52. Hutchison RM, Mirsattari SM, Jones CK, Gati JS, Leung LS (2010) Functional Networks in the Anesthetized Rat Brain Revealed by Independent Component Analysis of Resting-State fMRI. Journal of Neurophysiology 103: 3398–3406.RM HutchisonSM MirsattariCK JonesJS GatiLS Leung2010Functional Networks in the Anesthetized Rat Brain Revealed by Independent Component Analysis of Resting-State fMRI.Journal of Neurophysiology10333983406
- 53. Paakki J-J, Rahko J, Long X, Moilanen I, Tervonen O, et al. (2010) Alterations in regional homogeneity of resting-state brain activity in autism spectrum disorders. Brain Research 1321: 169–179.J-J PaakkiJ. RahkoX. LongI. MoilanenO. Tervonen2010Alterations in regional homogeneity of resting-state brain activity in autism spectrum disorders.Brain Research1321169179
- 54. Zou Q, Wu CW, Stein EA, Zang Y, Yang Y (2009) Static and dynamic characteristics of cerebral blood flow during the resting state. Neuroimage 48: 515–524.Q. ZouCW WuEA SteinY. ZangY. Yang2009Static and dynamic characteristics of cerebral blood flow during the resting state.Neuroimage48515524