I am working on a module where I make a make a binary labelmap on a 2d view with the scissors rectangle tool. The next step is to cut the rectangle into 3 regions for further processing.
My first approach was to add 3 segments with AddEmptySegment and then use SetExtent to resize the rectangles. This is not being reflected in the segmentation node so I am obviously missing something.
I worked out that I can do this manually by right-clicking on the mask in Subject Hierarchy in the Data module and selecting Clone. I can then rename the segment and modify Extent.
Is it possible to perform the clone from Python? I looked at the SubjectHierarchy code but could not work it out.
I found a problem using the suggested method on a segmentation. If you load sample data and create a segmentation with Segment Editor the clone is not valid