[vtkusers] Problem on picking vtkActor2D generated from vtkPNGReader

Tatiana Al-Chueyr Pereira Martins tati.alchueyr at gmail.com
Tue Oct 10 12:29:02 EDT 2006


-------------------------------------------------------------------------------------------------------------------
python  : 2.4.3
wxPython: 2.6.3.2
VTK     : 5.0
winxp
--------------------------------------------------------------------------------------------------------------------

Having read a png image (vtkPNGReader), I passed it through a mapper
(vtkImageMapper) and generated an actor2d (vtkActor2D). Then, I added
the actor
into wxVTKRenderWindowInteractor.

Also, I created a vtkPropPicker in order to check if the generated
actor was being clicked on.

This worked fine. The actor, by default, was inserted into the origin
and the picker recognized it.

However, when I tried to change the actor`s position, picker did not
identify the image anymore. Although the image changed place (I could
see it), the picker worked as if the actor was still in origin. :(

I thought that I might be creating the actor in an inappropriate way,
or positioning it using wrong methods. So, I generated an actor2d
based on vtkGlyphSource2D, used vtkPolyDataMapper2D, and tested
picking after changing its position. The picker worked fine.

Is there a bug on positioning actor2d generated from vtkPNGReader? Or
is there a
problem on vtkPropPicker?

Could someone help me? I really need to be able to pick actors
generated from images.

Thanks!

Tatiana



More information about the vtkusers mailing list