Page MenuHomePhabricator

Level window is nearly unusable if the image range is very small
Closed, ResolvedPublic

Description

Construct an image ranging from float values ranging something like
[-0.0001 to 0.0001]
The level window will be set somewhat okay in init, but it becomes nearly impossible to move the slider in a way which not completely overshoots the target positively or negatively. Scaling the slider to conform to the small numbers would be desired.

To an lesser extent this is true for example for images between 0 and 1.

Event Timeline

This bug could not be fixed within the 2013-06 release and has medium severity. Setting target milestone to unspecified.

Current release is finished. Reseting target milestone...

This is a big problem for us. +1

User goch has pushed new remote branch:

bug-14652-level-window-for-small-ranges

The pushed branch makes the level window usable for small float range images. But it introduces some usability issues. If the displayed numbers are floating point numbers they will always be displayed as such, leading to the somewhat absurd range of e.g. 100.002 to 200.532.

It should probably be discussed how we want this to look like before including these changes.

As a basis for discussion, here an attempted list for different use cases:

  1. Integer pixel values:

The level window should similarily use only integers. In these cases being able to continuously change the level window is overengineered and actually less user friendly.

  1. Small floating point pixel values (0<x<1):

The level window should use floating point information. However the number of significant digits is not clear. Default to 6? Choose the number of significant digits based on the range of floating point values in the image? Use scientific notation?
I would suggest using a certain number of decimal digits that fits within the corresponding field below the level window scale. Generally we probably want to switch to scientific notation only if the other notation would show only a single significant digit.

  1. Large range of floating point pixel values:

I would suggest using the same level window style as for integer pixel values. In these cases small differences in value are unlikely to be important enough to warrant having an unwieldy interaction experience. At the same time you most likely want to always be able to set the level window with an integer accuracy even if it means a lot of significant digits (e.g. for multilabel images with tens of thousands of different labels).

A discussion in the MITK meeting brought up the problem of video streams where it is generally not wanted to check for maximal/minimal image values each time the image changes. On the other hand you can not determine the range of values at the start of the stream, as the first few frames might be all 0 images untill the source is connected.

To avoid this problem the choice should be based strictly on the type of the image.

For integer images:
Integer labels

For floating point images:
Floating point labels, but always show all digits before the decimal point and only show digits after it untill a certain number of significant digits has been reached.
As an example: 1.234, 0.00234, 123.4, 123456

User goetzm has pushed new remote branch:

bug-14652-AddedFloatingProperty

store in the mitkLevelWindow-class, if the corresponding image is an floating-value-based image. If so, display the Level window with 3 digit accuracy (As discussed before.

Affected core files:
Modules/Core/src/DataManagment/mitkLevelWindow.cpp

Test:
Manual tests

Not sure if this is the discussed solution. Please test with an image that requires numbers like 0.0001 and attach a screenshot of the level window in that case to validate the fix, thank you. :)

User goetzm has pushed new remote branch:

bug-14652-AddedFloatingPropertyIntegration

Different Ranges. Behaviour of Level and Window is identic

range2.PNG (70×94 px, 845 B)

Why is this fixed, there has not been a merge?

  • Check whether it is possible to switch to scientific notation for numbers very close to zero
  • Check why e.g. center of 0 range of 0.000000008 does not render as expected

Scientif Notation is enabled for very small values.

Rendering bug with small values is not caused by the new changes.

User goetzm has pushed new remote branch:

bug-14652-IntegrationBranch

[6c5304]: Merge branch 'bug-14652-IntegrationBranch'

Merged commits:

2015-11-11 14:14:07 Michael Goetz [7ad705]
Fixed errors introduced by merging


2015-11-11 13:48:14 Michael Goetz [3b94a5]
Merge branch 'bug-14652-AddedFloatingProperty'

  1. Conflicts:
  2. Modules/Core/include/mitkLevelWindow.h
  3. Modules/Core/src/DataManagement/mitkLevelWindow.cpp

2015-07-16 08:27:49 Michael Goetz [3ccedc]
Show floating point with limited precision


2015-07-15 17:00:40 Michael Goetz [2f8cb8]
Added Floating property to LevelWindow.
This allows to differenciate between float and int images

[507533]: Merge branch 'bug-14652-IntegrationBranch'

Merged commits:

2015-11-11 14:54:26 Michael Goetz [0ad7b1]
COMP: Fixed wrong initialization order

[92b508]: Merge branch 'bug-14652-IntegrationBranch'

Merged commits:

2015-11-11 16:37:13 Michael Goetz [1152cf]
COMP: Fixed Serializer for LevelWindow Property