Impact Factor 4.677 | CiteScore 5.4
More on impact ›

METHODS article

Front. Neurosci., 26 April 2018 |

Integrated fMRI Preprocessing Framework Using Extended Kalman Filter for Estimation of Slice-Wise Motion

Basile Pinsard1,2,3*, Arnaud Boutin1,4, Julien Doyon1,4 and Habib Benali2,3,5
  • 1Unité de Neuroimagerie Fonctionelle, Centre de Recherche de l'Institut Universitaire de Gériatrie de Montréal, Montreal, QC, Canada
  • 2UMR7371 Laboratoire d'Imagerie Biomédicale, Paris, France
  • 3Sorbonne Universités, Paris, France
  • 4Montreal Neurological Institute, McGill University, Montreal, QC, Canada
  • 5PERFORM Center, Concordia University, Montreal, QC, Canada

Functional MRI acquisition is sensitive to subjects' motion that cannot be fully constrained. Therefore, signal corrections have to be applied a posteriori in order to mitigate the complex interactions between changing tissue localization and magnetic fields, gradients and readouts. To circumvent current preprocessing strategies limitations, we developed an integrated method that correct motion and spatial low-frequency intensity fluctuations at the level of each slice in order to better fit the acquisition processes. The registration of single or multiple simultaneously acquired slices is achieved online by an Iterated Extended Kalman Filter, favoring the robust estimation of continuous motion, while an intensity bias field is non-parametrically fitted. The proposed extraction of gray-matter BOLD activity from the acquisition space to an anatomical group template space, taking into account distortions, better preserves fine-scale patterns of activity. Importantly, the proposed unified framework generalizes to high-resolution multi-slice techniques. When tested on simulated and real data the latter shows a reduction of motion explained variance and signal variability when compared to the conventional preprocessing approach. These improvements provide more stable patterns of activity, facilitating investigation of cerebral information representation in healthy and/or clinical populations where motion is known to impact fine-scale data.


Functional MRI (fMRI) with echo-planar-imaging (EPI) is widely used in neuroscience research to indirectly measure brain activity through the brain-oxygen-level-dependent (BOLD) signal. Yet subject motion during fMRI scanning causes important signal changes unrelated to the hemodynamic response of interest (for reviews see Zaitsev et al., 2015, 2017) resulting mainly from variations in partial voxelwise tissue volumes with different relaxation times. Motion induced detrimental contrast and intensity changes also originate by the spin-history effects resulting from disruption of the T1 steady state (Muresan et al., 2002) and loss of magnetization between excitation and readout. In addition, EPI suffers from gross non-linear distortions and signal losses due to main static field (B0) in-homogeneity (Jezzard and Balaban, 1995) caused by interfaces between air and subjects' tissues or bones, which when moved in the B0 field modulate these artifacts. The latter artifacts as well as physiological noise are even more evident at high fields (e.g., 3 or 7 Tesla) (Triantafyllou et al., 2005; Bollmann et al., 2017) mitigating the benefit in signal sensitivity. Related to these issues is the fact that numerous innovations in pulse acquisition sequences, and simultaneous multi-slice imaging (SMS) (Feinberg and Setsompop, 2013) in particular, have rapidly been adopted in leading research initiatives such as the Human Connectome Project (HCP) (Uğurbil et al., 2013; Van Essen et al., 2013). This type of functional sequence enables simultaneous imaging of multiple 2D slices which, combined with in-plane acceleration, allows high spatial resolution and/or sampling rate. However, the increase of in-plane resolution extends the readout echo train and concerns have thus been raised about a heightened sensitivity to motion and respiration induced B0 in-homogeneity fluctuations under those conditions.

Such entangled MRI-related phenomena, magnified by novel acquisition techniques, generate important non-linear signal perturbations. Differences in motion amplitude and occurrence across groups of subjects can then result in strong spurious effects in subsequent statistical analyses (Power et al., 2012). This is even more manifest in participants for which motion control is difficult, such as in clinical (Haller et al., 2014), older (Mowinckel et al., 2012) and pediatric (Power et al., 2012; Satterthwaite et al., 2012) populations, or when responses to a particular task introduces subject's motion during scanning.

Despite aforementioned limitations, improvements in measurements through innovations in MRI hardware and acquisition sequences have helped the neuroimaging field to constantly move its interest to finer characteristic of brain activity using complex experimental designs and elaborated analysis techniques. Notably, multivariate pattern analysis (MVPA) has received major attention in recent years (Pereira et al., 2009; Haxby, 2012), allowing novel hypotheses to be tested. Such techniques look for fine-scaled spatio-temporal activity patterns, but conventional preprocessing pipelines perform successive interpolations, resulting in low-pass spatial filtering. While further spatial smoothing is voluntarily applied to increase the robustness of classically investigated broad activity signal, it also averages out high frequency information across neighboring but distinct neuronal populations and structures such as the opposite cortical sulci banks.

In order to address such spatial alignment issues, two main preprocessing approaches have been proposed. First, motion correction can be performed prospectively by adjusting slices position during scanning in order to stabilize the anatomical coverage using either MRI data of preceding volume, interleaved navigators (White et al., 2010) or external motion tracking devices. Second, due to technical difficulties (i.e., the need to use physical trackers and adapt pulse sequence) in implementing prospective methods, most researchers have been using a retrospective approach, which consists in estimating motion from fMRI volumes that are then realigned. However, the available implementations of both techniques perform 3D volume registrations, thus dismissing the fact that sequential acquisition of EPI slices does not guarantee that motion occurs solely between volumes. As intra-volume motion can be frequent, the single registration estimate of each 3D volume averages the different spatial positions of slices, depending on their information content, hence causing local misregistrations. In addition, both scanner noise and fMRI resolution also limit the stability of these successive estimates, resulting in biologically unrealistic detected motion due to noisy registration. This, in turn, leads the corrected data, parametrized by these estimates, to contain long-range spurious covariance extending beyond motion-corrupted slices (Satterthwaite et al., 2013). To account for motion induced signal changes, the preprocessing often regresses out of the BOLD signal, the estimated movement parameters, sometimes differentiated and squared (Satterthwaite et al., 2013; Yan et al., 2013). While these noisy and inaccurate volume-wise motion parameters can mitigate spurious signal changes introduced by the resulting imperfect realignment, they cannot fully account for non-linearity of magnetic field and gradient changes entangled with physiological processes and scanner noise (Power et al., 2014).

