Skip to main content

tkd

Function tkd 

Source
pub fn tkd(
    local_field: &[f64],
    mask: &[u8],
    nx: usize,
    ny: usize,
    nz: usize,
    vsx: f64,
    vsy: f64,
    vsz: f64,
    bdir: (f64, f64, f64),
    threshold: f64,
) -> Vec<f64>
Expand description

Truncated k-space division (TKD) for dipole inversion

Computes susceptibility map from local field using direct k-space division with threshold-based truncation.

§Arguments

  • local_field - Local field values (unwrapped phase / TE / gamma / B0)
  • mask - Binary mask (1 = inside ROI, 0 = outside)
  • nx, ny, nz - Array dimensions
  • vsx, vsy, vsz - Voxel sizes in mm
  • bdir - B0 field direction (bx, by, bz)
  • threshold - Truncation threshold (typically 0.1-0.2)

§Returns

Susceptibility map (same size as input)