pub fn spatial_dipole_kernel(grid: &Grid, bdir: (f64, f64, f64)) -> Vec<f64>Expand description
The dipole kernel in k-space (FFT order, real) as qsm_heidi’s
generateunitdipoleresponse(dims, true, Options) builds it with
isFourierDomainFormula = false and a voxel size given: the unit dipole response
(3(b·r̂)² − 1)/(4π|r|³) (zero at r = 0) sampled on an isotropic grid of the smallest
voxel size, 2⌊n·a/2⌋ + 1 voxels along an axis of n voxels and aspect a = vs/min(vs),
Fourier transformed, cropped to the central n frequencies, real part, DC set to zero.
For isotropic voxels the fine grid is the grid itself.
Every extent must be odd (upstream refuses even grids).