pub fn laplacian_kernel(
nx: usize,
ny: usize,
nz: usize,
vsx: f64,
vsy: f64,
vsz: f64,
negative: bool,
) -> Vec<f64>Expand description
Generate Laplacian kernel in image space
Creates a 7-point stencil Laplacian centered at (0,0,0) for FFT compatibility. The stencil is: [-2(1/dx² + 1/dy² + 1/dz²)] at center, [1/dx²] at ±1 in x, [1/dy²] at ±1 in y, [1/dz²] at ±1 in z.
§Arguments
nx,ny,nz- Array dimensionsvsx,vsy,vsz- Voxel sizes in mmnegative- If true, return negative Laplacian
§Returns
Flattened Laplacian kernel array of size nxnynz in C order