Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curve title is not visible in 3D if all control points are hidden #7665

Open
lassoan opened this issue Mar 29, 2024 · 3 comments
Open

Curve title is not visible in 3D if all control points are hidden #7665

lassoan opened this issue Mar 29, 2024 · 3 comments
Assignees
Milestone

Comments

@lassoan
Copy link
Contributor

lassoan commented Mar 29, 2024

Summary

A curve's properties label is not displayed if none of the curve points 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

Workaround

Show one control point or force display of the property label by enabling occluded visibility.

Environment

  • Slicer version: Slicer-5.7.0-2024-03-28
  • Operating system: Windows
@lassoan lassoan added this to the Slicer 5.7 milestone Mar 29, 2024
@lassoan
Copy link
Contributor Author

lassoan commented Mar 29, 2024

@Sunderlandkyl could you help with this?
I'm wondering what could be a good solution:

  • somehow force visibility=true for the control point where the property label is displayed
  • determine what part of the curve is actually visible and display the label there (this would be a nicer solution, but may require more changes)
  • other...?

This is needed for SlicerHeart, too, for example in the Csaba's PDA vessel quantification module where all the vessel segments are labelled.

@Sunderlandkyl
Copy link
Member

Sunderlandkyl commented Apr 2, 2024

Is the issue only when loading a scene, or is it an issue that also comes up when using Slicer?

@lassoan
Copy link
Contributor Author

lassoan commented Apr 2, 2024

If the control points are visible but they get hidden then the control point visibility output is not updated anymore, so the property label is stuck at "always displayed" state.

If the control points were never visible (because the curve was loaded from a file) then the control point visibility is missing, so all control points are assumed to be hidden, so the property label is stuck at "always hidden" state.

Neither of these are good.

The main question is how to determine efficiently that the curve is visible, so that we don't clutter the scene with property labels of occluded curves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants