philouc / mri_acq_recon_tutorial

Code for ISBI'19 Tutorial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Binder

MRI acquisition & image reconstruction tutorial

This repository contains code and slides that were initially presented at ISBI'19 in Venice during the tutorial entitled: "Recent advances in acquisition and reconstruction for Compressed Sensing MRI". The code focuses on basics and recent advances in MR acquisition or design of k-space sampling schemes. Then the code has been progressively extended for the 2022 IEEE Biomedical Imaging summer school that held in St Jacut de la Mer in June 2022. Even more recently, in 2024, I started to use MRI-NUFFT to illustrate multiple 2D and 3D non-Cartesian trajectories with density compensated adjoint Non-Unform Fast Fourier transform (NUFFT) reconstruction.
The aspects related to MRI reconstruction in the ISBI'19 tutorial were taught by Prof. Jeff Fessler with code and examples in Julia language.

Google Colaboratory: In development

Open In Colab

We can now run the codes on a google colab. However, this is in development and you may need to run some start up script at begining to ensure the codes run fine.

Running on Google Colab

  1. Click on Open In Colab.

  2. Once inside, choose the appropriate example which you want to run.

Slides

Slides area available in pdf format in the slides folder.

Code for mri_acq_recon_tutorial Tutorial

Test data

Some 2D MR synthetic images are available for testing at various image resolution (ie fixed FOV= 256mm and pixel size varying from 1mm down to 125 µm as in plane resolution). Matrix size thus varies from 256x256 up to 2048x2048. Each filename is called BrainPhantomXXX[X].png with XXX referring to the image dimension (e.g., 256). A single 2D MRI image collected at 7 Tesla is also available. We also provide some SPARKLING (Spreading Projection Algorithm for Rapid K-space sampLING) trajectories for illustration purposes for two different image sizes (256x256 and 512x512).

Matlab

Here, The repository gathers original Matlab code developed by my former PhD student, Nicolas Chauffert in collaboration with Pierre Weiss and located in the matlab folder. It is useful to reproduce the figures based on TSP-sampling (Travelling Salesman Problem), Markov chain sampling (subfolder: TSP_Markov) and illustrate the projection algorithm onto the hardware constraints imposed on the magnetic field gradients (subfolder gradient_waveform_design).

Python

You can find some ipython Notebooks in the Python folder. Note that we illustrate both Cartesian and non-Cartesian sampling, regular~(i.e. periodic or contiguous) and irregular undersampling. Irregular undersampling can be produced using either pseudo-random generation or incoherent optimization-driven sampling like SPARKLING. The code of the latter approach, originally designed by Carole Lazarus, Nicolas Chauffert and Pierre Weiss, is actually not disclosed. It can be requested by emailing us.

Importantly, we also develop our own image reconstruction python package for multiple Fourier imaging modalities, namely PySAP. These developments are done in collaboration with the CosmoStat team (J. L. Starck in the context of the COSMIC project. The two core developers of PySAP are A. Grigis (antoine.grigis@cea.fr) and S. Farrens. The new organization of PySAP relies on on separate plugin for each imaging modality, for instance for MRI: pysap-mri. The main contributors to this plugin habe been Chaithya G RLoubna El Gueddari, Zaccharie Ramzi, Guillaume Daval-Frérot and Pierre-Antoine Comby all former or current PhD candidates under my supervision at CEA/NeuroSpin.

To reproduce the last block of the 7th notebook, you must first install pyNFFT in the following way (on Linux):

  • sudo apt install -y libnfft3-dev
  • export CPLUS_INCLUDE_PATH=/usr/include/python3.7;

Then, if you use Python3.x (x=6,7) ans asuming pip3 is installed on your system, run:

  • pip3 install cython numpy
  • pip3 install pynfft2

Then go here to check PySAP's package dependencies (including PyQt4). Run:

  • sudo apt install cmake to compile the C++ dependencies

Note that the brand new release of PySAP has a new organization with separate plug-ins for MRI, astrophyics, tomography, etc. You will get it if you run:

  • pip3 install python-pysap pysap-mri>=0.3.0 modopt>=1.5.2
  • pip3 install --upgrade modopt

About

Code for ISBI'19 Tutorial

License:BSD 2-Clause "Simplified" License


Languages

Language:Jupyter Notebook 66.5%Language:HTML 18.7%Language:C 12.3%Language:MATLAB 1.4%Language:Scilab 0.6%Language:Makefile 0.3%Language:Python 0.2%Language:Shell 0.1%Language:Awk 0.0%Language:M 0.0%