Skip to content

Commit

Permalink
BUG: Fix joint smoothing in Segment Editor
Browse files Browse the repository at this point in the history
(cherry picked from commit 5206429)

Regression occurred due to VTK API change (ThresholdBetween method was removed from vtkThreshold).
  • Loading branch information
lassoan authored and jcfr committed Nov 23, 2022
1 parent 44d626d commit d4b2261
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,9 @@ def smoothMultipleSegments(self, maskImage=None, maskExtent=None):
oldOverwriteMode = self.scriptedEffect.parameterSetNode().GetOverwriteMode()
self.scriptedEffect.parameterSetNode().SetOverwriteMode(slicer.vtkMRMLSegmentEditorNode.OverwriteVisibleSegments)
for segmentId, labelValue in segmentLabelValues:
threshold.ThresholdBetween(labelValue, labelValue)
threshold.SetLowerThreshold(labelValue)
threshold.SetUpperThreshold(labelValue)
threshold.SetThresholdFunction(vtk.vtkThreshold.THRESHOLD_BETWEEN)
stencil.Update()
smoothedBinaryLabelMap = slicer.vtkOrientedImageData()
smoothedBinaryLabelMap.ShallowCopy(stencil.GetOutput())
Expand Down

0 comments on commit d4b2261

Please sign in to comment.