This repository includes a set of matlab functions for fMRI data preprocessing. Particularly, this pipeline was made for surface-based preprocessing, but it also can be used for volume-based preprocessing.
A) Make directories for preprocessed data (r1)
B) Convert DICOM images to NIFTI format (using dicm2nii.m, which was adapted from https://github.com/xiangruili/dicm2nii) (r2-r4)
C) Basic environmental setup for preprocessing (s1)
D) Preprocessing structural data
For surface-based preprocessing:
- Use recon-all (Freesurfer) to correct bias-field, extract brain tissue, reconstruct structural images to cortical surface, and do anatomical segmentation (s2)
- Use ciftify_recon_all (CIFTIFY, Dickie et al., 2019) to normalize structural images to MNI space, and resample native surface images onto Conte69 164k and 32k CIFTI surface (Van Essen et al., 2012) using MNI normalization parameters (s3)
For Volume-based preprocessing:
- Use antsBrainExtraction (ANTs) to correct bias-field and extract brain tissue (s4)
- Use antsRegistrationSyN (ANTs) to normalize structural images to MNI space (s4)
- Use FAST (FSL) to do anatomical segmentation (s4)
E) Preprocessing functional data
- Use 3dTshift (AFNI) to do slice-timing correction (s5, if needed)
- Use 3dvolreg (AFNI) to do motion-correction (s6)
- Use topup/applytopup (FSL) to do distortion-correction (s7)
- Use flirt (FSL) with BBR cost function to co-register functional images to structural images (s8)
- For surface-based preprocessing, additionally use bbregster (Freesurfer) to refine co-registration (s8)
- Use ICA-AROMA (Pruim et al., 2015) to remove motion-related signals (s9)
- Use 3dTproject (AFNI) to remove nuisance signals (s10)
- Use applywarp (FSL, for surface-based preprocessing) or antsApplyTransforms (ANTs, for volume-based preprocessing) to normalize functional images to MNI space
- For volume-based preprocessing, use susan (FSL) to spatially smooth functional images
- For surface-based preprocessing, use ciftify_subject_fmri (CIFTIFY, Dickie et al., 2019) to transform functional images to Conte69 32k CIFTI surface, and spatially smooth (based on both surface-based and volume-based smoothing) functional images
Note: 8 can precede 6 and 7. depending on your purpose.
- CanlabCore: https://github.com/canlab/CanlabCore
- dicm2nii: (https://github.com/xiangruili/dicm2nii): We modified the original toolbox a little bit to make the output data fully BIDS-compatible. For this reason, please use the dicm2nii toolbox in our repository (in https://github.com/cocoanlab/humanfmri_preproc_bids/tree/master/external), instead of the original one.
- AFNI: https://afni.nimh.nih.gov
- FSL: https://fsl.fmrib.ox.ac.uk
- ANTs: https://github.com/ANTsX/ANTs
- Freesurfer: https://surfer.nmr.mgh.harvard.edu
- Connectome Workbench: https://www.humanconnectome.org/software/connectome-workbench
- ICA-AROMA: https://github.com/rhr-pruim/ICA-AROMA
If you have trouble with setting up the environemnt above, please see https://docs.google.com/document/d/1wjh2fWaBKGc2XKo2alKkbHGLzOIGgxyBImCeL7VLI0o/edit (note: under construction!).
Date: 2019. 07. 20
Jae-Joong Lee