# Call "Center Volume" button from python script

**URL:** <https://discourse.slicer.org/t/call-center-volume-button-from-python-script/1132>\
**Category:** Development\
**Created:** [September 27, 2017, 12:29pm UTC](https://discourse.slicer.org/t/call-center-volume-button-from-python-script/1132 "2017-09-27T12:29:51Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [September 27, 2017, 9:15pm UTC](https://discourse.slicer.org/t/call-center-volume-button-from-python-script/1132/4 "2017-09-27T21:15:25Z")

</div>

Code that computes the origin that centers the volume is available [here](https://github.com/Slicer/Slicer/blob/d1bc71e59abf1405a5f14fb8e7c3250915d83607/Libs/MRML/Widgets/qMRMLVolumeInfoWidget.cxx#L117-L143).

However, **volume centering should never be used** for anything else than troubleshooting! Need for centering is typically a sign of an error in the data processing workflow.

Can you explain why you need to center the volume?

---

_[View the full topic](https://discourse.slicer.org/t/call-center-volume-button-from-python-script/1132)._
