[vtkusers] picking problem

Greg Book gbook at gbook.org
Mon Aug 3 10:32:07 EDT 2009


I'm creating an application in which the user picks points on a 
vtkImagePlaneWidget and connects the points with lines. This is done 
in-plane with the imageplanewidget. This part works fine, but now I need 
to pick those existing in-plane points/cells and connect them in 3D. 
I've setup a cellpicker and I'm performing picks (mouseover, then hit 
'p'), but the cell ids that it returns don't make any sense. (I do turn 
off interaction and display of the imageplanewidgets when trying the 
picking).

When I create the points/cells I note the location and cell id that was 
created. when I do the picking, I note the same information... but the 
cell ids don't always match up.

For example, I create 4 points, with cell ids 0,1,2,3. I then do picking 
of the points in the same order, and get cell ids 1,4,5,3. The picked 
coordinates do match in 3D.

Where are these weird cell ids coming from? I never explicitly created a 
cell id 4 or 5... There is a bounding box around the imageplanewidget 
setup, maybe this is getting in the way? Also, why does a red box show 
up around my polydata when i hit 'p'?

I can include code if it helps in diagnosing this,
-Greg



More information about the vtkusers mailing list