It is quite an old release example. Maybe now you need to set the master representation to planar contours. Or maybe you just haven’t installed SlicerRT extension.
Anyway, you can find a complete implementation for n this module that imports parallel contours from an OsiriX segmentation file that should work well:
Why do you need to create a segment from parallel contours? Are you implementing an importer for a new file format?
I was using it as an example of creating a segmentation from datapoints.
I am creating a module to process nuclear medicine dynamic images and one of the steps involves drawing a rectangular ROI to do count statistics. I currently use the scissors rectangle tool for the ROI but it would be better if the ROI could be adjusted after creation.
I want to make a box ROI in Markups and then convert it to a binary labelmap so I can run Mask Volume. The code snippet looked like it would help make the labelmap.