How to get current segmentation master volume?

Hello! Thank you for all the help @Sunderlandkyl @lassoan - we got our module to work.

Our very last question is when we assign our masterVolumeNode right now:

masterVolumeNode = SampleData.SampleDataLogic().downloadCTACardio()

We assign it to a newly downloaded CTACardio. Is there a way to just assign it to the current master volume? Let’s say I upload my own files, what is the Python syntax to assign it to those files automatically?

Thanks!

Have you tried vtkMRMLSegmentEditorNode::GetMasterVolumeNode()?
https://apidocs.slicer.org/master/classvtkMRMLSegmentEditorNode.html#ae7dbe89f755f115624dc1c701e9dcf80

Thank you! It works in our module.