Set parameters with python code. Skullstripper

(Mathias) #1

Does someone know how to set the parrameters of the skullstripper extension with the use of python code?

skullWidget = slicer.modules.Skullstripper.widgetRepresentation()
— need to set the inputs here first

I know like Segment editor you can write something like this;
segmentEditorWidget = slicer.qMRMLSegmentEditorWidget()
segmentEditorNode = slicer.vtkMRMLSegmentEditorNode()

I cant understand how to reach this for skullstripping.

All help is appreciate :slight_smile:

(Andras Lasso) #2

This is a CLI module that you can run from Python as described here:

Give SwissSkullStripper extension a try, too. It may work better.

(Mathias) #3

Thanks for the tip, found a way :slight_smile:

Here is a part of my code:

(Andras Lasso) #4

Thanks for the update and sharing the end result.

Please always include source code as text instead of screenshot, because others will not be able to easily copy-paste this code snippet picture and images also take thousand times more storage space. You can add triple ` character before and after the text to display it as source code.