Hi Marius,
how do you use MITK? As a library or as "project"?
Do you use the GIT version or (still) svn?
Which application do you start? CoreApp or ExtApp?
The regular behaviour of an application not being able to locate
statemachine.xml is a warning on the console and the disability to e.g. set
points. Interactions such as panning and zooming should still work, because
they don't need a state machine pattern. How did you verify successful loading
of statemachine.xml?
Regards,
Ingmar
Von: Marius Erdt [mailto:[email protected]]<mailto:[mailto:[email protected]]>
Gesendet: Montag, 9. Mai 2011 10:37
An: [email protected]<mailto:[email protected]>
Betreff: Re: [mitk-users] Statemachine.xml
Hi Klaus,
thank you for your suggestions. Writing an own statemachine.xml and loading it
via the LoadBehavior function worked.
However, I still don't know why I cannot just add it to the standard
statemachine.xml. According to the function
bool mitk::StateMachineFactory::LoadStandardBehavior()
it should be the file located in core/code/interactions:
std::string xmlFileName(
mitk::StandardFileLocations::GetInstance()->FindFile("StateMachine.xml",
"Core/Code/Interactions") );
But I can also delete this file and all interactors still work, so the file is
obviously not considered...
Strange, but anyway, the way you suggested works for me.
thanks again,
Marius
On 07.05.2011 01:09, Klaus Drechsler wrote:
Hi Marius,
I don“t have answers to your questions. However, I suggest writing your own
"stateachine.xml" for your pattern and load it within ExtApp like this:
mitk::GlobalInteraction::GetInstance()->GetStateMachineFactory()->LoadBehavior("x://MyStateMachines.xml");
Also have a look at "mitk::StandardFileLocations" for a convenient way to find
your xml file ... An example can be found in "mitkStateMachineFactoryTest.cpp".
Best wishes,
Klaus
On 06.05.2011 14:13, Marius Erdt wrote:
Hi,
I'm trying to integrate my own statemachine in the statemachine.xml file
in order to use it in my plugin. However, I'm not sure, if I got the
right file.
From a previous post in the mailing list, there are three options to
find the file:
This file is loaded during startup of the application. There are three
possibilities (see bug #3701):
1. Load from mitk/Core/Code/Interaction/Statemachine.xml (done e.g. by Tests)
2. Load from file (filename given) (done by tutorial)
3. Load from Qt resource in
mitk/CoreUI/Bundles/org.mitk.gui.qt.common/resources/Statemachine.xml (done by
MITK via activator / BlueBerry based)
(There will only be one statemachine.xml after the bug is closed.)
Now what confuses me, is that I renamed the statemachine.xml at location
1. and 3. and still, all statemachines of all plugins work. I'm not
sure, what option 2 is though, since I didn't find anything in the tutorial.
Is there another place or another file where the statemachines are
located (on my PC, the statemachine.xml file is only located at 1. and 3.).
Thank you!
Marius
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
mitk-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/mitk-users
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users