Such limitations in volume-wise registration motivated the development of slice-to-volume (S2V) motion correction methods (Kim et al., 1999; Yeo et al., 2006, 2008; Ferrante and Paragios, 2017) for a review, which perform individual registration of each slice to a reference 3D volume. To circumvent the scarcer information content of a single EPI slice these methods implement a top-down registration scheme (Ferrazzi et al., 2014), additional stabilization (Park et al., 2004), regularized iterative global optimization (Gholipour et al., 2010; Seshamani et al., 2014) or an outlier detection (Marami et al., 2016) approach. By better fitting the acquisition process, S2V approaches provide improved signal, notably in applications prone to large motion such as fetal imaging. Yet these softwares are not shared among members of the scientific community and are thus not widely used in fMRI research. To correct motion induced signal changes, linear data-driven methods (Perlbarg et al., 2007; Griffanti et al., 2014) have then been applied, first to resting state and then to task-related data, trying to remove volume-wise structured noise that remains after motion correction. However transient slice-specific artifacts are already non-linearly propagated to neighboring slices through interpolation, hence complicating their removal. Thus, as S2V improves registration, EPI-based fMRI would also benefit from slice-specific signal corrections in acquisition space prior to any volumetric processing.

Therefore, there is a need for fMRI correction strategies that better take into account the MRI acquisition specificities and adapt to novel high-resolution imaging techniques such as SMS, which generate larger datasets and thus require more efficient preprocessing, analysis and data storage (Glasser et al., 2013). To fulfill such a need, we propose here an SMS compatible integrated retrospective method for slice-wise motion, distortion and signal correction as well as extraction of gray matter BOLD fine-scale patterns. The main contribution of this development is a preprocessing framework build around the specificities of widely used sliced acquisition, in which existing and novel processing methods are combined in a sensible way, and could integrate other slice-specific processing in further work. A thorough evaluation of the method is performed on both simulated and real data.


Motion Estimation

Starting from an initial registration of the first EPI full volume to T1 reference, the motion estimation algorithm then iterates through groups of slices or single slices of SMS or conventional acquisition scheme respectively as illustrated in Figure 1. To model continuously the subjects' head changing position, we chose an Iterated Extended Kalman Filter (IEKF); a derivation of standard Kalman Filter that takes into account the non-linearity of MR signal changes described above through local derivation and iterative optimization. The IEKF, previously used in navigator-based prospective motion correction for MRI anatomical scan (White et al., 2010), allows to robustly track hidden states of 3D translation and rotation, a six parameters vector xt, t ∈ [0..T] from observation. For each group of slices acquired at time t the algorithm makes a prediction xt of the state and P of the covariance of this prediction error:

xtt-10=Axt-1t-1    (1)
Ptt-10=Pt-1t-1+Q    (2)

Figure 1. Diagram of the algorithm: EPI groups of slices are sequentially rigidly registered by IEKF to the EPI reference initialized by previously estimated position, while concurrently removing an intensity bias using prior information (mask, partial volume effect map) from anatomical segmented anatomical scan while taking into account distortions estimated from B0 fieldmap.

A = I6 the transition matrix is defined as identity, as it is the best estimate for the head position when the next slice is acquired. P can be initialized as a diagonal matrix and Q is added to the covariance of the previous slice to predict the error accounting for the possible change in position during the time δt separating the acquisition of the two slices.

This prediction is recursively updated using the acquired data y by iterating for i = 1..N until convergence or maximum number of iterations is attained:

Kti=Ptt-1HiT[HiPtt-1HiT+R]-1    (3)
xtti+1=xtt-1i-Kti[y-h(xtti)]    (4)

with K the Kalman gain matrix, H being the Jacobian based on finite difference of the measurement function h that samples the reference, and R the observation covariance, approximated by a diagonal covariance matrix with observation variance allowing weighting of the voxels' influence on registration depending on their reliability.

After this iterative optimization, state covariance is then updated:

Ptt=[I-KtNHN]Ptt-1    (5)

This iterative updating, similar to a gradient-descent or Gauss-Newton algorithm, allow non-linear optimization which initialized to the most recently estimated position, is likely to converge to a global optimal solution. The updating is performed with partial observation, thus the cost function and its Jacobian are only estimated for the part of the brain imaged in the group of slices, by interpolating the brain mask from the anatomical reference space.

Intensity Bias Correction

Apart from the misalignment, the motion induces multiple contrast and intensity modulations of the signal (Zaitsev et al., 2017), notably due to non-linear changes of the static field in-homogeneity and the loss of slice excitation or magnetization steady-state. Independent of the changes in subjects' position, the static field and gradients can also show some non-linearity and instability (Bollmann et al., 2017) respectively due to gradient coil and passive shimming heatings, that causes contrast and intensity changes (Foerster et al., 2005; El-Sharkawy et al., 2006). As these intensity changes are specific to individual slices, it is thought that the best procedure is to correct raw acquired slices before any interpolation is performed with the rationale of avoiding to mix slice signals and artifacts through interpolations which might then prove difficult to separate.

As with other bias correction methods (Seshamani et al., 2014), we choose to model intensity changes using the assumption of spatially smooth multiplicative effect on the measured signal. This approach thus do not specifically model any of the acquisition phenomena describe above, but rather aims at removing spatial low-frequency changes in the signal that are unrelated to the BOLD effect of interest, similar to correction based on signal decomposition techniques (Perlbarg et al., 2007; Griffanti et al., 2014).

In that goal, the update step of the IEKF is modified to incorporate a bias correction term:

xtti+1=xtt-1i-Kti[yb-h(xtti)]    (6)

where b is the bias field estimated, at each iteration of IEKF, for each 2D slice separately, using the following non-parametric measure:

b(xi)=jΩϕσb(dij)w(j)y(j)jΩϕσb(dij)w(j)h(xtti,j)    (7)

