Keywords

1 Introduction and Background

In this article we introduce an image registration-based method for EPI distortion Correction based on Opposite Phase Encoding (COPE). To ensure its usefulness, we compare the new, image-registration-based approach with a fieldmap-based approach for reducing geometric distortion in EPI data due to the susceptibility artifact.

In the fieldmap-based geometric distortion correction method for EPI data based on the ‘pixelshift method’ by Jezzard and Balaban [6], a pixelshift map, also called voxel displacement map (VDM), is calculated from a \(T_{2}\)-weighted reference scan. The VDM indicates how far the voxels need to be translated back to their original locations.

In image registration-based distortion correction methods, the VDM is estimated by acquiring EPI data with two opposite phase encoding directions. In EPI, the frequency and phase are modulated such that the original location of each signal can be found; due to the susceptibility artifact, the field inhomogeneity ‘disrupts’ the phase encoding, but by acquiring data in the opposite phase encoding direction, pixel shifts occur in the same amount in opposite directions in the functional images. Image registration-based methods use a suitable cost function to minimise, which is a function that measures the dissimilarity between the opposite phase encoded images.

In the next section, we will explain our distortion correction method ‘COPE’ in more detail. In Sect. 3 we show the experiment we performed for testing the performance of our method. In the final section we will discuss the results (Fig. 1).

Fig. 1.
figure 1

Setup of the EPI distortion correction comparison

2 Methods

In our image-registration based distortion correction method ‘COPE’, opposite phase encoded echo planar images (EPI) are registered to each other. Acquiring an opposite phase encoded EPI volume requires a few seconds. We use one model for the forward and backward transformation, which estimates a voxel displacement map, so the forward and backward transformations are each others inverse.

First, the optimal transformations (scaling and translation) in the y-direction are estimated column-wise; for each iteration, the distance \(D^{SSD}\) between the images is established via sum of square differences (SSD) or normalised cross-correlation (NCC). Let \(D^{SSD}\left[ I_{1}, I_{2}; \mathbf {p}\right] \) be a function of parameters \(\mathbf {p}\) using the 1D columns \(I_{1}\) (from image in one phase encoding direction) and \(I_{2}\) (from image in the opposite phase encoding direction), and where \(f(\mathbf {p}) = \sum \mathbf {r}\) is the sum of the residuals, quantifying the difference between each voxel in one image and the opposite phase encoded image:

$$\begin{aligned} D^{SSD}(\mathbf {p}) = \frac{1}{2}(f(\mathbf {p}))^{2} \;\;\; \text{ with } \;\;\; f(\mathbf {p}) = I_{2} \circ \phi _{\mathbf {p}} - I_{1} \circ \phi ^{-1}_{\mathbf {p}}, \end{aligned}$$
(1)

\(\phi : \mathbb {R}^{2} \rightarrow \mathbb {R}^{2}\) and \(x \mapsto p_{s}x + p_{t}\), where \(\phi \) is the transformation for each coordinate, composed of \(p_{s}\) and \(p_{t}\), the scaling resp. translation parameters. Gauss-Newton optimisation [7] involves approximating the function \(D^{SSD}\) with a second-degree Taylor expansion in order to iteratively minimise it. Like in Gauss-Newton optimisation methods, the Hessian \(\mathbf {H}\) is approximated with the Jacobian \(\mathbf {J}\) and the parameter change s is obtained using both \(\mathbf {H}\) and \(\mathbf {J}\) and differences between columns \(\delta \): \(s = -\mathbf {H}\; \mathbf {J}^{T} \delta \). Instead of regularization, smoothing with a Gaussian kernel is applied to the scaling and translation matrices and the EPI volumes that are used to estimate the VDM. The algorithm is inspired by Andersson et al. [1] and Ruthotto et al. [9].

If the “spin echo” (SE) option has been selected, intensity correction is applied using the derivative of the inverse of the VDM; for “gradient echo” (GE), this operation is omitted.

