Hi Miklos,

I just made some additional changes, because completely deactivating the 
display interactions during tool activation was too intrusive and caused some 
issues,
if you do another update of the master you will find a configuration file that 
describes the display interactors behavior during tool activation.

In this file you can set up how the display interactor should react while the 
user works with the tools, when the tool is deactivated the standard 
configuration will be restored.
The events for standard behavior are described in the file
/Core/Resources/Interactions/DisplayConfigMITK.xml

To which events it reacts during tool activation is described in:
/Core/Resources/Interactions/Legacy/DisplayConfigMITKTools.xml

There you can deactivate whatever you do not want to have during tool 
activation, or assign different mouse /key events  to the actions. I attached a 
commented file that disables slice panning, as this was your original problem, 
as an example. Using the attached file as a replacement should fix your problem.
I'll include a more detailed description of this process in the migration guide.

Please let me know how this works out,

Regards
Christian



Von: Miklos Espak [mailto:[email protected]]
Gesendet: Donnerstag, 28. März 2013 11:17
An: Weber, Christian(1)
Cc: Clarkson, Matt; mitk-users
Betreff: Re: [mitk-users] GlobalInteraction::INFORM_ONE

Thank you very much for the quick fix. I started a build, but the OpenCV seems 
to be broken in MITK, so I disabled it, but this caused many errors in our 
build that I started to work around, but this is still not finished.

Regards,
Miklos

<!--
* - MITK : The legacy handling for Tools.
    Describes which events should trigger an event_variant.
    The corresponding event_variants and their actions are declared in DisplayConfig.xml (in /Resources/Interactions).
    If no event_variant is specified here, this action is disabled during the activation of a tool.
    So if an action here conflicts with you tool you can comment out this section.
    ! Alternatively you can also just change the event description, so that the actions are triggered by different mouse/key events
    during Tool use. !
    Refer to 'How to create a Config-File' http://docs.mitk.org/nightly-qt4/Step10Page.html for details.

*   - middle mouse button : panning
*   - right mouse button  : zooming
*   - wheel               : scrolling
-->
<config>
  <!-- Zoom sensitivity -->
  <param name="zoomFactor" value="5"/>
  <!-- Zoom either by moving mouse leftright or updown -->
  <param name="zoomDirection" value="leftright"/>
  <!-- react to an event, even tough is was already processed by a DataInteractor-->
  <param name="alwaysReact" value="false"/>
  <!-- Moving -->
  <!-- uncommenting the "Move" section causes the interactor to no longer react to these events, hence deactivating it
  //  Alternatively you can change to which events it should, for example by changing it to:
  Example:
  ---
  <event_variant class="MousePressEvent" name="StartMove">
    <attribute name="EventButton" value="MiddleMouseButton"/>
    <attribute name="Modifiers" value="shift"/>
  </event_variant>  
  ---
  This would initiate the panning only when the middle mouse button is pressed while the shift key is pressed down.

  Old Code:
  <event_variant class="MousePressEvent" name="StartMove">
    <attribute name="EventButton" value="MiddleMouseButton"/>
  </event_variant>
  <event_variant class="MouseReleaseEvent" name="EndMoving">
    <attribute name="EventButton" value="MiddleMouseButton"/>
  </event_variant>
  <event_variant class="MouseMoveEvent" name="Moving">
    <attribute name="ButtonState" value="MiddleMouseButton"/>
  </event_variant>
  -->
  <!-- Zooming -->
  <event_variant class="MousePressEvent" name="StartZoom">
    <attribute name="EventButton" value="RightMouseButton"/>
  </event_variant>
   <event_variant class="MouseMoveEvent" name="Zooming">
    <attribute name="ButtonState" value="RightMouseButton"/>
  </event_variant>
  <event_variant class="MouseReleaseEvent" name="EndZooming">
    <attribute name="EventButton" value="RightMouseButton"/>
  </event_variant>
  <!-- Scrolling trough planes -->
  <event_variant class="MouseWheelEvent" name="PlaneUP">
    <attribute name="ScrollDirection" value="up"/>
  </event_variant>
  <event_variant class="MouseWheelEvent" name="PlaneDown">
    <attribute name="ScrollDirection" value="down"/>
  </event_variant>
</config>
------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to