# Extract centerline Python scripting

**URL:** <https://discourse.slicer.org/t/extract-centerline-python-scripting/21275>\
**Category:** Support\
**Tags:** centerlines\
**Created:** [December 30, 2021, 12:28pm UTC](https://discourse.slicer.org/t/extract-centerline-python-scripting/21275 "2021-12-30T12:28:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [December 30, 2021, 2:48pm UTC](https://discourse.slicer.org/t/extract-centerline-python-scripting/21275/2 "2021-12-30T14:48:45Z")

</div>

You seem to mix up things here.

\1. If you wish to work with the logic class of ‘ExtractCenterline’ module, [this](https://discourse.slicer.org/t/automatic-centerline/14829/22) post is very instructive. The logic class won’t modify the UI in itself.

\2. If you wish to work with the ‘ExtractCenterline’ module’s GUI, you can access all UI widgets this way :

```auto
ecWidgetRepresentation = slicer.modules.extractcenterline.widgetRepresentation()
ecUI = ecWidgetRepresentation.ui

```

For example, to get a handle to the output curve combobox, you would use _ecUI.outputCenterlineCurveSelector_.

---

_[View the full topic](https://discourse.slicer.org/t/extract-centerline-python-scripting/21275)._
