# How to getcenter of vtkplane by python?

**URL:** <https://discourse.slicer.org/t/how-to-getcenter-of-vtkplane-by-python/21135>\
**Category:** Development\
**Tags:** python\
**Created:** [December 19, 2021, 2:54pm UTC](https://discourse.slicer.org/t/how-to-getcenter-of-vtkplane-by-python/21135 "2021-12-19T14:54:03Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [December 19, 2021, 2:54pm UTC](https://discourse.slicer.org/t/how-to-getcenter-of-vtkplane-by-python/21135/1 "2021-12-19T14:54:03Z")

</div>

How to getcenter of vtkplane by python?  
@lassoan@Juicy@jamesobutler @jcfr @pieper

---

<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:** [December 19, 2021, 3:12pm UTC](https://discourse.slicer.org/t/how-to-getcenter-of-vtkplane-by-python/21135/2 "2021-12-19T15:12:35Z")

</div>

Add half of the origin-\>point1 and origin-\>point2 vector to the origin to get the center.

I would recommend to use the markup plane node. It allows you to display and interactively modify the plane and has convenience functions for setting/getting the center position.