In the next step, a local search is performed to find the most plausible deformation (measured via NCC or SSD); the local search is inspired by the local cost aggregation method of Heinrich et al. [5]. The displacement values are fine-tuned by locally finding the best displacement that minimizes the distance between the images. Additional displacement values are added to the values in the VDM - that was obtained via Gauss-Newton optimisation in the previous step - and the similarity between the transformed opposite phase encoded images is recalculated. This is performed iteratively, from larger additional displacement values from \(\pm 5.00\) in the y-direction while simultaneously applying strong smoothing, to smaller displacements until \(\pm 0.75\) with lighter smoothing; the image similarity is calculated accordingly and the displacement value for each voxel that results in the highest image similarity is kept (see also Fig. 2). The voxel displacement map can then be applied to distorted EPI data using cubic spline interpolation.

Fig. 2.
figure 2

Estimation of a voxel displacement map (VDM) via COPE

We compare fieldmap based-correction with image registration-based correction of SE-EPI and GE-EPI data on 3T and 7T. The distance of each EPI dataset to the anatomical image of the same subject is compared before and after distortion correction. To assess the generality of the performance of fieldmap-based vs image registration-based distortion, we use EPI data sets acquired with different field strengths (3T and 7T), multi-band factors and sequences (spin-echo (SE)-EPI, gradient echo (GE)-EPI), modality (BOLD and diffusion weighted) and different sites (Maastricht vs Carnegie-Mellon)(see Table 1) on Siemens scanners (Siemens Medical Systems, Erlangen, Germany).

2.1 Data Pre-processing

All processing was performed in native scanner space. Pre-processing steps specific for each modality are described below.

Anatomical Data. Anatomical data were corrected for \(B_{1}\) inhomogeneity and skull-stripped in BrainVoyager (v20.6, Maastricht, The Netherlands) [4].

Fieldmaps. For datasets 6–10, the combined 32-channel fieldmaps, differential phase maps \(\varDelta \phi \) were calculated in Matlab (R2014a) via a custom script according to \(-\arctan \left( \mathfrak {I}(z_{1}z_{2}^{*})/ \mathfrak {R}(z_{1}z_{2}^{*}) \right) \), where \(z_{1}\) is the first echo, \(z_{2}\) the second echo, \(\mathfrak {I}\) denotes the imaginary part, \(\mathfrak {R}\) the real part and \(^{*}\) the complex conjugate [2]. All following processing steps were performed on the fieldmaps using anatabacus plugin v1.1 for BrainVoyager. All phase maps were converted to radians using a linear transformation [8]. Unwrapping of the phase maps was calculated using 3D multigrid, the deviation from \(B_{0}\) in Hz and pixel shifts calculated according to [6]. Undistortion was applied using linear 1D interpolation.

EPI Data. The functional (BOLD) EPI data were slice scan time corrected using cubic interpolation, corrected for motion using rigid body parameters estimated using trilinear interpolation and resliced with SINC interpolation; finally, a temporal high pass filter was applied in Fourier domain with 0.0078 Hz cutoff in BrainVoyager v20.6.

Concerning diffusion weighted data, unprocessed \(b_{0}\) images were used for fieldmap-based and opposite phase encoding correction.

Table 1. Acquisition parameters of data used to compare fieldmap-based with image registration-based distortion correction. Sequence = sequence: field maps/EPI data, SE = spin echo, GE = gradient echo, MB = multiband factor: fieldmap/EPI data, Slices = number of slices in EPI data, iPAT = acceleration in EPI data, FOV = field of view (mm), TR = repetition time (ms), TE = echo time (ms) of EPI data, Echo sp = Echo spacing (ms), T = \(B_{0}\) field strength in Tesla. All EPI data were scanned in anterior-posterior phase encoding direction. Sets 1–4 were acquired at a Siemens scanner in Pittsburgh, USA, and sets 5–10 at the University of Maastricht, The Netherlands. For the diffusion weighted data (set 5), opposite phase encoded b = 0 images were used to estimate the VDM.

2.2 Data Comparison

The uncorrected, fieldmap-based corrected and image-registration-based corrected EPI data are mapped to anatomical space using the fmr2vmrplugin (v0.9.1) for BrainVoyager, after which the similarity is calculated via

