Hi I’m new to the slicer python api and was wondering if someone could point me in the right direction.
I would like to use a the python api to create serveral segements through the “Logic operators” function of the segment editor widget. I would like to create these segements from existing segments.
I managed to load an example extentsion for slicer in which I select the master volume and segmentation through python.
My main question is how I can find out about the different classes and functions that I want to use.
For example:
How do I change the “overwrite other segment” parameter ?
I found the setActiveEffectByName funtction were can I find its parameters ?
How do figure out what the SegmentID of each segment is?
Also note there are convenience functions for creating segments directly from polydata or labelmap: segmentationNode.AddSegmentFromClosedSurfaceRepresentation(...) and segmentationNode.AddSegmentFromBinaryLabelmapRepresentation(..) in segmentation node; or importing from existing model or labelmap nodes using segmetations module logic
I would like to create new segmentations with the threshold tool and save them. I am not sure if using the widget is the best way to do it. How do you think I can achive this easiest?
Where can I find the different parameters each editor effect accepts ? as this does not seem to work: