# How to determine the center point coordinates of the modeling area?

**URL:** <https://discourse.slicer.org/t/how-to-determine-the-center-point-coordinates-of-the-modeling-area/22205>\
**Category:** Support\
**Tags:** segmentation, python, 3d-model\
**Created:** [February 28, 2022, 7:50am UTC](https://discourse.slicer.org/t/how-to-determine-the-center-point-coordinates-of-the-modeling-area/22205 "2022-02-28T07:50:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhuyingxinxs](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zhuyingxinxs/32/13663_2.png) [@zhuyingxinxs](https://discourse.slicer.org/u/zhuyingxinxs)\
**Post date:** [February 28, 2022, 7:50am UTC](https://discourse.slicer.org/t/how-to-determine-the-center-point-coordinates-of-the-modeling-area/22205/1 "2022-02-28T07:50:33Z")

</div>

Can Slicer read the coordinates of the center point of the region that he modeled?  
Let’s say I modeled the kidney ,Can I read what the RAS coordinates are for the center of the kidney region?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/9/8993e64ea43bb8d95272dc429a5f1a3a6f9fc09b.jpeg)

---

<div class="post-metadata">

**Author:** ![jumbojing](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jumbojing/32/10811_2.png) [@jumbojing](https://discourse.slicer.org/u/jumbojing)\
**Post date:** [March 1, 2022, 1:10am UTC](https://discourse.slicer.org/t/how-to-determine-the-center-point-coordinates-of-the-modeling-area/22205/2 "2022-03-01T01:10:34Z")

</div>

这个应该能够帮到你

> [@Centering on a segment from a script](https://discourse.slicer.org/t/centering-on-a-segment-from-a-script/6209/9):
>
> Using a custom extension is certainly a solution, but in the long term I would recommend developers to use Slicer core functions if available. Slicer-4.10 returning a swig pointer (such as \_000001bfd4897340\_p\_void) is a minor inconvenience. You can still access the values using the helper function below (in the nightly version the VTK hint is there so the position is directly returned as a Python tuple). def getListFromPointer(bufferPtr, scalarType=vtk.VTK\_DOUBLE, numberOfElements=3): """Con…

---

<div class="post-metadata">

**Author:** ![MAURICIO\_ALBERTO\_LED](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mauricio_alberto_led/32/12480_2.png) [@MAURICIO\_ALBERTO\_LED](https://discourse.slicer.org/u/MAURICIO_ALBERTO_LED)\
**Post date:** [February 24, 2023, 7:36am UTC](https://discourse.slicer.org/t/how-to-determine-the-center-point-coordinates-of-the-modeling-area/22205/3 "2023-02-24T07:36:13Z")

</div>

Hello,  
It is possible to move a segment using code and not transformations? Thanks

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 24, 2023, 4:03pm UTC](https://discourse.slicer.org/t/how-to-determine-the-center-point-coordinates-of-the-modeling-area/22205/4 "2023-02-24T16:03:13Z")

</div>

Yes, you can create any transform type and set its parameters using Python scripting.

---

<div class="post-metadata">

**Author:** ![MAURICIO\_ALBERTO\_LED](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mauricio_alberto_led/32/12480_2.png) [@MAURICIO\_ALBERTO\_LED](https://discourse.slicer.org/u/MAURICIO_ALBERTO_LED)\
**Post date:** [February 25, 2023, 5:25pm UTC](https://discourse.slicer.org/t/how-to-determine-the-center-point-coordinates-of-the-modeling-area/22205/5 "2023-02-25T17:25:36Z")

</div>

Thank you, Mr. Lasso. Can you give me a link where this was done? thanks
