Skip to main content

find_thresholds

Function find_thresholds 

Source
fn find_thresholds(data: &[f64]) -> (f64, f64)
Expand description

newimage’s find_thresholds (Steve Smith’s robust 2 %/98 % limits; FSL-BET2 d5acd7f newimage/newimage.cc), for a volume<float>: a 1000-bin histogram between the minimum and maximum, the bins holding the lowest and highest 2 %, and while those limits span less than a tenth of the range, the histogram redone between them (up to 10 passes, the last ignoring the end bins). Returns (robustmin, robustmax).