Skip to main content

pdf

Function pdf 

Source
pub fn pdf(
    field: &[f64],
    mask: &[u8],
    grid: &Grid,
    bdir: (f64, f64, f64),
    params: &PdfParams,
    progress: impl FnMut(usize, usize),
) -> Vec<f64>
Expand description

PDF background field removal

§Arguments

  • field - Total field (nx * ny * nz)
  • mask - Binary mask (nx * ny * nz), 1 = brain, 0 = background
  • grid - Volume dimensions and voxel sizes
  • bdir - B0 field direction
  • params - PDF parameters (tolerance, optional max iterations)
  • progress - Progress callback (iteration, max_iter)

§Returns

Local field with background removed