[vtkusers] mouse interaction with vtkImagePlaneWidget

Aaron Cois aaron_vtk at yahoo.com
Tue May 25 12:03:53 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!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040525/5659550b/attachment.htm>


More information about the vtkusers mailing list