where dij is the euclidean distance between voxels i and j, Ω constitutes the set of voxels in the slices containing voxel i, and ϕ is a Gaussian kernel of standard deviation σb that control the spatial frequency to be removed and w(j) is a weight parameter. This equation computes a weighted estimate of the spatial low-frequency intensity differences between the slab being processed and the reference. White matter partial volume map is used as weight w, as it is expected that intensity changes are limitedly related to neural activity, and is widely used for confound regression. Gray matter bias values are thus extrapolated from white-matter through Gaussian kernel allowing intensity correction without removal of signal changes of interest. Removing the low spatial frequencies of the differences between the slice being processed and the reference is expected to improve the similarity measure used in the IEKF registration.


The method was developed in python using the nipy package, and integrated in the nipype pipelining environment, both under open-source licence, and will thus be made available to the community. A pseudo-code is provided in appendix A.1 (Supplementary Material) to give an algorithmic view of the method.

Transformation and Distortion Correction

As mentioned above, motion estimation and bias correction steps require anatomical priors, namely the brain mask and the white matter partial volume map. As EPI shows localized gross distortion due to static magnetic field (B0) in-homogeneity, a linear mapping of undistorted anatomical priors cannot match the data being preprocessed. Distortions were thus applied to anatomical information when mapping these priors to EPI space, by applying a shift in the phase encoding direction as estimated from a mapping of the B0 field. The latter could be estimated either from a dual-echo sequence (Jezzard and Balaban, 1995; Hutton et al., 2002) acquired separately or an fMRI acquisition with reversed phase encoding paired to the one being processed (Andersson et al., 2003).

Interpolation and Data Storage

Once slabs composing each volume are successively registered and their signal is corrected in slice space, one still needs to extract timecourses of the BOLD signal at stable anatomical location of interest for studying brain activity. With individual slice registration, motion estimation of a single volume results in slices with varying position relative to anatomical space, in which voxels are shifted in phase encoding direction as estimated from the fieldmap. Hence, the functional voxels are located on an irregular grid in the anatomical space which poses a problem of scattered data interpolation. We solved this problem by implementing a Nadaraya–Watson Gaussian kernel regression (Nadaraya, 1964; Watson, 1964; Bierens, 1996), which for each anatomically defined gray-matter location vk computed the average of neighboring scattered EPI voxels xi intensity corrected by bias b(xi) and weighted by the distance d(vk, xi) transformed by Gaussian kernel ϕ.

I(vk,t)=iϕσrbf(d(vk,xi))y(xi,t)/b(xi,t)iϕσrbf(d(vk,xi))    (8)

In a previous implementation of volumetric to surface data interpolation (Operto et al., 2008) a kernel with anatomical constraints was used to avoid inclusion of white matter, cerebrospinal fluid or opposite sulci banks in interpolation of neocortical signal. To the same end, we allowed the use of an anisotropic Gaussian kernel with restricted extent in the direction normal to the cortical surface, complying with anatomical topology. Therefore, the subcortical grayordinates were resampled using a Gaussian kernel with 1.5 mm standard deviation, while the cortical grayordinates were resampled using a anisotropic Gaussian kernel with 1.5 and 0.5 mm standard deviation respectively for the directions tangent and perpendicular to the cortex.

As with the Human Connectome Project grayordinates (Glasser et al., 2013), our pipeline warps anatomical templates to individual subject space, including surface registered by spherical alignment (Dale et al., 1999; Fischl et al., 1999a,b), and volumetric ROIS coordinates through non-linear diffeomorphic warping (Avants et al., 2008). Therefore, the single interpolation described above directly provides signal anatomically aligned between individuals, allowing group-level analysis and visualization without further interpolation.

As the algorithm applies correction online, loading raw DICOM files, it would allow real-time analysis of the data, if computational performance and processing delay meet the application requirements. Online storage of interpolated signal also reduces memory usage, enabling processing of long and high temporal or spatial resolution acquisitions resulting from accelerated or multiband imaging. The chosen storage format uses HDF5 standard, providing fast and flexibly accessible storage of large dataset on disk. Altogether, this overcome the limitation of current methods which, depending on implementation, requires loading of the whole acquisition data in memory.



The choice of the datasets was motivated by the fact that we needed to test the method on a diversity of protocols including different experimental paradigms and type of sequences. Thus we used:

The Healthy Brain Network Serial Scanning Initiative (HBN-SSI) dataset (O'Connor et al., 2017), in which subjects were scanned in a series of 14 sessions aiming at test-retest reliability assessments. This dataset, acquired on a Siemens 1.5T Avanto scanner with 32-channel coil, includes resting-state and tasks related acquisitions with a multiband sequence (TR = 1,450 ms, TE = 40 ms, FA = 55, MB_factor = 3 × 18 = 54 slices interleaved ascending, res = 2.46 × 2.46 × 2.5mm), a dual-echo fieldmap, as well as an T1 MEMPRAGE (1 mm iso, FA = 7, TR = 2,730 ms, TE = 1.64 ms, GRAPPA = 2), a root-mean-square (RMS) was computed across echoes, the readers can report to the published data note (O'Connor et al., 2017) for the full description of this dataset.

A local protocol, acquired on a Siemens 3T Tim Trio B17, that included a motor sequence execution task designed for MVPA, which was performed in two separated scans for each of the 25 subjects, in a single-band acquisition (using 12-channel coil, TR = 2,160 ms, TE = 30 ms, FA = 90, 40 slices sequential ascending, res = 3.44 × 3.44 × 3.3 mm, GRAPPA = 2), to test the algorithm with both single-band scan sequence and pattern analysis. After the task was completed, a short acquisition with similar parameters but with reversed phase was acquired, for estimation of inhomogeneity induced distortions. In another session, a T1 MEMPRAGE (1 mm iso, TR = 2,530 ms, TE = 1.64, 3.6, 5.36, 7.22 ms, FA = 7, GRAPPA = 2) was acquired using a 32-channel, and the echoes were combined by computing the RMS. The task required the subjects to perform four different 5-keypress sequences with their left hand fingers excluding the thumb, each of the four sequences being repeated 5 times in 8 practice blocks, each scan including 32 pseudo-random ordered blocks. Each subject performed the task twice in two separate scans. This study protocol was approved by the Research Ethics Board of the “Regroupement en Neuroimagerie du Québec” (RNQ). All subjects provided written informed consent and received financial compensation for their participation.


