[vtkusers] (no subject)
Amy Henderson
amy.henderson at kitware.com
Thu Nov 1 15:25:02 EST 2001
vtkPointPicker should work, assuming you are trying to retrieve point
data. Use the Pick method to pick a point on the surface. The first 2
parameters (x and y) are the x and y pixel coordinates. The z parameter
should be set to 0. The 4th parameter is the renderer you are using. If
you get a non-zero back from Pick (meaning that a point was successfully
picked), call GetPointId, which returns the point id of the picked
point. You can use that information to get the scalar value associated
with that point:
[[dataSet GetPointData] GetScalars] GetScalar $i
(where i is the value you got from GetPointId).
You may also need to specify the tolerance in the picker to determine how
close you have to be to a point in the data set for it to be considered
"picked".
- Amy
At 01:17 PM 11/1/2001 +0000, vtk_project at bonusfive.com wrote:
>Hi. We're trying to retrieve points on polygon data
>based on the position of the mouse pointer, and then
>trying to return the scalar value associated with that
>point (all in tcl). So far, we've tried using a
>vtkStyleInteractorUser which is giving what seems to be
>just the x and y position in the window, not relevant
>to the data. We thought that maybe using the GetZ?
>function would yield coordinates we could use to
>retrieve the scalar values, but we can't get GetZ
>working. Is this a situation where point picking is
>used? If so, how is that done? And how do we isolate
>scalar values based on point? Thank you for any help
>you can give. (Background note: This is a student
>project at UMBC on haptic display of surface certainty;
>the scalar values will be used by a Phantom device to
>give haptic feedback based on the user's pointing
>position)
>
>-Andy Grossman and Kirk
>Petri
>
>_______________________________________________
>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