Extract centerline Python scripting

You seem to mix up things here.

\1. If you wish to work with the logic class of ‘ExtractCenterline’ module, this 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 :

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

For example, to get a handle to the output curve combobox, you would use ecUI.outputCenterlineCurveSelector.

1 Like