pub fn calculate_swi(
phase: &[f64],
magnitude: &[f64],
mask: &[u8],
grid: &Grid,
params: &SwiParams,
) -> Vec<f64>Expand description
Calculate SWI from unwrapped phase and magnitude
Pipeline: high-pass filter phase → create phase mask → multiply with magnitude.
§Arguments
phase- Unwrapped phase (single echo or combined)magnitude- Magnitude image (single echo or combined)mask- Binary brain maskgrid- Volume grid (dimensions and voxel sizes)params- SWI algorithm parameters
§Returns
SWI image (magnitude × phase mask)