Hi guys,

I made some changes to my MITK fork and I wonder if you might be interested. Basically, I modified DisplayInteractor to support simple clicks, as well as ctrl and shift clicks that find the picked node using the basic picking interface. This can be enabled/disabled by using the MouseModeSwitcher with a new "Picking" mouse mode.

The only thing that needs to be changed is access to some selection provider which would inform all the views about selection change. I would need some help regarding how to make this properly. Should DisplayInteractor expose some picking events and the QstdMultiWidgetEditor would listen to? Then this editor should be a selection provider itself. Is this the way to go?

Please answer some time soon.

Rostislav.

On 25/08/2014 22:09, Rostislav Khlebnikov wrote:
Just tried a simple implementation of this approach and it works perfectly. Would you agree with this change? Should I make a /yet another/ pull request? :)

Rostislav.

On 25/08/2014 22:03, Rostislav Khlebnikov wrote:
Hi guys,

I'm implementing the interactor to select some specific sub-objects but
I have a problem making it work with the display interactor.

Basically, I want the following quite natural behavior in 3D window:
   - if a user clicks on the object of interest - it should be selected
   - if a user clicks and drags - the view should rotate without
triggering the selection

Basically, I have a DataInteractor that processes mouse release events
in the state machine. What I do within it is the following:

   Within FilterEvents method:
   - On mouse press event, I record that dragging might have started and
return mitk::DataInteractor::FilterEvents,  which as far as I understand
leads to returning true if there are any transitions for this event . In
this case, I have no transitions for that event, so it is being passed
to the vtk interactor style, which starts rotation.
   - On mouse move event, I record that dragging actually started, with
the same return value as above.
   - On mouse release event, I check if there was any actual dragging.
And if yes, I ignore the event by returning false so it would be passed
to the vtk interactor style to stop the rotation. But if not - there is
a transition and the event is accepted.

The problem is that the vtk interactor style does not get the mouse
release event in case a simple click was performed. Therefore it
continues rotating even though no actual dragging is performed.

What are your thoughts on how this can be fixed? What I see is that the
action's return value is not used at all (see
mitk::EventStateMachine::HandleEvent). Perhaps it could mean if the
event should be passed through, similar to FilterEvents?

Rostislav.

------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users



------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/


_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to