[vtk-developers] Picking a vtkImageActor does not work properly?

Peter Wainwright prw at ceiriog.eclipse.co.uk
Mon Aug 25 06:00:17 EDT 2008


Hi,

I've been working on an application which requires picking points on a
vtkImageActor and it seems to me that there is a bug.

vtkPicker::Pick by constructs a ray in data space and tests whether it
intersects the plane of the image within the bounding rectangle.

The algorithm for the point of intersection is wrong. Having obtained
the parameter t (the relative position of the intersection along the
ray), the subsequent calculation uses (t) in place of (1.0-t) and vice
versa.

Also, the calculation of t uses p2World[i] where as far as I can tell it
should have p2Mapper[i].

I have opened a bug for this issue,
http://www.vtk.org/Bug/view.php?id=7536 and I have attached a patch
which seems to "work for me" so far.

Regards,

Peter




More information about the vtk-developers mailing list