enh: Refactor and extend calculate-filtering, fix StDev
enh: Refactor and extend calculate-filtering, fix StDev

- Computation of median is more efficient using std::nth_element.
- Added -mask option to ignore background.
- Return sqrt of computed variance.

MIRTK/DrawEM,MIRTK/DrawEM