# Programatically use "Specify Geometry" (Python)

**URL:** <https://discourse.slicer.org/t/programatically-use-specify-geometry-python/18941>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [July 27, 2021, 10:06am UTC](https://discourse.slicer.org/t/programatically-use-specify-geometry-python/18941 "2021-07-27T10:06:05Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Edgaras\_Misiulis](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/edgaras_misiulis/32/16583_2.png) [@Edgaras\_Misiulis](https://discourse.slicer.org/u/Edgaras_Misiulis)\
**Post date:** [September 12, 2022, 8:49am UTC](https://discourse.slicer.org/t/programatically-use-specify-geometry-python/18941/11 "2022-09-12T08:49:52Z")

</div>

found a good example about it here:

> [@Change segmentation oversampling factor](https://discourse.slicer.org/t/change-segmentation-oversampling-factor/19025/5):
>
> @lassoan Thanks for your help again! The source code of vtkSlicerSegmentationGeometryLogic::ResampleLabelmapsInSegmentationNode is really helpful, and I finally completed this function correctly based on the source code. The issues aren’t technical issues, and since it works right now, there’s no needs to worry about upgrading. For those who are interested, here is my code. segmentIDs = vtk.vtkStringArray() segmentationNode.GetSegmentation().GetSegmentIDs(segmentIDs) #Create desired geometry…

---

_[View the full topic](https://discourse.slicer.org/t/programatically-use-specify-geometry-python/18941)._
