[vtkusers] vtkPicker picks an actor that isnt remotely close to the pick point

kent williams nkwmailinglists at gmail.com
Tue Jun 2 14:00:56 EDT 2009


Sorry, no idea.  I'd try some arbitrary small number and see what
works.  You might try reading the source code and see how it's using
the tolerance -- it will give you a better idea of what values would
make sense for your application.

On Sun, May 31, 2009 at 9:34 AM, John Eke <tonee47 at yahoo.com> wrote:
> Thanks a lot! That worked. What I need is for there to be no tolerance AT
> ALL, regardless of the size of the render window. Is there a fixed value I
> can set for this effect? I tried zero, and that didnt work.
>
> - John E
>
> ________________________________
> From: kent williams <nkwmailinglists at gmail.com>
> To: John Eke <tonee47 at yahoo.com>
> Cc: vtkusers at vtk.org
> Sent: Thursday, May 28, 2009 2:32:21 PM
> Subject: Re: [vtkusers] vtkPicker picks an actor that isnt remotely close to
> the pick point
>
> the vtkPicker class lets you set the tolerance, for picking.  The
> default tolerance is apparently a bit too loose for your taste.
>
> From the documentation:
>
>> virtual void vtkPicker::SetTolerance(double)    [virtual]
>>
>> Specify tolerance for performing pick operation. Tolerance is specified as
>> fraction of rendering window size.
>> (Rendering window size is measured across diagonal.)
>
> The way this works is a little squirrelly, because you probably care
> about a maximum distance from the exact pixel center, in pixels.  But
> this function wants a fraction of the window size (as measured
> diagonally), which you'll have to compute based on the window
> geometry.  And if your window can be resized, you'll have to watch for
> resize events and update the picker tolerance.
>
> But the reason you can pick a few voxels away from the particular
> voxel is that it's tricky to pick small features with the mouse
> pointer.  If you set the tolerance too low, it will make it rough for
> users to pick anything.
>
> On Thu, May 28, 2009 at 9:02 AM, John Eke <tonee47 at yahoo.com> wrote:
>> Hi Guys,
>>
>> I have a scenario where I am trying to enable annotations on images
>> displayed in a vtkImageActor. When I click on the image, I place a small
>> marker at that point on the image. Now when I click on that marker, it
>> allows me to do other things like enter notes etc.
>>
>> Problem is, I use vtkPicker to do the pick, and when I click on the marker
>> it works, problem is I move several pixels AWAY from the marker and when I
>> attempt a pick, I still pick the same marker. It seems the markers have a
>> few pixels around them where if you click, you can still pick the actor.
>> IS
>> there any way to change this? Are there any params in vtkPicker I can set
>> to
>> make sure that the markers should ONLY be picked if the intersect DIRECTLY
>> with the pick point?
>>
>> Thanks
>>
>> John E
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
>



More information about the vtkusers mailing list