[vtkusers] vtkPicker returned actor

Lonni Besançon lonni.besancon at gmail.com
Mon Feb 29 18:41:22 EST 2016


Hi David,

Thanks a lot for everything.
I will try that tomorrow morning. Getting kinda late here. I’ll keep you posted.

Thanks again.

Have a good evening(?)


Best 






> On 01 Mar 2016, at 00:19, David Gobbi [via VTK] <ml-node+s1045678n5736943h26 at n5.nabble.com> wrote:
> 
> Hi Lonni,
> 
> Regarding picker->PickTextureOn(), I looked through the code and the
> docs, and it only moves the results of GetPointIJK(), GetCellIJK(), and
> GetPCoords() into the vtkTexture input data space.  GetMapperPoint() still
> returns the coord in the vtkPolyDataMapper input space.
> 
> So to get the data coords in the texture's data space, you'd have to do
> something like this pseudocode:
> 
> ix, iy, iz = picker->GetCellIJK()
> px, py, pz = picker->GetPCoords()
> x = origin[0] + (ix + px - 0.5)*spacing[0]
> y = origin[1] + (iy + py - 0.5)*spacing[1]
> z = origin[2] + (iz + pz - 0.5)*spacing[2] 
> 
> The above should give accurate data coords within the image space of
> the vtkTexture's input.
> 
> 
> Moving on to your latest email:
> 
> If you are getting the position with picker->GetMapperPosition(), and if I
> understand your pipeline properly, then the only matrix you need to apply
> to that position is the ResliceAxes matrix.  If that's not working, then maybe
> I still don't completely understand your pipeline (but I'm getting exhausted).
> 
> If you were getting the position in world coordinates, with GetPickPosition(),
> then you would have to apply the inverse of the actor matrix to move from
> world coordinates to data coordinates.  But rather than use GetPickPosition(),
> I believe it is better to instead get the data coords as I outlined above.
> 
>  - David
> 
> 
> 
> 
> _______________________________________________ 
> Powered by www.kitware.com 
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html <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 <http://www.vtk.org/Wiki/VTK_FAQ>
> 
> Search the list archives at: http://markmail.org/search/?q=vtkusers <http://markmail.org/search/?q=vtkusers>
> 
> Follow this link to subscribe/unsubscribe: 
> http://public.kitware.com/mailman/listinfo/vtkusers <http://public.kitware.com/mailman/listinfo/vtkusers>
> 
> 
> If you reply to this email, your message will be added to the discussion below:
> http://vtk.1045678.n5.nabble.com/vtkPicker-returned-actor-tp5736763p5736943.html <http://vtk.1045678.n5.nabble.com/vtkPicker-returned-actor-tp5736763p5736943.html>
> To unsubscribe from vtkPicker returned actor, click here <http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5736763&code=bG9ubmkuYmVzYW5jb25AZ21haWwuY29tfDU3MzY3NjN8MTcxODAwMTkxOA==>.
> NAML <http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkPicker-returned-actor-tp5736763p5736944.html
Sent from the VTK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160229/3ae772b7/attachment.html>


More information about the vtkusers mailing list