My segmentation is a 3D binary volume (shown in green in the screenshot) imported from a RTSS file. I need to do two things:
- Extract the 2D mask in all three planar directions (the specific voxels that are shown in all three slices)
- Convert this 2D region to a contour. (There are algorithms for doing that, so I essentially just need to extract the mask from part 1)
I’ve figured out that slicer.util.getNode(‘1: RTSTRUCT: AutoSS’) will return a vthMRMLSegmentationNode, but I can’t figure out how to traverse it to get the segmentation. Is there an easy way to just export the 3d array of zeros and ones using python?