yes, just like this:
void QmitkMultiLabelSegmentationView::InitializeListeners()
{
if (m_Interactor.IsNull())
{
us::ModuleContext* moduleContext = us::GetModuleContext();
m_Interactor = mitk::SegmentationInteractor::New();
m_Interactor->LoadStateMachine( "SegmentationInteraction.xml",
moduleContext->GetModule());
m_Interactor->SetEventConfig ( "SegmentationConfig.xml",
moduleContext->GetModule());
us::GetModuleContext()->RegisterService<mitk::InteractionEventObserver>(
m_Interactor.GetPointer(), us::ServiceProperties() );
}
}
On 05/12/2013 11:10 a.m., Sascha Zelzer wrote:
> Just to make sure: Did you call LoadStateMachine("...xml",
> GetModuleContext()->GetModule()) using the second argument to provide
> the module instance which contains the embedded xml file?
>
> On 12/05/2013 02:38 PM, Miguel Nunes wrote:
>> Sebastian,
>>
>> I just tested my plugin and I continue without success. The same
>> Error remains in the MITK plugin tab says:
>> " Part initialization error:
>> D:\src\MITK2013.09.0\Core\Code\Interactions\mitkStateMachineContainer.cpp:73:
>> Resource not valid. State machine pattern not
>> found:StatemachineVrvis.xml "
>> Do you have any new stuff on this issue?
>>
>> On Thursday, December 5, 2013 13:37 CET, "Miguel Nunes"
>> <[email protected]> wrote:
>>> Hi Sebastian,
>>>
>>> Sorry for taking so long to reply but out of nowhere Poco stopped
>>> working and I am re-buidling the whole MITK framework from scratch,
>>> which takes some hours as u know.
>>>
>>> Comparing my code to yours, I can only say we have exactly the same
>>> thing from all points from 1 to 4, except in dont have the line
>>> Q_EXPORT_PLUGIN2(..., mitk::PluginActivator)
>>>
>>> And since MITK is not ready yet in my machine I cannot test with
>>> this extra line.
>>>
>>> As soon as I am ready, I will email the list.
>>> Best,
>>> Miguel
>>> On Thursday, December 5, 2013 13:21 CET, Sebastian Ordas
>>> <[email protected]> wrote:
>>>> Hi Miguel,
>>>>
>>>> Are you still stuck on loading the xml files from your plugin?
>>>> Let me know if you have tried the suggestion below. It did not work
>>>> for me
>>>>
>>>> best regards,
>>>> sebastian
>>>>
>>>> On 04/12/2013 02:29 p.m., Sascha Zelzer wrote:
>>>>> Hi,
>>>>>
>>>>> in
>>>>>
>>>>> m_Interactor->LoadStateMachine( "SegmentationInteraction.xml");
>>>>>
>>>>>
>>>>> you are not specifying a module as the second argument. It will
>>>>> default to the "Mitk" module for searching the XML file, which of
>>>>> course doesn't contain it. Use
>>>>>
>>>>> m_Interactor->LoadStateMachine( "SegmentationInteraction.xml",
>>>>> GetModuleContext()->GetModule());
>>>>>
>>>>>
>>>>> instead. The same goes for the SetEventConfig() method call. I agree
>>>>> that the documentation is lacking and the API could be improved...
>>>>>
>>>>> Best,
>>>>>
>>>>> Sascha
>>>>
>>>> ------------------------------------------------------------------------------
>>>>
>>>>
>>>> Sponsored by Intel(R) XDK
>>>> Develop, test and display web and hybrid apps with a single code base.
>>>> Download it for free now!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
>>>>
>>>>
>>>> _______________________________________________
>>>> mitk-users mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>>> --
>>> VRVis Zentrum fuer Virtual Reality und Visualisierung
>>> Forschungs-GmbH FN: 195369h, HG Wien
>>> Donau-City-Strasse 1 +43(0)1 20501 30100
>>> A-1220 Wien, Austria web:<http://www.vrvis.at>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>>
>>> Sponsored by Intel(R) XDK
>>> Develop, test and display web and hybrid apps with a single code base.
>>> Download it for free now!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
>>>
>>>
>>> _______________________________________________
>>> mitk-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users