Thank you so much Christian, this works very well!

Am I right that if I want to disable the middle button move with the tools
through the MITK API instead of modifying the xml in the MITK sources, then
I have to put the following code fragment after (or instead) setting the
notification policy to INFORM_ONE?

       std::list<mitk::ServiceReference> listEventObserver;
        ServiceTracker<InteractionEventObserver*>* eventObserverTracker=
new ServiceTracker<InteractionEventObserver*>(GetModuleContext());
        eventObserverTracker->Open();
        eventObserverTracker->GetServiceReferences(listEventObserver);
        for (std::list<mitk::ServiceReference>::iterator it =
listEventObserver.begin(); it != listEventObserver.end(); ++it)
        {
          InteractionEventObserver* interactionEventObserver =
eventObserverTracker->GetService(*it);
          if (interactionEventObserver != NULL) {
            DisplayInteractor* displayInteractor =
dynamic_cast<DisplayInteractor*>(interactionEventObserver);
            if (displayInteractor != NULL) {
              // here the regular configuration is loaded again

displayInteractor->LoadEventConfig("OurCustomDisplayConfigMITKTools.xml","Mitk");
            }
          }
        }
        eventObserverTracker->Close();
        delete eventObserverTracker;


... and add our custom display config to the Qt resources?

Thanks,
Miklos
------------------------------------------------------------------------------
Own the Future-Intel(R) 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://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to