Hide non visible labels on a 3d model

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Hide non visible labels on a 3d model

Fernando Nellmeldin
Hello.
I'm trying to show the values of a contour as labels. Each label is fixed to a point in the contour. I do not want to show the labels that are anchored to points that are not visible. 

To achieve this, I followed these two examples: 

Unfortunately, the removal of hidden points (and thus, of labels) is not working as expected. I attach three pictures of the behavior when I move the camera. Look at the values on the top (365 and 399).

The Pipeline I am using is the following:
vtkUnstructuredGrid -> vtkGeometryFilter -> vtkContourFilter -> vtkStripper -> (create a vtkPolyData with one point of each contour) -> vtkSelectVisiblePoints -> vtkLabeledDataMapper -> vtkActor2D.

I am using VTK 5.10 but I tried with VTK 6.3 and the problem is worse (nothing is hidden). This is under Windows 8.1.

Any ideas?

Thank you.


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers

contour_labels_problem.png (211K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Hide non visible labels on a 3d model

Fernando Nellmeldin
Hello. 
Does anyone has any tips? 
Thank you.

2016-01-25 10:39 GMT+01:00 Fernando Nellmeldin <[hidden email]>:
Hello.
I'm trying to show the values of a contour as labels. Each label is fixed to a point in the contour. I do not want to show the labels that are anchored to points that are not visible. 

To achieve this, I followed these two examples: 

Unfortunately, the removal of hidden points (and thus, of labels) is not working as expected. I attach three pictures of the behavior when I move the camera. Look at the values on the top (365 and 399).

The Pipeline I am using is the following:
vtkUnstructuredGrid -> vtkGeometryFilter -> vtkContourFilter -> vtkStripper -> (create a vtkPolyData with one point of each contour) -> vtkSelectVisiblePoints -> vtkLabeledDataMapper -> vtkActor2D.

I am using VTK 5.10 but I tried with VTK 6.3 and the problem is worse (nothing is hidden). This is under Windows 8.1.

Any ideas?

Thank you.




--
Fernando NELLMELDIN
Software Engineer
_______________________________________________________________

Open Engineering s.a.

Rue Bois Saint-Jean 15/1
B-4102 Seraing (Belgium)
Tel: +32.4.353.30.34


_________________________________________________________________________


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Hide non visible labels on a 3d model

Yumin Yuan
Hi Fernando,

You got a quite complicated pipeline here :). Just a thought without knowing all the details, you may try to decrease the Tolerance value in vtkSelectVisiblePoints. The default value might not work well with your data.

Yumin

On Thu, Jan 28, 2016 at 11:23 AM, Fernando Nellmeldin <[hidden email]> wrote:
Hello. 
Does anyone has any tips? 
Thank you.

2016-01-25 10:39 GMT+01:00 Fernando Nellmeldin <[hidden email]>:
Hello.
I'm trying to show the values of a contour as labels. Each label is fixed to a point in the contour. I do not want to show the labels that are anchored to points that are not visible. 

To achieve this, I followed these two examples: 

Unfortunately, the removal of hidden points (and thus, of labels) is not working as expected. I attach three pictures of the behavior when I move the camera. Look at the values on the top (365 and 399).

The Pipeline I am using is the following:
vtkUnstructuredGrid -> vtkGeometryFilter -> vtkContourFilter -> vtkStripper -> (create a vtkPolyData with one point of each contour) -> vtkSelectVisiblePoints -> vtkLabeledDataMapper -> vtkActor2D.

I am using VTK 5.10 but I tried with VTK 6.3 and the problem is worse (nothing is hidden). This is under Windows 8.1.

Any ideas?

Thank you.




--
Fernando NELLMELDIN
Software Engineer
_______________________________________________________________

Open Engineering s.a.

Rue Bois Saint-Jean 15/1
B-4102 Seraing (Belgium)
Tel: <a href="tel:%2B32.4.353.30.34" value="+3243533034" target="_blank">+32.4.353.30.34


_________________________________________________________________________


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Hide non visible labels on a 3d model

Fernando Nellmeldin
Hello and thank you for your response.
Indeed I have tried with different Tolerance values. The screenshots were made with tolerance of 0.001. 
Right now (after your message), I'm using 0.0001. It improved the behavior but still I have some annoying flickering (labels appear and disappear) when I move the camera. 

Thank you.

2016-01-28 19:32 GMT+01:00 Yumin Yuan <[hidden email]>:
Hi Fernando,

You got a quite complicated pipeline here :). Just a thought without knowing all the details, you may try to decrease the Tolerance value in vtkSelectVisiblePoints. The default value might not work well with your data.

Yumin

On Thu, Jan 28, 2016 at 11:23 AM, Fernando Nellmeldin <[hidden email]> wrote:
Hello. 
Does anyone has any tips? 
Thank you.

2016-01-25 10:39 GMT+01:00 Fernando Nellmeldin <[hidden email]>:
Hello.
I'm trying to show the values of a contour as labels. Each label is fixed to a point in the contour. I do not want to show the labels that are anchored to points that are not visible. 

To achieve this, I followed these two examples: 

Unfortunately, the removal of hidden points (and thus, of labels) is not working as expected. I attach three pictures of the behavior when I move the camera. Look at the values on the top (365 and 399).

The Pipeline I am using is the following:
vtkUnstructuredGrid -> vtkGeometryFilter -> vtkContourFilter -> vtkStripper -> (create a vtkPolyData with one point of each contour) -> vtkSelectVisiblePoints -> vtkLabeledDataMapper -> vtkActor2D.

I am using VTK 5.10 but I tried with VTK 6.3 and the problem is worse (nothing is hidden). This is under Windows 8.1.

Any ideas?

Thank you.




--
Fernando NELLMELDIN
Software Engineer
_______________________________________________________________

Open Engineering s.a.

Rue Bois Saint-Jean 15/1
B-4102 Seraing (Belgium)
Tel: <a href="tel:%2B32.4.353.30.34" value="+3243533034" target="_blank">+32.4.353.30.34


_________________________________________________________________________


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers





--
Fernando NELLMELDIN
Software Engineer
_______________________________________________________________

Open Engineering s.a.

Rue Bois Saint-Jean 15/1
B-4102 Seraing (Belgium)
Tel: +32.4.353.30.34


_________________________________________________________________________


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers