[vtkusers] Mouse Interaction with vtkImagePlaneWidget
Aaron Cois
aaron_vtk at yahoo.com
Tue May 25 14:22:24 EDT 2004
I am attemmpting to get the coordinates of a mouse
click on a vtkImagePlaneWidget. I believe (please
correct me if i am wrong, I am not that experienced
with vtk) that the best way to do this is to write a
callback handler (deriving from vtkCommand), which i
did, and to then add it as an observer to the
vtkImagePlaneWidget. However, this seems to have no
effect. My code basically looks like:
m_ImagePlane2D->AddObserver(vtkCommand::LeftButtonPressEvent,m_MouseCallbackHandler);
m_ImagePlane2D->EnabledOn();
m_ImagePlane2D->InteractionOn();
m_ImagePlane2D->On();
Can anyone give me some help?
(Note: I have tested the callback function by adding
an observer using it to the window interactor...it
works fine, but naturally that only gives me mouse
clicks outside of the image plane, not within)
-Aaron
---------------------------------
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040525/90c2c4e2/attachment.htm>
More information about the vtkusers
mailing list