"TopUp Docker", an SPM extension for EPI distortion correction

Poster No:

2241 

Submission Type:

Abstract Submission 

Authors:

Christophe Phillips1, Siya Sherif1, Mohamed Bahri1, Martin Grignard1

Institutions:

1GIGA CRC-In Vivo Imaging Unit, University of Liège, Liège, Belgium

First Author:

Christophe Phillips, Prof  
GIGA CRC-In Vivo Imaging Unit, University of Liège
Liège, Belgium

Co-Author(s):

Siya Sherif  
GIGA CRC-In Vivo Imaging Unit, University of Liège
Liège, Belgium
Mohamed Bahri, PhD  
GIGA CRC-In Vivo Imaging Unit, University of Liège
Liège, Belgium
Martin Grignard, PhD  
GIGA CRC-In Vivo Imaging Unit, University of Liège
Liège, Belgium

Introduction:

It is well known that EPI images, used in functional MRI, present geometric distortions due to the susceptibility distribution. These deformations prevents a good match with other non-affected modalities and accurate localisation of the brain activity recorded. To address this issue, two approaches have been proposed: the "field mapping" and "top-up" approaches [REF1,REF2]. The former requires the acquisition of specific "field map" images, which allows the derivation of the field inhomogeneity and of the distortion through a physical model. On the other hand, the "top-up" approach only requires the acquisition of a few EPI images with an opposite phase encoding direction thus leading to a distortion in the opposite direction. With these 2 sets of images, one then estimates the field that when applied to the two sets of volumes will maximise the similarity of the unwarped volumes.

Both approaches are available in widely used open source packages, "field map" in SPM [REF3] and "top-up" in FSL [REF4]. Nevertheless either approaches cannot easily be integrated in the same processing pipeline, e.g. for a direct comparison of their performances, because of their respective eco-systems. For example SPM users are largely limited to the "field map" correction approach.

Methods:

Here we propose a lightweight Docker containerized version of the FSL's topup tool directly interfaced in Matlab. On top of this, we provide the MatlabBatch GUI to integrate the "top-up" correction into SPM's batching system. The Docker installation simply requires to
1/ install Docker Desktop [REF5],
2/ download the "TopUp_Docker" container [REF6],
3/ load it into Docker.
Then the Matlab code has to be placed in a folder on Matlab's path and the MatlabBatch "config" files in a folder named "TopUpDocker" in SPM's "toolbox" subfolder, e.g. C:\SPM12\toolbox\TopUpDocker.

Results:

The Matlab code, which will only work if Docker is installed and loaded with the right container, is organized in 3 levels:
- "low level" functions talk directly to Docker and activate the container, through 'system' commands;
- "intermediate level" functions deal with the images to parameters to perform the calculation, moving things around as necessary to work with Docker;
- "high level" functions integrate the tool in SPM and provide a "wrapper" for the end user.
We also provide a small function that tests if Docker and the TopUp container are behaving as expected when actioned from Matlab

Since the core of the processing is FSL topup tool, the results of obtained on a dataset with an FSL installation or the Matlab-interfaced docker-ized version are exactly the same.

Conclusions:

The code and container allow to fairly easily use FSL's topup correction in Matlab and SPM, without the need to install a full FSL distribution, which requires a macOS or Linux system. The approach proposed, interfacing Docker with Matlab, also opens the door to using other non-Matlab tools in Matlab. The container weights only about 350MB, compared to the ~15GB of a full FSL distribution, and is available on ULiège's dataverse [REF6], while the Matlab code is openly available on GitHub [REF7].

Modeling and Analysis Methods:

Exploratory Modeling and Artifact Removal
Motion Correction and Preprocessing 2

Neuroinformatics and Data Sharing:

Informatics Other 1

Keywords:

Computing
Data Registration
FUNCTIONAL MRI
Informatics
Open-Source Code
Open-Source Software

1|2Indicates the priority used for review

Provide references using author date format

[REF1] C. Hutton, A. Bork, O. Josephs, R. Deichmann, J. Ashburner, and R. Turner. Image distortion correction in fMRI: A quantitative evaluation. NeuroImage, 16:217-240, 2002.
[REF2] J.L.R. Andersson, S. Skare, J. Ashburner. How to correct susceptibility distortions in spin-echo echo-planar images: application to diffusion tensor imaging. NeuroImage, 20(2):870-888, 2003
[REF3] SPM, https://www.fil.ion.ucl.ac.uk/spm/
[REF4] FSL, https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSL
[REF5] Docker desktop, https://www.docker.com/products/docker-desktop/
[REF6] Docker TopUp container, on ULiege's DataVerse, https://doi.org/10.58119/ULG/ADYEJF
[REF7] Matlab code on GitHub, https://github.com/CyclotronResearchCentre/TopUp_docker_Matlab/