[vtkusers] Two questions about handling multitouch events in VTK

HuaweiTu tuhuawei09 at gmail.com
Sat Dec 22 02:05:02 EST 2012


Hi all, 

I am working on a project of 3D anatomy visualization on multitouch devices.
I want to use VTK for 3D visualization and WPF for multitouch interaction.
One difficult part in this project is how to translate a multitouch event to
a corresponding mouse event because VTK can handle only mouse events and
keyboard events. For example, when WPF detects a “zoom in” event, VTK can
trigger a MouseWheelBackwardEvt event. I have two questions when doing so. 

1.How to trigger a MouseWheelBackwardEvt event in VTK? I did the following
coding, but it can not work. 
renWin = vtkRenderWindow.New(); 
iren = vtkRenderWindowInteractor.New(); 
iren.SetRenderWindow(renWin); 

vtkInteractorStyleUser interactorStyleUser = vtkInteractorStyleUser.New(); 
iren.SetInteractorStyle(interactorStyleUser); 
interactorStyleUser.InvokeEvent((uint)vtkCommand.EventIds.
MouseWheelBackwardEvent); 

2.A “zoom in” event of WPF has some parameters which are used to describe
the event, such as x, y coordinates. How to pass the parameters to
MouseWheelBackwardEvt event in VTK? This one may work:
SetEventInformation(int x, int y, int ctrl, int shift, sbyte keycode, int
repeatcount, string keysym), but I do not know how to use it. 

I am new to VTK and WPF. So could someone give me some hints to solve these
problems? Or could someone think better ways to handle multitouch events in
VTK? PS: Because I am doing this under C# environment, so it would be nice
to present examples using C# . 

I appreciate any help I can get. 



--
View this message in context: http://vtk.1045678.n5.nabble.com/Two-questions-about-handling-multitouch-events-in-VTK-tp5717708.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list