Hi Martin,

your right, this is strange. I filed a bug report (18699) and we will have a 
look at this today. 

The intention behind this code is as follows:
mitkDispatcher is aked if someone handles the event, and if it returns false,
it is passed to VTK, to allow VTK Interactor to deal with the events.

In 2D we handle the Display interaction with the DisplayInterator, in 3D the 
DisplayInteractor should (but currently doesn't) return false, and VTK takes 
the place to handle the events.
(Here the strange thing is that we still execute a lot of unnecessary code that 
seems to have no effect). 

Unfortunately I cannot give any good advice before I haven't completely figured 
out why it is currently like that and if it is possible to unify 2D and 2D 
behavior within the DisplayInteractor.  

I'd be happy if you keep us updated about your progress and the problems you 
run into!

Best,
Christian


-----Original Message-----
From: Martin Klemm [mailto:martin.kl...@hs-offenburg.de] 
Sent: Freitag, 30. Januar 2015 15:42
To: mitk-users@lists.sourceforge.net
Subject: [mitk-users] Pointless DisplayInteractor in VTK 3D render window

Hi all,

I am currently working on implementing touch interactions in my QML 
application. After I recognize gestures I send them to the display interactor 
to process them. I adapted the display interactor to work for GestureEvents. 
The events arrived but nothing was moving in the render window. I though that 
my parameters are wrong. So I wanted to check the parameters when a mouse event 
it handled.

The result were approximately the same values I already had before... So I dug 
deeper... I made a test in an void 
QmlMitkRenderWindowItem::mousePressEvent(QMouseEvent* me) which is the 
equivalent to void QmitkRenderWindow::mousePressEvent(QMouseEvent *me)

In there the incoming mouse event is converted into a mitk::mouseEvent and then 
passed to the dispatcher to be handled. The dispatcher sends it to display 
interactor to react. And at the end of the method the mouse event is passed to 
the vtk widget/quick item:
QVTKWidget::mousePressEvent(me);
respectively
QVTKQuickItem::mousePressEvent(me);

So I was wondering why you have to pass the mouse event to vtk if the display 
interactor is supposed to handle the event. I deactivated all calls of this 
sort and then no interaction was working anymore!!!

That means that we have a display interactor for this render window but in fact 
it has no influence on the interaction. Do I miss something or is it really 
like this? Is this a known issue?

I thought that I could send my gesture events to the display interactor to 
adapt the scene. But knowing about this, I think that I have to convert my 
touch events into mouse events and then send them to the QVTKQuickItem, since 
it is not supporting TouchEvents.

Does anyone has a better idea?

I forgot to mention above that this just happens in the 3D scene. In the 2D 
scenes the DisplayInteractor is working as expected, even when the events are 
not passed to the qvtkwidget/quickitem.

Best

Martin

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website, sponsored 
by Intel and developed in partnership with Slashdot Media, is your hub for all 
things parallel software development, from weekly thought leadership blogs to 
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to