# showViewControllers(False) removes annotations

**URL:** <https://discourse.slicer.org/t/showviewcontrollers-false-removes-annotations/8547>\
**Category:** Development\
**Created:** [September 24, 2019, 1:51pm UTC](https://discourse.slicer.org/t/showviewcontrollers-false-removes-annotations/8547 "2019-09-24T13:51:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aiden.zhu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aiden.zhu/32/67145_2.png) [@aiden.zhu](https://discourse.slicer.org/u/aiden.zhu)\
**Post date:** [September 24, 2019, 1:51pm UTC](https://discourse.slicer.org/t/showviewcontrollers-false-removes-annotations/8547/1 "2019-09-24T13:51:46Z")

</div>

Operating system: windows  
Slicer version: 3D Slcier 4.11.0-2019-06-23

Expected behavior: While I try to use  
cap.showViewControllers(False)  
via the instruction here: [https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Capture](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Capture), I wold like to see annotations of mine still there

Actual behavior: Right now while I use cap.showViewControllers(False), all my own annotations disappear as well.

Is there a way I may use cap.showViewControllers(False) on the same time keeping my annotations on? Thanks a lot.

---

<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 24, 2019, 4:04pm UTC](https://discourse.slicer.org/t/showviewcontrollers-false-removes-annotations/8547/2 "2019-09-24T16:04:24Z")

</div>

> [@aiden.zhu](#):
>
> I wold like to see annotations of mine still there

I could not reproduce this. What annotations do you mean? Could you attach a screenshot and mark what you are missing?

---

<div class="post-metadata">

**Author:** ![aiden.zhu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aiden.zhu/32/67145_2.png) [@aiden.zhu](https://discourse.slicer.org/u/aiden.zhu)\
**Post date:** [September 24, 2019, 4:21pm UTC](https://discourse.slicer.org/t/showviewcontrollers-false-removes-annotations/8547/3 "2019-09-24T16:21:16Z")

</div>

I first load an image and with some annotations created by:  
viewer.cornerAnnotation()  
as shown on the following screen shot:

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

then I do:  
import ScreenCapture  
cap = ScreenCapture.ScreenCaptureLogic()  
cap.showViewControllers(False)

after the above, I do have such screen shot as follows:

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

so you see, my own annotation has been gone after showViewControllers(False).

Thanks a lot!

---

<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 24, 2019, 4:38pm UTC](https://discourse.slicer.org/t/showviewcontrollers-false-removes-annotations/8547/4 "2019-09-24T16:38:47Z")

</div>

DataProbe module uses corner annotations to display information. You can override it temporarily but on the next update, DataProbe will reset the displayed texts. Apparently, `showViewControllers` triggers a DataProbe update, so you need to set your custom corner annotation after calling `showViewControllers`.

---

<div class="post-metadata">

**Author:** ![aiden.zhu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aiden.zhu/32/67145_2.png) [@aiden.zhu](https://discourse.slicer.org/u/aiden.zhu)\
**Post date:** [September 24, 2019, 9:29pm UTC](https://discourse.slicer.org/t/showviewcontrollers-false-removes-annotations/8547/5 "2019-09-24T21:29:39Z")

</div>

Thanks a lot! It works!
