Skip to main content

sti

Function sti 

Source
pub fn sti<F: AsRef<[f64]>>(
    local_fields: &[F],
    bdirs: &[(f64, f64, f64)],
    mask: &[u8],
    grid: &Grid,
    params: &StiParams,
) -> SusceptibilityTensor
Expand description

Reconstruct the susceptibility tensor from multi-orientation local field maps.

§Arguments

  • local_fields - One local (tissue) field map per orientation, ppm, all on the same grid.
  • bdirs - B0 direction for each orientation, in the voxel frame of that shared grid. Derive with crate::geometry::b0_direction_from_affine.
  • mask - Binary mask (1 = inside ROI); applied to every output component.
  • grid - The shared volume grid.
  • params - See StiParams.

§Panics

If fewer than N_TENSOR orientations are given (the tensor is then under-determined at every k-point), if field and direction counts differ, or if any field does not match grid.