[vtkusers] Mouse interaction with vtkImagePlaneWidget
Aaron Cois
aaron_vtk at yahoo.com
Tue May 25 11:53:49 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.
http://messenger.yahoo.com/
More information about the vtkusers
mailing list