diff --git a/plugins/slicer/MONAILabel/MONAILabel.py b/plugins/slicer/MONAILabel/MONAILabel.py index 1346f55b3..a335261d0 100644 --- a/plugins/slicer/MONAILabel/MONAILabel.py +++ b/plugins/slicer/MONAILabel/MONAILabel.py @@ -1828,7 +1828,10 @@ def updateSegmentationMask(self, in_file, labels, sliceIndex=None, freeze=None): # We remember if closed surface representation was present and restore it after import. segmentationRepresentationNames = [] segmentationNode.GetSegmentation().GetContainedRepresentationNames(segmentationRepresentationNames) - hasClosedSurfaceRepresentation = slicer.vtkSegmentationConverter.GetSegmentationClosedSurfaceRepresentationName() in segmentationRepresentationNames + hasClosedSurfaceRepresentation = ( + slicer.vtkSegmentationConverter.GetSegmentationClosedSurfaceRepresentationName() + in segmentationRepresentationNames + ) slicer.modules.segmentations.logic().ImportLabelmapToSegmentationNode( labelmapVolumeNode, segmentationNode, segmentIds