[vtkusers] Re: vtkImagePlaneWidget issues RESOLVED!

robert tamburo rtamburo2000 at yahoo.com
Fri Sep 9 03:53:10 EDT 2005


I did some digging through the code and found ways to
fix my issues. Just to summarize the issues:
1. Disabling the rotation of a vtkImagePlaneWidget
2. LeftButtonPressEvent not being triggered correctly
for an observer

For 1, I added the ability to enable/disable rotation
with SetRotationEnabled(). In OnMouseMove(),
RotationEnabled is checked with the state Rotating. 

I believe the "correct" way to do it is add virtual
functions for RotationEnabledOff and RotationEnabledOn
and making the variable RotationEnabled protected. I
didn't test this because I was scared to rebuild VTK
:)

For 2, when a LeftButtonPressEvent is triggered the
function OnLeftButtonDown() is called. However, at the
end of the function a StartInteractionEvent is
triggered instead of a LeftButtonPressEvent. I changed
it such that a LeftButtonPressEvent is triggered
instead. It seems to work fine and not break anything.

I've attached the changes to the code. For quick
reference, I added "RJT added this" next to any code
that I added. It'd be great if these changes could be
added to the toolkit (assuming they don't break
anything).

Thanks!
-Robert

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkImagePlaneWidget.cxx
Type: text/x-c++src
Size: 68297 bytes
Desc: 1565015393-vtkImagePlaneWidget.cxx
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050909/f8e9a0a4/attachment.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkImagePlaneWidget.h
Type: text/x-chdr
Size: 18273 bytes
Desc: 1647831107-vtkImagePlaneWidget.h
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050909/f8e9a0a4/attachment.h>


More information about the vtkusers mailing list