[vtkusers] vtkPicker returned actor

Lonni Besançon lonni.besancon at gmail.com
Sun Feb 28 12:30:42 EST 2016


Yes right sorry about the bad explanations.

So I have a Volume and a slicing plane. Both of them can move and rotate in
the 3D space. The slicing plane gives me a rendering the a slice of the
volume according to their positions. I actually always display this slice at
the same position and orientation on screen.
That's why I do not use the z-value returned by GetMapperPosition() which is
always 0 in my case.
Indeed, in my case the mapper is the mapper of my slicing plane, which is
always displayed on my screen as parallel to the screen.

My screen only shows the slice of the volumetric data. The volume itself is
not pickable. However I would like to know where, knowing where the slicing
plane and the volume are, exactly where in the volumetric data is located
the point under my finger.

For instance, imagine that my dataset is in its original position (no
rotation or translation applied to it), and my plane is parallel to my
screen at a given depth d in my volume. 
Let's say pos is the vector representing the position of my finger given by
GetMapperPosition().
By simply multiplying pos.x and pos.y by the dimensions of my data along the
x and y axis, and then setting pos.z with the depth d, I can locate my
finger's position in my volumetric data.

However this is not so simple if we consider a case where both the plane and
the volume have moved.

Hope it's not too complicated and it got clearer now.

Thanks again for the help 



--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkPicker-returned-actor-tp5736763p5736902.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list