To assess the accuracy of our method, we first simulated fMRI data by taking the first volume of the fMRI sequences, and by introducing parametrized slice-wise motion and by resampling slices in this volume. The generated motion included both slow and rapid acceleration to assess the different types of motion that subjects head can show in the scanner. At each slice, the slow and fast accelerations had respectively a 10 and 5% chance to be changed, being randomly drawn from a logistic distribution with a mean biased toward the original position. This bias, reflecting the restriction of movements that the scanner and the coil impose to the head, avoided the head to move out of the field-of-view. With probability increasing with velocity, the fast acceleration was reset to zero and speed divided, progressively stopping the movement. The exact procedure for movement generation is provided in python code in appendix A.2 (Supplementary Material). We further introduced a smooth multiplicative spatial bias generated from a polynomial basis of degree 3 with random coefficients and we finally added noise drawn from a Rician distribution (Henkelman, 1985).

The simulations were based on the local protocol dataset, the first volume of the 2 scans of each of the 25 subjects set as input, yielding 50 simulations with different motion and bias field parameters.

Comparison to Conventional Pipeline

To compare with more conventional pipeline, we processed the same datasets using MCFLIRT (FSL) motion correction (Jenkinson et al., 2002), Topup (Andersson et al., 2003) or fieldmap based distortion correction (Hutton et al., 2002) depending on fieldmap or inverted-phase EPI availability. Then we extracted signals of interest in gray matter using volume to surface ribbon-constrained interpolation of HCP workbench tools (Glasser et al., 2013).

Signal Characteristics

To evaluate the benefits of the novel estimation of motion we compared the statistical dependence between the estimated motion and resampled timeseries to that of the conventional pipeline. We thus computed the absolute derivative of the signal δy(t) = ∣y(t) − y(t − 1)∣ from which we regressed the delta-root-mean-square (DRMS) (Power et al., 2012) of the motion: DRMSx(t)=p=16(x(t,p)-x(t-1,p))2, for t ∈ [1, T − 1]. An absolute value was taken as the motion-related intensity changes can have inverted signs across scans (Power et al., 2012).

As BOLD signal is functionally tied to the hemodynamic response function (HRF), it should exhibit characteristic temporal smoothness, despite underlying broadband neuronal activity. However, as noise has less limited frequency range, its variance added to the signal of interest can reduce this low frequency structure. To evaluate the motion and related signal intensity corrections, we measured smoothness of the signal as the variance of the derivative of the signal divided by the variance of the signal itself σ(δy)σy. Slowly fluctuating signal should exhibit low derivative variance as compared to the signal variance, so the smallest this quantity the smoothest the timeseries.



To assert that the algorithm is able to reliably track the subjects' head motion, we processed the simulated data and measured the error in motion estimate compared to the simulated parameters for the proposed method and conventional preprocessing. An example of motion estimated with both methods as compared to simulated motion is provided in Figure 2.


Figure 2. Example of motion parameters and bias simulated and estimated by the proposed algorithm and conventional volume-wise method.

Similarly, simulated and estimated biases are shown in Figure 2. As the bias is estimated only from the voxels including white matter, values in other voxels are extrapolated through the Gaussian kernel and thus error increases with distance from the white-matter, notably in gray-matter or outside of the brain mask.

We evaluated the root-mean-squared error (RMSE) between the estimated and simulated motion and intensity bias in brain mask (Figure 3) in all single-slice sequence simulations. Rotational parameters were converted to translation, using a 100 mm radius, prior to computing the RMSE to obtain a single error measure for each slice simulated. The consistent pattern of error magnitude clearly exhibits the dependence of algorithm accuracy on slicewise available information for both motion and bias. With conventional preprocessing, the accuracy of volume-based registration similarly varies when assessed at the slice level, being also driven by the richer information of central slices. Slices at the top and bottom of the brain contains lower number of voxels covering the brain than middle slices, decreasing the accuracy of the registration process, and the number of voxel containing white matter follow the same pattern increasing the bias estimation error.


Figure 3. Root mean square error statistics of motion and bias estimates per slice across simulations, for the single-slice acquisition simulations, using the proposed algorithm (blue) and MCFLIRT (red). The top and bottom slices show higher errors in motion slicewise estimates and for conventional volume registration, as well as in bias estimation.

Real Dataset

We applied the algorithm to the real datasets, and extracted examples of the different estimated parameters to illustrate the results, including the bias map for a single slice in Figure S2.

To illustrate fieldmap-based distortion correction, we interpolated corrected EPI data to volumetric anatomical space in Figure S1 with T1 segmented white-matter boundary overlaid.

Quality Assessment

To assess the preprocessed signal quality, we compared the variance that can be explained by the motion parameters in a regression model between the proposed method and conventional preprocessing. The betas were submitted to pairwise comparisons between the two methods across subjects and scans to generate a map (Figure 4), which shows differential reduction of motion explained variance of the signal depending on anatomy.


Figure 4. Comparison of betas of BOLD signal regressed with motion parameters (DRMS) using between-preprocessing paired t-test across subjects and scans, showing global decrease of motion explained variance.

The metric evaluating the variability of the signal was submitted to pairwise comparisons between the two methods across subjects and scans, which shows (Figure 5) widespread decrease of variability with few exceptions.


Figure 5. Comparison of signal variability between new and conventional preprocessing using a paired t-test across subjects and scans, showing overall decrease of rapid non-physiologically plausible signal changes.

The difference in stability of the signal can result from the combination of different motion, distortion and intensity corrections.

Analysis Results

Our method provides a sparse BOLD signal because of extraction of gray matter signals only. We therefore designed a 3D viewer to allow an exploded view of the whole brain results in a single image by representing the cortical surfaces, optionally inflated, of both hemispheres as well as subcortical structures represented as voxel cloud enclosed in transparent boundary surfaces colored by freesurfer atlas colors. The colormap represent the values of the displayed data overlaid on curvature grayscale values (as illustrated in Figure 6 with t-values), the sizes of the subcortical voxels also vary with these values to allow viewing of significant clusters.


Figure 6. Wholebrain exploded view displaying a T-value map of an activation for a single block of about 5 s. during left-hand finger motor sequence production, showing activity in contralateral primary sensorimotor cortex and the anterior lobe of ipsilateral cerebellum.


