mrinufft.extras#

Extra utilities for non Cartesian MRI.

This modules notably provides way to estimate sensitivity maps and off-resonance correction.

Most of this module is accessible through the following registry :

Tip

You can register your own methods to the registries using the following decorators:

  • register_smaps(),

  • register_orc(),

  • register_optim().

This registry system is also available when using a non-Cartesian Fourier operator

For example:

from mrinufft import get_operator
from mrinufft.extras import register_smaps

# get a non-Cartesian Fourier operator
# with espirit sensitivity maps and off-resonance correction
fourier_op = get_operator("nufft", trajectory=trajectory, smaps="espirit")
fourier_op_orc = fourier_op.with_off_resonance_correction(
    interpolators={"name":"svd", "L":10}
)
# select the least-square solver to use for pseudo-inverse computation.
img = fourier_op_orc.pinv_solver(kspace_data, solver="lsqr")

Custom registered functions can be used as well:

@register_smaps("awesome")
def awesome_smaps(kspace_data, trajectory, **kwargs):
    ...

fourier_op = get_operator("nufft", trajectory=trajectory, smaps="awesome")
# using the function is equivalent:
fourier_op = get_operator("nufft", trajectory=trajectory, smaps=awesome_smaps)

Functions

cartesian_espirit

ESPIRIT algorithm on Cartesian data.

cg

Perform conjugate gradient (CG) optimization for image reconstruction.

coil_compression

Coil compression using principal component analysis on k-space data.

compute_mfi_coefficients

Compute off-resonance correction coefficients using Mixed-Frequency-Interpolator.

compute_mti_coefficients

Compute off-resonance correction coefficients using Mixed Time interpolator (MTI).

compute_svd_coefficients

Compute off-resonance correction coefficients using an SVD.

espirit

ESPIRIT algorithm on non-Cartesian data.

fft

Compute n-dimensional FFT along the last dims axes.

fse_simulation

Perform simple analytical Fast Spin Echo simulation.

get_brainweb_map

Get M0, T1 and T2 parametric maps from a brainweb crisp segmentation.

get_complex_fieldmap_rad

Create a complex-valued field-map in rad/s.

get_optimizer

Get the optimizer function from its name.

get_orc_factorization

Get the orc_factorization function from its name.

get_smaps

Get the smaps function from its name.

ifft

Compute n-dimensional IFFT along the last dims axes.

loss_l2_AHreg

Compute the norm of the residual in the image domain.

loss_l2_reg

Compute the regularized least squares loss for MRI reconstruction.

low_frequency

Calculate low-frequency sensitivity maps.

lsmr

Solve a regularized linear least-squares problem with the LSMR algorithm [1]_.

lsqr

Solve a regularized linear least-squares problem with the LSQR algorithm [1]_.

make_b0map

Make radial B0 map.

make_t2smap

Make homogeneous T2* map.