Skip to main content

chisepnet

Function chisepnet 

Source
pub fn chisepnet(
    local_field_ppm: &[f64],
    qsm: &[f64],
    r2prime: &[f64],
    mask: &[u8],
    grid: &Grid,
    model_onnx: &[u8],
    norm: &ChiSepNetNorm,
) -> Result<(Vec<f64>, Vec<f64>, Vec<f64>), OnnxError>
Expand description

Run χ-sepnet χ-separation.

  • local_field_ppm, qsm (χ_total, ppm), r2prime (Hz) — column-major (nx,ny,nz).
  • mask — binary brain mask (same layout).
  • model_onnx — bytes of the exported chi-sepnet.onnx (192×192×128, 3→2 chan).
  • norm — training normalization constants.

Returns (chi_pos ≥ 0, chi_neg ≤ 0, chi_total = chi_pos + chi_neg) in ppm, masked, in the same layout.