Hi Amir,

Thank you - that's exactly what I was looking for! Solved my problem.

Kind regards,

Bertram

From: Kalali, Amir [mailto:a.kal...@dkfz-heidelberg.de]
Sent: 19 June 2018 11:05
To: Dinkelacker, Stefan <s.dinkelac...@dkfz-heidelberg.de>; Bertram 
Sabrowsky-Hirsch <bertram.sabrowsky-hir...@risc-software.at>; 
mitk-users@lists.sourceforge.net
Subject: RE: DataInteractor: IntLeaveWidget

Hi Bertram,

I don't know If I understood you correctly but you might take a look at 
QmitkRenderWindow::leaveEvent.
Here a mouse move that leaves a render window is recognized and an internal 
event 'LeaveRenderWindow' is created and handled.
You might check e.g. the 'BoundingShapeInteraction.xml' to see the use of this 
leave render window event.

Best,
Amir

From: Dinkelacker, Stefan [mailto:s.dinkelac...@dkfz-heidelberg.de]
Sent: Tuesday, 19 June, 2018 10:32
To: 'Bertram Sabrowsky-Hirsch'; 
mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>
Subject: Re: [mitk-users] DataInteractor: IntLeaveWidget

Oh snap. ._. Please let us know if you found a solution.

From: Bertram Sabrowsky-Hirsch 
[mailto:bertram.sabrowsky-hir...@risc-software.at]
Sent: Dienstag, 19. Juni 2018 10:27
To: Dinkelacker, Stefan; 
mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>
Subject: RE: DataInteractor: IntLeaveWidget

Hi Stefan,

I thought about that too but the problem is that there are no more MouseMove 
events once the cursor leaves the RenderWindow so checking the coordinates in a 
condition won't help.

Kind regards,

Bertram

From: Dinkelacker, Stefan [mailto:s.dinkelac...@dkfz-heidelberg.de]
Sent: 19 June 2018 10:14
To: Bertram Sabrowsky-Hirsch 
<bertram.sabrowsky-hir...@risc-software.at<mailto:bertram.sabrowsky-hir...@risc-software.at>>;
 mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>
Subject: RE: DataInteractor: IntLeaveWidget

Hi Bertram, I didn't dig deeper into this to check if there isn't something 
like a working MouseLeave event but you always can, for example, add a 
condition to your statemachine [1] and check yourself in the callback function 
if the new mouse coordinates are still inside the renderwindow and if they are 
not traverse to another custom state like MouseLeft or something like that and 
react appropriately.

Best,
Stefan

[1] http://docs.mitk.org/2016.11/DataInteractionPage.html

From: Bertram Sabrowsky-Hirsch 
[mailto:bertram.sabrowsky-hir...@risc-software.at]
Sent: Dienstag, 19. Juni 2018 10:00
To: Dinkelacker, Stefan; 
mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>
Subject: RE: DataInteractor: IntLeaveWidget

Hi Stefan,

Thanks for the suggestion, however when trying the Segmentation plugins eraser 
tool I noticed that it has the exact same problem that I'm trying to solve: 
When leaving the RenderWindow the eraser shape stays at the position of the 
last MouseMove event until the mouse enters any of the RenderWindows again. Is 
there no way to detect the mouse leaving the window?

Kind regards,

Bertram


From: Dinkelacker, Stefan [mailto:s.dinkelac...@dkfz-heidelberg.de]
Sent: 18 June 2018 19:12
To: Bertram Sabrowsky-Hirsch 
<bertram.sabrowsky-hir...@risc-software.at<mailto:bertram.sabrowsky-hir...@risc-software.at>>;
 mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>
Subject: AW: DataInteractor: IntLeaveWidget

Hi,

I don't know about IntLeaveWidget, but there is an eraser tool in the 
segmentation plugin that uses the 
PressMoveReleaseWithCTRLInversionAllMouseMoves interaction statemachine. This 
interaction is located in the Resources/Interactions folder of the Segmentation 
module.

Best,
Stefan

Von: Bertram Sabrowsky-Hirsch [mailto:bertram.sabrowsky-hir...@risc-software.at]
Gesendet: Monday, June 18, 2018 3:56 PM
An: mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>
Betreff: [mitk-users] DataInteractor: IntLeaveWidget

Hi everyone,

I am trying to implement a DataInteractor for an Eraser tool.
For this I want to visualize the erasers Region in the RenderWindow.
I figured that I can do this using a mitk::Annotation2D to render a 
Shape(transparent circle) that I reposition on every MouseMove event.
However, there is no MouseMove event once the cursor leaves the RenderWindow. 
The shape than just stays at the last position within the window.
When I looked for a solution, I stumbled over DataInteractor::IntLeaveWidget 
which, according to the comment is an internal event.
However, connecting to this event, directly (CONNECT_FUNCTION) or in the 
StateMachine configuration (transition with event_class="InternalEvent" 
event_variant="LeaveWidget") has no effect.
Is this internal event still in use and if so, how can I connect to it? Are 
there other approaches to this problem?

Kind regards,

Bertram
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to