# Is there any code to control 'specify geometry in Segment editor?

**URL:** <https://discourse.slicer.org/t/is-there-any-code-to-control-specify-geometry-in-segment-editor/31021>\
**Category:** Support\
**Created:** [August 7, 2023, 8:35am UTC](https://discourse.slicer.org/t/is-there-any-code-to-control-specify-geometry-in-segment-editor/31021 "2023-08-07T08:35:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![telomere](https://avatars.discourse-cdn.com/v4/letter/t/e47c2d/32.png) [@telomere](https://discourse.slicer.org/u/telomere)\
**Post date:** [August 7, 2023, 8:35am UTC](https://discourse.slicer.org/t/is-there-any-code-to-control-specify-geometry-in-segment-editor/31021/1 "2023-08-07T08:35:55Z")

</div>

I made a shortcut to go Segment Editor module and automatically load source volume and add segmentation and segment.  
In this situation, I also want to control “specify geometry” button which is next to source volume.  
I want to choose ROI that I made previously and set spacing as 0.15mm.  
But I never could find the function codes for controlling ‘specify geometry’ ☹

I also saw the script of Segment Editor module but I can’t find the ‘specify geometry’ part…

---

<div class="post-metadata">

**Author:** ![simonoxen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/simonoxen/32/66398_2.png) [@simonoxen](https://discourse.slicer.org/u/simonoxen)\
**Post date:** [August 7, 2023, 9:07am UTC](https://discourse.slicer.org/t/is-there-any-code-to-control-specify-geometry-in-segment-editor/31021/2 "2023-08-07T09:07:20Z")

</div>

hi, not an expert here, but this test seems to have examples that could help:

> <https://github.com/Slicer/Slicer/blob/7ef59614c2458e4f693ab77834e6726cf6ae0540/Modules/Loadable/Segmentations/Testing/Python/SegmentationWidgetsTest1.py#L171>

Also using ROIs as inputs
