[vtkusers] vtkPicker returned actor

David Gobbi david.gobbi at gmail.com
Sun Feb 28 14:07:49 EST 2016


If you are using a vtkTexture and if you want to pick the image
data for the texture, you can tell the picker to do this:

picker->PickTextureDataOn();

Then GetMapperPosition() will return the data coords for the
image that is the input to the vtkTexture.

If the input to vtkTexture is the output from vtkImageReslice,
and if you want to convert the position into the data coords
for the input of vtkImageReslice, then use the ResliceAxes
matrix to do this:

volumePosition = axes->MultiplyPoint(mapperPosition);

Do not invert the matrix.  Also, do not use the actor's matrix.
You would need the actor's matrix if you were getting world
coords, but you aren't.  Your getting mapper coords (which
are data coords).

If you're using the vtkImageReslice ResliceTransform, then
you'll have to use it to transform the position.

Hope this answers your original question.

 - David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160228/3384a5ce/attachment.html>


More information about the vtkusers mailing list