pub fn create_phase_mask(
phase: &[f64],
mask: &[u8],
scaling: PhaseScaling,
strength: f64,
) -> Vec<f64>Expand description
Create the SWI phase mask from filtered phase
As CLEARSWI.jl’s createphasemask!: the phase is set to zero outside mask, then the
scaling is applied to every voxel, so outside the mask the weight is the scaling’s value at
zero phase (≈ 0.88 for PhaseScaling::Tanh, 1 for PhaseScaling::Positive) rather
than zero. The SWI therefore keeps the whole head visible, as CLEAR-SWI does.
§Arguments
phase- High-pass filtered phase (any unit; every scaling is scale-invariant)mask- Binary maskscaling- Phase scaling typestrength- Scaling strength (higher = stronger phase contrast)
§Returns
Phase mask with values in [0, 1]