# Display segment name in 3d View, Red, Green and Yellow Slice views

**URL:** <https://discourse.slicer.org/t/display-segment-name-in-3d-view-red-green-and-yellow-slice-views/24590>\
**Category:** Development\
**Tags:** segmentation\
**Created:** [August 1, 2022, 1:00pm UTC](https://discourse.slicer.org/t/display-segment-name-in-3d-view-red-green-and-yellow-slice-views/24590 "2022-08-01T13:00:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karthik](https://avatars.discourse-cdn.com/v4/letter/k/9fc348/32.png) [@Karthik](https://discourse.slicer.org/u/Karthik)\
**Post date:** [August 1, 2022, 1:00pm UTC](https://discourse.slicer.org/t/display-segment-name-in-3d-view-red-green-and-yellow-slice-views/24590/1 "2022-08-01T13:00:23Z")

</div>

I have segmentation node with multiple segments. When I click on Show3D, they show up in 3D view and also in Red, Yellow and Green slices.

However, when I have many segments, I find it confusing to differentiate them purely based on colour. I want the segment names to be displayed next to the segments in 3D, Red, Yellow and Green slice views. That way, I can relate what the segment is based on its name.

How is it possible to achieve this?  
Thanks

---

<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 1, 2022, 6:02pm UTC](https://discourse.slicer.org/t/display-segment-name-in-3d-view-red-green-and-yellow-slice-views/24590/2 "2022-08-01T18:02:46Z")

</div>

The segment name is already displayed in the DataProbe window (lower left). It could be displayed elsewhere with some programming but usually the DataProbe is enough.

---

<div class="post-metadata">

**Author:** ![Karthik](https://avatars.discourse-cdn.com/v4/letter/k/9fc348/32.png) [@Karthik](https://discourse.slicer.org/u/Karthik)\
**Post date:** [August 2, 2022, 3:42am UTC](https://discourse.slicer.org/t/display-segment-name-in-3d-view-red-green-and-yellow-slice-views/24590/3 "2022-08-02T03:42:45Z")

</div>

In order to display the name on the Slice Views and 3D views next to the segmentation, which parts of the code do I have to modify? Do I have to make changes to the Segment Editor module itself?  
Do does it have to do with the rendering?

---

<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 2, 2022, 3:17pm UTC](https://discourse.slicer.org/t/display-segment-name-in-3d-view-red-green-and-yellow-slice-views/24590/4 "2022-08-02T15:17:51Z")

</div>

A good place to start would be to look at the `DataProbe` code and how corner annotations in the Slice Views

> **[Slicer/Modules/Scripted/DataProbe at a5f75351073ef62fd6198d9480d86c0009d70f9b ·...](https://github.com/Slicer/Slicer/tree/a5f75351073ef62fd6198d9480d86c0009d70f9b/Modules/Scripted/DataProbe)**
>
> a5f75351073ef62fd6198d9480d86c0009d70f9b/Modules/Scripted/DataProbe

For the 3D view look, for example, at how the orientation marker is handled.

> <https://github.com/Slicer/Slicer/blob/a5f75351073ef62fd6198d9480d86c0009d70f9b/Libs/MRML/DisplayableManager/vtkMRMLOrientationMarkerDisplayableManager.cxx>

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [August 3, 2022, 4:11am UTC](https://discourse.slicer.org/t/display-segment-name-in-3d-view-red-green-and-yellow-slice-views/24590/5 "2022-08-03T04:11:10Z")

</div>

> [@pieper](#):
>
> It could be displayed elsewhere with some programming but usually the DataProbe is enough.

İ would second a request to display segment name inside segmentation view, eg when someone hovers over and waits a few seconds.  
On remote sessions (eg zoom) data probe is next to impossible to use effectively.
