Page MenuHomePhabricator

Thresholding feedback wrong for float images
Closed, ResolvedPublic

Description

The interactive thresholding in the datamanager generates an incorrect feedback if used with float-images between 0 and 1. Instead of the resulting segmentation it shows an image with varying opacity. The bug does not appear with the same image multiplied by 100.

Event Timeline

The problem is in this line in line 120 in mitkBinaryThresholdTool.cpp:
m_ThresholdFeedbackNode->SetProperty( "levelwindow", LevelWindowProperty::New( LevelWindow(m_CurrentThresholdValue, 1) ) );

this adds a levelwindow property with the following upper and lower boarders:
mitk::LevelWindow::LevelWindow(mitk::ScalarType level, mitk::ScalarType window)
: m_LowerWindowBound( level - window / 2.0 ), m_UpperWindowBound( level + window / 2.0 ),

If the image is on a scale fro 0-1, this levelwindow is too big to give the impression of a binary threshold. setting the window to 0 is not possible either but setting it to 0.001 works fine. Also with images with larger domains

[badd33]: Merge branch 'bug-11807-ThresholdFeedback'

Merged commits:

2012-06-27 16:37:25 Thomas Van Bruggen [7efb4b]
set window to 0.001


2012-06-27 16:33:55 Thomas Van Bruggen [83cf2c]
made the level window smaller

A smaller level window will make sure that the threshold feedback is also correct when using images with a domain from 0-1