Skip to main content

makehomogeneous

Function makehomogeneous 

Source
pub fn makehomogeneous(
    mag: &[f64],
    nx: usize,
    ny: usize,
    nz: usize,
    vx: f64,
    vy: f64,
    vz: f64,
    sigma_mm: f64,
    nbox: usize,
) -> Vec<f64>
Expand description

Make magnitude homogeneous by dividing by bias field

This is the main entry point for bias field correction.

§Arguments

  • mag - Input magnitude data (nx * ny * nz)
  • nx, ny, nz - Dimensions
  • vx, vy, vz - Voxel sizes in mm
  • sigma_mm - Smoothing sigma in mm (default 7, will be clamped to 10% FOV)
  • nbox - Number of boxes per dimension for segmentation (default 15)

§Returns

Bias-corrected magnitude