Commit 2a5484b9 authored by pieper's avatar pieper

BUG: include entire scalar range in threshold

Because the ctk range widget rounds the values for display, it
can have the effect of truncating the values such that the
selected range does not include the highest
value(s) in the volume.  Adding 1 to the max value avoids this
problem with no anticipated downsides.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21166 3bd1e089-480b-0410-8dfb-8563597acbee
parent 5a145b5c
......@@ -172,11 +172,14 @@ class EditOptions(object):
return success, lo, hi
def setRangeWidgetToBackgroundRange(self, rangeWidget):
"""Set the range widget based on current backgroun
volume - note that hi+1 is used since the range widget
will round floating numbers to 2 significant digits"""
if not rangeWidget:
return
success, lo, hi = self.getBackgroundScalarRange()
if success:
rangeWidget.minimum, rangeWidget.maximum = lo, hi
rangeWidget.minimum, rangeWidget.maximum = lo, hi+1
def statusText(self,text):
slicer.util.showStatusMessage(text)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment