Avoid crashes at extreme level window ranges
Summary:
Fixes T29341 . Takes care of extreme values for the level window range, which would cause problems when exceeding the possible range of floating point values.
I introduced a simple check inside the level window itself, that clamps any values at the maximum/lowest floating point value, to ensure staying inside its available range.
Additionally, I raised several variables in the level window widget from float to double so that the widget can calculate its values without running into infinity or NaN. Anything exceeding the float range will then be limited by the level window.
Test Plan: Load any image and move the level window to a range around 3.4 * 10^38 (positive or negative). At that point, the values should stop increasing (/decreasing), with the maximum (/minimum) border of the level window widget remaining fixed. There is no crash anymore.
Reviewers: O3 MITK Reviewer Group II, O1 MITK Reviewer Group I, floca
Reviewed By: O3 MITK Reviewer Group II, O1 MITK Reviewer Group I, floca
Subscribers: floca, kislinsk
Maniphest Tasks: T29341
Differential Revision: https://phabricator.mitk.org/D737