I am currently working on an extension to create a segmentation on start-up. One step in that process is to update the oversampling factor under segmentation geometry from 1.0 to 1.5.
I want to know how I can do this in python~
Thank you for all the help! Hope family/friends are safe during these pressing times!
I could really use the help~ It means a lot.
I can’t seem to find the necessary methods to do this. Not sure if this is a part of the Segmentation Editor Module or the MasterVolumeNode.
Sorry for not noticing your post until now.
Here’s how you can do that:
s = getNode('vtkMRMLSegmentationNode1')
se = s.GetSegmentation()
se.SetConversionParameter('Oversampling factor', '0.5')
By the way on the UI you can set it by either long-clicking Create in the row oof binary labelmap if you don’t have that representation yet, or click Update if you have one already. Then select the path and you’ll see the parameters:
Thank you so much for the easy to follow steps! I got it works as I desired