# Automatic center volume when clicking on the eye to show volume

**URL:** https://discourse.slicer.org/t/automatic-center-volume-when-clicking-on-the-eye-to-show-volume/8973
**Category:** Development
**Created:** [October 31, 2019, 2:56pm UTC](https://discourse.slicer.org/t/automatic-center-volume-when-clicking-on-the-eye-to-show-volume/8973 "2019-10-31T14:56:05Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![giovform](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/giovform/32/4687_2.png) [@giovform](https://discourse.slicer.org/u/giovform)
#### Post date: [October 31, 2019, 2:56pm UTC](https://discourse.slicer.org/t/automatic-center-volume-when-clicking-on-the-eye-to-show-volume/8973/1 "2019-10-31T14:56:05Z")

</div>

Hi, I have multiple volumes and would like to call

```
slicer.util.resetSliceViews()

```

when the ‘eye’ button is clicked to show the volume.

Is there a way to script this behavior?

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: [October 31, 2019, 3:00pm UTC](https://discourse.slicer.org/t/automatic-center-volume-when-clicking-on-the-eye-to-show-volume/8973/2 "2019-10-31T15:00:25Z")

</div>

It is already available as an option in Data module in recent Slicer Prevew Releases. Right-click on a volume’s eye icon and check “Reset field of view on show”:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/e/6e269c55e69892c76526214cf679b657388eca3f.png)

---

<div class="post-metadata">

### Author: ![giovform](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/giovform/32/4687_2.png) [@giovform](https://discourse.slicer.org/u/giovform)
#### Post date: [October 31, 2019, 3:07pm UTC](https://discourse.slicer.org/t/automatic-center-volume-when-clicking-on-the-eye-to-show-volume/8973/3 "2019-10-31T15:07:49Z")

</div>

Nice! Is there a way set as default behavior when Slicer starts?

---

<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: [October 31, 2019, 4:03pm UTC](https://discourse.slicer.org/t/automatic-center-volume-when-clicking-on-the-eye-to-show-volume/8973/4 "2019-10-31T16:03:07Z")

</div>

Yes. The choice is stored persistently in application settings.

---

<div class="post-metadata">

### Author: ![giovform](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/giovform/32/4687_2.png) [@giovform](https://discourse.slicer.org/u/giovform)
#### Post date: [October 31, 2019, 4:05pm UTC](https://discourse.slicer.org/t/automatic-center-volume-when-clicking-on-the-eye-to-show-volume/8973/5 "2019-10-31T16:05:07Z")

</div>

Yes. Just found it on the Slicer.ini file. Thanks!

```
[SubjectHierarchy]
ResetFieldOfViewOnShowVolume=true
```
