Page MenuHomePhabricator

Threshold Tool does not work with Double Image with Range from 0.0 to 1.0
Closed, ResolvedPublic


right click on datanode
select "threshold"
Preview works!! but as soon as you click OK you get either NOTHING or ALL as segmentation.

With other double images (e.g. Range from 0.0 to 127.0) it SEEMS to work..

Have a look in

line 243

Before that TKThresholding function is called, the image is still a float image. Maybe in this function the casted ITK image is not float anymore??? or it is float but the pixel intensity was rounded to integer during casting??

Event Timeline

[f4d93d]: Merge branch 'bug-10832-Threshold-Tool-range-1-0'

Merged commits:

2012-02-29 17:23:32 Michael Bauer [b2f3fb]
fixed bug for thresholdingtool on float images with a range from 0.0 to 1.0

The issue was that the value compared to the threshold was casted with '(singned)' in line 269 or so. And this is actually 'signed int' and so all values were casted to 0. The fix was to remove the cast.