Skip to main content

Module ndi

Module ndi 

Source
Expand description

Nonlinear Dipole Inversion (NDI) for QSM

Solves the dipole inversion problem with a nonlinear data-consistency term, modelling the wrapped phase directly via sin(Dx - phase) and minimizing it with a simple L2-regularized gradient descent:

min_x || W .* (exp(iDx) - exp(iphase)) ||^2 + alpha ||x||^2

which yields the update (weight W = mask here):

x <- x - tau * D^H(W .* sin(Dx - phase)) - taualphax

Because the dipole kernel D is real, conj(D) = D and the adjoint is just another forward dipole application.

Reference: Polak, D., Chatnuntawech, I., Yoon, J., Iyer, S.S., Milovic, C., Lee, J., Bachert, P., Adalsteinsson, E., Setsompop, K., Bilgic, B. (2020). “Nonlinear dipole inversion (NDI) enables robust quantitative susceptibility mapping (QSM).” NMR in Biomedicine, 33(12):e4271. https://doi.org/10.1002/nbm.4271

Ported from FANSI’s ndi.m (https://gitlab.com/cmilovic/FANSI-toolbox).

§Note on phase_scale

FANSI’s NDI operates on the phase in radians. In this crate the input local field is provided at ppm-scale. With the default phase_scale = 1.0 the solver runs at the native ppm scale; for small ppm values sin(x) ~ x, so the behaviour is numerically well-conditioned and scale-consistent with the rest of the crate. A user may set phase_scale to convert the input to radians (e.g. via the Hz->rad / ppm->rad factor for their acquisition) to recover the true nonlinear behaviour; the output is divided back by the same factor so the returned susceptibility stays at ppm-scale.

Structs§

NdiParams
NDI algorithm parameters

Functions§

apply_dipole 🔒
Apply the forward dipole operator D * x in-place buffers.
ndi
Nonlinear Dipole Inversion (NDI)