Python - Editing Feature Size Local Threshold

Indeed, in case of this effect, which is derived from C++ effect, the syntax is slightly different, as effect refers to the C++ effect, and you need to call effect.self() to access the methods added in Python. So, a complete example:

segmentEditorWidget = slicer.modules.segmenteditor.widgetRepresentation().self().editor
segmentEditorWidget.setActiveEffectByName("Local Threshold")
effect = segmentEditorWidget.activeEffect()
ijkPoints = vtk.vtkPoints()
ijkPoints.InsertNextPoint(127,102,80)
effect.self().apply(ijkPoints)
1 Like