# Python - Editing Feature Size Local Threshold

**URL:** https://discourse.slicer.org/t/python-editing-feature-size-local-threshold/12393
**Category:** Development
**Created:** [July 6, 2020, 1:15pm UTC](https://discourse.slicer.org/t/python-editing-feature-size-local-threshold/12393 "2020-07-06T13:15:34Z")
**Posts on this page:** 1
**Showing post:** 16

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [July 6, 2020, 7:41pm UTC](https://discourse.slicer.org/t/python-editing-feature-size-local-threshold/12393/16 "2020-07-06T19:41:29Z")

</div>

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:

```python
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)

```

---

_[View the full topic](https://discourse.slicer.org/t/python-editing-feature-size-local-threshold/12393)._
