From aec63812978de9577e2d8af2e1ec6f4ba7808846 Mon Sep 17 00:00:00 2001 From: Anthony Lombardi Date: Wed, 24 Jul 2024 13:34:36 -0400 Subject: [PATCH] BUG: Remove secondary call to segmentation generation Regression initially introduced in e036c22. The secondary call is removed here to prevent multiple calls to the automatic segmentation pipeline. --- AutoscoperM/AutoscoperM.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/AutoscoperM/AutoscoperM.py b/AutoscoperM/AutoscoperM.py index 2a54e25..1b11da4 100644 --- a/AutoscoperM/AutoscoperM.py +++ b/AutoscoperM/AutoscoperM.py @@ -708,6 +708,7 @@ 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) @@ -715,13 +716,6 @@ def onSegmentation(self): 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):