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

Labels can no lonber be set in Bounds property constructor - they have

to be provided when creating widget.
parent 898d6f04
No related branches found
No related tags found
No related merge requests found
...@@ -178,7 +178,13 @@ class HistogramControlPanel(fslpanel.FSLEyesPanel): ...@@ -178,7 +178,13 @@ class HistogramControlPanel(fslpanel.FSLEyesPanel):
self.__nbins = props.makeWidget(wlist, hs, 'nbins', showLimits=False) self.__nbins = props.makeWidget(wlist, hs, 'nbins', showLimits=False)
volume = props.makeWidget(wlist, hs, 'volume', showLimits=False) volume = props.makeWidget(wlist, hs, 'volume', showLimits=False)
dataRange = props.makeWidget(wlist, hs, 'dataRange', showLimits=False) dataRange = props.makeWidget(
wlist,
hs,
'dataRange',
showLimits=False,
labels=[strings.choices['HistogramPanel.dataRange.min'],
strings.choices['HistogramPanel.dataRange.max']])
ignoreZeros = props.makeWidget(wlist, hs, 'ignoreZeros') ignoreZeros = props.makeWidget(wlist, hs, 'ignoreZeros')
showOverlay = props.makeWidget(wlist, hs, 'showOverlay') showOverlay = props.makeWidget(wlist, hs, 'showOverlay')
......
...@@ -49,8 +49,16 @@ _DISPLAY_PROPS = td.TypeDict({ ...@@ -49,8 +49,16 @@ _DISPLAY_PROPS = td.TypeDict({
props.Widget('invertClipping', props.Widget('invertClipping',
enabledWhen=lambda o, sw: not sw, enabledWhen=lambda o, sw: not sw,
dependencies=[(lambda o: o.display, 'softwareMode')]), dependencies=[(lambda o: o.display, 'softwareMode')]),
props.Widget('displayRange', showLimits=False, slider=True), props.Widget('displayRange',
props.Widget('clippingRange', showLimits=False, slider=True)], showLimits=False,
slider=True,
labels=[strings.choices['VolumeOpts.displayRange.min'],
strings.choices['VolumeOpts.displayRange.max']]),
props.Widget('clippingRange',
showLimits=False,
slider=True,
labels=[strings.choices['VolumeOpts.displayRange.min'],
strings.choices['VolumeOpts.displayRange.max']])],
'MaskOpts' : [ 'MaskOpts' : [
props.Widget('resolution', showLimits=False), props.Widget('resolution', showLimits=False),
......
...@@ -97,7 +97,9 @@ _TOOLBAR_PROPS = td.TypeDict({ ...@@ -97,7 +97,9 @@ _TOOLBAR_PROPS = td.TypeDict({
'displayRange', 'displayRange',
slider=False, slider=False,
showLimits=False, showLimits=False,
tooltip=_TOOLTIPS['VolumeOpts.displayRange']), tooltip=_TOOLTIPS['VolumeOpts.displayRange'],
labels=[strings.choices['VolumeOpts.displayRange.min'],
strings.choices['VolumeOpts.displayRange.max']]),
'resetDisplayRange' : actions.ActionButton( 'resetDisplayRange' : actions.ActionButton(
'resetDisplayRange', 'resetDisplayRange',
icon=icons.findImageFile('verticalReset24'), icon=icons.findImageFile('verticalReset24'),
......
...@@ -322,17 +322,11 @@ class VolumeOpts(ImageOpts): ...@@ -322,17 +322,11 @@ class VolumeOpts(ImageOpts):
""" """
displayRange = props.Bounds( displayRange = props.Bounds(ndims=1)
ndims=1,
labels=[strings.choices['VolumeOpts.displayRange.min'],
strings.choices['VolumeOpts.displayRange.max']])
"""Image values which map to the minimum and maximum colour map colours.""" """Image values which map to the minimum and maximum colour map colours."""
clippingRange = props.Bounds( clippingRange = props.Bounds(ndims=1)
ndims=1,
labels=[strings.choices['VolumeOpts.displayRange.min'],
strings.choices['VolumeOpts.displayRange.max']])
"""Values outside of this range are not shown.""" """Values outside of this range are not shown."""
......
...@@ -61,10 +61,7 @@ class HistogramSeries(plotpanel.DataSeries): ...@@ -61,10 +61,7 @@ class HistogramSeries(plotpanel.DataSeries):
showOverlay = props.Boolean(default=False) showOverlay = props.Boolean(default=False)
includeOutliers = props.Boolean(default=False) includeOutliers = props.Boolean(default=False)
volume = props.Int(minval=0, maxval=0, clamped=True) volume = props.Int(minval=0, maxval=0, clamped=True)
dataRange = props.Bounds( dataRange = props.Bounds(ndims=1)
ndims=1,
labels=[strings.choices['HistogramPanel.dataRange.min'],
strings.choices['HistogramPanel.dataRange.max']])
def __init__(self, def __init__(self,
......
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