[vtkusers] Ray interesection with volume - finding the mouse position

Julian Ibarz julian.ibarz at gmail.com
Thu May 8 09:13:31 EDT 2008


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/5c8d2cd1/attachment.htm>


More information about the vtkusers mailing list