# Add label tag in 3D view

**URL:** <https://discourse.slicer.org/t/add-label-tag-in-3d-view/15646>\
**Category:** Development\
**Created:** [January 25, 2021, 7:44am UTC](https://discourse.slicer.org/t/add-label-tag-in-3d-view/15646 "2021-01-25T07:44:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![RanChenSignIn](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ranchensignin/32/9634_2.png) [@RanChenSignIn](https://discourse.slicer.org/u/RanChenSignIn)\
**Post date:** [January 25, 2021, 7:44am UTC](https://discourse.slicer.org/t/add-label-tag-in-3d-view/15646/1 "2021-01-25T07:44:17Z")

</div>

hello everyone, i have a question, i have a segmentation with many labels,  
How do i add a tag on each label in 3D view, and rotation angle of view to display only part of the labels tag?

---

<div class="post-metadata">

**Author:** ![RanChenSignIn](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ranchensignin/32/9634_2.png) [@RanChenSignIn](https://discourse.slicer.org/u/RanChenSignIn)\
**Post date:** [January 25, 2021, 8:58am UTC](https://discourse.slicer.org/t/add-label-tag-in-3d-view/15646/2 "2021-01-25T08:58:37Z")

</div>

Anyone can give me some advice?

---

<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:** [January 25, 2021, 9:10pm UTC](https://discourse.slicer.org/t/add-label-tag-in-3d-view/15646/3 "2021-01-25T21:10:54Z")

</div>

Could you attach an image that illustrates what you would like to achieve?

---

<div class="post-metadata">

**Author:** ![RanChenSignIn](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ranchensignin/32/9634_2.png) [@RanChenSignIn](https://discourse.slicer.org/u/RanChenSignIn)\
**Post date:** [January 26, 2021, 2:33am UTC](https://discourse.slicer.org/t/add-label-tag-in-3d-view/15646/4 "2021-01-26T02:33:36Z")

</div>

OK. thank you!

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/7/d787d021fa86a83db18ebf35f3414e585bdf830b.jpeg)

I want to add a label to the surface of the different brain structures in the 3D view,  
realize the rotation view to show the front label

---

<div class="post-metadata">

**Author:** ![RanChenSignIn](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ranchensignin/32/9634_2.png) [@RanChenSignIn](https://discourse.slicer.org/u/RanChenSignIn)\
**Post date:** [January 26, 2021, 2:43am UTC](https://discourse.slicer.org/t/add-label-tag-in-3d-view/15646/5 "2021-01-26T02:43:02Z")

</div>

I have tried to add different labels centroid, but the centroid of the label is inside the label, so it cannot be displayed normally

---

<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:** [January 26, 2021, 2:55am UTC](https://discourse.slicer.org/t/add-label-tag-in-3d-view/15646/6 "2021-01-26T02:55:05Z")

</div>

We recently added the option to make markups visible, even if they are occluded by other 3D objects. You can enable it in Markups module / Display / Advanced / 3D Display / Occluded visibility.

However, you may find that it line markups pointing from outside the volume into the target points provides better 3D depth cues than isolated points. If you want the lines to be arranged nicely, you can add an observer to the camera node and add a Python script that updates the line endpoints when the view direction changes (so that the lines and labels are always visible from the current viewpoint and don’t cross or overlap each other).

---

<div class="post-metadata">

**Author:** ![RanChenSignIn](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ranchensignin/32/9634_2.png) [@RanChenSignIn](https://discourse.slicer.org/u/RanChenSignIn)\
**Post date:** [January 26, 2021, 10:00am UTC](https://discourse.slicer.org/t/add-label-tag-in-3d-view/15646/8 "2021-01-26T10:00:31Z")

</div>

Fine,line markups look better, thank you!

Could you provide some similar script examples or related information links which add an observer to the camera node and add a Python script that updates the line endpoints when the view direction changes？

---

<div class="post-metadata">

**Author:** ![RanChenSignIn](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ranchensignin/32/9634_2.png) [@RanChenSignIn](https://discourse.slicer.org/u/RanChenSignIn)\
**Post date:** [January 26, 2021, 10:10am UTC](https://discourse.slicer.org/t/add-label-tag-in-3d-view/15646/9 "2021-01-26T10:10:09Z")

</div>

The occluded visibility approach is not suitable for my example, because there are too many brain structures targets to display, so that too many markups in 3D view.
