Package: dwiprep
DWIPrep: A Robust Preprocessing Pipeline for dMRI DataThis pipeline is being developed and maintaingYaniv Assaf's lab at Tel Aviv University, as an open-source tool for preprocessing of dMRI data.DWIPrepis a diffusion magnetic resonance image (dMRI) data preprocessing pipeline that is designed to provide an easily accessible, robust and dynamic interface, allowing basic pre-processing for both within-subject (plasticity) and between-subjects datasets, envolving a wide variety of dMRI scan acquisitions.ThedMRIPreppipeline uses a combination of tools from well-known software packages, includingFSL,MRtrix3,SPMandCAT12. This pipeline was designed to provide a potentially best preprocessing pipeline for a wide range of dMRI data acquisition parameters, and will be updated as new neuroimaging software become available.This tool allows you to easily do the following:Preprocess a wide variety of dMRI data, from raw NIfTI (structured to follow theBIDS format) to fully preprocessed form.Account for specific preprocessing procedures that are crucial of analyzing plasticity (i.e, within-subjects) datasets.Automate processing steps.Preprocessing (including demonstrations):Extraction of opposite phase-encoding DWI'sB0volumesfor later Susceptability Distortions Correction (SDC).Motion & Susceptability Distortions Correction (SDC)using FSL'stopup1andEddy2, as implemented via MRTrix3'sdwifslpreproc3. Note that the pipeline assumesoppositephase encoding directions, as it was found to be optimal for SDC4.Figure 1:AP and PA represent the opposite, uncorrected, B0 volumes - extracted from opposite phase-encoded DWIs, "corrected" stands for post-SDC implementation ofdwifslpreproc.B1 field inhomogeneity correction for a DWI volume series, using the N4 algorithm as provided in ANTs* (N4BiasFieldCorrection)5, as implemented in MRTtrix3'sdwibiascorrect3.* In case ANTs is not installed in user's computer, the pipeline will use FSL'sfastalgorithm6,7, which is discouraged due to its dependency on DWI's brain masking.Estimation of diffusion (kurtosis) tensor & tensor-derived parametersFollowing the preprocessing of DWI data, the pipeline automatically estimates several, widely used, tensor-derived parameters:Estimation of diffusion tensorusing MRTrix3tensor2metricimplementation of the Weighted Linear Least Squares estimation of diffusion MRI parameters8.Generation of tensor-derived parameters maps9,10Registration pipelineLongitudinal (Multi-sessions)To account for registration-induced biases, we've implemented a within-subject (i.e, between-sessions) registration pipeline, before normalizing subject's data into standard space. This implementation includes the following steps:Registration of subject’s first session ("pre") b0to it’s second one (“post”) b0and vice versa (post's b0to pre's b0), using FSL’sflirt11,12, with amutual informationcost function.Calculation of forward and backwardhalfway transformation matrices(pre to post and post to pre, accordingly) using FSL’savscle.Applying halfway transformation to both sessions’ b0(forward to pre, backward to post), registrating them into subject's "middle" space.Calculating subject’s average (between sessions) b0, as the average of both coregistered b0s.5. Same procedure is applied to register (between-sessions) subjects’ anatomical (T1) images.Co-registrations and NormalizationNote that all registerations procedures denoted below, when performed on a longitudinal dataset, do so for the within-subject (between-sessions) registered images.Coregistration (DWI to T1)Coregistration, in this case, refers to the registration of images of different modalities (i.e DWI, T1, etc.) of the same subject.
Coregisteration is performed using FSL'sepi_regscript, performing appropriate linear registration between subject's B0and T1images.NormalizationBy default, thenormalizationprocedure conducted as part of this pipeline makes use of theComputational Anatomy Toolbox (CAT)for SPM. Since it requires MATLAB and SPM to be installed, the pipeline will resort to using FSL'sfsl_anatscript.CAT12CAT12 is a structural preprocessing tool offered as an addition to the Statistical Parametric Mapping (SPM) toolbox. It offers robust spatial normalization algorithms, as well as a Quality Assurance (QA) score regarding the structural image being processed, for example:fsl_anatIn case the user doesn't have MATLAB/SPM/CAT12 installed, the pipeline will resort to performing the spatial normalization using FSL'sfsl_anat, which includes the following:Reorientation to standard (MNI) orientation using fslreorient2std.Automatically cropping the image using robustfov.Bias-field correction (RF/B1-inhomogeneity-correction) using FAST.Registration to standard space (linear and nonlinear) using FLIRT and FNIRT.Brain extraction (FNIRT-based)Tissue-type segmentation using FAST.Subcortical structure segmentation using FIRST.
A summarized presentation of the anatomical preprocessing conducted viafsl_anat:Inverse registrationFollowing the "forward" registration (i.e, from subject to average space), and only if a parcellation atlas in MNI space is given as input for the pipeline, a "backward" registration (i.e from MNI to native space) is performed to transform the parcellation atlas into subject's space.
Note that this behaviour is promoted due to our agenda to promote region-based analyses (RBA), as described in our paper13(under review).
For example, a reverse registration performed on the Brainnetome parcellation atlas14:ReferencesAndersson, J. L., Skare, S., & Ashburner, J. (2003). How to correct susceptibility distortions in spin-echo echo-planar images: application to diffusion tensor imaging. Neuroimage, 20(2), 870-888.Andersson, J. L., & Sotiropoulos, S. N. (2016). An integrated approach to correction for off-resonance effects and subject movement in diffusion MR imaging. Neuroimage, 125, 1063-1078.Tournier, J. D., Smith, R., Raffelt, D., Tabbara, R., Dhollander, T., Pietsch, M., ... & Connelly, A. (2019). MRtrix3: A fast, flexible and open software framework for medical image processing and visualisation. NeuroImage, 202, 116137.Gu, X., & Eklund, A. (2019). Evaluation of six phase encoding based susceptibility distortion correction methods for diffusion MRI. Frontiers in neuroinformatics, 13, 76.Tustison, N. J., Avants, B. B., Cook, P. A., Zheng, Y., Egan, A., Yushkevich, P. A., & Gee, J. C. (2010). N4ITK: improved N3 bias correction. IEEE transactions on medical imaging, 29(6), 1310-1320.Zhang, Y.; Brady, M. & Smith, S. Segmentation of brain MR images through a hidden Markov random field model and the expectation-maximization algorithm. IEEE Transactions on Medical Imaging, 2001, 20, 45-57Smith, S. M.; Jenkinson, M.; Woolrich, M. W.; Beckmann, C. F.; Behrens, T. E.; Johansen-Berg, H.; Bannister, P. R.; De Luca, M.; Drobnjak, I.; Flitney, D. E.; Niazy, R. K.; Saunders, J.; Vickers, J.; Zhang, Y.; De Stefano, N.; Brady, J. M. & Matthews, P. M. Advances in functional and structural MR image analysis and implementation as FSL. NeuroImage, 2004, 23, S208-S219Veraart, J.; Sijbers, J.; Sunaert, S.; Leemans, A. & Jeurissen, B. Weighted linear least squares estimation of diffusion MRI parameters: strengths, limitations, and pitfalls. NeuroImage, 2013, 81, 335-346Basser, P. J.; Mattiello, J. & Lebihan, D. MR diffusion tensor spectroscopy and imaging. Biophysical Journal, 1994, 66, 259-267Westin, C. F.; Peled, S.; Gudbjartsson, H.; Kikinis, R. & Jolesz, F. A. Geometrical diffusion measures for MRI from tensor basis analysis. Proc Intl Soc Mag Reson Med, 1997, 5, 1742Jenkinson, M., Bannister, P., Brady, M., Smith, S., 2002. Improved optimization for the
robust and accurate linear registration and motion correction of brain images. Neuroimage 17, 825-841.Jenkinson, M., Smith, S., 2001. A global optimisation method for robust affine registration of brain images. Med Image Anal 5, 143-156.Ben-Zvi, G., Hofstetter, S., Tavor, I. & Assaf, Y. (2021). Measuring neuroplasticity with diffusion MRI: experimental considerations. (under review)Fan, L., Li, H., Zhuo, J., Zhang, Y., Wang, J., Chen, L., ... & Jiang, T. (2016). The human brainnetome atlas: a new brain atlas based on connectional architecture. Cerebral cortex, 26(8), 3508-3526.