MRI-NUFFT

Contents

MRI-NUFFT#

Doing non-Cartesian MR Imaging has never been so easy.

https://mind-inria.github.io/mri-nufft/_static/coverage_badge.svg https://github.com/mind-inria/mri-nufft/workflows/CI/badge.svg https://github.com/mind-inria/mri-nufft/workflows/CD/badge.svg
https://img.shields.io/badge/style-black-black https://img.shields.io/badge/docs-Sphinx-blue https://img.shields.io/pypi/v/mri-nufft

This python package extends various NUFFT (Non-Uniform Fast Fourier Transform) python bindings used for MRI reconstruction.

In particular, it provides a unified interface for all the methods, with extra features such as coil sensitivity, density compensated adjoint and off-resonance corrections (for static B0 inhomogeneities).

Usage#

from scipy.datasets import face # For demo
import numpy as np
import mrinufft
from mrinufft.trajectories import display
from mrinufft.density import voronoi

# Create a 2D Radial trajectory for demo
samples_loc = mrinufft.initialize_2D_radial(Nc=100, Ns=500)
# Get a 2D image for the demo (512x512)
image = np.complex64(face(gray=True)[256:768, 256:768])

## The real deal starts here ##
# Choose your NUFFT backend (installed independly from the package)
NufftOperator = mrinufft.get_operator("finufft")

# For better image quality we use a density compensation
density = voronoi(samples_loc.reshape(-1, 2))

# And create the associated operator.
nufft = NufftOperator(
    samples_loc.reshape(-1, 2), shape=image.shape, density=density, n_coils=1
)

kspace_data = nufft.op(image)  # Image -> Kspace
image2 = nufft.adj_op(kspace_data)  # Kspace -> Image

For best image quality, embed these steps in a more complex reconstruction pipeline (for instance using PySAP).

Want to see more ?

Installation#

MRI-nufft is available on Pypi and can be installed with:

pip install mri-nufft

You will also need to install at least one NUFFT computation backend. See the Documentation for more guidance.