Skip to content

Commit

Permalink
BUG: Remove secondary call to segmentation generation
Browse files Browse the repository at this point in the history
Regression initially introduced in e036c22. The secondary call is removed
here to prevent multiple calls to the automatic segmentation pipeline.
  • Loading branch information
NicerNewerCar committed Jul 31, 2024
1 parent de29b1e commit aec6381
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions AutoscoperM/AutoscoperM.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,20 +708,14 @@ def onSegmentation(self):
currentVolumeNode,
self.ui.segGen_ThresholdSpinBox.value,
self.ui.segGen_marginSizeSpin.value,
progressCallback=self.updateProgressBar,
)
progress = (i + 1) / numFrames * 100
self.ui.progressBar.setValue(progress)
if self.logic.IsSequenceVolume(volumeNode):
segmentationSequenceNode.SetDataNodeAtValue(segmentationNode, str(i))
slicer.mrmlScene.RemoveNode(segmentationNode)
currentVolumeNode = self.logic.getNextItemInSequence(volumeNode)

segmentationNode = SubVolumeExtraction.automaticSegmentation(
volumeNode,
self.ui.segGen_ThresholdSpinBox.value,
self.ui.segGen_marginSizeSpin.value,
progressCallback=self.updateProgressBar,
)
elif self.ui.segGen_fileRadioButton.isChecked():
segmentationFileDir = self.ui.segGen_lineEdit.currentPath
if not self.logic.validatePaths(segmentationFileDir=segmentationFileDir):
Expand Down

0 comments on commit aec6381

Please sign in to comment.