Skip to main content

rescale_selected

Function rescale_selected 

Source
fn rescale_selected(
    data: &mut [f64],
    pos: &[bool],
    positive: bool,
    new_min: f64,
    new_max: f64,
    strength: f64,
)
Expand description

CLEARSWI.jl’s robustrescale(x[sel], new_min, new_max) .^ strength on the voxels whose pos equals positive: the 1st and 99th percentiles, extrapolated to 0 % and 100 %, map to new_min and new_max. Clamped to [0, 1] before the power.