Skip to main content

iharperella

Function iharperella 

Source
pub fn iharperella(
    input: HarperellaInput<'_>,
    mask: &[u8],
    grid: &Grid,
    params: &IharperellaParams,
    progress: impl FnMut(usize, usize),
) -> Result<(Vec<f64>, Vec<u8>), InputError>
Expand description

iHARPERELLA: the exterior Laplacian minimises the weighted resulting field in the brain.

STI Suite 3.0’s iHARPERELLA: with L the brain’s Laplacian (module docs), E the exterior and W = 1 in the brain, 2 in the boundary rim and 0 outside, it solves min_x ‖W L⁻¹(E x) − W L⁻¹(L)‖₂ with MATLAB lsqr and returns L⁻¹(L − x) in the mask: the field from the brain’s Laplacian minus the field the exterior sources x explain.

§Arguments

  • input - Unwrapped total field (ppm) or wrapped phase (rad); see HarperellaInput
  • mask - Binary brain mask (nx * ny * nz), 1 = inside
  • grid - Volume dimensions and voxel sizes
  • params - Algorithm parameters
  • progress - Progress callback (iteration, max_iter)

§Returns

(local_field_ppm, mask)

§Errors

As harperella.