[vtkusers] vtkpointpicker

David Gobbi dgobbi at irus.rri.ca
Thu Jul 5 11:57:43 EDT 2001


Hi Matt,

As far as I know, picking doesn't work with 2D actors.  Someone
correct me if I'm wrong.  You'll have to write the math to convert
mouse coordinates to image data coordinates yourself.

 - David

On Thu, 5 Jul 2001, Matthias Zangl wrote:

> Hello out there!
>
> I just get mad with trying the vtkpointpicker. I modified the
> sliceviewer.py-example in a way, that there 's a pointpicker.
>
> In class SliceViewer I added:
>
> self._picker = vtkPointPicker()
> self._picker.SetTolerance(0.01)
>  .
> .
>  .
> self._Interactor.SetPicker(self._picker)
>  .
> .
>
> And then I used the slide-event - only for testing purposes to fire a
> pick-event.
>
> def Slide(self,x,y):
>         self._picker.Pick(x,y,0,self._Renderer)
>         print x,y,self._picker.GetPointId()
>
> But, I don't know why, the point-Id is always -1. Did I forget something to
> initialize or do I've to take care on other things? Or maybe its a known
> problem in the nightly build (about 2 weeks old).
>
> bye,
> Matt
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>





More information about the vtkusers mailing list