Hi Alyson,

state machines (xml files) are loaded via the resource system for the modules 
(in the Interactions folder therein) . So you can load a statemachine by 
specifying the file name and the according module.
The default module is "Core" so the call

m_CurrentInteractor->LoadStateMachine("PointSet.xml");

will look in MITK-src/Core/Code/Resources/Interactions for a PointSet.xml

these files have to be registered in the Build system by listing them in the

set(RESOURCE_FILES
..)

section files.cmake of the according module.
To load an EventConfig the same procedure applies,
But in addition you can create them via objects or string stream.

See [1] for some information about this.

Hope this helps!

Best
Christian

--

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

Von: Alyson Roger [mailto:[email protected]]
Gesendet: Freitag, 29. November 2013 16:53
An: [email protected]<mailto:[email protected]>
Betreff: [mitk-users] Add a new state machine

Hi Mailing List,
I am trying to do something simple : use my own State Machine in a .xml file 
for my plug in in  the mitkWorkBench. A part in the tutorial that is not clear 
to me is how I include my state machine into the GlobalInteraction. I know the 
code must be in the form
m_CurrentInteractor = mitk::PointSetDataInteractor::New();
m_CurrentInteractor->LoadStateMachine("PointSet.xml");
m_CurrentInteractor->SetEventConfig("PointSetConfig.xml");

As Step 10 of the tutorial.
But I would like to know where do I have to put my .xml file so the 
LoadStateMachine does not crash when I run my Plug In with my state machine. I 
intended to use InteractionEventHandler::AddEventConfig but it didn't work.
I really hope that someone will be able to help me because I have been stuck 
during days with the interaction part, which is new for me.
Thank you very much

--
Alyson ROGER

[email protected]<mailto:[email protected]>
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to