Welcome to the forum of resting-state fMRI

Dynamic brain connectome analysis toolbox

Dynamic brain connectome (DynamicBC) analysis toolbox is a Matlab toolbox to calculate Dynamic Functional Connectivity (d-FC) and Dynamic Effective Connectivity (d-EC). Sliding window analysis (Bivariate Pearson correlation and Granger causality) and time varying parameter regression method (Flexible Least Squares) are two dynamic analysis strategies for time-variant connectivity analysis in the DynamicBC. Granger causality density/strength (GCD/GCS) and functional connectivity density/strength (FCD/FCS) analysis would be performed in this toolbox. Add DynamicBC's directory to MATLAB's path and enter "DynamicBC" in the command window of MATLAB to enjoy it.

The latest release is DynamicBC_V1.1_20140710.  

Manual could also be downloaded here.

New features of DynamicBC 1.1 release 20140710:
1. Added the new utilties including the ‘Clustering’ and 'Spectrum' for dynamic FC/EC time series.
2. Added the new output of variance of dynamic FC/EC time series.  

New features of DynamicBC 1.0 release 20140429: 
This release fixed some minor bugs in dynamic FCD.

Resting-State fMRI Data Analysis Toolkit V1.8 (静息态功能磁共振数据处理工具包 V1.8)

Resting-State fMRI Data Analysis Toolkit (REST) is a convenient toolkit to calculate Functional Connectivity (FC), Regional Homogeneity (ReHo), Amplitude of Low-Frequency Fluctuation (ALFF), Fractional ALFF (fALFF), Gragner causality, degree centrality, voxel-mirrored homotopic connectivity (VMHC) and perform statistical analysis. You also can use REST to view your data, perform Monte Carlo simulation similar to AlphaSim in AFNI, perform Gaussian random field theory multiple comparison correction like easythresh in FSL, calculate your images, regress out covariates, extract ROI time courses, reslice images, and sort DICOM files. Download a MULTIMEDIA COURSE would be helpful for knowing more about how to use this software. Add REST's directory to MATLAB's path and enter "REST" in the command window of MATLAB to enjoy it.

Citation of REST is: 
Xiao-Wei Song, Zhang-Ye Dong, Xiang-Yu Long, Su-Fang Li, Xi-Nian Zuo, Chao-Zhe Zhu, Yong He, Chao-Gan Yan, Yu-Feng Zang. (2011) REST: A Toolkit for Resting-State Functional Magnetic Resonance Imaging Data Processing. PLoS ONE 6(9): e25031. doi:10.1371/journal.pone.0025031

The latest release is REST_V1.8_130615


Multimedia Course: Data Processing of Resting-State fMRI

New features of REST V1.8 release 130615:
1. Fixed a bug in temporal correlation of two groups of images in Image Calculator. (Thanks for the report of ZHANG Han)

2. The midline of VMHC results were set to zero. (YAN Chao-Gan)

New features of REST V1.8 release 130303:
When calling Mingrui Xia's BrainNet Viewer (http://www.nitrc.org/projects/bnv/), the default surface template is changed to the smoothed version (BrainMesh_ICBM152_smoothed.nv). The previous default template (BrainMesh_ICBM152.nv) hide more information in the sulcus. If the users want to use BrainMesh_ICBM152.nv as default surface template, please uncomment Line 3740 in rest_sliceviewer: %SurfFileName=[BrainNetViewerPath,filesep,'Data',filesep,'SurfTemplate',filesep,'BrainMesh_ICBM152.nv'];
(After discussion with Mingrui Xia).

New features of REST V1.8 release 130214:
1.    This release fixed some minor bugs, will not affect any data analysis.
2.    Fixed a bug when using .nii(.gz) files in REST Image Calculator. (WANG Xin-Di)
3.    Fixed a bug in using .nii(.gz) files in GCA analyses. (ZANG Zhen-Xiang)
4.    Fixed the imresize_old bug of REST Slice Viewer with Matlab 2012b. (YAN Chao-Gan)

