# Slicer 3D view not displaying labels of markup curves properly

**URL:** https://discourse.slicer.org/t/slicer-3d-view-not-displaying-labels-of-markup-curves-properly/34364
**Category:** Feature requests
**Tags:** vmtk-centerline
**Created:** [February 16, 2024, 2:38pm UTC](https://discourse.slicer.org/t/slicer-3d-view-not-displaying-labels-of-markup-curves-properly/34364 "2024-02-16T14:38:49Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ruili](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@ruili](https://discourse.slicer.org/u/ruili)
#### Post date: [February 16, 2024, 2:38pm UTC](https://discourse.slicer.org/t/slicer-3d-view-not-displaying-labels-of-markup-curves-properly/34364/1 "2024-02-16T14:38:49Z")

</div>

Hello,

I am writing to report what seems to be a bug with the labelling of centerline curves or markup curves in general in the 3D view. The details of this bug can be found in a previous discussion [here](https://discourse.slicer.org/t/vmtk-extract-centerline-with-python-console/31596/14). But to summarise, there are two main problems:

1. When generating centerline curves using the ‘ExtractCenterline’ module from VMTK, if your 3D view is zoomed and does not show the full segmentation structure, only those curves that are included in your current view will be labelled in the 3D view.
2. Even when the curves are labelled initially, if you save the curves either as a .mrk.json file or the whole scene in a mrml or mrb file, when reloading it, no markup curve will be labelled in the 3D view.

To replicate the first problem, you may use [this](https://drive.google.com/file/d/1eTTquFSzlJC8Ioq7qHEl590RjKiD5uNs/view?usp=sharing) scene with a segmentation and re-run the ExtractCenterline module. To replicate the second problem, you may use the same file or just draw any mark up curve in slicer and try saving and reloading it.

I will appreciate it very much if anyone can help me check if this is indeed a bug and fix it if it is!

---

<div class="post-metadata">

### Author: ![ruili](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@ruili](https://discourse.slicer.org/u/ruili)
#### Post date: [March 29, 2024, 10:51am UTC](https://discourse.slicer.org/t/slicer-3d-view-not-displaying-labels-of-markup-curves-properly/34364/2 "2024-03-29T10:51:00Z")

</div>

@chir.set @mikebind Hi! This request of mine seems to have been largely ignored, but I will still appreciate some help with it from the experts, as it is very annoying to have extracted and saved the curves and to be unable to see their labels in the 3D view when loading them later.

---

<div class="post-metadata">

### Author: ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)
#### Post date: [March 29, 2024, 11:40am UTC](https://discourse.slicer.org/t/slicer-3d-view-not-displaying-labels-of-markup-curves-properly/34364/3 "2024-03-29T11:40:30Z")

</div>

I noticed that too, like in the picture below.

 ![Copie d'écran_20240329_122009](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/7/97fbe63f650ede3a254485e90f53dbb77d74a1b1.png)

I don’t think it would be considered a bug by core developers, i.e, it’s doubtful they would spend time tracking the root cause.

There are other glitches. For example, with a double 3D view layout, if I apply a volume rendering then display the ROI, the resizing handles appear in the slice views, but would next disappear in the green and yellow views when the mouse cursor is over them. They persist in the red view only. I did not report it since there are other ways to resize the ROI and it does not result in an unusable workspace.

So I think thet one has to accept the kind of unexpected observation you described as it is; or convince some core developer to look into it.

---

<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 29, 2024, 1:11pm UTC](https://discourse.slicer.org/t/slicer-3d-view-not-displaying-labels-of-markup-curves-properly/34364/4 "2024-03-29T13:11:21Z")

</div>

Sorry for the slow response, we just have not had the chance to get to this. There is indeed something wrong with the initialization of the property label when all the control points are hidden.

A workaround until we fix the issue is to show and hide a control point; or enable occluded visibility.

Since the problem is 100% reproducible I expect that we can fix it very quickly.

---

<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 29, 2024, 2:09pm UTC](https://discourse.slicer.org/t/slicer-3d-view-not-displaying-labels-of-markup-curves-properly/34364/5 "2024-03-29T14:09:39Z")

</div>

Unfortunately, the problem is not so simple. It is actually a feature that a curve label is not displayed if none of the curve points are visible in the current 3D view. The check if the curve points are visible is done by checking if there is any control point that is not occluded. Occlusion check is expensive and so it is only done if a control point is visible, otherwise the previous result of the occlusion check will be used. This is not a good choice, as the curve may become visible or occluded while none of the control points are shown. If we turn off the occlusion check then the curve label would be always visible, which would mean all curve names would always be visible in all 3D views, regardles if the curve is occluded or not.

For now, you can force display of the property label by enabling occluded visibility or show one control point.

I’ve added an issue to make determination of curve visibility better:

> <https://github.com/Slicer/Slicer/issues/7665>
>
> \## Summary
> 
> A curve's properties label is not displayed if none of the curve p…oints are visible in the current 3D view. However, someone may want to show just a curve without any control points (e.g., because it is a curve with many control points and the control points would clutter the view).
> 
> https://discourse.slicer.org/t/slicer-3d-view-not-displaying-labels-of-markup-curves-properly/34364/3
> 
> \## Steps to reproduce
> 
> \- Create a curve =\> properties label is visible in 3D view, showing the node's name
> \- Hide all control points
> \- Save scene, close scene, load the saved scene =\> properties label is not visible =\> ERROR: the label should be visible
> 
> \## Environment
> \- Slicer version: Slicer-5.7.0-2024-03-28
> \- Operating system: Windows

---

<div class="post-metadata">

### Author: ![ruili](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@ruili](https://discourse.slicer.org/u/ruili)
#### Post date: [April 26, 2024, 4:16pm UTC](https://discourse.slicer.org/t/slicer-3d-view-not-displaying-labels-of-markup-curves-properly/34364/6 "2024-04-26T16:16:40Z")

</div>

Thank you for checking this!

> you can force display of the property label by enabling occluded visibility

Can I please ask where I can change this setting? The other option to show one control point for each curve might be too troublesome for me, as I have many curves to load.
