Hello Sascha,
great, now it works! ... but how should I use it?
Here“s what I had so far:
void QmitkMultiLabelSegmentationView::InitializeListeners()
{
if (m_Interactor.IsNull())
{
us::Module* module = us::GetModuleContext()->GetModule(); //
<------ crashes here
std::vector<us::ModuleResource> resources =
us::GetModuleContext()->GetModule()->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);
}
}
QmitkMultiLabelSegmentationView::~QmitkMultiLabelSegmentationView()
{
m_ServiceRegistration.Unregister();
}
but it crashes in the first line: us::Module* module =
us::GetModuleContext()->GetModule(); // <------ crashes here
I know you are working on these issues, so please take this just as a
preliminary feedback.
btw, my application is still crashing on the first run after a rebuild.
I know you were working on it (cannot find the bugzilla bug right now ...)
Was that issue solved already?
thank you,
sebastian
On 14/10/2014 06:00 a.m., Sascha Zelzer wrote:
> Hi Sebastian,
>
> you are living on the (dangerous) bleeding edge ;-)
>
> Write
>
> usFunctionAddResources(TARGET ${PLUGIN_TARGET}
> WORKING_DIRECTORY resources
> FILES ...
> )
>
> instead (after the "create plugin" macro call). This is out of my
> head. Also add a source file named "${PLUGIN_TARGET}_resources.cpp" to
> the CPP_FILES list of your plug-in (this makes sure your plug-in is
> re-linked if resource files changed).
>
> There will be a detailed list of (breaking) changes with the release
> notes.
>
> - Sascha
>
> On 10/14/2014 04:39 AM, Sebastian Ordas wrote:
>> Hello team,
>>
>> Sascha, this one is for you ;-)
>>
>> How should I rewrite the following?
>>
>> usFunctionEmbedResources(CPP_FILES
>> LIBRARY_NAME "liborg_mitk_gui_qt_multilabelsegmentation"
>> ROOT_DIR resources
>> FILES Interactions/SegmentationInteraction.xml
>> Interactions/ConfigSegmentation.xml
>> )
>>
>> thank you!
>> sebastian
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>>
>> Comprehensive Server Monitoring with Site24x7.
>> Monitor 10 servers for $9/Month.
>> Get alerted through email, SMS, voice calls or mobile push
>> notifications.
>> Take corrective actions from your mobile device.
>> http://p.sf.net/sfu/Zoho
>> _______________________________________________
>> mitk-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users