[vtkusers] picking widget behind vtkImageActor

Miroslav Drahos mdrahos at thinksurgical.com
Mon Apr 13 15:53:21 EDT 2015


Hi VTK folks,
I am rendering vtkImageActor and a bunch of vtkHandleWidget widgets in the scene. vtkImageActor (its mapper) is setup to slice at the focal point and always face camera, and Pickable is set to 1.
The problem is that the handle widget is picked even when it is hidden beyond the vtkImageActor slice, which is not what I want -- I would like the picking to stop at the first prop encountered. 
I believe that the handle widget's picker is setup to pick from list, and the widget rep is the only prop in the list, so the picker ignores vtkImageActor completely. I am trying to come up with a solution so that when the picking ray hits the image actor, it stops and all other props behind it are ignored.
I could add the imageactor to the handle rep's picker, and then check whether image was picked, but it seems like a heavy-handed solution, especially since I am using multiple different representations at the same time. 
Anyone has encountered this before or has an idea how to prevent the picking behind vtkImageActor?
Thank you tons,
Miro


More information about the vtkusers mailing list