Correcting motion in low-resolution noisy MRI data, such as EPI fMRI acquisition, has been a challenging problem since the introduction of functional imaging, even with the simpler rigid constraint inherent to brain imaging. Existing algorithms, required to be robust, achieve this correction in a sub-optimal way by notably performing volume-wise correction of separately acquired slices thus not taking into account the imaging process. While advances in scanner hardware and acquisition sequence development achieve higher resolution, opening finer investigation of physiological processes, these simpler methods are limiting their accuracy. In the meantime, functional imaging uses acquisition techniques prone to artifacts, including distortion and signal changes, these being amplified with novel hardware and the use of higher resolution.

Even small estimated motions have been found to cause spurious intensity changes in preprocessed signals (Power et al., 2012), although their interpolation is parametrized by the same motion estimates.

To address these limitations we extended early work on slice-to-volume motion correction (Kim et al., 1999; Yeo et al., 2006, 2008), with the method presented here, which concurrently corrects for EPI distortions and spurious intensity changes. To improve robustness of the registrations of sequentially acquired single slices or SMS slice-groups to a high resolution anatomical image, we modeled motion in a state-space and applied online Kalman filtering similarly to Marami et al. (2016). The distortion estimated from a fieldmap was used during the registration of slices to improve correspondence of EPI data to the non-distorted anatomical reference. EPI signal is corrupted by spatial low-frequency intensity changes due to magnetic fluctuations induced by scanner instabilities (Foerster et al., 2005; El-Sharkawy et al., 2006) as well as motion, not only of the head but also from out-of-field object including respiratory thoracic movement. To correct for these spurious signal changes and robustify registration, an intensity bias was fitted non-parametrically to each slice data, with higher weighting of white-matter where limited BOLD signal changes of interest were expected. This bias, aiming to model slice-specific acquisition perturbations, was fitted and removed prior to any interpolation that could mix signal and artifacts from different slices. Finally, kernel regression of resulting scattered data was performed at segmented and template registered gray-matter location to reconstruct BOLD signal in a space directly enabling between-subjects statistical analysis.

Evaluation of the method, by processing single-slice simulated data, showed that generated dynamic motion and intensity bias parameters is retrieved with low error ranging below two tenth of mm (see Figure 3) and below 4% of the multiplicative field respectively. In comparison, volume-wise motion registration provided less accurate motion estimates (see Figures 2, 3), as this approach was not able to track motion at sub-volume resolution nor was constrained for continuity, leading to systematically larger errors for both slow or rapid movements.

As illustrated in Figure S1, distortions are appropriately taken into account by the fieldmap which is a prerequisite to accurate anatomical localization of activity when interpolation of the gray-matter timecourse is used with limited smoothing. The reduction of measures of signal variability reflects the removal of sources of variance with high-frequency characteristics that are inconsistent with the hemodynamic processes. The large reduction of statistical dependency between motion parameters and signal indicates that accurate spatial registration decreases the motion related signal intensity changes and avoids introduction of large-scale spurious signal variations due to erroneous estimates.

One of the limitations of our algorithm is that its accuracy depends on the variable amount of brain coverage given by the slices which relates to available information for registration and intensity correction. The common use of axial slicing scheme provides caudal slices, covering brainstem and cerebellum, and rostral slices, covering cortex, with relatively little anatomical information, as compared to mid-brain, leading to instability of the registration and outliers. While the Kalman online filtering of motion estimates ensures that such error is limited by propagating information from previous slices, multiple successive outliers can still occur and affect the accuracy. For this reason, the algorithm was expected to perform better in acquisition sequences that provide continuous rich anatomical information, such as SMS, which slices, regularly spaced to limit spatio-temporal overlap, also ensures constant coverage of large neo-cortical areas with rich structural content. To counteract the error in case of low-informational content would be for the state space to model not only position but also it's first and second order derivatives, velocity and acceleration, which are expected to vary smoothly. As the first frame is used as the reference for registration, it is required to be motion-free, and a careful quality assessment is thus required to avoid slices to be registered to a corrupted volume. Future work should focus on registering directly to high-resolution anatomical image, which should increase the motion estimate quality.

The implemented bias correction suppresses low-frequency intensity changes as measured from the white matter regions, which however have been reported to show small signal changes correlated to behavioral task design. While this phenomenon have not been widely studied nor explained, the removal of task-relevant signal from white-matter could decrease the signal of interest in neighboring gray-matter regions. Nevertheless, the use of signal from white-matter as regressed confounds in resting-state fMRI study have been widely used, and our high-pass filtering only removes the large-scale intensity changes in the signal, preserving fine-grained activity patterns. The direct interpolation from raw data to the segmented cortical and sub-cortical gray-matter is performed using a Gaussian kernel regression with limited bandwidth, which optionally further restrict the bandwidth in the direction perpendicular to the cortical surface in order to reduce smearing across tissues and sulci. While this performs satisfactorily, future work should focus in the choice of kernel that extract fine-scale activity with reduced noise sensitivity, notably for laminar level analysis of brain activity at ultra-high-field MRI (Polimeni et al., 2010; Goense et al., 2012; Huber et al., 2017) for which surface-based preprocessing and analysis are particularly adapted. While the kernel weights prioritize local information but can interpolate signal from further data point in the case of locally sparser sampling, degenerate cases of large sampling gap induced by rapid large movement could yet result in missing data. Future work will be required to perform not only spatial but also temporal interpolation to avoid such problem while also allowing to correct for slice acquisition timing differences.

While other methods directly used four dimensional data simultaneously estimate motion and distortions in an iterative process (Andersson et al., 2017), we chose an online filtering framework in which data are processed sequentially, as data are acquired. The former could show improved performance benefiting from a global optimization criterion, while our method achieves lower computational cost and constant memory requirement. The computational complexity is linear with number of acquired volume, which accommodates processing of longer scans with higher temporal and spatial resolution, enabling as well online processing for real-time applications.

Static fieldmap based correction of distortion enables the removal of the bulk of anatomical inaccuracy of EPI image. However, in long scanning with motion and scanner drifts, the B0 field evolves over time. Moreover, with increasing resolution in phase encoding direction, fast cyclic B0 fluctuations generated essentially by respiratory motion are observable in serial EPI acquisition. Proper correction would require either a continuous measure of the B0 in-homogeneity changes that can be extracted from evolution of MRI phase information (Yeo et al., 2008) which is generally discarded, or retrieved with computational non-linear registration. The latter option could be applied after linear registration of each slice to further improve anatomical accuracy and thus removing spurious motion-induced signal changes.

The proposed method provides a framework in which other slice-specific artifacts correction, such as B1 unwarping or eddy currents, or analysis, such as fitting R2* parameters from multi-echo EPI, could be conducted prior to between slice interpolation, better matching the sequential order of acquisition.


We developed a novel method that retrospectively processes raw individual fMRI data into an analysis-ready group template space, by applying slice-level motion tracking with concurrent distortion and intensity correction. Experimental results on simulated data show that this technique successfully and robustly remove significant motion-induced confounds. Analysis of real fMRI data with the proposed integrated method, in comparison to conventional preprocessing, highlights its benefits in terms of artifacts correction, signal quality, and statistical significance. The increase in signal quality compared to mainstream volume-based correction is thought to generalize to other scanner models or acquisition sequences and particularly adapt to novel high-resolution multi-slice techniques used in cutting-edge research projects. These improvements also provide more stable patterns of activity facilitating investigation of cerebral information representation in healthy or clinical populations for which motion, by interacting with magnetic resonance physics, deteriorates fine-scale measures of brain activity.

Author Contributions

BP: conceptualized the method, developed the software, analyzed the data, and wrote the manuscript; BP, AB, JD, and HB: edited the manuscript.


This work was supported by the Canadian Institutes of Health Research (MOP 97830) to JD, as well as by French Education and Research Ministry and Sorbonne Universités to BP.

Conflict of Interest Statement

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Supplementary Material

The Supplementary Material for this article can be found online at:


Andersson, J. L. R., Graham, M. S., Drobnjak, I., Zhang, H., Filippini, N., and Bastiani, M. (2017). Towards a comprehensive framework for movement and distortion correction of diffusion MR images: within volume movement. Neuroimage 152, 450–466. doi: 10.1016/j.neuroimage.2017.02.085

PubMed Abstract | CrossRef Full Text | Google Scholar

Andersson, J. L. R., Skare, S., and Ashburner, J. (2003). How to correct susceptibility distortions in spin-echo echo-planar images: application to diffusion tensor imaging. Neuroimage 20, 870–888. doi: 10.1016/S1053-8119(03)00336-7

PubMed Abstract | CrossRef Full Text | Google Scholar

Avants, B. B., Epstein, C. L., Grossman, M., and Gee, J. C. (2008). Symmetric diffeomorphic image registration with cross-correlation: evaluating automated labeling of elderly and neurodegenerative brain. Med. Image Anal. 12, 26–41. doi: 10.1016/

PubMed Abstract | CrossRef Full Text | Google Scholar

Bierens, H. J. (1996). Topics in Advanced Econometrics: Estimation, Testing, and Specification of Cross-Section and Time Series Models. Cambridge: Cambridge University Press.

Google Scholar

Bollmann, S., Kasper, L., Vannesjo, S. J., Diaconescu, A. O., Dietrich, B. E., Gross, S., et al. (2017). Analysis and correction of field fluctuations in fMRI data using field monitoring. Neuroimage 154, 92–105. doi: 10.1016/j.neuroimage.2017.01.014

PubMed Abstract | CrossRef Full Text | Google Scholar

Dale, A. M., Fischl, B., and Sereno, M. I. (1999). Cortical surface-based analysis: I. segmentation and surface reconstruction. Neuroimage 9, 179–194.

PubMed Abstract | Google Scholar

El-Sharkawy, A. M., Schär, M., Bottomley, P. A., and Atalar, E. (2006). Monitoring and correcting spatio-temporal variations of the MR scanner's static magnetic field. MAGMA 19, 223–236. doi: 10.1007/s10334-006-0050-2

PubMed Abstract | CrossRef Full Text | Google Scholar

Feinberg, D. A., and Setsompop, K. (2013). Ultra-fast MRI of the human brain with simultaneous multi-slice imaging. J. Magn. Reson. 229, 90–100. doi: 10.1016/j.jmr.2013.02.002

PubMed Abstract | CrossRef Full Text | Google Scholar

Ferrante, E., and Paragios, N. (2017). Slice-to-volume medical image registration: a survey. Med. Image Anal. 39(Suppl. C), 101–123. doi: 10.1016/

PubMed Abstract | CrossRef Full Text | Google Scholar

Ferrazzi, G., Kuklisova Murgasova, M., Arichi, T., Malamateniou, C., Fox, M. J., Makropoulos, A., et al. (2014). Resting State fMRI in the moving fetus: a robust framework for motion, bias field and spin history correction. Neuroimage 101, 555–568. doi: 10.1016/j.neuroimage.2014.06.074

PubMed Abstract | CrossRef Full Text | Google Scholar

Fischl, B., Sereno, M. I., and Dale, A. M. (1999a). Cortical surface-based analysis: II: inflation, flattening, and a surface-based coordinate system. Neuroimage 9, 195–207.

PubMed Abstract | Google Scholar

Fischl, B., Sereno, M. I., Tootell, R. B., and Dale, A. M. (1999b). High-resolution intersubject averaging and a coordinate system for the cortical surface. Hum. Brain Mapp. 8, 272–284.

PubMed Abstract | Google Scholar

Foerster, B. U., Tomasi, D., and Caparelli, E. C. (2005). Magnetic field shift due to mechanical vibration in functional magnetic resonance imaging. Magn. Reson. Med. 54, 1261–1267. doi: 10.1002/mrm.20695

PubMed Abstract | CrossRef Full Text | Google Scholar

Gholipour, A., Estroff, J. A., and Warfield, S. K. (2010). Robust super-resolution volume reconstruction from slice acquisitions: application to fetal brain MRI. IEEE Trans. Med. Imaging 29, 1739–1758. doi: 10.1109/TMI.2010.2051680

PubMed Abstract | CrossRef Full Text | Google Scholar

Glasser, M. F., Sotiropoulos, S. N., Wilson, J. A., Coalson, T. S., Fischl, B., Andersson, J. L., et al. (2013). The minimal preprocessing pipelines for the Human Connectome Project. Neuroimage 80, 105–124. doi: 10.1016/j.neuroimage.2013.04.127

PubMed Abstract | CrossRef Full Text | Google Scholar

Goense, J., Merkle, H., and Logothetis, N. (2012). High-resolution fMRI reveals laminar differences in neurovascular coupling between positive and negative BOLD responses. Neuron 76, 629–639. doi: 10.1016/j.neuron.2012.09.019

PubMed Abstract | CrossRef Full Text | Google Scholar

Griffanti, L., Salimi-Khorshidi, G., Beckmann, C. F., Auerbach, E. J., Douaud, G., Sexton, C. E., et al. (2014). ICA-based artefact removal and accelerated fMRI acquisition for improved resting state network imaging. Neuroimage 95, 232–247. doi: 10.1016/j.neuroimage.2014.03.034

PubMed Abstract | CrossRef Full Text | Google Scholar

Haller, S., Monsch, A. U., Richiardi, J., Barkhof, F., Kressig, R. W., and Radue, E. W. (2014). Head motion parameters in fMRI differ between patients with mild cognitive impairment and Alzheimer disease versus elderly control subjects. Brain Topogr. 27, 801–807. doi: 10.1007/s10548-014-0358-6

PubMed Abstract | CrossRef Full Text | Google Scholar

Haxby, J. V. (2012). Multivariate pattern analysis of fMRI: the early beginnings. Neuroimage 62, 852–855. doi: 10.1016/j.neuroimage.2012.03.016

PubMed Abstract | CrossRef Full Text | Google Scholar

Henkelman, R. M. (1985). Measurement of signal intensities in the presence of noise in MR images. Med. Phys. 12, 232–233.

PubMed Abstract | Google Scholar

Huber, L., Uludağ, K., and Möller, H. E. (2017). Non-BOLD contrast for laminar fMRI in humans: CBF, CBV, and CMRO2. Neuroimage. doi: 10.1016/j.neuroimage.2017.07.041. [Epub ahead of print].

PubMed Abstract | CrossRef Full Text | Google Scholar

Hutton, C., Bork, A., Josephs, O., Deichmann, R., Ashburner, J., and Turner, R. (2002). Image distortion correction in fMRI: a quantitative evaluation. Neuroimage 16, 217–240. doi: 10.1006/nimg.2001.1054

PubMed Abstract | CrossRef Full Text | Google Scholar

Jenkinson, M., Bannister, P., Brady, M., and Smith, S. (2002). Improved optimization for the robust and accurate linear registration and motion correction of brain images. Neuroimage 17, 825–841. doi: 10.1006/nimg.2002.1132

PubMed Abstract | CrossRef Full Text | Google Scholar

Jezzard, P., and Balaban, R. S. (1995). Correction for geometric distortion in echo planar images from B0 field variations. Magn. Reson. Med. 34, 65–73.

PubMed Abstract | Google Scholar

Kim, B., Boes, J. L., Bland, P. H., Chenevert, T. L., and Meyer, C. R. (1999). Motion correction in fMRI via registration of individual slices into an anatomical volume. Magn. Reson. Med. 41, 964–972.

PubMed Abstract | Google Scholar

Marami, B., Scherrer, B., Afacan, O., Warfield, S. K., and Gholipour, A. (2016). “Motion-robust reconstruction based on simultaneous multi-slice registration for diffusion-weighted MRI of moving subjects,” in Medical Image Computing and Computer-Assisted Intervention – MICCAI 2016 (Springer: Cham), 544–552.

PubMed Abstract | Google Scholar

Mowinckel, A. M., Espeseth, T., and Westlye, L. T. (2012). Network-specific effects of age and in-scanner subject motion: a resting-state fMRI study of 238 healthy adults. Neuroimage 63, 1364–1373. doi: 10.1016/j.neuroimage.2012.08.004

PubMed Abstract | CrossRef Full Text | Google Scholar

Muresan, L., Renken, R., Roerdink, J. B., and Duifhuis, H. (2002). Position-history and spin-history artifacts in fMRI time series. Med. Imaging 4683, 444–451. doi: 10.1117/12.463613

CrossRef Full Text | Google Scholar

Nadaraya, E. (1964). On estimating regression. Theor. Probabil Appl. 9, 141–142.

Google Scholar

O'Connor, D., Potler, N. V., Kovacs, M., Xu, T., Ai, L., Pellman, J., Vanderwal, T., Parra, L. C., Cohen, S., Ghosh, S., Escalera, J., Grant-Villegas, N., Osman, Y., Bui, A., Craddock, R. C., and Milham, M. P. (2017). The Healthy Brain Network Serial Scanning Initiative: a resource for evaluating inter-individual differences and their reliabilities across scan conditions and sessions. Gigascience 6, 1–14. doi: 10.1093/gigascience/giw011

PubMed Abstract | CrossRef Full Text

Operto, G., Bulot, R., Anton, J. L., and Coulon, O. (2008). Projection of fMRI data onto the cortical surface using anatomically-informed convolution kernels. Neuroimage 39, 127–135. doi: 10.1016/j.neuroimage.2007.08.039

PubMed Abstract | CrossRef Full Text | Google Scholar

Park, H., Meyer, C. R., and Kim, B. (2004). “Improved motion correction in fMRI by joint mapping of slices into an anatomical volume,” in Medical Image Computing and Computer-Assisted Intervention–MICCAI 2004 (Berlin; Heidelberg: Springer), 745–751.

Google Scholar

Pereira, F., Mitchell, T., and Botvinick, M. (2009). Machine learning classifiers and fMRI: a tutorial overview. NeuroImage 45(Suppl. 1), S199–S209. doi: 10.1016/j.neuroimage.2008.11.007

PubMed Abstract | CrossRef Full Text | Google Scholar

Perlbarg, V., Bellec, P., Anton, J.-L., Pélégrini-Issac, M., Doyon, J., and Benali, H. (2007). CORSICA: correction of structured noise in fMRI by automatic identification of ICA components. Magn. Reson. Imaging 25, 35–46. doi: 10.1016/j.mri.2006.09.042

PubMed Abstract | CrossRef Full Text | Google Scholar

