Hi Ingmar,
how is your module supposed to be loaded? By a linker dependency or as a
"auto-load" module? In the latter case you need to make sure that the
shared library is created in the proper sub-directory (e.g.
MITK-build/(bin|lib)/MitkCore)
Best,
Sascha
On 02/12/2015 11:03 AM, Ingmar Wegner wrote:
Hi all,
I am merging our readers and writers to the new micro service based
apporach but am probably missing something.
I basically stuck to Stefan K. approach for migrating the simulation
module (*Bug 18640* <http://bugs.mitk.org/show_bug.cgi?id=18640>).
Before I was registering the ObjectFactory in my
WorkbenchWindowAdvisor but now the autoload feature of my written
micro service is supposed to do that.
Setup:
MSVC 2013 X64 QT 5.4 (!)
MITK checkout from 30 Jan 2015 but might stick close to the trunk
until the next release once I have it working.
The easiest example of mine is my own vrml reader and writer.
So for now I implemented an activator and one vrml_io class that
contains Read() and Write().
The Activator::Load() method though is never called!
(Object factory and serializer are neglected as long as the module
doesn't load.)
I am calling
US_EXPORT_MODULE_ACTIVATOR(MyActivator);
in the body of my activator.
I have to mention that I am manually setting properties in my
cmakelists.txt file as I am not using the macros provided by mitk.
see following section:
#start CMakeLists.txt
# Registering as mitk module with MicroService functionality
# set template file
project(mesh)
... # ...including file.cmake
set(module_name ${PROJECT_NAME})
set(US_MODULE_INIT_TEMPLATE
${MITK_SOURCE_DIR}/Core/CppMicroServices/CMake/usModuleInit.cpp)
... # ...calling add_library(...)
#Define US_MODULE_NAME needed for MITK MicroService
set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY
COMPILE_DEFINITIONS US_MODULE_NAME=${module_name}) # otherwise it
complains about a not set module name
set_property(TARGET ${PROJECT_NAME} PROPERTY US_MODULE_NAME
${module_name})
#end CMakeLists.txt
I tried to debug the other working loading modules but didn't find a
difference why my one shouldn't start.
Do I have to untangle some cmake magic done in the MITK_CREATE_MODULE
macro?
Which example is best for such a job?
The one in modules/core is written to also contain VTK and ITK IO and
doesn't seem to me as a good example for an external project.
Best Regards,
Ingmar
P.S. Can't wait for the users meeting in April!
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users