New features of REST V1.8 release 121225:
1.    Support parallel computing! If you installed the MATLAB parallel computing toolbox, REST can distribute the subjects into different CPU cores. (WANG Xin-Di and YAN Chao-Gan).
2.    Algorithm change: (1) Filtering: a separate function for matrix filtering was written. The low cutoff frequency index calculation changed from round (in REST V1.7) to "ceil". E.g., if low cut off corresponded to index 5.1, now it will start from 6 other than 5. This change also applies to ALFF and fALFF calculation. The filtered data changes slightly, about 0.0001. (2) The ALFF generated by the new version is sqrt(2/N) times of the original version. (new version used: 2*abs(fft(x))/N; original version used:  sqrt(2*abs(fft(x))^2/N)). This change will not affect group analysis (as each individual scaled the same number), and will not affect mALFF and fALFF calculation as this factor will be normalized. (3) In the calculation of ReHo, the rank will keep as double and no longer converted into uint16, thus created slight difference with REST V1.7. (YAN Chao-Gan)
3.    REST Slice Viewer support 4D file display and the maximum and minimum value could be set. (WANG Xin-Di)
4.    Gaussian random field (GRF) theory multiple comparison correction (like easythresh in FSL) was supported. The smoothness could be evaluated for GRF correction or AlphaSim correction. (GUI by WANG Xin-Di, algorithm by YAN Chao-Gan)
5.    Modules of voxel-mirrored homotopic connectivity (VMHC) (Zuo et al., 2010), Degree Centrality (Buckner et al., 2009) were added. (GUI by WANG Xin-Di, algorithm by YAN Chao-Gan)
6.    REST GCA: could handle multiple ROIs (other than 2) in ROI-wise GCA now. Fixed a bug of discordance between the outputs and the description in REST-GCA readme in the pre-release of REST V1.8. (ZANG Zhen-Xiang)
7.    rest_readfile.m and rest_writefile: The default format changed to .nii from .img. (WANG Xin-Di)
8.    rest_to4d.m: now support one 4d file other than a directory, also support a cell of image filenames. (YAN Chao-Gan)
9.    rest_regress_ss.m: add the output of T value. (YAN Chao-Gan)
10.    rest_Write4DNIfTI.m: This function was added for write 4D nifti files based on SPM’s nifti function. (YAN Chao-Gan)
11.    rest_writefile.m: No longer need to change to RPI before writing. (YAN Chao-Gan)


1) 我关心的是limbic network,DMN,executive control network这三个网络,我是应该做好这三个网络的mask,分别进行双样本t检验?还是做好双样本t检验,然后再找出这些网络的cluster进行比较?

关于Cl. Report体素大小问题

 老师,你好。您说Cl. Report中的体素太小(如9  Left Cerebellum, 9  Declive, 9  Cerebellum Posterior Lobe,6  Sub-Gyral,5  brodmann area 18,2  Occipital_Mid_L (aal))需排除,不用汇报进我们的实验结果中,但究竟体素多小时才需要排除掉?有什么标准么?

Cluster 1
Number of voxels: 112
Peak MNI coordinate: -45 -78 -12

关于Cl. Report体素大小问题

 老师,你好。您说Cl. Report中的体素太小(如9  Left Cerebellum, 9  Declive, 9  Cerebellum Posterior Lobe,6  Sub-Gyral,5  brodmann area 18,2  Occipital_Mid_L (aal))需排除,不用汇报进我们的实验结果中,但究竟体素多小时才需要排除掉?有什么标准么?

Cluster 1
Number of voxels: 112
Peak MNI coordinate: -45 -78 -12



我查阅了关于多重比较校正的相关论坛,在SPM5里results选项中,有个默认的FDR及FWE校正的按钮,这个按钮默认的是对voxel-wise 的FDR及FWE的校正,这个校正相对比较严格。而Cluster-wise的校正相对比较宽松一点。我用voxel-wise 的FDR及FWE的校正跑出了一片空白脑区。所以想用Cluster-wise的FDR校正。


Problems when trying to run REST v1.8

Hi all,

I am new to using REST_V1.8_130615 fMRI toolbox extension in SPM12 and am having some problems when trying to start the REST toolbox.
I am using Matlab version 2015a and SPM12 on Windows 10 64-bit machine.

I am able to start the REST toolbox however when I start by typing "rest" in the command window I get the following error

REST paired t test统计

 老师您好,我想问一下:用REST 进行paired t test只得到一个T.nii文件,那么如何知道阈值T0来查看有差异的体素呢?


Hi there,
I've got a question regarding the granger causality analysis. I've got an fMRI block design where I get activations in two main language areas. I'm now interested to test whether region A exerts influence on region B or whether region B exerts more influence on region A. Can I use REST-GCA even though it is a block design?

Thanks very much for your help!


Dynamic FC问题

        我最近在学习有关Dynamic FC, 用的是DynamicBC toolbox,在此过程中遇到一些问题,特来请教。
Syndicate content