The result is an error that theSegmentation does not have a method AddEmptySegment. When I check the class type, theSegmentation is a vtkObject, rather than a vtkSegmentation. Is there a reason for this? Do I need to downcast to vtkSegmentation, or is there something I’m doing incorrectly?
Thanks very much.
You need to import vtkSegmentationCorePython, we usually do it like this:
import vtkSegmentationCorePython as vtkSegmentationCore
It would be great if it was imported by default, similarly to all the other libraries, like vtkAddon etc. @jcfr@pieper I have tried to make that happen, but it turned out to be more complicated than I thought. I’ll submit a PR shortly, I hope you can tell me what’s missing. Thanks!