Skip to content

Commit

Permalink
BUG: Ensure step size if properly initialized when loading MNI atlas
Browse files Browse the repository at this point in the history
See #99
  • Loading branch information
jcfr committed Sep 18, 2020
1 parent 3a8749e commit dc5e261
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Modules/Scripted/Home/Home.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,11 +796,12 @@ def updateGUIFromSliceNode(self):
sliceLogic.GetLowestVolumeSliceBounds(bounds)
spacingRange = bounds[5] - bounds[4]
if spacingRange > 0:
self.get('StepSizeSliderWidget').minimum = 1
self.get('StepSizeSliderWidget').maximum = spacingRange / 10
stepSize = {'minimum': 0.1, 'maximum': spacingRange / 10}
else:
self.get('StepSizeSliderWidget').minimum = 1
self.get('StepSizeSliderWidget').maximum = 100
stepSize = {'minimum': 0.1, 'maximum': 100}
with SignalBlocker(self.get('StepSizeSliderWidget')):
self.get('StepSizeSliderWidget').minimum = stepSize['minimum']
self.get('StepSizeSliderWidget').maximum = stepSize['maximum']

if self.Annotations.current is None or self.Annotations.current.markup.GetNumberOfMarkups() == 0:
sliceSpacing = sliceNode.GetPrescribedSliceSpacing()
Expand Down

0 comments on commit dc5e261

Please sign in to comment.