Hi, My slicer version is:
Operating system: Arch Linux
Kernel: x86_64 Linux 5.14.16-arch1
Slicer version: 4.11.20210226
I tried to use ApplyToAllVisibleSegments
effect parameter:
https://slicer.readthedocs.io/en/latest/developer_guide/modules/segmenteditor.html#scissors
volumeNode = slicer.mrmlScene.GetFirstNodeByClass('vtkMRMLScalarVolumeNode')
segmentationNode = slicer.mrmlScene.GetFirstNodeByClass('vtkMRMLSegmentationNode')
segmentationNode.CreateClosedSurfaceRepresentation()
segmentationNode.GetDisplayNode().SetAllSegmentsVisibility(1)
segmentationNode.SetReferenceImageGeometryParameterFromVolumeNode(volumeNode)
segmentEditorWidget = slicer.qMRMLSegmentEditorWidget()
segmentEditorWidget.setMRMLScene(slicer.mrmlScene)
segmentEditorNode = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLSegmentEditorNode")
segmentEditorWidget.setMRMLSegmentEditorNode(segmentEditorNode)
segmentEditorWidget.setSegmentationNode(segmentationNode)
segmentEditorWidget.setMasterVolumeNode(volumeNode)
segmentEditorWidget.setActiveEffectByName("Scissors")
effect = segmentEditorWidget.activeEffect()
effect.setParameter('ApplyToAllVisibleSegments', 1)
Then I used mouse to cut the segments in 3D view, but only worked on the first segment.
So, is there a way to cut multi-segments with scissors at the same time?
Thanks