Expand description
Shared ADMM iteration infrastructure for TV-based inversion methods.
Provides pre-allocated buffers and a generic iteration step used by TV-ADMM, NLTV, and RTS algorithms.
Structs§
- Admm
Buffers - Pre-allocated buffers for ADMM-based inversion algorithms.
Enums§
- Fansi
Kernel - The dipole kernel a FANSI-family solver (NDI, nlTV, nlTGV, L1-QSM, WH-QSM, HD-QSM) uses.
Functions§
- admm_
step - Run one ADMM iteration step.
- fansi_
dipole_ kernel - FANSI’s discrete dipole kernel,
dipole_kernel_angulated(N, spatial_res, B0_dir)with its defaultmode = 1(FANSI-toolbox 93044a3): - fansi_
magnitude_ weight - FANSI’s data weight from the magnitude, as in its in vivo example (script_invivo.m):
min(2*mask*mag/max(mag), 1). - fansi_
ppm_ to_ rad - ppm -> radians factor
2*pi*gamma*b0*te(gamma =GAMMA_BAR_MHZ_PER_T), for the FANSI solvers, which work on the phase in radians while the crate’s inversions take ppm. FANSI’s scripts usegyro = 2*pi*42.58; QSM.rs uses the shared constant, which is closer to the CODATA shielded-proton value (seecrate::constants). - fansi_
unit_ ee2 - FANSI’s
EE2 = |E1|^2 + |E2|^2 + |E3|^2withE_j = 1 - exp(2*pi*i*k_j/N_j): the spectral Laplacian of unit-spacing forward differences, as FANSI’s nlTV.m, nlTGV.m and nlL1TV.m build it (whatever the voxel size). Pair it withfgrad_inplace/bdiv_inplaceon a unit-voxel grid. FFT order,i + nx*(j + ny*k). - prepare_
admm_ spectral - Pre-compute ADMM spectral operators (dipole kernel, inverse operator, and RHS).
- prepare_
fansi_ kernel - [
Fft3dWorkspace] and the FANSI-family dipole kernelkernelselects (seeFansiKernel). - prepare_
fansi_ spectral - Pre-compute the continuous-kernel spectral operators of the nonlinear solvers that are
not FANSI’s (QSM.jl’s NLTV, AMP-PE). The FANSI-family ports take their kernel from
prepare_fansi_kernelinstead.