$$\begin{aligned} D(I_{1}, I_{2}) = \frac{\sum _{i=1}^{n} (I_{1}{_{i}} \cdot I_{2}{_{i}} )^{2} }{ \sum _{i=1}^{n}( I_{1}{_{i}} I_{1}{_{i}} ) \cdot \sum _{i=1}^{n}( I_{2}{_{i}} I_{2}{_{i}}) } \end{aligned}$$
(2)

where \(I_{1}\) is the anatomical image of the subject, \(I_{2}\) the EPI image and n is the number of voxels.

2.3 Computational Platform

The COPE plugin was implemented using C++ 11 code. The data were processed on a MacBook Air with a 1.6 GHz Intel Core i5 processor and 4 GB 1600 MHz DDR3 memory with a macOS 10.13 (High Sierra) operating system. We used COPE v1.1 and anatabacus v1.1. Typical processing time for estimation of a VDM by COPE is 3 min (dataset 8).

3 Results

3.1 Distance Measure

The similarities between EPI data and anatomical images, calculated using the fmr2vmrplugin v0.9.1 in BrainVoyager 20.6.2., are shown in Table 2. The ‘before’ column indicates the similarity between the EPI data and the anatomical image without any EPI distortion correction. The ‘anatabacus’ column shows the similarity after fieldmap-based EPI distortion correction via the anatabacus plugin. In the ‘COPE’ column the similarity values are provided after image registration-based EPI distortion correction via the COPE plugin.

Table 2. Similarity values between anatomical image and distorted EPI data (left), between anatomical image and EPI data undistorted via fieldmap-based method (anatabacus) (centre) and between anatomical image and EPI data undistorted via image registration (COPE) (right).

In Table 2 we see that in all ten cases, EPI distortion correction improves the match between the shape of the EPI data and the shape of the anatomical data. Furthermore, in six of the ten cases, the new image registration-based EPI distortion correction method (as implemented in COPE) outperforms the fieldmap-based EPI distortion correction method (as implemented in anatabacus), which is shown in the graph in Fig. 3.

Fig. 3.
figure 3

The graph shows that the image based registration (via COPE) relatively increases similarity between anatomical and functional 7T data the most (datasets 6–10)

3.2 Comparison

We ran a non-parametric test, the Friedman Test, on the distance data. The results showed a significant difference between the groups (\(p < 0.001\)). Processing was performed via the SciPy library. Posthoc analysis with the Nemenyi test using scikit-posthocs [10] did not provide any further specific significance. All statistical analysis was performed in Python 3.

Fig. 4.
figure 4

Slice z = 135 of dataset 6 before EPI distortion correction (left), after EPI distortion correction via COPE v1.1 (centre) and after distortion correction via anatabacus v1.1 (right), where the green lines depict the contours of the EPI image overlaid on the anatomical image in native space (Color figure online)

Figure 4 shows data set 6 after “fine alignment” (normalized gradient field registration) of EPI data to anatomical data (z=135) in BrainVoyager 20.6, where the overlay shows the contours of the EPI image in green. On the left the distorted EPI image is shown; in the centre, the EPI image corrected via image registration-based EPI distortion correction in COPE; on the right, the EPI image corrected via fieldmap-based EPI distortion correction in anatabacus. Improvements in the registration with respect to the distorted image on the left are indicated with circles; we see for example an improved fit at the anterior of the corpus callosum. Normalized gradient field registration is an affine image registration method finding global scaling, translation and rotation parameters for the EPI image via Gauss-Newton optimization.

4 Conclusion

The comparison between fieldmap-based and our novel method of image registration-based distortion correction combined with local cost aggregation indicates that this approach can be a viable alternative to fieldmap-based distortion correction (see also [3]), in particular for 7T data; this eliminates the need for phase data unwrapping and masking. This image registration-based EPI distortion correction variant has been implemented in the COPE plugin for BrainVoyager and can be freely downloaded from the BrainVoyager support website.