Skip to content
Snippets Groups Projects
Commit ab094ecf authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Hacky way to get the displayRange sliders to have the data range as

their limits.
parent eb1b217b
No related branches found
No related tags found
No related merge requests found
......@@ -226,6 +226,23 @@ class OverlayDisplayPanel(fslpanel.FSLEyesPanel):
if isinstance(target, displayctx.VolumeOpts) and \
p.key == 'cmap':
widget = self.__buildColourMapWidget(widget)
if isinstance(target, displayctx.VolumeOpts) and \
p.key == 'displayRange':
# This is a big hack. The VolumeOpts displayRange
# has limits which are much bigger than the data
# range, due to the relationship between display
# range and brightness/contrast. But we want the
# display range sliders to have the data range as
# their limits. You should think of a nicer way
# to do this.
log.debug('Forcing displayRange slider range to data '
'range: [{:0.3f}, {:0.3f}]'.format(
target.dataMin, target.dataMax))
widget.GetChildren()[0].SetLimits(target.dataMin,
target.dataMax)
widgets.append(widget)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment