Page MenuHomePhabricator

[Levelwindow] Preset definition does not allow floating point numbers
Closed, ResolvedPublic


When you define a levelwindow preset with a floating point number, the point gets removed when saving the preset (E.g. 0.5 becomes 5).
However in the level window setting (in the standard display), entering floating points works. Would be great if that also works for saving presets.

OS: Ubuntu 20.04
MITK Version: v2022.04

Event Timeline

kahl triaged this task as High priority.Jun 14 2022, 6:50 PM
kahl created this task.

In case the number is already serialized as floating point instead of an integer it is probably an i18n issue regarding the difference of the decimal point . and , in English and German locales. We had these issues quite often in the past and the solution to such issues is to enforce the neutral locale while serializing/deserializing on the streams. Just search for "imbue" in all of MITK's .cpp files for examples. There's also the LocaleSwitch class but I think I can remember that there's an issue with it. Still both solutions can be found many times in MITK.