Hi Sebastian,

Do you implement in your SegmentationInteractor any navigation commands like 
scrolling trhough planes ?
If so, you would need to deactivate the DisplayInteractor for the time your 
Interactor is active.
The nicer solution would be though not to implement any Display Interaction in 
you Interactor but to simply replace the configuration of the DisplayInteractor 
while your interaction is active [1], this should also take care of the double 
steps.

Cheers,
Christian


[1] 
http://docs.mitk.org/nightly-qt4/InteractionMigration.html#ModifyDisplayInteractorBehavior


-----Ursprüngliche Nachricht-----
Von: Sebastian Ordas [mailto:[email protected]] 
Gesendet: Montag, 3. Februar 2014 12:47
An: [email protected]
Betreff: two wheel events triggered when overriding DisplayInteractor

Hello folks!

In my plugin I use a dedicated interactor called "SegmentationInteractor" which 
derives from DisplayInteractor

You can see below how I load it.

So far, so good, but it looks like the original DisplayInteractor is still 
active because I get two mouse wheel events instead of a single one. In 
consequence, the scroll through planes steps every two instead of one.

Changing the active slice through up/down arrow keys works fine (single event 
triggered)

Any clue regarding this misbehavior?

thanks,
sebastian

Here's how I use it:

    us::Module* module = us::GetModuleContext()->GetModule();
     std::vector<us::ModuleResource> resources = 
module->FindResources("/", "*", true);
     for (std::vector<us::ModuleResource>::iterator iter = resources.begin(); 
iter != resources.end(); ++iter)
     {
       MITK_INFO << iter->GetResourcePath();
     }

     m_Interactor = mitk::SegmentationInteractor::New();
     if (!m_Interactor->LoadStateMachine("SegmentationInteraction.xml",
module))
     {
       MITK_WARN << "Error loading state machine";
     }

     if (!m_Interactor->SetEventConfig ("ConfigSegmentation.xml", module))
     {
       MITK_WARN << "Error loading state machine configuration";
     }

     // Register as listener via micro services
     us::ServiceProperties props;
     props["name"] = std::string("SegmentationInteraction");
     m_ServiceRegistration =
us::GetModuleContext()->RegisterService<mitk::InteractionEventObserver>(
m_Interactor.GetPointer(), props);


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to