[vtkusers] Ray interesection with volume - finding the mouse position
polys_poly at hotmail.com
polys_poly at hotmail.com
Thu May 8 09:19:24 EDT 2008
Actually i want to be able to pick some actors (polygons) that i am rendering with the brain volume so that i can calculate and display the surface area of the picked actor.
In the beginning i asked about finding the mouse position but this is not needed since i found out about the pick functions of VTK (i'm a newbie). Hope the links you gave me will help
Thanks, Polys
From: Julian Ibarz
Sent: Thursday, May 08, 2008 4:13 PM
To: polys_poly at hotmail.com ; vtkusers at vtk.org
Subject: Re: [vtkusers] Ray interesection with volume - finding the mouse position
I don't know what you want exactly but if you want to find the points of the volume or the actors picked by the mouse you have in the VTK nightly version :
http://www.vtk.org/doc/nightly/html/classvtkPointPicker.html
http://www.vtk.org/doc/nightly/html/classvtkPropPicker.html
To get the mouse position :
http://www.vtk.org/doc/nightly/html/classvtkRenderWindowInteractor.html
You are working with what programming language ? C++ ? Java ? other ? To get the mouse position it's change with the language. For example in java you create a vtkCanvas to draw the rendering and override the methode MouseMoveEvent(MouseEvent e) to get the new position of the mouse when it moves and get the position with e->x and e->y...
This answers your question ?
2008/5/8 <polys_poly at hotmail.com>:
Hello,
Currently i am creating a volume of a DICOM Dataset. The interactor i am using is vtkInteractorStyleTrackballCamera.
What i want to do is finding the mouse pointer location on the rendering window, and then finding the ray that connects the position of the camera with the mouse position so i can find the points of the volume or the actors that this ray intersects.
I would appreciate any help on this subject.
Thanks,
Polys
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
--
Julian Ibarz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080508/d8614a86/attachment.htm>
More information about the vtkusers
mailing list