Polimeni, J. R., Fischl, B., Greve, D. N., and Wald, L. L. (2010). Laminar analysis of 7 T BOLD using an imposed spatial activation pattern in human V1. Neuroimage 52, 1334–1346. doi: 10.1016/j.neuroimage.2010.05.005

CrossRef Full Text | Google Scholar

Power, J. D., Barnes, K. A., Snyder, A. Z., Schlaggar, B. L., and Petersen, S. E. (2012). Spurious but systematic correlations in functional connectivity MRI networks arise from subject motion. Neuroimage 59, 2142–2154. doi: 10.1016/j.neuroimage.2011.10.018

PubMed Abstract | CrossRef Full Text | Google Scholar

Power, J. D., Mitra, A., Laumann, T. O., Snyder, A. Z., Schlaggar, B. L., and Petersen, S. E. (2014). Methods to detect, characterize, and remove motion artifact in resting state fMRI. Neuroimage 84, 320–341. doi: 10.1016/j.neuroimage.2013.08.048

PubMed Abstract | CrossRef Full Text | Google Scholar

Satterthwaite, T. D., Elliott, M. A., Gerraty, R. T., Ruparel, K., Loughead, J., Calkins, M. E., et al. (2013). An improved framework for confound regression and filtering for control of motion artifact in the preprocessing of resting-state functional connectivity data. Neuroimage 64, 240–256. doi: 10.1016/j.neuroimage.2012.08.052

PubMed Abstract | CrossRef Full Text | Google Scholar

Satterthwaite, T. D., Wolf, D. H., Loughead, J., Ruparel, K., Elliott, M. A., Hakonarson, H., et al. (2012). Impact of in-scanner head motion on multiple measures of functional connectivity: relevance for studies of neurodevelopment in youth. Neuroimage 60, 623–632. doi: 10.1016/j.neuroimage.2011.12.063

PubMed Abstract | CrossRef Full Text | Google Scholar

Seshamani, S., Cheng, X., Fogtmann, M., Thomason, M. E., and Studholme, C. (2014). A Method for handling intensity inhomogenieties in fMRI sequences of moving anatomy of the early developing brain. Med. Image Anal. 18, 285–300. doi: 10.1016/

PubMed Abstract | CrossRef Full Text | Google Scholar

Triantafyllou, C., Hoge, R., Krueger, G., Wiggins, C., Potthast, A., Wiggins, G., et al. (2005). Comparison of physiological noise at 1.5 T, 3 T and 7 T and optimization of fMRI acquisition parameters. Neuroimage 26, 243–250. doi: 10.1016/j.neuroimage.2005.01.007

PubMed Abstract | CrossRef Full Text | Google Scholar

Uğurbil, K., Xu, J., Auerbach, E. J., Moeller, S., Vu, A. T., Duarte-Carvajalino, J. M., et al. (2013). Pushing spatial and temporal resolution for functional and diffusion MRI in the Human Connectome Project. Neuroimage 80, 80–104. doi: 10.1016/j.neuroimage.2013.05.012

PubMed Abstract | CrossRef Full Text | Google Scholar

Van Essen, D. C., Smith, S. M., Barch, D. M., Behrens, T. E. J., Yacoub, E., and Ugurbil, K. (2013). The WU-Minn Human Connectome Project: an overview. Neuroimage 80, 62–79. doi: 10.1016/j.neuroimage.2013.05.041

PubMed Abstract | CrossRef Full Text | Google Scholar

Watson, G. S. (1964). Smooth Regression Analysis. Sankhy 26, 359–372.

Google Scholar

White, N., Roddey, C., Shankaranarayanan, A., Han, E., Rettmann, D., Santos, J., et al. (2010). PROMO:Real-time prospective motion correction in MRI using image-based tracking. Magn. Reson. Med. 63, 91–105. doi: 10.1002/mrm.22176

PubMed Abstract | CrossRef Full Text | Google Scholar

Yan, C.-G., Cheung, B., Kelly, C., Colcombe, S., Craddock, R. C., Di Martino, A., et al. (2013). A comprehensive assessment of regional variation in the impact of head micromovements on functional connectomics. Neuroimage 76, 183–201. doi: 10.1016/j.neuroimage.2013.03.004

PubMed Abstract | CrossRef Full Text | Google Scholar

Yeo, D. T. B., Bhagalia, R. R., and Kim, B. (2006). Improved map-slice-to-volume motion correction with B0 inhomogeneity correction: validation of activation detection algorithms using ROC curve analyses. Med. Image Comput. Comput. Assist. Interv. 9(Pt 2), 276–283. doi: 10.1007/11866763_34

PubMed Abstract | CrossRef Full Text | Google Scholar

Yeo, D. T. B., Fessler, J. A., and Kim, B. (2008). Concurrent correction of geometric distortion and motion using the map-slice-to-volume method in echo-planar imaging. Magn. Reson. Imaging 26, 703–714. doi: 10.1016/j.mri.2007.11.001

PubMed Abstract | CrossRef Full Text | Google Scholar

Zaitsev, M., Akin, B., LeVan, P., and Knowles, B. R. (2017). Prospective motion correction in functional MRI. Neuroimage 154, 33–42. doi: 10.1016/j.neuroimage.2016.11.014

PubMed Abstract | CrossRef Full Text | Google Scholar

Zaitsev, M., Maclaren, J., and Herbst, M. (2015). Motion artifacts in MRI: a complex problem with many partial solutions. J. Magn. Reson. Imaging 42, 887–901. doi: 10.1002/jmri.24850

PubMed Abstract | CrossRef Full Text | Google Scholar

Keywords: fMRI, motion correction, distortion correction, denoising, BOLD, visualization

Citation: Pinsard B, Boutin A, Doyon J and Benali H (2018) Integrated fMRI Preprocessing Framework Using Extended Kalman Filter for Estimation of Slice-Wise Motion. Front. Neurosci. 12:268. doi: 10.3389/fnins.2018.00268

Received: 09 November 2017; Accepted: 06 April 2018;
Published: 26 April 2018.

Edited by:

John Ashburner, University College London, United Kingdom

Reviewed by:

Jesper Leif Roger Andersson, University of Oxford, United Kingdom
Enzo Ferrante, Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET), Argentina

Copyright © 2018 Pinsard, Boutin, Doyon and Benali. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

*Correspondence: Basile Pinsard,