# Label layer annotations cannot be hidden

**URL:** <https://discourse.slicer.org/t/label-layer-annotations-cannot-be-hidden/3717>\
**Category:** Feature requests\
**Created:** [August 9, 2018, 4:48pm UTC](https://discourse.slicer.org/t/label-layer-annotations-cannot-be-hidden/3717 "2018-08-09T16:48:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fernando](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fernando/32/5640_2.png) [@Fernando](https://discourse.slicer.org/u/Fernando)\
**Post date:** [August 9, 2018, 4:48pm UTC](https://discourse.slicer.org/t/label-layer-annotations-cannot-be-hidden/3717/1 "2018-08-09T16:48:08Z")

</div>

Hi all,

When I uncheck the `Bottom Left` checkbox in the Data Probe module, only annotations for background and foreground layers are hidden, but the one for the label layer stays.

There must be something wrong in `Modules/Scripted/DataProbe/DataProbeLib/SliceViewAnnotations.py`, but I haven’t been able to spot it.

I’ve tried getting the widget and doing `widget.sliceView().cornerAnnotation().SetText(0, '')` with no luck.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [August 9, 2018, 9:37pm UTC](https://discourse.slicer.org/t/label-layer-annotations-cannot-be-hidden/3717/2 "2018-08-09T21:37:04Z")

</div>

Hi Fernando -

It looks like `if self.bottomLeft:` needs to be added before the block at line 631. Let me know if that fixes it for you and I can make the change.

> <https://github.com/Slicer/Slicer/blob/5e88dcc9aa3e543bdaf37c983132cf4bc5f9edf2/Modules/Scripted/DataProbe/DataProbeLib/SliceViewAnnotations.py#L617-L635>

---

<div class="post-metadata">

**Author:** ![Fernando](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fernando/32/5640_2.png) [@Fernando](https://discourse.slicer.org/u/Fernando)\
**Post date:** [August 9, 2018, 10:40pm UTC](https://discourse.slicer.org/t/label-layer-annotations-cannot-be-hidden/3717/3 "2018-08-09T22:40:31Z")

</div>

Hi Steve 👋

Thanks for your answer, that worked.

You’ll need another `if self.bottomLeft:` for Case I, it doesn’t work either.

> <https://github.com/Slicer/Slicer/blob/5e88dcc9aa3e543bdaf37c983132cf4bc5f9edf2/Modules/Scripted/DataProbe/DataProbeLib/SliceViewAnnotations.py#L576-L599>

---

<div class="post-metadata">

**Author:** ![Fernando](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fernando/32/5640_2.png) [@Fernando](https://discourse.slicer.org/u/Fernando)\
**Post date:** [August 10, 2018, 7:48pm UTC](https://discourse.slicer.org/t/label-layer-annotations-cannot-be-hidden/3717/4 "2018-08-10T19:48:26Z")

</div>

I have submitted a PR:

> <https://github.com/Slicer/Slicer/issues/1004>
>
> \_This issue was created automatically from an original \[Mantis Issue\](https://ma…ntisarchive.slicer.org/view.php?id=1004). Further discussion may take place here.\_

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [August 10, 2018, 8:00pm UTC](https://discourse.slicer.org/t/label-layer-annotations-cannot-be-hidden/3717/5 "2018-08-10T20:00:32Z")

</div>

Great! I"m just rebuilding now for a quick test and will commit.

---

<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:** [March 21, 2023, 3:01am UTC](https://discourse.slicer.org/t/label-layer-annotations-cannot-be-hidden/3717/6 "2023-03-21T03:01:13Z")

</div>


