# Update oversampling factor

**URL:** https://discourse.slicer.org/t/update-oversampling-factor/11717
**Category:** Support
**Created:** [May 26, 2020, 4:36pm UTC](https://discourse.slicer.org/t/update-oversampling-factor/11717 "2020-05-26T16:36:57Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Queen\_Rei](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/queen_rei/32/6348_2.png) [@Queen\_Rei](https://discourse.slicer.org/u/Queen_Rei)
#### Post date: [May 26, 2020, 4:36pm UTC](https://discourse.slicer.org/t/update-oversampling-factor/11717/1 "2020-05-26T16:36:57Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![Queen\_Rei](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/queen_rei/32/6348_2.png) [@Queen\_Rei](https://discourse.slicer.org/u/Queen_Rei)
#### Post date: [May 29, 2020, 3:01pm UTC](https://discourse.slicer.org/t/update-oversampling-factor/11717/2 "2020-05-29T15:01:48Z")

</div>

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.

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/3/1378ccf9b2da032ebc306ff7efe36995a85e929d.png)

---

<div class="post-metadata">

### Author: ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)
#### Post date: [May 29, 2020, 3:32pm UTC](https://discourse.slicer.org/t/update-oversampling-factor/11717/3 "2020-05-29T15:32:06Z")

</div>

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')
```

---

<div class="post-metadata">

### Author: ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)
#### Post date: [May 29, 2020, 3:33pm UTC](https://discourse.slicer.org/t/update-oversampling-factor/11717/4 "2020-05-29T15:33:48Z")

</div>

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:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/2/52d7d66b3cba381389407d8a0b0bc9d8326d1845.png)

---

<div class="post-metadata">

### Author: ![Queen\_Rei](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/queen_rei/32/6348_2.png) [@Queen\_Rei](https://discourse.slicer.org/u/Queen_Rei)
#### Post date: [May 29, 2020, 5:56pm UTC](https://discourse.slicer.org/t/update-oversampling-factor/11717/5 "2020-05-29T17:56:51Z")

</div>

Thank you so much for the easy to follow steps! I got it works as I desired 😃
