Re: [mitk-users] CppMicroServices Questions

2021-01-22 Thread Sascha Zelzer

Hi,

I hesitated to reply at first, but I think it could still be helpful. I 
am not up-to-date regarding the current MITK development and its usage 
of CppMicroServices, so what I provide below might be outdated. Also, I 
am writing all of this from the top of my head relying on memories which 
are five years old by now.


MITK-devs, please correct me if I am wrong.

Every MITK "Module" is a CppMicroServices "Module". Note that "Module" 
in the CppMicroServices context is a legacy term which is been replaced 
by "Bundle" in newer versions.


A MITK module can register 0 or more services. It doesn't make sense to 
view a MITK module as a service (also the other way around doesn't make 
sense), unless you (in your own design) always register a service with a 
MITK module context and view them as conceptually equal. A module is a 
library (shared or static) which can consume and publish services (it 
can also provide other static resources like files, icons, etc.).


MITK (and CppMicroservices) Modules don't require an activator (I 
think). An activator allows you to register services at module load 
time, but you could do so from any place in your module later, by 
acquiring a module context with GetModuleContext().


You can view us::ModuleRegistry::GetModule(1) as a "hack" to get hold of 
the CppMicroServices module itself, which is always present. And yes, 1 
should always be the CppMicroServices module.


The module ID is assigned on module load time, if I remember correctly. 
So it depends on the order of the shared libraries being loaded. Code 
using module 1's context to register or consumer services either does 
not have a module context itself (because it does not belong to a 
module), has a very special reasong to use the CppMicroServices module 
context, or is just doing it wrong.


The CppMicroServices module is loaded first by virtue of library 
dependencies. The dynamic loader of the OS takes care of that, because 
every other module has a dependency on the CppMicroservices library. On 
the other hand, I think I remember that MITK uses a special way to 
eagerly load the CppMicroServices module, because it might not have a 
hard dependency on any module right after startup.


Contexts:

- There is one context for each module loaded in the current process. An 
executable itself can be a module.


- The framework is the CppMicroServices environment. I think this is 
used in a rather loose sense


- It is possible to get the module context for any module loaded in the 
current processes. You have seen an example via 
us::ModuleRegistry::GetModule(1). This can be used to e.g. register a 
service "on behalf" of another module, which meaning making use  of its 
module context outside of the module's code. It's not a common use case 
but enables certain patterns.


- The only code from modules executed by the CppMicroServices 
"framework" are the ModuleActivator Load and Unload functions. This 
happens during static initialization of the module, which itself happens 
by the dynamic loader, which to the best of my knowledge sequences all 
its actions in one thread. What modules themselves do, is up to them.


- As a module is basically a shared library with a module context given 
my the CppMicroServices framework, it doesn't make much sense to speak 
of instances. You can register multiple instances of the same service 
though.


ServiceTracker:

- Services are dynamic objects and can come and go during the lifetime 
of a process. A ServiceTracker simplifies the overhead which comes with 
the dynamic nature of services. You don't need to listen on service 
events yourself and you can use filters to filter on service properties.


- "service modified" is called when the properties a service was 
registered with are modified. The allow you to attach meta-information 
to service instances and later decide which service of many (potentially 
of the same type) is better suited for that particular consumer of a 
service.



Cheers,

Sascha


On 1/7/21 6:38 PM, Alex Melville wrote:

Hello,

I spent some time reading through the documentation on the 
CppMicroServices module, but a few things are still not clear to me,


General:
Note: By "MITK Module" I mean code that resides in the Modules/ folder 
of a MITK application, and is created by MITK_CREATE_MODULE(...). By 
CppMicroServices Module I mean what you would access via 
us::ModuleRegistry::GetModule(
- Can I assume that the CppMicroServices "Module" is the same as MITK 
"Module"? Or are these two different concepts that share the same name?
- Is every MITK module always a service? In my application I have one 
module that seems to not be a service. It has no activator code, and 
seems to be just an ordinary dll with header and cpp files.

- Is every service a MITK module?

GetModule(1):
- In my code I see 
us::ModuleRegistry::GetModule(1)->GetModuleContext(); occasionally, I 
have checked which module GetModule(1) returns and it appears to be 

Re: [mitk-users] Is there any template project that have the foundation to build a modular application with Qt?

2020-09-14 Thread Sascha Zelzer

Hi,

as answered on the CppMicroservices GitHub issues page, CppMicroServices 
and CTK are independent projects with no dependencies on each other.


CppMicroServices was the reincarnation of the service layer from the CTK 
Plugin Framework, without the module (bundle) layer (well, just the bare 
minimum of the bundle layer to support the service registry design). I 
think it will help to read the history on [1] (the first three blog 
entries).


These days, it doesn't make much sense to use the CTK PluginFramework 
together with CppMicroServices for new projects. They both provide a 
similar feature set, but the former is actively developed. Note that the 
version used by MITK (as far as I know) is old enough to lack major 
features and the creation of CppMicroServices was motivated by the 
desire to "register services" from non-CTK bundles.


Regarding all your other questions about modular UI development, my 
personal point of view is to look at web technologies or just use 
Eclipse directly since you seem to be familiar with it already. 
BlueBerry supports a lot of features, but as Stefan said there are 
certain things missing and it is based on Eclipse RPC 3.x. Using a more 
widely adopted UI you are familiar with (Eclipse) seems to make sense 
since you seem to not have a need for the medical imaging and 
interaction features of MITK. Interfacing the Java UI logic with native 
libraries (C/C++ if you want) or even with CppMicroServices 
infrastructure via native libraries might be worth to investigate.


- Sascha

[1] http://blog.cppmicroservices.org/

On 9/11/20 12:03 PM, Dinkelacker, Stefan wrote:


The creator of BlueBerry (and CppMicroServices) is reading this 
mailing list, so let’s see if he has something to say. :-)


CppMicroServices started like BlueBerry as MITK subproject 
(Modules/CppMicroservices) and it is still a subproject in its initial 
version (which we are using). There’s also subsequent versions of 
CppMicroServices that are completely decoupled and are hosted on 
http://cppmicroservices.org/ and have nothing to do with MITK anymore 
(and won’t work out of the box with MITK). At least in the CTK version 
that we are using, CppMicroservices is not a dependency of CTK or we 
are not aware of it/not using it/not building it, so I am not sure how 
you came to this conclusion? :-)


The CTK guys are also active and have a mailing list, if you have 
CTK-specific questions.


Best,

Stefan


*From:*Ramazan Ergüder Bekrek [mailto:e.bek...@yandex.com]
*Sent:* Friday, September 11, 2020 10:47 AM
*To:* Dinkelacker, Stefan ; 
mitk-users@lists.sourceforge.net
*Subject:* Re: AW: AW: [mitk-users] Is there any template project that 
have the foundation to build a modular application with Qt?


Can you or someone other in your contacts with whom I can connect who 
can provide more information about how BlueBerry is working... Based 
only on the information from MITK documentation it only help not to 
much in details about how to hook that separate project into CTK for 
example or CppMicroServices.


Where does the initialisation of BlueBerry takes place?

I am also confused does CTK have a dependency on CppMicroServices(CMS) 
or is CMS directly copied in the source code of CTK and just renamed 
all the its file starting by ctk.cpp&.h


Is there any internal detailed documentation that was not rendered 
publicly due to forgetting or other kind of policies?


How could you direct me to the right people so that I can ask my 
question to the concerned parties?


I would like to also know what kind of development environment are you 
using to work with MITK. I mean by that if you are using Eclipse and 
if yes are there any visual tooling which was develop specifically in 
the Eclipse/IntelliJ environment  connected with the MITK project?


Best regards

11.09.2020, 09:59, "Dinkelacker, Stefan" 
>:


Thanks for the explanation. :)

In this case and if you have the time to spend, it could be worth
to first try to make BlueBerry a separate project by extracting it
from MITK instead of deleting everything from MITK that you do not
need. I think BlueBerry was already designed this way not to be
too much entangled with the rest of MITK.

I also know that there are companies that did it before but it’s
not open source unfortunately. We do not have the capacity
currently to give much support for such big projects off the
beaten path, though. Also note that as far as I know, BlueBerry is
not a complete implementation of OSGi and there may be things
missing you are used to rely on.

Best,

Stefan

*From:*Ramazan Ergüder Bekrek [mailto:e.bek...@yandex.com]
*Sent:* Thursday, September 10, 2020 1:44 PM
*To:* Dinkelacker, Stefan mailto:s.dinkelac...@dkfz-heidelberg.de>>;
mitk-users@lists.sourceforge.net

*Subject:* Re: AW: AW: [mitk-users] Is there 

Re: [mitk-users] Startup error: ctkPluginException on first run

2019-07-19 Thread Sascha Zelzer
Hi,

I am not sure what you tried already, but more information would
certainly help here. If you can reproduce a state where you know that
starting your application will show the described errors, have a look at
the output of those two commands before you actually start your app:

/lib64/ld-linux-x86-64.so.2 --list
/home/fmorency/softwares/MITK-v2018.04.2-54-gca0a3e57c1-linux-x86_64/bin/plugins/liborg_blueberry_core_expressions.so

ldd -r
/home/fmorency/softwares/MITK-v2018.04.2-54-gca0a3e57c1-linux-x86_64/bin/plugins/liborg_blueberry_core_expressions.so


Then start your app and afterwards run the commands again. Is the output
any different?

Best,

Sascha

On 7/19/19 8:09 PM, Nil Goyette wrote:
>
> Hi all,
>
> We can't release our application because of this problem so I tested
> more. Here's some facts about the problem:
>
>   * Mitk Workbench doesn't have the problem. It happens only on Linux
> on each new releases (commit + make package), even if they are all
> based on MITK 2018.04.2. I do not use the "build tree", I use
> "make package".
>   * --Blueberry.clean and deleting ~/.local/share/Imeka produce almost
> the same error.
>   * The paths are right. imagenavigator.so is where the app thinks it is.
>   * It's clearly related to plugins.db located in
> ~/.local/share/Imeka. The first (and only) crash is creating this
> file. The next run is doubling its size, to a working condition. A
> working build simply creates the file and continue running the
> application.
>   * There's no problem on the computer where the package was created.
> Even when I delete plugins.db. And even when I delete all
> dependencies: Qt, MITK build and our app build. It seems to be
> incompatible between 16.04 and 18.04 builds but I'm not sure about
> that yet. Overall, this makes the bug really hard to test.
>
> Knowing that the Mitk Workbench is fine and that you added "a few Qt
> dependencies" to fix it, can I have more details about what you did?
> How did you know which dependencies to add? I can't really add the
> imagenavigator plugin "more" than it's already added? How am I
> supposed to add them? Moreover, is there a way to have a stacktrace?
> It's only complaining about imagenavigator.so but I know that it
> exists at the right place! I must be doing something in my app that
> MITK Workbench isn't doing and I need to know who the culprint is.
>
> Nil Goyette
>
> Le 2019-06-21 à 04:47, Dinkelacker, Stefan a écrit :
>>
>> Hi,
>>
>>  
>>
>> we had several of these issues and shortly before the last release.
>> One had to open the Workbench three times before it continuously
>> worked afterwards. Most of the issues were Qt related and we could
>> fix it by adding a few Qt dependencies to our scripts that are
>> actually meant to be dynamically loaded during runtime. We also
>> noticed that these issues only occurred when starting MITK out of the
>> build tree but the installers just worked fine as all binaries are at
>> a single place.
>>
>>  
>>
>> AFAIK we still didn’t find the actual cause for the Poco-issue but it
>> never happened in installers. Do you build installers for your
>> clients or are they using build-tree versions of MITK?
>>
>>  
>>
>> I also see that you use the releases/2018-04 branch instead of the
>> latest stable tag v2018.04.2. Just a small warning that it may fail
>> from time to time, even though it should be much more stable than the
>> master branch, though.
>>
>>  
>>
>> Stefan
>>
>>  
>>
>> *From:*Nil Goyette [mailto:nil.goye...@imeka.ca]
>> *Sent:* Thursday, June 20, 2019 3:41 PM
>> *To:* mitk-users@lists.sourceforge.net
>> *Subject:* [mitk-users] Startup error: ctkPluginException on first run
>>
>>  
>>
>> Hi all,
>>
>> I upgraded to MITK 2018.04, built linux installers and my users see
>> this error on the first time they open the application.
>>
>> 0.393! WARNING: Startup error: ctkPluginException: The plugin
>> "/home/fmorency/softwares/MITK-v2018.04.2-54-gca0a3e57c1-linux-x86_64/bin/plugins/liborg_mitk_gui_qt_imagenavigator.so"
>> could not be loaded: Cannot load library
>> /home/fmorency/softwares/MITK-v2018.04.2-54-gca0a3e57c1-linux-x86_64/bin/plugins/liborg_mitk_gui_qt_imagenavigator.so:
>> (/home/fmorency/softwares/MITK-v2018.04.2-54-gca0a3e57c1-linux-x86_64/bin/plugins/liborg_blueberry_core_expressions.so:
>> undefined symbol:
>> _ZN5berry14ElementHandler6CreateEPNS_19ExpressionConverterEPN4Poco3XML7ElementE)
>>
>> It opens without any problem when they try again. It's happen *only
>> the first time*. It seems you can't mix MITK 2016.11 and MITK
>> 2018.04. We tried deleting the temp folder ~/.local/share/Imeka, or
>> using --Blueberry.clean, but it gives almost the same error as before.
>>
>> 0.437! WARNING: Failed to install plugin 
>> QUrl("file:///home/fmorency/softwares/MITK-v2018.04.2-54-gca0a3e57c1-linux-x86_64/bin/plugins/liborg_mitk_gui_qt_imagenavigator.so"
>> )
>> : ctkPluginException: Failed to install plugin
>> 

Re: [mitk-users] C++17 compatibility

2019-01-22 Thread Sascha Zelzer
Hi,

one of the CppMicroServices contributors here. We also love
contributions! Auto-loading is also something which would not need
changes in the core framework itself. It could be implemented
independently in an external bundle as well.

By the way Visual Studio 2017 did not remove those templates. They are
by default not accessible, but there is an escape hatch to bring them
back in:

#define _HAS_AUTO_PTR_ETC 1


- Sascha

On 1/22/19 9:26 AM, Dinkelacker, Stefan wrote:
>
> Hi Frederico,
>
>  
>
> the current version of CppMicroServices still lacks the support of
> autoload modules, which it provides in the old version we are using.
> We would also like to upgrade to a newer version, as we have problems
> with the unloading part of the old CppMicroServices.  Until the
> autoload feature isn’t provided again, we’re stuck to the current
> solution. Please feel free to also open a feature request ticket here
> [1] to raise the author’s awareness about this feature for the next
> release of CppMicroServices. :-)
>
>  
>
> [1] https://github.com/CppMicroServices/CppMicroServices/issues
>
>  
>
> Until then, our fork of the CppMicroServices, which is integrated in
> the MITK source code will drift farther, meaning, it is at least
> possible to fix the issue in our code and replace the deprecated stuff
> with something compatible to C++14, which is our current minimum
> required version of the C++ standard. Contributions welcome.
>
> ;-)
>
>  
>
> Best,
>
> Stefan
>
>  
>
> *From:*Federico Milano [mailto:fmil...@gmail.com]
> *Sent:* Monday, January 21, 2019 11:05 PM
> *To:* mitk-users@lists.sourceforge.net
> *Subject:* [mitk-users] C++17 compatibility
>
>  
>
> Hi. I was wondering if you are going to update the CppMicroServices
> version. I would need to build my project with C++17 support, but the
> CppMicroServices module used in MITK is old and still uses
> std::unary_function and std::binary_function, which were deprecated
> since C++11 and removed in C++17. Gcc is forgiving about this, but
> Visual Studio 2017 is strict and it has removed those classes from its
> C++17 standard library implementation.
>
>  
>
> Thanks,
>
>  
>
> Federico
>
>  
>
>
>
> ___
> mitk-users mailing list
> mitk-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] deploying

2018-05-17 Thread Sascha Zelzer
Hi,

are you using the MITK provided CMake macros for creating applications?
E.g. mitkFunctionCreateBlueBerryApplication for a BlueBerry based
application or similar.

The macros take care of dependencies and additional plug-ins etc.

Best,

Sascha


On 05/17/2018 09:40 AM, Paolo Cabras wrote:
>
> I am sorry... I don't know why I took the last version (it was written
> to take 2.x).
>
> Now the packaging is done but it seems incomplete : in
> _CPack_Packages/win64/NSIS/my_project-0.1.1-win64, only the Microsoft
> Visual C++ Redistributable Package (added setting
> CPACK_VISUAL_STUDIO_PRODUCT_NAME and CPACK_VISUAL_VERSION_MAJOR
> variables in the CMakeLists.txt) and the files of  my_project's bin
> directory are present. Furthermore, when launching the executable
> created by the installer, an error is returned saying that some mitk
> dll is not present on my pc.
>
> How can I automatically include (and then install) all MITK and 3rd
> party libraries necessary for running my application (on a different
> system) ?
>
> Thank you again for your help!
>
> Paolo
>
>
> Le 16/mag/2018 à 11:09, Dinkelacker, Stefan a écrit :
>> Hi Paolo,
>>
>> did you install NSIS 3.x or 2.x? You need 2.x.
>>
>> Best,
>> Stefan
>>
>> -Original Message-
>> From: Paolo Cabras [mailto:cab...@unistra.fr] 
>> Sent: Mittwoch, 16. Mai 2018 10:43
>> To: mitk-users@lists.sourceforge.net
>> Subject: [mitk-users] deploying
>>
>> Hello everybody,
>>
>> I would like to create a windows installer for my application based on 
>> mitk (no workbench plugin). I have installed nsis, but when I run the 
>> 'cpack' command within the build directory the following error appears :
>>
>> CPack: Create package using NSIS
>> CPack: Install projects
>> CPack: - Run preinstall target for: my_project
>> CPack: - Install project: my_project
>> CPack: Create package
>> CPack Error: Problem running NSIS command: "E:/App/NSIS/makensis.exe" 
>> "[path_to_build_dir]/_CPack_Packages/win64/NSIS/project.nsi"
>> Please check 
>> [path_to_build_dir]/_CPack_Packages/win64/NSIS/NSISOutput.log for errors
>> CPack Error: Problem compressing the directory
>> CPack Error: Error when generating package: my_project
>>
>> and from NSISOutput.log :
>> !macro: macro named "RemoveSection" already found!
>> Error in script 
>> "[path_to_build_dir]/_CPack_Packages/win64/NSIS/project.nsi" on line 127 
>> -- aborting creation process
>>
>> I am using QtCreator, but the behavior is the same when compiling the 
>> "PACKAGE" project with Visual Studio 2015.
>>
>> Do you have any suggestions ? Am I missing something ?
>>
>> Thank you very much in advance for your help!
>>
>
> -- 
> Paolo Cabras
> Research Engineer
> Automatic, Vision and Control Team
> ICUBE (UMR 7357 CNRS-Université de Strasbourg)
> +33 (0) 3 88 11 90 68
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> ___
> mitk-users mailing list
> mitk-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Access resources in a test instance

2018-04-04 Thread Sascha Zelzer
Hi,


this cannot work since mitk::IOUtil::Load("/some/path") expects its
string argument to represent a path in some local file system. It cannot
know that what you pass in is the name of some embedded resource in your
module.


However, there is a mitk::IOUtil::Load overload [1] that takes a
ModuleResouce instance as first argument. You can also create a
ModuleResourceStream object and read the embedded binary data from it
(just like you do with normal C++ stream objects).


Best,

Sascha


[1]
http://docs.mitk.org/nightly/classmitk_1_1IOUtil.html#a04c23c6cf7834ddce66831376740ae2d


On 03/29/2018 10:28 PM, Alex Valcourt Caron wrote:
>
> Hi,
>
>
> I am presently trying to access some files placed in a Resources
> folder in my test directory, which I included to my build via the
> set(RESOURCE_FILES ...) cmake variable in my files.cmake.
>
>
> I was wondering how to access them via my test classes however.
> mitk::IOUtil::Load doesn't seem to know where to find them with just
> the file names (example : I have a file named "fiber.json" and try to
> load it with mitk::IOUtil::Load("fiber.json")).
>
>
> I want my tests to be path agnostic so the resource mechanism seems to
> me the way to do it. However, I have to admit I am having trouble
> understanding how the building of the project handles it.
>
>
> Can somebody point to me where the files should be located via the way
> I am presently including them (I found a .zip with them, but that is
> all) ? Or what is missing to make them accessible through this way (if
> possible) ?
>
>
> I would prefer not having to make use of the mitkAddCustomModuleTest
> function if possible. I don't know neither if it would work with my
> test classes.
>
>
> Thanks ,
>
> Alex
>
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> ___
> mitk-users mailing list
> mitk-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] CTK plugins

2017-12-22 Thread Sascha Zelzer
Hi Matt,

sorry for the long wait, but better late than never, I guess.

I am also getting old and my answers are based on my memories, so you
might have to double-check.

CTK plug-ins are indeed Qt plugins (they implement the
"ctkPluginActivator" interface). But they make use of the low-level Qt
Plugin API, since they are meant to extend a Qt application, not the Qt
framework itself.

The provisioning files are only one of many possible ways how to
initially provision an application based on the CTK Plugin Framework.
The provisioning files are an addition on top of CTK, implemented as
part of the BlueBerry application framework. When an application is
deployed, the file typically just lists all the plug-ins shipped by
default with the product and they get installed on first start-up.
During development, however, the provisioning file additionally allows
to selectively enable / disable plug-ins, e.g. when starting an
application with --BlueBerry.clean

The Qt approach for Qt plug-ins extending Qt itself is based on naming
conventions for sub-directories, and on application start-up all the
plug-ins in those standard sub-directories are loaded unconditionally.
An application is free to implement the same behavior for e.g. a
sub-directory named "ctk". If this application does not allow for other
CTK plug-ins to be installed/started/stopped during runtime (their state
is recorded in a separate sqlite database), then this approach will be
straight forward. Otherwise, it might be a bit more involved regarding
removal of plug-ins from the ctk sub-folder, but not much as far as I
remember.

Actually, we had discussions about providing such functionality out of
the box and I started to look at implementing something similar to the
Apache Felix File Install bundle [1], which would also be interesting
for CppMicroServices. But it never took off so far.


Best,

Sascha

[1]
http://felix.apache.org/documentation/subprojects/apache-felix-file-install.html


On 11/23/2017 09:48 AM, Clarkson, Matt wrote:
> Hi there,
>
> can someone remind me (I’m getting old..or older at least), why the CTK 
> plugins used in MITK are not just like the normal Qt plugins (image formats, 
> databases etc), and why they therefore require a provisioning file to load.
>
> It seems that the MITK Autoloaded Modules are great for having nicely 
> extensible functionality, with no link-time dependency, where people could 
> just add drop in modules etc.. But would it be possible to do the same for 
> plugins? Im wondering if it would be possible to provide a pre-compiled GUI 
> application, and the user just creates a standalone project for each new 
> plugin that they can deploy to their app, much like new Osirix plugins, (or 
> Mevis I think).
>
> Just a thought.
>
> Thanks
>
> M
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> mitk-users mailing list
> mitk-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Json file Reader

2017-10-28 Thread Sascha Zelzer

Hi,


the JSON library used in CppMicroServices is an internal dependency 
only. It cannot be consumed by clients.



You could try the Boost Property Tree library to parse your 
configuration files.



Best,

Sascha


On 10/27/2017 09:04 PM, Alex Valcourt Caron wrote:


Hello,


I am presently writing my own module and plugin using MITK. I want to 
read properties and configuration files written in the Json language 
and know that a parser is available in the distribution.



I've tried to compile my reader, but keep having error message of 
unresolved external symbols with the Json library (I've included the 
trace at the bottom of the mail).



jsoncpp.h is included in the reader's .cpp file. I've tried to add 
CppMicroService to the DEPENDS of my module too, since it contains the 
third_party libraries, without success.



Trace :

--

VoxsimIOMimeTypes.obj : error LNK2019: symbole externe non résolu 
"public: __thiscall Json::Value::Value(enum Json::ValueType)" 
(??0Value@Json@@QAE@W4ValueType@1@@Z) référencé dans la fonction 
"public: static bool __cdecl 
mitk::VoxsimIOMimeTypes::canReadByJsonReader(class 
std::basic_string const &)" 
(?canReadByJsonReader@VoxsimIOMimeTypes@mitk@@SA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
2>VoxsimStructureReader.obj : error LNK2001: symbole externe non 
résolu "public: __thiscall Json::Value::Value(enum Json::ValueType)" 
(??0Value@Json@@QAE@W4ValueType@1@@Z)
2>VoxsimIOMimeTypes.obj : error LNK2019: symbole externe non résolu 
"public: __thiscall Json::Value::~Value(void)" (??1Value@Json@@QAE@XZ) 
référencé dans la fonction "public: static bool __cdecl 
mitk::VoxsimIOMimeTypes::canReadByJsonReader(class 
std::basic_string const &)" 
(?canReadByJsonReader@VoxsimIOMimeTypes@mitk@@SA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
2>VoxsimStructureReader.obj : error LNK2001: symbole externe non 
résolu "public: __thiscall Json::Value::~Value(void)" 
(??1Value@Json@@QAE@XZ)
2>VoxsimIOMimeTypes.obj : error LNK2019: symbole externe non résolu 
"public: __thiscall Json::Reader::Reader(void)" 
(??0Reader@Json@@QAE@XZ) référencé dans la fonction "public: static 
bool __cdecl mitk::VoxsimIOMimeTypes::canReadByJsonReader(class 
std::basic_string const &)" 
(?canReadByJsonReader@VoxsimIOMimeTypes@mitk@@SA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
2>VoxsimStructureReader.obj : error LNK2001: symbole externe non 
résolu "public: __thiscall Json::Reader::Reader(void)" 
(??0Reader@Json@@QAE@XZ)
2>VoxsimIOMimeTypes.obj : error LNK2019: symbole externe non résolu 
"public: bool __thiscall Json::Reader::parse(class 
std::basic_string const &,class Json::Value &,bool)" 
(?parse@Reader@Json@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAVValue@2@_N@Z) 
référencé dans la fonction "public: static bool __cdecl 
mitk::VoxsimIOMimeTypes::canReadByJsonReader(class 
std::basic_string const &)" 
(?canReadByJsonReader@VoxsimIOMimeTypes@mitk@@SA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
2>VoxsimIOMimeTypes.obj : error LNK2019: symbole externe non résolu 
"public: class std::basic_string __thiscall 
Json::Reader::getFormattedErrorMessages(void)const " 
(?getFormattedErrorMessages@Reader@Json@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 
référencé dans la fonction 
__catch$?canReadByJsonReader@VoxsimIOMimeTypes@mitk@@SA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z$0
2>VoxsimStructureReader.obj : error LNK2019: symbole externe non 
résolu "public: __thiscall Json::Value::Value(int)" 
(??0Value@Json@@QAE@H@Z) référencé dans la fonction "public: virtual 
class std::vector,class 
std::allocator > > 
__thiscall mitk::VoxsimStructureReaderService::Read(void)" 
(?Read@VoxsimStructureReaderService@mitk@@UAE?AV?$vector@V?$SmartPointer@VBaseData@mitk@@@itk@@V?$allocator@V?$SmartPointer@VBaseData@mitk@@@itk@@@std@@@std@@XZ)
2>VoxsimStructureReader.obj : error LNK2019: symbole externe non 
résolu "public: __thiscall Json::Value::Value(char const *)" 
(??0Value@Json@@QAE@PBD@Z) référencé dans la fonction "public: virtual 
class std::vector,class 
std::allocator > > 
__thiscall mitk::VoxsimStructureReaderService::Read(void)" 
(?Read@VoxsimStructureReaderService@mitk@@UAE?AV?$vector@V?$SmartPointer@VBaseData@mitk@@@itk@@V?$allocator@V?$SmartPointer@VBaseData@mitk@@@itk@@@std@@@std@@XZ)
2>VoxsimStructureReader.obj : error LNK2019: symbole externe non 
résolu "public: __thiscall Json::Value::Value(class Json::Value const 
&)" 

Re: [mitk-users] Linux package contains Qt libraries but no plugins

2017-07-19 Thread Sascha Zelzer

Hi Stefan,

there is linuxdeployqt, but it seems to have a couple of issues. With 
the plugins, one would either need to copy all the plugins from the 
build machine, or have a curated list of plugins required for the 
application to work. No tool can possibly infer plugin dependencies 
without knowledge of the source code or runtime behavior.


Best,

Sascha


On 07/18/2017 09:32 AM, Dinkelacker, Stefan wrote:

Hi Sascha,

you're right. It wasn't intended not to ship the Qt plugins within the package. 
I'll check that and update the tarball. BTW, do you know something similar for 
Linux like windeployqt.exe?

Best,
Stefan

-Original Message-
From: Sascha Zelzer [mailto:sascha.zel...@gmail.com]
Sent: Montag, 17. Juli 2017 18:40
To: mitk-users@lists.sourceforge.net
Subject: [mitk-users] Linux package contains Qt libraries but no plugins

Hi,

I just tried the MITK 2016.11 Linux binary (I have a MR dicom series to
view) and got the (kind of) common error:

This application failed to start because it could not find or load the Qt platform plugin 
"xcb"
in "".

Reinstalling the application may fix this problem.


which is typically attributed to the Qt plugins not being found. Looking at the 
bin folder, I saw that the Qt libraries are shipped in the binary package, but 
not the required Qt plugins. Is there a particular reason for that?

In my view, you should either ship a complete self-contained set of Qt 
libraries, or none at all. After I deleted all bin/libQt5* files, my system Qt 
libraries were used by the MITK Workbench and hence also the system Qt plugins 
were found and loaded (sure, some QT_PLUGIN_PATH env var trickery would also 
work, but just hides the real issue). The workbench started just fine.

Let me know if I can help with this for the next release.

Thanks,

Sascha


--
Check out the vibrant tech community on one of the world's most engaging tech 
sites, Slashdot.org! http://sdm.link/slashdot 
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


[mitk-users] Linux package contains Qt libraries but no plugins

2017-07-17 Thread Sascha Zelzer

Hi,

I just tried the MITK 2016.11 Linux binary (I have a MR dicom series to 
view) and got the (kind of) common error:


This application failed to start because it could not find or load the Qt platform plugin 
"xcb"
in "".

Reinstalling the application may fix this problem.


which is typically attributed to the Qt plugins not being found. Looking 
at the bin folder, I saw that the Qt libraries are shipped in the binary 
package, but not the required Qt plugins. Is there a particular reason 
for that?


In my view, you should either ship a complete self-contained set of Qt 
libraries, or none at all. After I deleted all bin/libQt5* files, my 
system Qt libraries were used by the MITK Workbench and hence also the 
system Qt plugins were found and loaded (sure, some QT_PLUGIN_PATH env 
var trickery would also work, but just hides the real issue). The 
workbench started just fine.


Let me know if I can help with this for the next release.

Thanks,

Sascha


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Linux icon

2017-07-05 Thread Sascha Zelzer

Hi,

what icon location are we talking about? If it is the icon in the window 
decoration, this is set via some Qt API, if I remember correctly, and 
should work on all three platforms.


If it is about the icon in some desktop environment menu or shortcut, 
there is no "desktop entry file" provided with MITK AFAIK (for Windows, 
there is an embedded .ico file in the executable itself and on MacOS 
there should be a Info.plist file in the application bundle).


- Sascha


On 07/05/2017 05:16 PM, Nil Goyette wrote:

Hi all,

We found that there's no icon in our linux executable. There's one on 
Windows and OS X but on Linux it's a "?" or a black square with a 
"forbidden" red circle. I searched in the cmake file but there's 
strangely not much about icons and there's no ".desktop" file so the 
icon is probably set in Qt somewhere. Do you know who are the usual 
suspects for a missing icon? Where should I check?


Nil


-- 


Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Make Package on OSX

2017-06-14 Thread Sascha Zelzer

Hi Dora,

I am not sure if my comments are still valid because I haven't used MITK 
much recently. Back then, "make package" was not supposed to be used for 
debug builds. It would work for some special cases, but not in general 
if I remember correctly.


The first thing I would check is if your release package references the 
correct set of shared libraries (dylib files). I am not familiar with 
Xcode (if you happen to use it), but you should be able to see the list 
of loaded dylib files when running your executable with the Xcode 
debugger attached.


Things to watch out for:

1. Do you have a mix of release and debug dylibs loaded?

2. Are the loaded Qt libraries of the same (or newer) version as the 
ones you originally linked with?


Regarding Qt, its libraries may or may not be packaged when you run 
"make package", depending on their install location.


Best,

Sascha


On 06/14/2017 04:05 PM, Admin Uniapp wrote:

Hi again,

Can anybody help me with this please? I understand that building in 
debug mode may in some cases hides semantic errors in the code but I 
can't see anything in the place where the application crashes. Does 
anyone have experience of packaging in OSX?


Any hints is highly appreciated as this has given me a headache for 
the last week or so.


Many thanks
Dora

On Mon, Jun 12, 2017 at 4:04 PM, Admin Uniapp > wrote:


Hello all,

I've been having numerous problems with creating a package of my
MITK project since the new OSX updates:

- First I had to add CMAKE_INSTALL_RPATH to point it to where VMTK
libraries are in the MITK build directory, otherwise make package
would complain about not finding VMTK libraries

- Setting the project build type to release builds and makes a
package but for a very strange reason when I test the application
it crashes after running a few operations. I know there is nothing
wrong with the operations because they work fine on linux and also
the application crashes when it reaches the end of a function
where there is no interesting code:

...
this->BusyCursorOn();
mitk::ProgressBar::GetInstance()->AddStepsToDo(1);
std::unique_ptr cmd(new CommandLine());
cmd->ExecuteCreateMesh(directory, templatePath);
QMessageBox::information(NULL, "Attention",
"Command Line Operations Finished!");
this->BusyCursorOff();

//Code runs fine up to here and the suddenly
crashes after the message box!

} else if(dialogCode == QDialog::Rejected) {
inputs->close();
inputs->deleteLater();
}//_if

} catch(mitk::Exception& e) {
return;
}//_try
} else
return;
} else
return;

- More confusing is when I set the build type to debug, the crash
I explained in the last point does not happen but trying to make
package from debug mode fails with errors like this:

CMake Error at
/Users/dxr/Install/Proj-build/Apps/ProjApp/cmake_install.cmake:452
(file):
  file INSTALL cannot find
 
"/Users/dxr/Install/Projapp/Apps/ProjApp/_target_loc_debug-NOTFOUND".

Call Stack (most recent call first):
  /Users/dxr/Install/Proj-build/Apps/cmake_install.cmake:32 (include)
  /Users/dxr/Install/Proj-build/cmake_install.cmake:78 (include)

Can someone please help a little with these? I have run out of
things to try and not really sure what's going on!

Many thanks
Dora




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Deprecated functions on OSX

2017-06-06 Thread Sascha Zelzer
The task should read "Update to CppMicroServices 3.x" which uses the 
recommended C++11 atomics :)


- Sascha


On 06/06/2017 01:15 PM, Dinkelacker, Stefan wrote:


Thank you, I created a task for this [1].

Best,
Stefan

[1] https://phabricator.mitk.org/T22929

*From:*Admin Uniapp [mailto:contactuni...@gmail.com]
*Sent:* Dienstag, 6. Juni 2017 13:07
*To:* Dinkelacker, Stefan
*Cc:* MITK
*Subject:* Re: [mitk-users] Deprecated functions on OSX

Hi Stefan,

Thanks for your reply. This is the example output from the compiler:

/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/src/util/usThreads_p.h:203:5: 
error:


  'OSAtomicIncrement64Barrier' is deprecated: first deprecated in 
macOS 10.12 - Use std::atomic_fetch_add() from 


  instead [-Werror,-Wdeprecated-declarations]

US_ATOMIC_INCREMENT(_Counter);

^

/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/src/util/usThreads_p.h:90:55: 
note: expanded from


  macro 'US_ATOMIC_INCREMENT'

#define US_ATOMIC_INCREMENT(x)IntType n = 
OSAtomicIncrement64Barrier(x)


^

/usr/include/libkern/OSAtomicDeprecated.h:269:9: note: 
'OSAtomicIncrement64Barrier' has been explicitly marked deprecated here


int64_t OSAtomicIncrement64Barrier( volatile 
OSAtomic_int64_aligned64_t *__theValue );


^

In file included from 
/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/src/util/usSharedLibrary.cpp:22:


In file included from 
/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/include/usSharedLibrary.h:26:


In file included from 
/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/include/usSharedData.h:32:


In file included from 
/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/src/util/usAtomicInt_p.h:27:


/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/src/util/usThreads_p.h:209:5: 
error:


  'OSAtomicIncrement64Barrier' is deprecated: first deprecated in 
macOS 10.12 - Use std::atomic_fetch_add() from 


  instead [-Werror,-Wdeprecated-declarations]

US_ATOMIC_INCREMENT();

^

/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/src/util/usThreads_p.h:90:55: 
note: expanded from


  macro 'US_ATOMIC_INCREMENT'

#define US_ATOMIC_INCREMENT(x)IntType n = 
OSAtomicIncrement64Barrier(x)


^

/usr/include/libkern/OSAtomicDeprecated.h:269:9: note: 
'OSAtomicIncrement64Barrier' has been explicitly marked deprecated here


int64_t OSAtomicIncrement64Barrier( volatile 
OSAtomic_int64_aligned64_t *__theValue );


^

In file included from 
/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/src/util/usSharedLibrary.cpp:22:


In file included from 
/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/include/usSharedLibrary.h:26:


In file included from 
/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/include/usSharedData.h:32:


In file included from 
/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/src/util/usAtomicInt_p.h:27:


/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/src/util/usThreads_p.h:215:5: 
error:


  'OSAtomicDecrement64Barrier' is deprecated: first deprecated in 
macOS 10.12 - Use std::atomic_fetch_sub() from 


  instead [-Werror,-Wdeprecated-declarations]

US_ATOMIC_DECREMENT(_Counter);

^

/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/src/util/usThreads_p.h:91:55: 
note: expanded from


  macro 'US_ATOMIC_DECREMENT'

#define US_ATOMIC_DECREMENT(x)IntType n = 
OSAtomicDecrement64Barrier(x)


^

/usr/include/libkern/OSAtomicDeprecated.h:288:9: note: 
'OSAtomicDecrement64Barrier' has been explicitly marked deprecated here


int64_t OSAtomicDecrement64Barrier( volatile 
OSAtomic_int64_aligned64_t *__theValue );


^

In file included from 
/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/src/util/usSharedLibrary.cpp:22:


In file included from 
/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/include/usSharedLibrary.h:26:


In file included from 
/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/include/usSharedData.h:32:


In file included from 
/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/src/util/usAtomicInt_p.h:27:


/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/src/util/usThreads_p.h:227:5: 
error:


'OSAtomicCompareAndSwap64Barrier' is deprecated: first deprecated in 
macOS 10.12 - Use


std::atomic_compare_exchange_strong() from  instead 
[-Werror,-Wdeprecated-declarations]


US_ATOMIC_ASSIGN(, m_Counter);

^

/Users/dxr/Install/MITK/MITK-2016.03/Modules/CppMicroServices/core/src/util/usThreads_p.h:92:43: 
note: expanded from


  macro 'US_ATOMIC_ASSIGN'

#define US_ATOMIC_ASSIGN(l, v)   
 OSAtomicCompareAndSwap64Barrier(*l, v, l)


^


Re: [mitk-users] BlueBerry question: Change data node selection from editor

2017-05-31 Thread Sascha Zelzer

Hi Miklos,

you are on the right track!

Cheers,

Sascha


On 05/31/2017 06:24 PM, Miklos Espak wrote:
OK, I got it work. The editor had to register its own selection 
provider. I copied the implementation from QmitkAbstractView.


Cheers,
Miklos

On 31 May 2017 at 16:19, Miklos Espak > wrote:


Hi,

we have a custom editor (aka. DnD Display) that can contain
multiple image viewers for viewing images side by side.

I would like to maintain the data node selection for each internal
viewer, so that when the user changes the selected (focused)
viewer, the earlier data manager selection for that viewer is
restored, and (!) all the views are notified about the selection
change and update their status.

I cannot figure out, how to do that. :-(

The editor derives from QmitkAbstractRenderEditor and
mitk::ILinkedRenderWindowPart, and it receives a signal when the
selection has to be changed.

I tried this but the views are not notified:

voidMultiViewerEditor::OnSelectionChanged()

{


berry::IWorkbenchWindow::PointerworkbenchWindow=this->GetSite()->GetWorkbenchWindow();


berry::ISelectionService*workbenchWindowSelectionService=workbenchWindow->GetSelectionService();


berry::ISelection::ConstPointerselection=workbenchWindowSelectionService->GetSelection("org.mitk.views.datamanager");


berry::IViewPart::PointerdataManagerView=workbenchWindow->GetActivePage()->FindView("org.mitk.views.datamanager");

QmitkDataNodeSelectionProvider::PointerdataManagerSelectionProvider=


dataManagerView->GetSite()->GetSelectionProvider().Cast();

dataManagerSelectionProvider->SetSelection(selection);

}

Any idea?

Cheers,
Miklos








--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Plugin's Label Localization

2017-05-11 Thread Sascha Zelzer

Hi,

the documentation is misleading. This feature was never fully 
implemented and there is no way to handle translations automatically at 
the manifest level right now. Sorry for that. The paragraph in the doc 
block should be deleted (or the translation system be implemented...)


Cheers,

Sascha


On 05/10/2017 04:29 PM, IBlackCatter . wrote:

Dear MITK users,

I am adding new plugins to MITK and need to get their localized names 
to display in menu.


After some search this lines of code were found:

MITK/Plugins/org.blueberry.core.runtime/src/registry/berryIExtension.h

/**
* Returns a displayable label for this extension.
* Returns the empty string if no label for this extension
* is specified in the extension manifest file.
*  Note that any translation specified in the extension manifest
* file is automatically applied.
* 
*
* @return a displayable string label for this extension,
* possibly the empty string
* @throws InvalidRegistryObjectException if this extension is no 
longer valid

*/
virtual QString GetLabel() const = 0;


But it is not clear how translation should be specified in manifest 
file. And I can't find any examples of such functionality being used.

How can i achieve getting localized label from this function?

I really appreciate any help you can provide.

--
Artem Burjachenko


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] [Simulation plugin] Execution error at plugin loading

2017-02-28 Thread Sascha Zelzer

Hi,


Stefan will know this better than I do, but looking at the SOFA 
ObjectFactory it looks like it does not provide "unregister" 
functionality. So it looks to me that while unloading the DLL of the 
simulation plugin (and hence the SOFA Core library) there are still some 
dangling pointers in the ObjectFactory. Probably due to some previously 
unloaded SOFA modules.



If you really want to get to the bottom of this, I suggest to look at 
the list of loaded and unloaded DLLs when debugger breaks into your 
application due to the  read access violation. Visual Studio provides 
this list in the "Modules" view. Please post it here.



A typically workaround is to add the SOFA Core library to the list of 
"preloaded" DLLS, such that it is not unloaded during the CTK 
PluginFramework initialization.



Best,

Sascha


On 02/23/2017 06:41 PM, Camille Krewcun wrote:

Hi,

On the last test I made I used the source code cloned from 
https://phabricator.mitk.org/source/mitk.git today (after you merged 
the patch into the master), with no modification nor additional code.


I proceeded to the following build steps:
- Switched on MITK_USE_SOFA in the superbuild (which forced 3 
boost libraries on), configured twice, generated the solution, and 
built project ALL_BUILD in debug mode
- Switched in CMake to the MITK-build directory to switch both 
MITK_BUILD_org.mitk.simulation and 
MITK_BUILD_org.mitk.gui.qt.simulation plugins on, configured and 
generated.
- I opened the solution directly from CMake, then built and run 
MITKWorkbench.


All projects are built successfully (including MitkWorkbench without 
any error, but I encounter an error when running MitkWorkbench (in 
Debug mode). I also tried to use the /BlueBerry.clean argument, with 
the same result.


When I run MitkWorkbench, a pop-up window appears with the following text:
-
Exception thrown: read access violation.
this-> was 0x7FFF33F669E8
If there is a handler for this exception, the program may be safely 
continued.

-

I encounter the error before the interface is visible, and it occurs 
when the plugins are being loaded. Here is the call stack when the 
application crashes:

---
 SofaCore_1_0d.dll!boost::detail::sp_counted_base::release() Line 103
SofaCore_1_0d.dll!boost::detail::shared_count::~shared_count() Line 473
 [External Code]
SofaCore_1_0d.dll!boost::checked_delete(sofa::core::ObjectFactory::ClassEntry 
* x) Line 34
SofaCore_1_0d.dll!boost::detail::sp_counted_impl_p::dispose() 
Line 79

 SofaCore_1_0d.dll!boost::detail::sp_counted_base::release() Line 104
SofaCore_1_0d.dll!boost::detail::shared_count::~shared_count() Line 473
 [External Code]
SofaCore_1_0d.dll!sofa::core::ObjectFactory::~ObjectFactory() Line 37
 [External Code]
 Qt5Cored.dll!QLibraryPrivate::unload_sys() Line 151
Qt5Cored.dll!QLibraryPrivate::unload(QLibraryPrivate::UnloadFlag flag) 
Line 552

 Qt5Cored.dll!QPluginLoader::unload() Line 256
CTKPluginFramework.dll!ctkPluginStorageSQL::insertArchive(QSharedPointer 
pa, QSqlQuery * query) Line 491
CTKPluginFramework.dll!ctkPluginStorageSQL::insertArchive(QSharedPointer 
pa) Line 400
CTKPluginFramework.dll!ctkPluginStorageSQL::insertPlugin(const QUrl & 
location, const QString & localPath) Line 378
 CTKPluginFramework.dll!ctkPlugins::install(const QUrl & location, 
QIODevice * in) Line 119
CTKPluginFramework.dll!ctkPluginContext::installPlugin(const QUrl & 
location, QIODevice * in) Line 101
CTKPluginFramework.dll!ctkPluginFrameworkLauncherPrivate::install(const 
QUrl & pluginPath, ctkPluginContext * context) Line 238
CTKPluginFramework.dll!ctkPluginFrameworkLauncherPrivate::loadBasicPlugins() 
Line 335
CTKPluginFramework.dll!ctkPluginFrameworkLauncher::startup(QRunnable * 
endSplashHandler) Line 522
CTKPluginFramework.dll!ctkPluginFrameworkLauncher::run(QRunnable * 
endSplashHandler, const QVariant & argument) Line 423
 MitkAppUtil.dll!mitk::BaseApplication::main(const 
std::vector,std::allocator > > & args) Line 701

 PocoUtild.dll!Poco::Util::Application::run() Line 333
 MitkAppUtil.dll!mitk::BaseApplication::run() Line 824
 MitkWorkbench.exe!main(int argc, char * * argv) Line 41
 [External Code]
---

The code crashes when a call is made to method 

Re: [mitk-users] AbstractFileIO problems (inheritance, Qt resources)

2017-02-21 Thread Sascha Zelzer

Hi Daniel,

I try to comment inline below as good as my memory serves me. Take it 
with a grain of salt though, since I haven't worked with that code for 
quite a while.


Best,

Sascha


On 02/21/2017 04:10 PM, mailingli...@maleike.de wrote:


Hi,

I just encountered an unfortunate detail in using file readers derived 
from mitk::AbstractFileIO directly. I cannot use QmitkIOUtil because I 
want to read from a Qt resource and (Qmitk/mitk::)IOUtil verifies 
_file_ existence before looking for readers (and finds that my Qt 
resource is not a regular file). Due to AbstractFileIO's double 
inheritance we need to write code like below to specify an input file 
location:


|MySpecialFileIO_C reader;|
|reader.mitk::AbstractFileReader::SetInput(":/in_exe/my.file");|
|auto result = reader.Read();|

This is a little strange indeed. The way it was designed is to use the 
IFileReader and IFileWriter interfaces, and not work with the 
AbstractFileIO directly (except when implementing a reader / writer 
pair). So in that sense, it would be more idiomatic to get a IFileReader 
first and then work with that:


MySpecialFileIO_C special_io;
mitk::IFileReader& reader =  special_io;
reader.SetInput(...);

This way, no ambiguity exists.

AbstractFileReader::SetInput is specified explicitly because 
AbstractFileIO also inherits AbstractFileWriter::SetInput and the 
compilerwants a clarification of what we want to call.


As I would prefer to avoid this uncommon syntax:

  * was the name of SetInput used in two base classes on purpose? Why
not avoid name collissions by different names, e.g.
SetInputLocation() and SetInputData()?



The same name was chosen for "consistency". Sure, this can be argued 
about. The ambiguity only appears when working with AbstractFileIO 
directly, which is constrained to the IO system implementation if a user 
accesses the system via the interfaces only.



  * would you mind removing the _file_ existance check from IOUtil
(more specifically, from mitk::FileReaderSelector's constructor)?
Or could this check be made aware of Qt's resource system?
  o I know that the first option would require each reader to
handle non-existing files. But this should be a basic check
done in every reader anyway, right?



As far as I remember, this was exactly not the case. I think there were 
some ITK or VTK readers, which didn't check this but failed 
spectacularly instead. Maybe this has changed.


The interfaces contain SetInput() overloads which take a std::istream 
object as input. In case of Qt resources, I believe this is the way to 
go (with the current state of the system). Especially, since you seem to 
know exactly what reader you want already. Now, you only need a way to 
create a std::istream from a Qt resource. Not sure if this is straight 
forward or not. If not, you could embed the file using the 
CppMicroServices resources system which provides convenient classes to 
easily create a std::istream from an embedded resource. Again, I am not 
sure if this an option for you at all.


(Q)mitk(::)IOUtil is definitely lacking support for input streams. Also, 
the mitk::FileReaderSelector could probably be made more flexible such 
that it continues to try and match file reader services based on the 
mime type of a non-existing path passed in (then only relying on the 
file ending).


I hope this helps.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] redland integration problems

2016-11-09 Thread Sascha Zelzer

Hi Sarah,

MITK provides its own CMake scripts for the Redland, Raptor2, and Rasqal 
libraries.


Are you sure you enabled the MITK_USE_Rasqal CMake variable in MITK's 
super-build configuration? Switching it ON and building the super-build 
should generate RasqalConfig.cmake.


Cheers,
Sascha

On 11/09/2016 04:18 PM, Sarah Grimm wrote:

Hello,
i would like to use the rdf modul but i can't integrate redland cause 
cmake couldn't find RasqalConfig.cmake. Rasqal doesn't support 
building with cmake so from where can i get the RasqalConfig.cmake?

Thanks and warm regards,
Sarah


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users



--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] OSX platform flags not used for building microservice resources?

2016-10-06 Thread Sascha Zelzer
Hi Miklos,

this was fixed recently [1] in the CppMicroServices development branch 
but not back-ported to MITK's version. As usual, you could apply the fix 
to your MITK fork, provide a MITK pull request containing a back-port, 
or wait until MITK switches to a new CppMicroServices version containing 
the fix.

Cheers,

Sascha

P.S.: I think it is safe to use the application, but I am not an expert 
on eventual ABI changes in the Mach-O format between e.g. 10.10 and 10.11.


[1] 
https://github.com/CppMicroServices/CppMicroServices/commit/80c885fd5ce91fea0ba6f99a82673bbe1b1f0790#diff-6424bce3f9dea568e30741b0789c5b58


On 10/06/2016 08:02 AM, Miklos Espak wrote:
> Hi,
>
> I see these warnings when I am compiling MITK on El Capitan (11.11)
> using the Yosemite system environment (10.10).
>
> ld: warning: object file (us_MitkCoreTestDriver/us_resources.o) was
> built for newer OSX version (10.11) than being linked (10.10)
>
> The applications look working fine in spite of the warnings, although
> I have not checked which resources should be loaded and if they are
> available.
>
> These variables are set for the build:
>
>   CMAKE_OSX_ARCHITECTURES  x86_64
>
> CMAKE_OSX_DEPLOYMENT_TARGET  10.10
> CMAKE_OSX_SYSROOT
>   /Applications/Xcode
> 6.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
>
> Clang provides the '-arch', '-mmacosx-version-min' and '-isysroot'
> option to pass these values.
>
> Same with the current master and 2015.05.2
>
> Any idea how to fix this? Or can I safely ignore the warnings?
>
> Cheers,
> Miklos
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> mitk-users mailing list
> mitk-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Remeshing plugin not showing up on GUI

2016-10-04 Thread Sascha Zelzer
Are you sure you did "build" the project, after changing the cmake 
configuration? It looks like the plugin does not exist.

Cheers,

Sascha


On 10/04/2016 08:19 AM, Sriprabha Ramanarayanan wrote:
> D:/MITKm2/MITK-superbuild/MITK-build/bin/plugins/Debug/liborg_mitk_gui_qt_remeshing.dll:
>  
> The specified module could not be found.


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Superbuild on Windows MSVC 2012 leads to incomplete building of Boost libraries

2016-09-30 Thread Sascha Zelzer

Hi,


normally, the MITK superbuild sets the required boost libraries 
depending on the MITK_USE_* CMake variables being set to ON. E.g. if 
MITK_USE_SOFA is on, it adds the system, thread and chrono library. If 
you send us the full cmake output, it is easier to tell what is going on 
and which dependency requires data_time and atomic.



However, you can manually append required libraries in the 
MITK_USE_Boos_LIBRARIES cmake variable (e.g. using the CMake GUI). It 
would look like "date_time;atomic", but I am wondering why this is 
needed at all.



Cheers,

Sascha


On 09/30/2016 05:25 PM, Audette, Michel A. wrote:


Hello,


I would like to build MITK with SOFA, using MS Visual Studio 2012 
(with service packs) and the superbuild does not seem to produce all 
of the needed Boost libraries.



The build process complains of the following:


19>Unable to find the requested Boost libraries.
19>
19>Boost version: 1.59.0
19>
19>Boost include path: 
C:/MITK/MITK16.3.0-buildMSVS2012/ep/include/boost-1_59

19>
19>Could not find the following Boost libraries:
19>
19>boost_date_time
19>boost_atomic

Is there an easy fix?


Best wishes,


Michel Audette, Ph.D.
Assistant Professor,
Department of Modeling, Simulation and Visualization Engineering,
Old Dominion University,
Norfolk, VA.


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] New interactor concept, how to access data after procession

2016-08-16 Thread Sascha Zelzer
Hi,

from your plug-in, you need to get hold of some class instance from the 
module. You seem to have done so already in some way or another (e.g. 
from within the plug-in activator or some other code triggered by a user 
interaction in the Workbench). Use the same technique to get an instance 
from you module which allows you to register some kind of callback for 
the action you are interested in. This callback could be as simple as a 
std::function object or an ITK observer if your module code uses ITK 
already.

In any case, do not forget to unregister your callback properly.

Cheers,

Sascha


On 08/16/2016 05:18 PM, Florian Jung wrote:
> I'll try it in a bit more detail:
>
> I have a algorithm in module.
> I connect an interactor from a plugin with the module.
> I triggered the plugin through the interactor, the data is processed and
> lies within the module.
> How should the module notify the plugin that the data is processed, so
> the plugin can fetch the processed data?
>
> Am 16.08.2016 um 16:54 schrieb Kislinskiy, Stefan:
>> Hi,
>>
>> I'm not sure if I really understood your scenario. You trigger an algorithm 
>> that runs in another thread and you want to get informed when the work is 
>> done? There are different general strategies for async programming but you 
>> could start by listen to the modified event of the data you are manipulating 
>> in your algorithm? As MITK "derives from ITK", most of our classes provide 
>> the possibility to be observed (modified and delete events). Depending on 
>> your scenario you can also try to work with Qt Threads.
>>
>> Best,
>> Stefan
>>
>>
>> -Original Message-
>> From: Florian Jung [mailto:florian.j...@igd.fraunhofer.de]
>> Sent: Dienstag, 16. August 2016 15:46
>> To: mitk-users
>> Subject: [mitk-users] New interactor concept, how to access data after 
>> procession
>>
>> We move/have moved several plugins to modules.
>> Most things worked without a problem.
>>
>> But there is still one scenario, which I don't know how to design it 
>> properly.
>>
>> I add an interactor within the plugin.
>> The interactor catches a mouseclick and does some image processing within 
>> the module.
>>
>> Now the question. Once the module is finished, how can I inform the plugin 
>> that the processing is finished, because the module has no knowledge about 
>> the plugin.
>> Obviously something like a observer pattern is needed.
>> Is there an example in the code for this or can somebody tell me, how 
>> something like this is best implemented in mitk?
>>
>> Best regards
>> Florian
>>
>> --
>> Florian Jung
>> Department Visual Healthcare Technologies
>>
>> Fraunhofer-Institute for Computer Graphics Research IGD Fraunhoferstr. 5, 
>> 64283 Darmstadt, Germany
>>
>> phone:  +49.6151.155.520
>> fax:+49.6151.155.480
>> email:  florian.j...@igd.fraunhofer.de
>> web:http://www.igd.fraunhofer.de
>>
>>
>> --
>> ___
>> mitk-users mailing list
>> mitk-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] MITK Workbench- installation advise

2016-08-16 Thread Sascha Zelzer
Hi,

MITK has a few shared library dependencies, but if your Linux 
distribution is not too old (e.g. it has an incompatible libc.so file), 
there is no reason why it shouldn't run given that all its dependencies 
are resolvable.

To find the package name, use dnf (or yum on older RedHat based 
distributions):

dnf whatprovides libXNVCtrl*

then

dnf install libXNVCtrl-352 (if you have that particular package).

Do so for all other shared libraries the MITKWorkbench complains about 
on start-up.

- Sascha


On 08/16/2016 05:34 PM, Goch, Caspar Jonas wrote:
> Hi Paul,
>
> I cannot say for certain whether MITK works on RedHat or not, but it seems 
> there is a libXNVCtrl package for RedHat:
> http://rpm.pbone.net/index.php3/stat/4/idpl/30802233/dir/redhat_el_7/com/libXNVCtrl-352.21-2.el7.x86_64.rpm.html
>
> You might run into other missing packages however.
>
> Best,
> Caspar
>
> -Ursprüngliche Nachricht-
> Von: Paul Palei [mailto:ppa...@mit.edu]
> Gesendet: Dienstag, 16. August 2016 17:19
> An: Kislinskiy, Stefan; Heim, Eric; mitk-users@lists.sourceforge.net
> Betreff: Re: [mitk-users] MITK Workbench- installation advise
>
> libXNVCtrl is not found by yum.
>
> I guess I should of asked this question in the first place, is it possible to 
> install MITK on RedHat or is not supported and I should switch to Ubuntu? 
> This is per your supported platforms page:
> http://docs.mitk.org/2016.03/SupportedPlatformsPage.html
>
> Paul Palei
> Information Technology Specialist
> Massachusetts Institute of Technology
> Research Laboratory of Electronics
> 77 Massachusetts Ave, Cambridge, MA 02139 36-427B
> (617) 324-2197 | Direct
> ppa...@mit.edu
>
>
>
>
> -Original Message-
> From: Kislinskiy, Stefan [mailto:s.kislins...@dkfz-heidelberg.de]
> Sent: Tuesday, August 16, 2016 04:55
> To: Paul Palei ; Heim, Eric ; 
> mitk-users@lists.sourceforge.net
> Subject: RE: MITK Workbench- installation advise
>
> Hi Paul,
>
> In your log file, the relevant lines are:
>
> Caused by: ctkPluginException: The plugin 
> "/root/Desktop/mitk/MITK-2016.3.0-linux64/bin/plugins/liborg_mitk_core_services.so"
>  could not be loaded: Cannot load library 
> /root/Desktop/mitk/MITK-2016.3.0-linux64/bin/plugins/liborg_mitk_core_services.so:
>  (libXNVCtrl.so.0: cannot open shared object file: No such file or directory)
>
> libXNVCtrl.so is missing. This is a library from Nvidia that's missing. You 
> can install it by something like "sudo yum install libXNVCtrl".
>
> Best,
> Stefan
>
> -Original Message-
> From: Paul Palei [mailto:ppa...@mit.edu]
> Sent: Montag, 15. August 2016 14:32
> To: Paul Palei; Heim, Eric; Kislinskiy, Stefan; 
> mitk-users@lists.sourceforge.net
> Subject: RE: MITK Workbench- installation advise
>
> Just checking if anyone would be able to assist with installation issues on 
> RedHat.
> Thanks
>
> Paul Palei
> Information Technology Specialist
> Massachusetts Institute of Technology
> Research Laboratory of Electronics
> 77 Massachusetts Ave, Cambridge, MA 02139 36-427B
> (617) 324-2197 | Direct
> ppa...@mit.edu
>
>
>
> -Original Message-
> From: Paul Palei [mailto:ppa...@mit.edu]
> Sent: Friday, August 5, 2016 10:36
> To: Heim, Eric ; Kislinskiy, Stefan 
> ; mitk-users@lists.sourceforge.net
> Subject: Re: [mitk-users] MITK Workbench- installation advise
>
> Hi Eric,
> Thank you so much for your advice. This got me further than I was before but 
> still can't install it completely so that it can be used.
> It now generates lots of error messages and fails at the end.
>
> I am attaching those errors here if someone is brave enough to take a look at 
> try to figure out what they mean.
>
> Thank you for all you help.
>
>
> Paul Palei
> Information Technology Specialist
> Massachusetts Institute of Technology
> Research Laboratory of Electronics
> 77 Massachusetts Ave, Cambridge, MA 02139 36-427B
> (617) 324-2197 | Direct
> ppa...@mit.edu
>
>
>
> -Original Message-
> From: Heim, Eric [mailto:e.h...@dkfz-heidelberg.de]
> Sent: Tuesday, August 2, 2016 11:16
> To: Paul Palei ; Kislinskiy, Stefan 
> ; mitk-users@lists.sourceforge.net
> Subject: AW: MITK Workbench- installation advise
>
> Hi Paul,
>
> This is what solves the "xcb" error for me:
>
> MitkWorkbench.sh:
>
> #!/bin/sh
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/Qt5.4.0/5.4/gcc_64/lib
> export QT_QPA_PLATFORM_PLUGIN_PATH=/opt/Qt5.4.0/5.4/gcc_64/plugins
> binpath=$(dirname "$(readlink -f "$0")") appname=$(basename "$0" .sh) export 
> LD_LIBRARY_PATH="$binpath/bin":"$binpath/bin/plugins":$LD_LIBRARY_PATH
> "$binpath/bin/$appname" $*
>
> Cheers,
> Eric
>
> -Ursprüngliche Nachricht-
> Von: Paul Palei [mailto:ppa...@mit.edu]
> Gesendet: Dienstag, 2. August 2016 16:42
> An: Kislinskiy, Stefan; mitk-users@lists.sourceforge.net
> Betreff: Re: [mitk-users] MITK Workbench- 

Re: [mitk-users] Unregistration of Mitk ITK image reader wrapper

2016-08-10 Thread Sascha Zelzer

Hi,

if I understood correctly, you seem to think that "UngetService" would 
unregister the referenced service, but that is not what it does. It 
tells the registry that you are done "using" the service, after you "got 
it" via a "GetService" call. This helps the internal registry to keep 
track of the client currently using a particular service.


Unregistering a service that you didn't register yourself is not in the 
spirit of the system and hence not directly supported.


Cheers,

Sascha


On 07/22/2016 11:09 AM, Aurélien Labrosse wrote:

Hello,

We need to implement a flexible TIFF reader with a delegation system 
which will allow us to gather image metadata from themselves or from 
companion files. We started to implement it in a module, and we 
register it with a custom tiff mimetype.


Now when we open a TIFF image in Mitk, a dialog appears where we have 
to choose between the Mitk/ITK tiff or our reader (which is the 
expected behaviour if two readers are able to read the same mimetype).


How can we unregister() the Itk wrapped loader?  We just want to use 
our reader.


We  tried to lookup and unregister the service :

[...]

std::vector refs;
refs = 
context->GetServiceReferences("(org.mitk.IFileIO.description=ITK 
TIFFImageIO)");

if (!refs.empty())
{
us::ServiceReference tiffReaderServiceRef = 
refs.front();
mitk::AbstractFileIOReader* tiffReader = 
dynamic_cast(context->GetService(tiffReaderServiceRef));


tiffReader->UnregisterService();
context->UngetService(tiffReaderServiceRef);

}

[...]

Unfortunatly, the UngetService() call does nothing since the 
registration information is lost in the reader. After some digging, we 
found that information loss occurs in 
Modules\Core\src\IO\mitkItkImageIO.cpp, around line 42 :


[...]

ItkImageIO::ItkImageIO(const ItkImageIO& other)
: AbstractFileIO(other)
  , 
m_ImageIO(dynamic_cast(other.m_ImageIO->Clone().GetPointer())) 



{
[...]

So the solution we found is to cancel the wrapping of the ITK TIFF 
reader as its already done for Nifti and GDCM images. Could the failed 
unregistration considered as a bug or are we doing things bad? Anyway 
a more elegant solution than just adding an exception would be great.


We can event work on a solution to fix the unregistration if its a bug.

Thanks for any clues!

Regards,

Aurélien Labrosse



--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Unregistration of Mitk ITK image reader wrapper

2016-08-10 Thread Sascha Zelzer
Hi,

in fact, there are two different ways of achieving this:

1. Register a CustomMimeType service [1] (use some custom name like 
"application/x-pollen-tiff") and associate the set of TIFF extensions 
with it that you want to use. The important part is to use a non-default 
service ranking when registering your mime type (e.g. > 0). Now when the 
system tries to match a reader to a TIFF file, it uses your custom mime 
type name, which is not associated with any MITK/ITK related reader. 
Register your own TIFF reader using your custom mime type name in its 
service properties and you should be all set.


2. You can "filter" service registrations by using service hooks [2]. 
This is a more generic solution but requires careful implementation and 
more knowledge about how CppMicroServices works. It allows you to 
pro-actively filter the list of services other clients can see, e.g. 
suppress a specific reader service by filtering it out.


[1] http://docs.mitk.org/2016.03/classmitk_1_1CustomMimeType.html

[2] http://docs.mitk.org/2016.03/MicroServices_ServiceHooks.html


On 08/10/2016 02:55 PM, Goch, Caspar Jonas wrote:
> Hi Aurélien,
>
> sorry for the delay, we were somewhat occupied with our phabricator 
> migration. Assuming this is still relevant to you:
>
> It kind of depends on what your desired result is. If you only want your 
> reader to be the default choice (and thus being selected if no dialog is 
> opened, such as when running from the command line or loading scene files) 
> you can register yours with a higher service ranking (see [1] for an example).
> If you want to get rid of the other reader altogether and thus have no dialog 
> show at all, it seems that is currently not possible, I have opened a feature 
> request for it where we can discuss a couple of different ways to go about 
> this [2]. It would be great if you could weigh in.
>
> Best,
> Caspar
>
> [1] 
> https://phabricator.mitk.org/diffusion/MITK/browse/master/Modules/DiffusionImaging/DiffusionIO/mitkDiffusionModuleActivator.cpp;9ef2563eac399aa063bc1965e71f8e83442344eb$48
> [2] https://phabricator.mitk.org/T19853
>
>
> -Ursprüngliche Nachricht-
> Von: Aurélien Labrosse [mailto:aurel...@pollen-metrology.com]
> Gesendet: Freitag, 22. Juli 2016 11:09
> An: mitk-users@lists.sourceforge.net
> Betreff: [mitk-users] Unregistration of Mitk ITK image reader wrapper
>
> Hello,
>
> We need to implement a flexible TIFF reader with a delegation system which 
> will allow us to gather image metadata from themselves or from companion 
> files. We started to implement it in a module, and we register it with a 
> custom tiff mimetype.
>
> Now when we open a TIFF image in Mitk, a dialog appears where we have to 
> choose between the Mitk/ITK tiff or our reader (which is the expected 
> behaviour if two readers are able to read the same mimetype).
>
> How can we unregister() the Itk wrapped loader?  We just want to use our 
> reader.
>
> We  tried to lookup and unregister the service :
>
> [...]
>
> std::vector refs;
>   refs =
> context->GetServiceReferences("(org.mitk.IFileIO.desc
> context->ription=ITK
> TIFFImageIO)");
>   if (!refs.empty())
>   {
>   us::ServiceReference tiffReaderServiceRef = 
> refs.front();
>   mitk::AbstractFileIOReader* tiffReader = 
> dynamic_cast(context->GetService(tiffReaderServiceRef));
>
>   tiffReader->UnregisterService();
>   context->UngetService(tiffReaderServiceRef);
>
> }
>
> [...]
>
> Unfortunatly, the UngetService() call does nothing since the registration 
> information is lost in the reader. After some digging, we found that 
> information loss occurs in Modules\Core\src\IO\mitkItkImageIO.cpp, around 
> line 42 :
>
> [...]
>
> ItkImageIO::ItkImageIO(const ItkImageIO& other)
> : AbstractFileIO(other)
> ,
> m_ImageIO(dynamic_cast(other.m_ImageIO->Clone().GetPointer()))
>
>
> {
> [...]
>
> So the solution we found is to cancel the wrapping of the ITK TIFF
> reader as its already done for Nifti and GDCM images. Could the failed
> unregistration considered as a bug or are we doing things bad? Anyway a
> more elegant solution than just adding an exception would be great.
>
> We can event work on a solution to fix the unregistration if its a bug.
>
> Thanks for any clues!
>
> Regards,
>
> Aurélien Labrosse
>
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. http://sdm.link/zohodev2dev
> ___
> mitk-users mailing list
> mitk-users@lists.sourceforge.net
> 

Re: [mitk-users] IO module not loaded in package

2016-06-20 Thread Sascha Zelzer

Hi Nil,


1) As far as I remember, the plug-in order when calling 
mitkFunctionCreateBlueBerryApplication does not matter


2) ctkPluginActivator is the base class for all CTK plugin activators. 
The berry::AbstractUICTKPlugin class derives from it (well, from 
berry::Plugin which in turn implements ctkPluginActivator) and can be 
used in BlueBerry Workbench plug-ins. It is nor required to use it, but 
it provides some convenience methods for easier access to preferences, 
and the plug-in persistend state area for example. Last, the 
berry::IApplication is the main entry point for a complete application. 
It is tied to the org.blueberry.osgi.applications extension point. 
Usually, you would not create your own but rely on the one provided by MITK.


3) Q_PLUGIN_METADATA is not used by CTK or BlueBerry but required by the 
Qt plugin system, if I remember correctly. Using the project name as the 
identifier is a good idea to avoid confusion.



Now, the auto-load issue. The general problem is, that the install 
scripts are quite involved because they try to do the "right thing". 
When you install a BlueBerry application via 
mitkFunctionCreateBlueBerryApplication, the CMake macro is able to 
retrieve all transitive plug-in dependencies (also from external 
projects) and install them explicitly.  The auto-load modules (which 
also need to be installed explicitly) are derived from this set of 
plug-ins. When you declare a module in your project to be auto-loaded 
with MitkCore (which belongs to the external MITK project) but none of 
your own plug-ins have a direct dependency on MitkCore, the CMake 
scripts are not able to find your auto-load module and install it (they 
will only "see" the auto-load modules from external projects like MITK 
itself). This is a bug in the system. Your work-around works because 
your dummy-plugin depends on MitkCore and when you install your 
application the scripts see the MitkCore dependency and now also has the 
current list of modules that are to be auto-loaded with it (including 
yours). A better work-around could be to just add the MitkCore 
dependency explicitly to one of your existing plug-ins (even if that 
plug-in already transitively depends on it).


I couldn't think of a quick solution to fix the install scripts in a 
good way yet. One approach could be to expose another CMake macro which 
lets you install auto-load modules explicitly yourself (essentially 
refactoring the mitkFunctionInstallAutoLoadModules macro).



Cheers,

Sascha


On 06/16/2016 07:19 PM, Nil Goyette wrote:


Hi all.

Is there someone who can answer my questions?
My IO module is loading now, but this is such an hack, maybe an answer 
to 2) could help me.

Thank you for your time.

Nil

Le 2016-06-08 à 10:32, Nil Goyette a écrit :


Hi all,

Thank you Pierre-Yves and Stefan. I did find a workaround yesterday. 
It's totally a hack and I don't even understand how it can work. I 
simply added back a plugin that I deleted earlier. The plugin only 
contains its activator, depends on CTK and MitkCore, requires no 
other plugin. It simply does nothing. And yet, my IO module works 
when I use it in my app. It's as if doing something random fixed my 
module.


Here are some questions for you!
1) I know the order of the plugins in Plugins/plugin.xml is 
important, but is it important in Apps/{name}/CMakeList.txt, in the 
list of plugins that we pass to mitkFunctionCreateBlueBerryApplication?
2) What's the differences between ctkPluginActivator, 
berry::AbstractUICTKPlugin and berry::IApplication? When should we 
use them? I discovered that we use them almost randomly. This can't 
be right :/
3) Is the ID important in the activator? "Q_PLUGIN_METADATA(IID 
"org_imeka_app")" Should it be identical to the project's name in the 
plugin's cmakelist? I tested with random names and it seems to work.


Le 2016-06-08 à 03:53, Kislinskiy, Stefan a écrit :


Hi,

I remember a similar question from a coworker. He wasn’t able to get 
his autoload modules loaded from the package he made out of his 
project template based application. He also found a solution to this 
bug if I remember correctly: He added the corresponding bin folder 
of the module in charge to the path, so i. e., when you autoload 
with MitkCore, this would be MITK-build/bin/MitkCore/Release.


Does it help (for now) as workaround?

Best,

Stefan

*From:*Pierre-Yves Menguy [mailto:pierreyves.men...@gmail.com]
*Sent:* Dienstag, 7. Juni 2016 16:11
*To:* Nil Goyette
*Cc:* mitk-users@lists.sourceforge.net
*Subject:* Re: [mitk-users] IO module not loaded in package

Hello,

I had a similar problem when updating from 2014.10 to 2016.03 (big gap).
When looking into it, I noticed my library wasn't packaged, it was 
left out during the process (both NSIS and ZIP).


I couldn't find a fix that involved only changes into my own code, 
and my code was similar to the IOExt/Diffusion module.


As a last chance, I created a MITK fork to include my own IO module 

Re: [mitk-users] Testing modules problem

2016-04-20 Thread Sascha Zelzer
If your library does not export any symbols, there will be no import .lib file. 

As far as I know mitk does not support static linking officially yet. It 
wouldn't help much in your case anyways. How is the test using your module? If 
it is via some indirection, you need to load your module manually or use 
auto-loading.

Cheers, 
Sascha

On April 20, 2016 12:48:33 PM GMT+02:00, "Kislinskiy, Stefan" 
 wrote:
>Hi,
>
>why do you have the DLL but not the LIB of your own module? As far as I
>know, DLLs are created out of LIBs, so if there’s a DLL, I’d expect a
>LIB, too. For example, the LIBs of MITK modules are in
>MITK-superbuild/MITK-build/lib/, and the DLL
>counterparts are located in
>MITK-superbuild/MITK-build/bin/. Are you sure that your
>module is really built successfully and that the DLL isn’t just an
>artifact from previous builds?
>
>The mitk_create_module_tests() macro uses the MODULE_NAME variable,
>which is available after the call to mitk_create_module(), to name the
>test driver and to add the module as dependency to the test driver
>executable. If there’s something wrong, it should happen already at
>configure time. This is why I suspect your module isn’t built
>successfully.
>
>Best,
>Stefan
>
>From: Aurélien Labrosse [mailto:aurel...@pollen-metrology.com]
>Sent: Mittwoch, 20. April 2016 09:14
>To: 'mitk-users@lists.sourceforge.net'; moir...@pollen-metrology.com
>Subject: [mitk-users] Testing modules problem
>
>Hello,
>
>I created a brand new module with one sample test included. I followed
>the documentation, and so i have the module itself and an included test
>folder, with minimal CMakeLists.txt, file.cmake and a test.cpp.
>So test/CMakeLists.txt contains :
>
>MITK_CREATE_MODULE_TESTS()
>-
>
>test/files.cmake :
>-
>SET(MODULE_TESTS
>   sampleTest.cpp
>)
>SET(MODULE_CUSTOM_TESTS
>)
>--
>
>and test/sampleTest.cpp contains .. a test implementation as described
>in [1].
>
>The module itself is named PlatypusLib.
>At compile time, the test driver cannot be linked due to the lack of
>PlatypusLib.lib file ([2])
> I only have the dynamic counterpart, ..\..\bin\Debug\PlatypusLib.dll.
>
>I wonder how i have to configure the test driver to be compiled static
>using DLLs only and not static lib.
>Do anyone have a clue on this?
>
>Thanks,
>
>Aurélien
>
>[1] http://docs.mitk.org/nightly/NewModulePage.html
>[2] LINK : fatal error LNK1104: cannot open file
>'..\..\..\bin\Debug\PlatypusLib.lib'
>--
>[cid:image003.png@01D19B01.168320E0]
>
>
>
>Aurélien Labrosse
>Co Founder - VP of product and Engineering
>9 rue du Rocher de Lorzier – 38430 Moirans – France
>Office: +33 (0)476657121
>
>www.pollen-metrology.com
>[cid:image006.png@01D19B01.168320E0]
>
>[cid:image007.png@01D19B01.168320E0]
>
>
>
>
>
>--
>Find and fix application performance issues faster with Applications
>Manager
>Applications Manager provides deep performance insights into multiple
>tiers of
>your business applications. It resolves application problems quickly
>and
>reduces your MTTR. Get your free trial!
>https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>
>
>
>___
>mitk-users mailing list
>mitk-users@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/mitk-users

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Read of configuration file

2016-04-13 Thread Sascha Zelzer

Hi,

I do not know why the application is not reading your .ini file. It 
should, as far as I remember, look for a .ini file named like the 
application executable, starting in the executable's directory and 
continuing the search upwards. This is a POCO feature and I suggest to 
debug the POCO Application class to see why it does not find / read your 
file.


For MITK, we are not installing the .ini file since we set appropriate 
defaults within the application itself. I believe you need to issue a 
CMake "install" call yourself, if you want the .ini file included in the 
install package.


Cheers,
Sascha

On 04/11/2016 12:18 PM, Aurélien Labrosse wrote:

Hello,
I have a custom application based on Mitk. When working on it trough 
Visual Studio, I can use a ".ini" file, which is read and processed well.
But when the application is deployed, the "ini" file is not present in 
the bin/ directory, and not even processed if I create it by hand.
I had a read in Mitk _BaseApplication_ and Poco _Application_ classes, 
but haven't find any reason for this behavior.

Do anyone have any clue about the processing of .ini file?
Thanks by advance.

Regards,

--
Pollen Metrology
Pollen Metrology

Aurélien Labrosse
Co Founder - VP of product and Engineering
9 rue du Rocher de Lorzier – 38430 Moirans – France
Office: +33 (0)476657121

www.pollen-metrology.com  youtube 
linked-in 





--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301=/ca-pub-7940484522588532


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Rebuilding on Mac

2016-04-13 Thread Sascha Zelzer
The linguist tools are a dependency of every CTK plug-in

https://github.com/commontk/CTK/blob/master/CMake/ctkMacroBuildPlugin.cmake#L319

You shouldn't need to add the Qt5*_DIR CMake variables yourself. I'd 
suggest to try removing all of the Qt5*_DIR variables from the CMake 
cache and run configure again (from the MITK build directory, not the 
MITK-superbuild one).

Cheers,
Sascha

On 04/13/2016 10:08 PM, Kislinskiy, Stefan wrote:
> That's strange as i'm pretty sure that the linguist tools are not a 
> dependency of MITK, not even a transitive one. Is it possible that you have 
> that dependency in your own code/module/plugin/app? Search for "Qt5|" in all 
> of your CMakeLists.txt files to get an overview of your Qt dependencies. The 
> MITK Qt 5 dependencies are listed in [1]. A few optional modules have an 
> additional dependency to Qt5Quick.
>
> [1] https://github.com/MITK/MITK/blob/master/CMakeLists.txt#L207
>
> Best,
> Stefan
>
> 
> Von: Admin Uniapp [contactuni...@gmail.com]
> Gesendet: Mittwoch, 13. April 2016 19:55
> An: MITK
> Betreff: Re: [mitk-users] Rebuilding on Mac
>
> Hi again,
>
> I tried to build from the master branch again today, this time at build time, 
> it complains about not finding "Qt5LinguistTools", so I added 
> Qt5LinguistTools_DIR to the cmake and pointed it to the right 
> Qt5LinguistToolsConfig.cmake file but it still complains about not finding 
> the tool. Am I doing something wrong here?
>
> Many thanks
> Dora
>
> On Wed, Apr 13, 2016 at 6:55 PM, Admin Uniapp 
> > wrote:
> Hi again,
>
> I tried to build from the master branch again today, this time at build time, 
> it complains about not finding "Qt5LinguistTools", so I added 
> Qt5LinguistTools_DIR to the cmake and pointed it to the right 
> Qt5LinguistToolsConfig.cmake file but it still complains about not finding 
> the tool. Am I doing something wrong here?
>
> Many thanks
> Dora
>
> On Wed, Apr 13, 2016 at 7:45 AM, Kislinskiy, Stefan 
> > 
> wrote:
> Hi,
>
> after some fixes yesterday, the current development branch is supposed to be 
> the base for the upcoming release. Just the release branching, version number 
> update and MITK-ProjectTemplate adaptions are missing. According to [1] the 
> code is compiling also on OS X. What's the compile errors you have had?
>
> [1] http://goo.gl/pHvIs9
>
> Best,
> Stefan
> 
> Von: Admin Uniapp [contactuni...@gmail.com]
> Gesendet: Dienstag, 12. April 2016 18:41
> An: Kislinskiy, Stefan
> Cc: Clarkson, Matt; MITK
> Betreff: Re: [mitk-users] Rebuilding on Mac
>
> Hi everyone,
>
> Following my last month questions and with your help, I did manage to install 
> MITK 2015.05.2 using Qt4 on a new iMac. However, a few days ago I updated the 
> OSX El Capitan with a new security update and had to rebuild my MITK plugins 
> to update few changes I had in my code. Since, then I have been facing 
> strange problems, first of all the same MITK code was not building again 
> throwing errors at:
>
> Modules/MapperExt/src/mitkUnstructuredGridMapper2D.cpp
> Modules/MapperExt/src/vtkMitkOpenGLVolumeTextureMapper3D.cpp
>
> Complaining about using delete[] for arrays in these two files, which I 
> thought might be due to a change in the OSX c++ compiler after the update. 
> So, I manually updated these two files and have noticed that in the nightly 
> version of MITK the same changes have been done. Following this, the code 
> actually gets built and runs normally but a strange crash happens when I try 
> to use the DICOM plugin and load a DICOM into the viewer. The application 
> crashes and quits. Are these events anyhow related?
>
> I also tried to build MITK from scratch using the current developing branch 
> but it seemed that it is not stable yet as the code did not compile. Can 
> anyone please shed some light on these? Because, I think I am running out of 
> options to test.
>
> Many thanks
> Dora
>
> --
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> ___
> mitk-users mailing list
> mitk-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It 

Re: [mitk-users] Query about Micro Service Load/Unload.

2016-04-10 Thread Sascha Zelzer

Hi Matt,

please see my comment inline below.

Cheers,
Sascha

On 04/07/2016 12:08 PM, Clarkson, Matt wrote:

Hi there,

I’ve just found a scenario where one of our Micro Services is 
registered twice and I’m debugging whats going on.


On what platform? Maybe there is some strange symbol clash and the wrong 
activator is called for a specific module?




However, in this documentation:
http://docs.mitk.org/nightly/MicroServices_Overview.html
http://docs.mitk.org/nightly/MicroServices_Example2.html

the us::ModuleActivator has Load/Unload methods. The Load basically 
calls context->RegisterService, and the Unload method says the service 
is automatically unloaded. This is what our service was modelled on.


This is all still valid and the idiomatic way how to do it.



However in this example, a ServiceTracker is used:
http://docs.mitk.org/nightly/MicroServices_Example7.html

And in this example, there is a ServiceRegistration and a ServiceTracker:
http://docs.mitk.org/nightly/MicroServices_Example6.html



The examples demonstrate how to use a service tracker to use *other* 
services. It is complementary to registering your *own* service.


I also notice that in services like the PersistenceService and 
PythonService, the Service and ServiceRegistration are both 
Unregistered/Deleted manually in the Unload method.


So whats the correct or preferred approach? I just have a Module that 
should register a MicroService when it is loaded, and unregister a 
MicroService when it is unloaded.
It also seems to me that I have to manually delete things in the 
unload method. Is that right? We have quite a few MicroServices, that 
Im now worrything that I need to go and change.


I do not know why the mentioned modules registering the persistence and 
python services do what they do. Albeit not required, manually 
unregistering the service in the Unload method does not hurt though. 
However, when you have multiple services registered in one module, there 
are cases where you might want to unregister manually to control the order.


If you do not use some kind of smart pointer in your module to manage 
the lifetime of your registered service, you will need to manually 
delete things to prevent memory leaks. You can do it in the destructor 
of your activator. If you do it in Unload, you will need to manually 
unregister the service first. There is no advantage in deleting the 
service in Unload though (at least none of which I can think of currently).


So, I do not think you need to change any thing here.


Thanks

Matt




--


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301=/ca-pub-7940484522588532___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Scene properties

2016-04-05 Thread Sascha Zelzer
You could at least put a breakpoint in the activator load() method of 
the persistence module and another at the line where you try to retrieve 
the persistence service. Are both breakpoints hit? What is their hit order?

Cheers,
Sascha

On 04/05/2016 10:31 AM, Kislinskiy, Stefan wrote:
> Thanks Matt, seems like this feature could be broken and we should 
> investigate then. I just found a bug in our tracker [1] which sounds like it 
> was never completely implemented? I'll check. I would recommend you guys to 
> subscribe to the bug to stay in the loop.
>
> [1] http://bugs.mitk.org/show_bug.cgi?id=18542
>
> Best regards,
> Stefan
> 
> Von: Clarkson, Matt [m.clark...@ucl.ac.uk]
> Gesendet: Dienstag, 5. April 2016 10:02
> An: Kislinskiy, Stefan
> Cc: MITK
> Betreff: Re: [mitk-users] Scene properties
>
> Hi there,
>
> This rings a bell in my mind. I believe I found similar things to Nil.
>
> I had an auto-loaded module, that created a dialog box to set the file name 
> of an IGTToolStorage file, and the port name of the COM port to connect to, 
> for an NDI Tracker. I wanted to persist the settings, so that the user didn't 
> have to keep repeatedly setting the filename and port, which in all 
> likelihood remain fairly constant for each users setup. I could not get the 
> PersistenceService to work, and it performed differently on Linux/Mac to 
> Windows. Im basically using MITK 2015.05.2.
>
> In the attached file you will see I ended up commenting it out, and resorting 
> to QSettings.
> So, I would be interested in the outcome of this.
> Any ideas what is going on?
>
> Is it something to do with the fact that its an auto-loaded module, and the 
> order of auto-loading?
>
> Thanks
>
> Matt
> --
> ___
> mitk-users mailing list
> mitk-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] MITK build using external ITK

2015-12-02 Thread Sascha Zelzer
Hi,

your compiler does not support (the non-standard) in-class static const 
initialization for float types (at least with the provided compile 
flags). You need to apply this patch [1] to teach vnl to not do this 
non-standard stuff.

Cheers,
Sascha

[1] 
http://mitk.org/git/?p=MITK.git;a=blob;f=CMakeExternals/ITK-4.7.1-gcc-4.6.patch

On 12/02/2015 10:23 AM, Fetzer, Andreas wrote:
> Hi Hongzhi,
>
> I know that we are building GDCM by ourself and we are passing it to the
> ITK build in order to avoid a duplicate GDCM build. I am not sure if your
> setup could cause troubles in this case.
>
> Another reason could be that you first used the regular superbuild and
> afterwards you passed an external ITK / VTK.
> This could in fact cause some issues since the ITK / VTK libraries and
> include directories are installed into ep/lib and ep/include.
> If you update these toolkits you will usually have to remove the former
> libraries and include dirs to avoid linker or compile errors.
>
> You could build ITK and VTK separately and set the according build
> directories via the cmake variables ITK_DIR and VTK_DIR before starting
> the actual superbuild.
> Or you can change the ITK / VTK source tar balls in the
> CMakeExternals/(ITK/VTK).cmake that are used for the superbuild to the
> ones you want to use.
>
> Hope this helps!
>
> Andreas
>
> Am 27/11/15 18:35 schrieb "Hongzhi Lan" unter :
>
>> Hi Andreas,
>>
>> I use MITK 2015.05.2.
>>
>> First I have a MITK super build at MITK-superbuild. No problem for this.
>>
>> Then I build vtk itk separately. The source code for vtk itk is from
>> MITK-superbuild/ep/src/VTK and ITK. The build configuration is the same
>> as the MITK siperbuild. The only difference is itk uses its own gdcm not
>> system gdcm.  Then I pass my vtk itk build directories to MITK build.
>>
>> Thanks!
>> Hongzhi
>>
>>
>>> On Nov 27, 2015, at 3:49 AM, Fetzer, Andreas
>>>  wrote:
>>>
>>> Hi Hongzhi,
>>>
>>> how are you building these external libraries? It is important to use
>>> the same build configuration like it is done in the superbuild.
>>> Are you passing the related source files to the superbuild or do you
>>> build them separately and then pass the build directories to the MITK
>>> build.
>>>
>>> Please note also that with MITK 2015.05.2 we already use ITK 4.7.1
>>> What MITK version are you using?
>>>
>>> Regards,
>>> Andreas
>>>
>>>
>>>
>>>
>>> Von: Hongzhi Lan >
>>> Datum: Friday 27 November 2015 04:29
>>> An:
>>> "mitk-users@lists.sourceforge.net>
>>> Betreff: [mitk-users] MITK build using external ITK
>>>
>>>
>>> Hi,
>>>
>>>
>>> I used MITK superbuild, which was very convenient. Now I'm trying to
>>> build MITK with some external such as  VTK6.2.0, ITK4.7.1, CTK ect , but
>>> there are some issues. Those issues never happened in the superbuild.
>>> Can I get some help to deal with these issues?  VTK ITK source code is
>> >from MITK website. I use Ubuntu 14.04  and gcc 4.8.4.
>>>
>>> Thanks!
>>>
>>> Hongzhi
>>>
>>>
>>> 1.  First error is  as below:
>>>
>>> --
>>>
>>> In file included from
>>> /home/hongzhi/SourceCode/From_MITK/ITK/Modules/ThirdParty/VNL/src/vxl/vcl
>>> /vcl_compiler.h:250:0,
>>>  from
>>> /home/hongzhi/SourceCode/From_MITK/ITK/Modules/ThirdParty/VNL/src/vxl/vcl
>>> /vcl_limits.h:5,
>>>  from
>>> /home/hongzhi/SourceCode/From_MITK/ITK/Modules/Core/Common/include/itkNum
>>> ericTraits.h:45,
>>>  from
>>> /home/hongzhi/SourceCode/From_MITK/ITK/Modules/Core/Common/include/itkVec
>>> torContainer.hxx:22,
>>>  from
>>> /home/hongzhi/SourceCode/From_MITK/ITK/Modules/Core/Common/include/itkVec
>>> torContainer.h:358,
>>>  from
>>> /home/hongzhi/SourceCode/MITK-2015.05.2/Modules/Core/include/mitkDataStor
>>> age.h:24,
>>>  from
>>> /home/hongzhi/SourceCode/MITK-2015.05.2/Modules/Core/include/mitkBaseRend
>>> erer.h:20,
>>>  from
>>> /home/hongzhi/SourceCode/MITK-2015.05.2/Modules/Core/include/mitkMapper.h
>>> :22,
>>>  from
>>> /home/hongzhi/SourceCode/MITK-2015.05.2/Modules/Core/include/mitkCoreObje
>>> ctFactoryBase.h:27,
>>>  from
>>> /home/hongzhi/SourceCode/MITK-2015.05.2/Modules/Core/src/mitkCoreObjectFa
>>> ctoryBase.cpp:17:
>>>
>>> /home/hongzhi/SourceCode/From_MITK/ITK/Modules/ThirdParty/VNL/src/vxl/cor
>>> e/vnl/vnl_numeric_traits.h:387:27: error: Œconstexpr¹ needed for
>>> in-class initialization of static data member Œconst float
>>> vnl_numeric_traits::zero¹ of non-integral type [-fpermissive]
>>>static const float zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0F);
>>>^
>>>
>>> 

Re: [mitk-users] Install/Package does miss auto load module

2015-11-30 Thread Sascha Zelzer

Hi,

what "application" are you referring to?

BlueBerry based applications are installed such that at some point the 
MITK install macros call


MITK_INSTALL_TARGETS(EXECUTABLES ${_APP_NAME} LIBRARY_DIRS 
${_APP_LIBRARY_DIRS} GLOB_PLUGINS )


and the "GLOB_PLUGINS" options (should) ensure that all "plugins" (qt 
plugins, ctk plugins, and auto-load modules) are fixed up, which means 
that their dependencies are pulled in (if they can be found in the used 
search paths).


If you do "make install VERBOSE=1" and look at the output which prints 
the list of globbed plugins and search paths, do you see your auto-load 
module and the search path containing its dependencies?


Cheers,

Sascha

On 11/30/2015 08:44 AM, Markus Engel wrote:


Hi Ralf,

this sounds exactly like the issue described in bug #16505.

DLLs that are only used in modules that are auto-loaded will not be 
found correctly when building INSTALL or PACKAGE.


In the bug you mentioned we had a ‘fix/hack’ for this issue by 
extending mitkFunctionInstallAutoLoadModules()


to return a list of these missing DLLs and installing those ‘manually’.

Right now, we  do no longer use this ‘fix’ as it was not considered a 
good solution by Sascha, but install our missing dependencies hard 
codedly.


So, I do not have a solution, but I’m facing the same problem!

Best regards,

Markus

*From:*Floca, Ralf Omar [mailto:r.fl...@dkfz-heidelberg.de]
*Sent:* Dienstag, 24. November 2015 16:51
*To:* mitk-users@lists.sourceforge.net
*Subject:* [mitk-users] Install/Package does miss auto load module

Hello,

I have the following setup in my application for a special data format.

I have one Module “MyFormat” which contains some wrapping code and 
introduces the package dependency to the external data format lib.


Within “MyFormat” I have a sub module “MyFormatIO” which defines some 
IO services, registers them and should be autoloaded with MitkCore.


If I start the application directly (e.g. From Visual Studio) 
everything works fine.


If I make a package the DLLs for MyFormat, MyFormatIO and the external 
package are not copied but forgotten.


May this be correlated with Bug 16505 – 
mitkFunctionInstallAutoLoadModules?


How can I solve this problem? I would appreciate to not use a hard 
coded linkage to the module to enforce the install dependency. (I just 
reworked into autoload, to get read of this ugly hack ;)


Thanks.

Best Regards,

Ralf

*--*

*Dr. Ralf Floca*
Software development for Integrated Diagnostic and Therapy (SIDT)

Group leader

German Cancer Research Center (DKFZ)

Foundation under Public Law

Im Neuenheimer Feld 280
69120 Heidelberg

Germany
phone: +49 6221 42-2560

_r.fl...@dkfz.de _
www.dkfz.de __

Management Board: Prof. Dr. Michael Boutros (interim), Prof. Dr. Josef 
Puchta


VAT-ID No.: DE143293537

Confidentiality Note:

This message is intended only for the use of the named recipient(s) 
and may obtain confidential and/or privileged information. If you are 
not the intended recipient, please contact the sender and delete the 
message. Any unauthorized use of the information contained in this 
message is prohibited.




--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551=/4140


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] BlueBerry question: Unregistering views from plugin activator?

2015-11-26 Thread Sascha Zelzer

Hi Miklos,

Your suggestion with the additional macro might work, but I am afraid 
that the devil lies in the details. The platform actually has some 
support for this (inherited from the original Eclipse design, e.g. 
filtering out UI contributions) but there are some bits and pieces still 
missing.


I think your current best option is to have your own workbench advisor 
and reuse MITK's workbench window advisor [1] which provides a function 
to set a list of views which are to be excluded in the UI.


Cheers,
Sascha

[1] http://docs.mitk.org/2015.05/classQmitkExtWorkbenchWindowAdvisor.html

On 11/19/2015 09:26 AM, Miklos Espak wrote:

Hi,

we would like to hide the image statistics view that comes with the 
org.mitk.gui.qt.measurementtoolbox plugin.


This plugin provides two views. The other one, 
org.mitk.views.measurement we need. However, we have our custom 
statistics view. Is it possible to disable / hide the statistics view 
while keeping the measurement one?


E.g. would it be possible to have a BERRY_UNREGISTER_EXTENSION_CLASS 
macro, similarly to BERRY_REGISTER_EXTENSION_CLASS? Then we could 
place this call to the activator of the plugin that provides our 
statistics view.


We can of course comment out the unwanted extension point in our MITK 
fork, I just thought it would be cleaner this way.


Cheers,
Miklos





--


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Plugins.cmake on|off option

2015-11-20 Thread Sascha Zelzer

Hi Dora,

the ON / OFF values are the defaults for the plug-in build option. If 
every plug-in would be listed with ON and you start with a clean build 
directory, the CMake build options of all the listed plug-ins are set to 
ON according to this default.


the exampleapp plug-in configure the overall application look, behavior, 
etc. For example if it should display the toolbar, what the default 
perspective should be and so on. The exampleplugin contains just other 
example code, if I remember correctly. Both are by default set to OFF, 
but can either be set to ON explicitly in the CMake configuration or 
they are set to ON automatically due to another build option requiring 
them as a dependency (for example when building the provided application).


Cheers,
Sascha

On 11/20/2015 01:23 PM, Admin Uniapp wrote:

Hi everyone,

I downloaded the MITK template project and have developed a few things 
using the template project but I have two questions I was hoping 
someone could explain to me:


1) In the plugins folder there is a file called Plugins.cmake. I know 
that I need to add IDs of my newly developed plugins to this file. But 
what is the ON and OFF option? To activate/deactivate the plugins? if 
so, I can't really see any difference when I run my application.


2) More generally in the MITK template project under plugins folder, 
there are 3 folders. One is called the exampleapp, one is 
exampleplugin and one for the renderwindow editor. I know that last 
one is for making customized rendering windows but what are the other 
two? and why in the Plugins.cmake file only the exampleplugin is on?


I'm pretty new to MITK and answeing these questions could help my 
understanding a lot.


Many thanks
Dora


--


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Is there perspective changed event?

2015-11-11 Thread Sascha Zelzer

Hi,

I mentioned perspective listeners in my original answer. Please browse 
the API of IPageService.


Cheers,
Sascha

On 11/11/2015 01:48 PM, Pukhlikov Mikhail wrote:

Hello, can I make some action on perspective changed event?

Depending on active perpective I want to hide or show some plugins in 
toolbar, to implement it best way will be some event for perspective 
changing.


Thank you.


--


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] is it possible to know active perspective

2015-11-10 Thread Sascha Zelzer

Hi,

from within a class inheriting from IWorkbenchPart (all views and 
editors) you can call GetSite() and use the returned object to query for 
all sorts of things in the Workgench, e.g.:


GetSite()->GetPage()->GetPerspective()

will return a descriptor for the current perspective or null. If you 
need to react to perspective changes, you need a perspective listener. I 
suggest to browse through the interface classes and check the available API.


Cheers,
Sascha

On 11/10/2015 02:26 PM, Goch, Caspar Jonas wrote:


Hi,

the berry::WorkbenchPage has the function

/**

   * Returns the active perspective for the page, null if

* none.

*/

SmartPointer GetActivePerspective();

Does this work for you or are there some other constraints?

Best,

Caspar

*Von:*Pukhlikov Mikhail [mailto:mikhail.pukhli...@outlook.com]
*Gesendet:* Dienstag, 10. November 2015 14:19
*An:* mitk-users@lists.sourceforge.net
*Betreff:* [mitk-users] is it possible to know active perspective

Hello

Is it possible to get/detect currently active perspective?

Thank you!



--


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] is it possible to make static width for pugin

2015-11-02 Thread Sascha Zelzer

Hi,

the xml looks good. Maybe you didn't reset the perspective in your 
workbench application after you made those changes ("Window -> Reset 
Perspective" in den application menu).


Cheers,
Sascha

On 11/03/2015 08:37 AM, Pukhlikov Mikhail wrote:

Hello. Thank you, it helped.

In addition it will be could if there are ways of hiding title, 
disabling attaching other plugins with this one and making it fully 
standalone.


I was trying to




(sorry for code formatting) but it wasn't working.

> From: s.kislins...@dkfz-heidelberg.de
> To: mikhail.pukhli...@outlook.com; sascha.zel...@gmail.com; 
mitk-users@lists.sourceforge.net

> Date: Fri, 30 Oct 2015 20:23:02 +0100
> Subject: AW: [mitk-users] is it possible to make static width for pugin
>
> Sascha is right, the Image Navigator view [1] implements the 
berry::ISizeProvider interface [2]. As far as I understand the code, 
it just constrains the height of the view and intentionally is 
flexible in its width. The interface allows for restrictions in both 
directions though. There's also a hint in the documentation of the 
berry::IViewPart interface [3]. However, the documentation states that 
it is still a *preferred* size and it is not guaranteed. For example, 
it wont work if there are multiple views (with constraints?) in the 
same stack.

>
> [1] 
https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.gui.qt.imagenavigator/src/internal/QmitkImageNavigatorView.cpp#L154
> [2] 
https://github.com/MITK/MITK/blob/1056bf6d459b18b9996e2cd9f44f588a704810f8/Plugins/org.blueberry.ui.qt/src/berryISizeProvider.h
> [3] 
https://github.com/MITK/MITK/blob/1056bf6d459b18b9996e2cd9f44f588a704810f8/Plugins/org.blueberry.ui.qt/src/berryIViewPart.h#L61

> 
> Von: Pukhlikov Mikhail [mikhail.pukhli...@outlook.com]
> Gesendet: Freitag, 30. Oktober 2015 13:42
> An: Sascha Zelzer; mitk-users@lists.sourceforge.net
> Betreff: Re: [mitk-users] is it possible to make static width for pugin
>
> Hello
>
> But image navigator scales like other plugins
>
> 
> Date: Fri, 30 Oct 2015 12:32:31 +
> Subject: Re: [mitk-users] is it possible to make static width for pugin
> From: sascha.zel...@gmail.com
> To: mikhail.pukhli...@outlook.com
> CC: mitk-users@lists.sourceforge.net; s.kislins...@dkfz-heidelberg.de
>
>
> It is possible in BlueBerry. I don't remember the exact location. 
Either in the view extension point or the PageLayout class used in an 
application Window advisor. Look at the image navigator view for an 
example.

>
> Am 30.10.2015 13:12 schrieb "Pukhlikov Mikhail" 
<mikhail.pukhli...@outlook.com<mailto:mikhail.pukhli...@outlook.com>>:

> Thanks
>
> but sadly parent->setMaximumWidth doesn't help and 
parent->parentWidget returns Access violation - I need some way to 
have *static* plugin - is the only way to achieve it is to modify 
blueberry?

>
> 
> From: s.kislins...@dkfz-heidelberg.de
> To: 
mikhail.pukhli...@outlook.com<mailto:mikhail.pukhli...@outlook.com>; 
mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>

> Date: Fri, 30 Oct 2015 12:57:00 +0100
> Subject: RE: [mitk-users] is it possible to make static width for pugin
>
>
> Hi,
>
>
>
> it is not possible or at least shouldn’t be possible by design. 
Views are framed within BlueBerry controls which make up a *flexible* 
UI framework. However, there might be possibilities to circumvent 
that. Have you tried to set a maximum size for your top-level widget?

>
>
>
> Best,
>
> Stefan
>
>
> From: Pukhlikov Mikhail 
[mailto:mikhail.pukhli...@outlook.com<mailto:mikhail.pukhli...@outlook.com>]

> Sent: Freitag, 30. Oktober 2015 11:17
> To: 
mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>

> Subject: [mitk-users] is it possible to make static width for pugin
>
> Hello
>
> Can I create plugin with static width? unresizeable
>
> Thank you
>
> 
--

>
> ___
> mitk-users mailing list
> 
mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>

> https://lists.sourceforge.net/lists/listinfo/mitk-users


--


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] BlueBerry questions about command line argument processing with 2015.05.0

2015-09-02 Thread Sascha Zelzer

Hi,

I am not really opposed to the workbench listener approach, I just don't 
think it is needed.


Although your activator might be called before the workbench is running, 
the constructor of our custom editor certainly isn't. Can't you do the 
processing there?


Another but more sophisticated approach would be to use the config admin 
ctk plug-in. You would do your processing in the workbench advisor class 
and set "configuration" objects via the config admin service. Your other 
plug-in can then listen for specific config objects and (re)configure 
itself accordingly.


Cheers,
Sascha

On 09/02/2015 01:32 PM, Miklos Espak wrote:
I would like to do that. The problem is that if I put the code in the 
activator of the dnddisplay plugin, it runs too early, and the 
workbench has not started up yet. I have to schedule it to run after 
the workbench has started. I could solve this with a workbench 
listener if it had a PostStartup function. Actually, the patch I wrote 
looks working well to me.


On 1 September 2015 at 17:42, Sascha Zelzer <sascha.zel...@gmail.com 
<mailto:sascha.zel...@gmail.com>> wrote:


Hi Miklos,

this all makes sense. Why can't you just process the cmd args
specific to your DnDDisplay in the very same plug-in the
DnDDisplay is defined?

Cheers,
Sascha

On 08/28/2015 07:45 PM, Miklos Espak wrote:

Hi Sascha,

yes, I tried the WorkbenchAdvisor::PostStartup. Actually, all the
CL argument processing was done in that function before the MITK
upgrade, but now I had to move it somewhere else. The problem is
that the workbench advisor is defined in the application plugin,
i.e. the one that provides the org.blueberry.osgi.applications
extension point and that is kicked off by mitk::BaseApplication.

However, I found that this plugin must not depend on plugins that
provide a view that derives from QmitkAbstractView. This class is
defined in org.mitk.gui.qt.common. Otherwise, the
org.mitk.gui.qt.common would be loaded together with the
application plugin because of the transitive dependency. This is
a problem because the activator of org.mitk.gui.qt.common assumes
that the workbench is already running:


https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.gui.qt.common/src/internal/QmitkCommonActivator.cpp#L47

What is obviously not the case when the application plugin is
just being loaded.

This also causes a crash when shutting down the application
because the view coordinator is NULL here:


https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.gui.qt.common/src/internal/QmitkCommonActivator.cpp#L63

So, the application plugin must not depend on e.g. our DnDDisplay
plugin that gives our custom editor. So, I cannot process the
command line args there which would manipulate the DnD display.
So, I have to move the CL arg processing to a different plugin,
and somehow schedule it to the time when the workbench has started.

Does this make sense?

Cheers,
Miklos


On 28 August 2015 at 18:01, Sascha Zelzer
<sascha.zel...@gmail.com <mailto:sascha.zel...@gmail.com>> wrote:

Hi Miklos,

command line arguments are added as plugin framework
properties and can be queried by any plug-in by calling
ctkPluginContext::getProperty(...).

For post workbench startup actions, the
berry::WorkbenchAdvisor class is intended to provide this
facility. Did you run into problems with that one?

Best,
Sascha


On 08/27/2015 10:18 PM, Miklos Espak wrote:

Hi,

I introduced some command line arguments for our MITK based
application, e.g. --perspective, to set the initial
perspective, and others to set the initial layout of our
custom editor. Until the MITK upgrade the arguments were
processed in the PostStartup function of our Workbench class
that was in our application plugin. Now I have to move the
code to a different plugin so that the application plugin
does not have a transitive dependency on
org.mitk.gui.qt.common. (This plugin assumes that the
workbench is ready when it gets activated.)

What I figured so far:

Now you need to override the defineOptions function of your
application class. My looks like this now:

   void  defineOptions(Poco::Util::OptionSet&  options)  override
   {
 Poco::Util::Option  perspectiveOption("perspective",  "",  "name  of  
initial  perspective");
 
perspectiveOption.argument("").binding("niftk.perspective");
 options.addOption(perspectiveOption);
 mitk::BaseApplication::defineOptions(options);
   }

And I try to access the "niftk.perspective" configuration
   

Re: [mitk-users] BlueBerry questions about command line argument processing with 2015.05.0

2015-09-01 Thread Sascha Zelzer

Hi Miklos,

this all makes sense. Why can't you just process the cmd args specific 
to your DnDDisplay in the very same plug-in the DnDDisplay is defined?


Cheers,
Sascha

On 08/28/2015 07:45 PM, Miklos Espak wrote:

Hi Sascha,

yes, I tried the WorkbenchAdvisor::PostStartup. Actually, all the CL 
argument processing was done in that function before the MITK upgrade, 
but now I had to move it somewhere else. The problem is that the 
workbench advisor is defined in the application plugin, i.e. the one 
that provides the org.blueberry.osgi.applications extension point and 
that is kicked off by mitk::BaseApplication.


However, I found that this plugin must not depend on plugins that 
provide a view that derives from QmitkAbstractView. This class is 
defined in org.mitk.gui.qt.common. Otherwise, the 
org.mitk.gui.qt.common would be loaded together with the application 
plugin because of the transitive dependency. This is a problem because 
the activator of org.mitk.gui.qt.common assumes that the workbench is 
already running:


https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.gui.qt.common/src/internal/QmitkCommonActivator.cpp#L47

What is obviously not the case when the application plugin is just 
being loaded.


This also causes a crash when shutting down the application because 
the view coordinator is NULL here:


https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.gui.qt.common/src/internal/QmitkCommonActivator.cpp#L63

So, the application plugin must not depend on e.g. our DnDDisplay 
plugin that gives our custom editor. So, I cannot process the command 
line args there which would manipulate the DnD display. So, I have to 
move the CL arg processing to a different plugin, and somehow schedule 
it to the time when the workbench has started.


Does this make sense?

Cheers,
Miklos


On 28 August 2015 at 18:01, Sascha Zelzer <sascha.zel...@gmail.com 
<mailto:sascha.zel...@gmail.com>> wrote:


Hi Miklos,

command line arguments are added as plugin framework properties
and can be queried by any plug-in by calling
ctkPluginContext::getProperty(...).

For post workbench startup actions, the berry::WorkbenchAdvisor
class is intended to provide this facility. Did you run into
problems with that one?

Best,
Sascha


On 08/27/2015 10:18 PM, Miklos Espak wrote:

Hi,

I introduced some command line arguments for our MITK based
application, e.g. --perspective, to set the initial perspective,
and others to set the initial layout of our custom editor. Until
the MITK upgrade the arguments were processed in the PostStartup
function of our Workbench class that was in our application
plugin. Now I have to move the code to a different plugin so that
the application plugin does not have a transitive dependency on
org.mitk.gui.qt.common. (This plugin assumes that the workbench
is ready when it gets activated.)

What I figured so far:

Now you need to override the defineOptions function of your
application class. My looks like this now:

   void  defineOptions(Poco::Util::OptionSet&  options)  override
   {
 Poco::Util::Option  perspectiveOption("perspective",  "",  "name  of  
initial  perspective");
 
perspectiveOption.argument("").binding("niftk.perspective");
 options.addOption(perspectiveOption);
 mitk::BaseApplication::defineOptions(options);
   }

And I try to access the "niftk.perspective" configuration
parameter from the activator of a plugin, like this:

   Poco::Util::LayeredConfiguration&  config  =  
Poco::Util::Application::instance().config();
   if  (config.has("niftk.perspective"))
   {
 
   }

But this config object does not have that configuration property.
There used to be a berry::Platform::GetConfiguration() function
(you can still find some uses in the MITK sources) but it has
been removed.

Any idea, how to access those properties? Should that function be
reintroduced?

My other problem is that it does not seem to be possible to run
code after the workbench has started. There is an
IWorkbenchListener class, but it only has PreShutDown and
PostShutDown functions but no PostStartUp. I noticed that when
the plugin activator above runs,
berry::PlatformUI::IsWorkbenchRunning() returns true but the
PostStartUp function of the workbench has not run yet.

Should berry::IWorkbenchListener have a PostStartUp function?

Cheers,
Miklos





--


___
mitk-users mailing list
mitk-users@lists.sourceforge.net  <mailto:

Re: [mitk-users] MITK 2015.05 on Linux

2015-08-28 Thread Sascha Zelzer

Hi,

if you look at the output carefully, you see that the MITK libraries are 
missing Qt5 dependencies, especially Qt5Help and Qt5WegKitWidgets. You 
need to install these by installing the appropriate packages of your 
Linux distribution.


Cheers,
Sascha

On 08/28/2015 12:12 PM, Urban Simoncic wrote:

Hi,

thank you for explanation and sorry for asking things that are already 
explained.


Declaring environment variable QT_PLUGIN_PATH solves this issue, but 
MITK still does not start; it fetch attached output. Any idea why that 
would be?


Thanks,
Urban

On 27.8.2015 18:06, Goch, Caspar Jonas wrote:

Hi Urban,

this is due to the Qt5 switch, compare the note at [1]
For Linux users: The environment variable QT_PLUGIN_PATH has to be 
set to point to the Qt 5 plugins directory in order to run the 
application since MITK 2015.05. One of the typical paths is listed 
within the example commando


  bash:~/$ export 
QT_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins


Best,
Caspar
[1] http://mitk.org/wiki/Downloads#MITK_Workbench

-Ursprüngliche Nachricht-
Von: Urban Simoncic [mailto:urban.simon...@gmail.com]
Gesendet: Donnerstag, 27. August 2015 18:01
An: 'mitk-users'
Betreff: [mitk-users] MITK 2015.05 on Linux

Hi,

I tried to run MITK 2015.05 on Kubuntu 14.04 and it first complained 
that there is no Qt5 library. Than I installed them (qt5-default), 
and it complains that application failed to start because it could 
not find or load the Qt platform plugin xcb, and that reinstalling 
application could solve the problem.


Did I install wrong Qt5 library, or I have any other problem?

On contrary, MITK 2014.10 runs smoothly.

Thanks,
Urban

-- 


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users





--


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Default file writer in Data Manager's Save... dialog

2015-08-18 Thread Sascha Zelzer

Hi Daniel,

long time no see ;-)

I cannot rule out bugs in that code, but I am quite confident that the 
behavior is as designed. If that design can be improved is likely 
another question ;-)


We need to carefully distinguish file writers and mime types here. The 
Save... dialog will show in its filter list all suitable mime-types 
for the base data which is to be saved. The default selected item in 
that list is based on the mime-type comparison operator only (which 
considers the mime-type ranking). Suitable in that context means 
mime-types related to file writers which claim to be able to write the 
specific base data type. However, the FileWriterSelector class is not 
responsible for selecting a writer just yet because the user still 
needs to select the mime-type (i.e. the extension) in the Save... dialog.


Depending on the selected mime-type, the FileWriterSelector class is 
finally asked to provide the default writer for the given base-data 
and mime-type combination. In case of multiple suitable writers, 
QmitkIOUtil will display another dialog box to the user for selecting 
among the writers. mitk::IOUtil will just use the best match from 
FileWriterSelector for writing.


So in summary, for writing, the procedure is roughly:

1. Get file writers for the base data type (using FileWriterSelector)
2. Get the associated mime-types to construct the Save... filter string
3. Get the best writer for the base data - mime type combination (using 
FileWriterSelector)

4. In case of a tie, let the user select (QmitkIOUtil only)

Last, in order to influence the default in the Save... filter list, 
you need to modify the ranking of the mime type, not of one of its 
associated writers.


Hope that helps,

Sascha

On 08/18/2015 01:23 PM, Daniel Maleike wrote:

Hi,

I worked a bit with a custom file writer and would like to make it the 
default choice in Data Manager's Save... dialog.


I understood that the Qt file type list is constructed by QmitkIOUtil 
which makes use of mitk::FileWriterSelector.


When setting a high-enough ranking and an appropriate base data 
type for my writer, it gets correctly selected as default and current 
selection by the FileWriterSelector class. QmitkIOUtil will however 
always select the first item in its file type list, completely 
ignoring what the FileWriterSelector determined as default. To 
reproduce this easily, you could manipulate mitk::ImageVtkXmlIO, for 
example.


Question: is the behavior of the Qt dialog wanted? Or could we adapt 
it to match the decision of the FileWriterSelector? Attached patch 
(applies to 3fc812cc)  is what I would have in mind.


Kind regards,
Daniel



--


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Launching a plugin by default

2015-08-18 Thread Sascha Zelzer
Hi Jagir,

I don't remember the details of the ctkPluginFrameworkLauncher::start 
method, but I am pretty sure that it has some constraints which are not 
met when using the MITK application framework BlueBerry. I assume you 
*are* using BlueBerry.

If you set the activation policy correctly, and if the plug-in is listed 
in your applications .provisioning file, you are set. So you could check 
that file (in your applications binary directory) to see if it lists 
your plug-in.

Best,
Sascha

On 08/18/2015 01:01 PM, Jagir Hussan wrote:
 Hi Sascha,
Many thanks for the pointers. I am trying to load a plugin that 
 generates events (say to synchronize them etc). I tried the activation 
 policy and also made other plugins have a dependency on this plugin. 
 Unfortunately, the plugin does not load. If however, I enable a view 
 and start it in the workbench and it starts!
 I extended the mikt::BaseApplication class as follows

 class BaseApplication: public mitk::BaseApplication{
 public:
 BaseApplication(int argc, char** argv) : 
 mitk::BaseApplication(argc, argv){

 };

 bool startPlugin(char* pluginName){
 getQApplication(); //Initialize QCoreApplication
 bool res = ctkPluginFrameworkLauncher::start(pluginName);
 return res;
 };
 };

 and called the startPlugin method post initialization of an instance. 
 My plugin is in the Plugins directory, so I provided this detail using
 ctkPluginFrameworkLauncher::addSearchPath(Plugins,true);
 prior to the startPlugin invokation. Unfortunately, the plugin is not 
 started (I get a false value returned).

 Am I doing something incorrect? Is there another design pattern that 
 you think is suitable?

 Many thanks
 Jagir

 On 18/08/2015 5:53 p.m., Sascha Zelzer wrote:
 Hi Jagir,

 You can use the Plugin-ActivationPolicy header in the plugins
 manifest_headers.cmake file. See for example [1].

 Another approach is to call ctkPlugin::start() explicitly from an
 overridden method in mitk::BaseApplication.

 In general however, explicitly loading a plugin can often be avoided by
 using a different technique, depending on what you are trying to 
 achieve.

 Best,
 Sascha

 [1]
 http://mitk.org/git/?p=MITK.git;a=blob;f=Plugins/org.mitk.planarfigure/manifest_headers.cmake;h=5b2d8e50e355af309d8cda55d4ee233f5230cabb;hb=HEAD#l6
  


 On 08/18/2015 03:27 AM, Jagir Hussan wrote:
 Hi,
I would like to launch a plugin, which does not have a view, 
 when
 the mitk baseapplication starts. Is there any api similar to
 ctkPluginFrameworkLauncher::start that I could use to start the plugin?

 Thanks
 Jagir

 --
  

 ___
 mitk-users mailing list
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users

 --
  

 ___
 mitk-users mailing list
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users



--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Is there way to make some action by some plugin after it's loading

2015-08-18 Thread Sascha Zelzer

Hi,

I meant to write start method instead of load. In a CTK plugin, you 
need to use start and stop, in a CppMicroServices module load and 
unload. You could mix both, but unless you are really familiar with 
that subject, I would advise against it.


Best,
Sascha

On 08/18/2015 10:21 AM, Pukhlikov Mikhail wrote:

Thank you.

I can see load methind in Module Activator here: 
https://github.com/samsmu/MITK/blob/develop/Core/CppMicroServices/core/include/usModuleActivator.h


However with Plugin Activator I only have start and stop: 
https://github.com/commontk/CTK/blob/master/Libs/PluginFramework/ctkPluginActivator.h


Can I use this Load methid inside plugin?


Date: Tue, 18 Aug 2015 07:44:01 +0200
From: sascha.zel...@gmail.com
To: mikhail.pukhli...@outlook.com; mitk-users@lists.sourceforge.net
Subject: Re: [mitk-users] Is there way to make some action by some 
plugin after it's loading


Hi,

I think it depends how the tool plugin can be distinguished from 
other plugins:


Approaches where the plugin needs to be loaded and it actively 
registers something


1. The tool plugin actively calls a singletone method of some other 
plugin. If you want that call to happen at the earliest time possible, 
you can either use the constructor of a file-scoped static object or 
put the call in the plugin's activator load method.
2. The tool plugin makes use of the service registry and registers a 
service object in its activator load method. The hypervisor plugin 
would just track such services using the service registry.


Both approaches require the tool plugin to depend on some other entity 
(the hypervisors singleton method or the service interface class).


For an enumeration of tool plug-ins, they probably do not need to be 
loaded. They could be tracked by relying on meta data added to the 
plug-ins. I assume you are working with CTK plugins (you can use 
similar techniques with CppMicroServices modules)


- Add meta data to your plugin by modifying the manifest_headers.cmake 
file and adding a new new line, e.g. set(Provides-Tools 1).
- The hypervisor plugin instantiates a ctkPluginTracker [1] which is 
notified if new plugins are installed or change state. It can then use 
the ctkPlugin::getHeaders() [2] method to check if the plugin contains 
the Provides-Tools header.


Depending on your needs the above scheme can get more elaborate and 
provide more information via meta data or embedded resources.


Best,
Sascha

[1] http://www.commontk.org/docs/html/classctkPluginTracker.html
[2] 
http://www.commontk.org/docs/html/classctkPlugin.html#a60f6b7f62313a22639d4a52122f8288a


On 08/17/2015 12:14 PM, Pukhlikov Mikhail wrote:

Hello

I'm creating plugin which should know the list of available tools
plugins.
The idea was that those plugins during application loading will
call singletone method of hypervisor plugin.
So I wanted to know if that is possible to have method inside
plugins to be called during Application startup.

Thank you


Date: Fri, 14 Aug 2015 16:41:54 +0200
From: sascha.zel...@gmail.com mailto:sascha.zel...@gmail.com
To: mitk-users@lists.sourceforge.net
mailto:mitk-users@lists.sourceforge.net
Subject: Re: [mitk-users] Is there way to make some action by some
plugin after it's loading

Hi,

it's hard to give you proper advice without exactly knowing what
you are trying to achieve. You cant obviously call a function from
a plug-in until its shared library is loaded.

There are different hooks, listeners, etc. but without knowing
your use case I could just guess...

Cheers,

Sascha

Am 14/08/2015 um 14:09 schrieb Pukhlikov Mikhail:

Hello.

I need to make some action by some plugin after it's loading.

Not when I activate it. Before Activator loading.

Just when MITK itself starts it enumerates available plugins
and in that time I need to call some function iside that plugin.

Thank you.




--



___
mitk-users mailing list
mitk-users@lists.sourceforge.net  
mailto:mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users




--
___ mitk-users mailing
list mitk-users@lists.sourceforge.net
mailto:mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users




--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net

Re: [mitk-users] Change layout in StdMultiWidget depending on the active perspective

2015-08-16 Thread Sascha Zelzer
Hi Sebastian,

interaction with the StdMultiWidgetEditor is asked for on the mailing 
list quite often. You can in fact achieve what you want, but you should 
be aware that the platform was not designed for this scenario and you 
would be somewhat misusing it or missing an approach that would fit better.

Editors are meant to be controlled by the user and there can be zero to 
many, stacked in arbitrary layouts (albeit constrained to the main area 
in the center of the window). Changing the active layout of the four 
render window widget depending on the perspective sounds like it should 
be part of that perspective proper. Which means that the four render 
window widget should rather be a view not an editor.

If you for some reason need to stick with the current design, you will 
need a perspective listener. On each activate signal, you would need 
to get the list of open editors from the workbench and try to 
dynamic_cast each entry to the QmitkStdMultiWidgetEditor class. There 
was a recent mitk-users thread about that.

Best,
Sascha

On 08/15/2015 12:03 AM, Sebastian Ordas wrote:
 Hi Team,

 I would like to change the active Layout e.g. Standard, 2D views up, 2D
 views left, etc. whenever I change the active perspective and also when
 it gets activated the first time.

 In other words, how can I set a different view layout depending on the
 active perspective?

 thank you!
 sebastian

 PS: no problems to extend StdMultiWidgetEditor but how to call it from a
 perspective when it gets changed/activated?

 --
 ___
 mitk-users mailing list
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Is there way to make some action by some plugin after it's loading

2015-08-14 Thread Sascha Zelzer

Hi,

it's hard to give you proper advice without exactly knowing what you are 
trying to achieve. You cant obviously call a function from a plug-in 
until its shared library is loaded.


There are different hooks, listeners, etc. but without knowing your use 
case I could just guess...


Cheers,

Sascha

Am 14/08/2015 um 14:09 schrieb Pukhlikov Mikhail:

Hello.

I need to make some action by some plugin after it's loading.

Not when I activate it. Before Activator loading.

Just when MITK itself starts it enumerates available plugins and in 
that time I need to call some function iside that plugin.


Thank you.



--


___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] [SPAM] once again: QmitkStdMultiWidget controlling layout

2015-07-31 Thread Sascha Zelzer

Hi,

Am 31/07/2015 um 14:07 schrieb Ingmar Wegner:

Hi,
I know this is an evergreen topic. And I know that QmitkStdMultiWidget 
is an old class but with mighty features that I would like to control.

 ...
- But I can't set the layout to show a 2D widget on the left side and 
a 3D widget on the right side.
I see that the linked_render_window_part is the 
QmitkStdMultiWidgetEditor but as this is a plugin class I can not 
include, cast, and access it!
I can only reach the interface methods of ILinkedRenderWindowPart and 
IRenderWindowPart, so enable and disable decorations and such.
If I could reach it I could call GetStdMutliwidget and reach heaven 
(QmitkStdMultiWidget).


You actually can if you really must. A a link dependency from your 
plugin to the org.mitk.gui.qt.stdmultiwidgeteditor plugin by adding ts 
symbolic name to the Require-Plugin CMake variable in its 
manifest_headers.cmake file. You can then include the header file and 
dynamic_cast the interface.


Best,

Sascha

What I also tried was to control the widget via the 
QmitkRenderWindowMenu (the icons in the upper right corner of the 
widget) as the QmitkRenderWindow holds it as a member but there is no 
apropriate public method.

Is there a way to switch the layout from code?
Or do I have to modify the mitk class? If so, what would be the best 
strategy for it so I could contribute the changes if they are of interest?

Best Regards,
Ingmar
I saw the following user list threads:
http://article.gmane.org/gmane.comp.lib.mitk.user/3843/match=qmitkstdmultiwidget+layout
http://article.gmane.org/gmane.comp.lib.mitk.user/698/match=qmitkstdmultiwidget+layout


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] how to load an STL resource in a Qt-based module?

2015-07-28 Thread Sascha Zelzer
Hi,

if your stl file is binary encoded, you would need to tell this fact the 
IOUtil::Load method (by providing the std::ios::binary | std::ios::in 
open flags, just like you would when using regular std streams). I cant 
think of any other issue here.

Best,
Sascha

On 07/28/2015 11:45 PM, Sebastian Ordas wrote:
 thank you Sascha,

 It looks like the problem is somewhere else: the resource is correctly
 loaded, I guess, but:

 std::vectormitk::BaseData::Pointer data = mitk::IOUtil::Load(resource);
 mitk::Surface::Pointer fileoutput =
 dynamic_castmitk::Surface*(data[0].GetPointer());
 vtkPolyData* pd = fileoutput-GetVtkPolyData();

 retrieves wrong data: 32409 points instead of the correct number, 5421
 (retrieved via vtkSTLReader)

 Let me add that the file opens correctly via File-Open File

 so the problem should be in the resource version of
 mitk::IOUtil::Load(), right?

 thanks
 sebastian

 On 28/07/2015 02:06 p.m., Sascha Zelzer wrote:
 Hi,

 the Module::GetResource() method will make the resources of the module
 object you call that method with accessible. It does not search across
 modules. My guess is you are trying to retrieve the body.stl
 resource from your own module, not from the QtWidgets module.

 Cheers,
 Sascha

 On 07/28/2015 04:28 AM, Sebastian Ordas wrote:
 Hi Team,

 How can I load an .stl resource file in a class located in QtWidgets
 module? (QmitkStdMultiWidget.cpp)
 1) My STL file, body.stl is located in
 D:\sources\MITK\Modules\QtWidgets\resource (note, there is no
 resources folder)
 2) It is not listed in Qmitk.qrc
 3) but it is indicated in
 D:\sources\MITK\Modules\QtWidgets\files.cmake as:

 ...

 set(QRC_FILES
  resource/Qmitk.qrc
 )

 set(RESOURCE_FILES
  body.stl
 )

 4) finally, in the code:

 us::Module* module = us::GetModuleContext()-GetModule();
 us::ModuleResource resource = module-GetResource(body.stl);
 std::vectormitk::BaseData::Pointer data =
 mitk::IOUtil::Load(resource);

   if(!data.empty())
   {
 mitk::Surface::Pointer fileoutput =
 dynamic_castmitk::Surface*(data[0].GetPointer());
 if (fileoutput-GetVtkPolyData())
  ...
   }

 thank you for any hint,
 sebastian

 --

 ___
 mitk-users mailing list
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] QMetaObject symbol not found

2015-07-28 Thread Sascha Zelzer
Hi Yari,

did you add the header file (step6.h) to the CMake list of files which 
should be processed by moc (look at files.cmake and the MOC_H_FILES 
variable)?

Cheers,
Sascha

On 07/28/2015 04:47 PM, yari mattei wrote:
 Hi guys,

 I am trying to create my own user interface for a MITK based application.

 I have created a MITK proejct with the project template and I am
 folowing the tutorial steps.

 I made the all the steps since the step5 without any problem, but I am
 having problem with step6.

 Just copy and paste the code from step6.h and step6.cpp (I only named
 the file different and I change all the name of the class in the file) I
 get this error :

 7 Creating library
 E:/MITK-d2/MITK-b/AwesomeProject-build/bin/Debug/AwesomeApp.lib and
 object E:/MITK-d2/MITK-b/AwesomeProject-build/bin/Debug/AwesomeApp.exp
 7Eco3DMainUI.obj : error LNK2001: unresolved external symbol public:
 virtual struct QMetaObject const * __cdecl
 Eco3DMainUI::metaObject(void)const 
 (?metaObject@Eco3DMainUI@@UEBAPEBUQMetaObject@@XZ)
 7Eco3DMainUI.obj : error LNK2001: unresolved external symbol public:
 virtual void * __cdecl Eco3DMainUI::qt_metacast(char const *)
 (?qt_metacast@Eco3DMainUI@@UEAAPEAXPEBD@Z)
 7Eco3DMainUI.obj : error LNK2001: unresolved external symbol public:
 virtual int __cdecl Eco3DMainUI::qt_metacall(enum
 QMetaObject::Call,int,void * *)
 (?qt_metacall@Eco3DMainUI@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
 7E:\MITK-d2\MITK-b\AwesomeProject-build\bin\Debug\AwesomeApp.exe :
 fatal error LNK1120: 3 unresolved externals

 I find out that should be something related with the Qt preprocessor,
 infact without Q_OBJECT macro after the declaration of the class (the
 code is the same as step6.h and step6.cpp ) it build fine.

 Does anyone have any idea?

 Thanks

 Yari


 --
 ___
 mitk-users mailing list
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] how to load an STL resource in a Qt-based module?

2015-07-28 Thread Sascha Zelzer
Hi,

the Module::GetResource() method will make the resources of the module 
object you call that method with accessible. It does not search across 
modules. My guess is you are trying to retrieve the body.stl resource 
from your own module, not from the QtWidgets module.

Cheers,
Sascha

On 07/28/2015 04:28 AM, Sebastian Ordas wrote:
 Hi Team,

 How can I load an .stl resource file in a class located in QtWidgets
 module? (QmitkStdMultiWidget.cpp)
 1) My STL file, body.stl is located in
 D:\sources\MITK\Modules\QtWidgets\resource (note, there is no
 resources folder)
 2) It is not listed in Qmitk.qrc
 3) but it is indicated in D:\sources\MITK\Modules\QtWidgets\files.cmake as:

 ...

 set(QRC_FILES
 resource/Qmitk.qrc
 )

 set(RESOURCE_FILES
 body.stl
 )

 4) finally, in the code:

 us::Module* module = us::GetModuleContext()-GetModule();
 us::ModuleResource resource = module-GetResource(body.stl);
 std::vectormitk::BaseData::Pointer data = mitk::IOUtil::Load(resource);

  if(!data.empty())
  {
mitk::Surface::Pointer fileoutput =
 dynamic_castmitk::Surface*(data[0].GetPointer());
if (fileoutput-GetVtkPolyData())
 ...
  }

 thank you for any hint,
 sebastian

 --
 ___
 mitk-users mailing list
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Enhanced workbench customization from within a perspective

2015-07-28 Thread Sascha Zelzer

Hi,

On 07/22/2015 03:05 PM, Ingmar Wegner wrote:

Hi community,
I am currently implementing a new perspective with which I want to 
strip down the GUI as much as possible; similar to a full screen mode.
So only to show a plugin X and the QmitkStdMultiWidget. The 
approptiate terms for BlueBerry application framework would be a view 
and an editor.
I have found the following explanation great: 
http://docs.mitk.org/2015.05/AddFunctionality.html
(Some code snippets on QmitkDicomExternalDataWidget are not shown in 
the webpage!)
I already have the additional perspective in place and when I activate 
it it shows my plugin X.
However when I restart the application it starts the perspective again 
but doesn't show the StdMultiWidget! It remains white, the space is 
reserved for it though.

I didn't find a way to hook into the loading process during a restart.
Any hints on that?


If I remember correctly, restoring editors from previous sessions is not 
fully functional yet (as you experienced).


As I want to have a full screen I need a way to get back to regular 
perspective so I added a button to the plugin X with :

// Switch to default perspective.
QString perspective_id = my.workbench.app.perspective;
berry::IWorkbenchWindow::Pointer window = 
this-GetSite()-GetWorkbenchWindow();
window-GetWorkbench()-ShowPerspective(perspective_id, 
berry::IWorkbenchWindow::Pointer(window));

mitk::RenderingManager::GetInstance()-RequestUpdateAll();
This works great and with the latter RequestUpdateAll the perspective 
looks good again.

So maybe this is what is missing?
But I don't have a hook to call it! CreateInitialLayout is only called 
when the perspective is explicitly triggered, not loaded during 
startup because it was activated when the app was closed.


There are hooks for perspective activation etc. but it is probably not 
the best way to do what you want. I think there is some logic hidden in 
the MITK Workbench which opens a QmitkStdMultiWidgetEditor instance if 
there is none and and e.g. a request update all is triggered (something 
along these lines).


The complication with restoring editors is that they need an input to 
be useful. The input for the multi widget is the data storage, which on 
startup usually is empty (except if you start the workbench with some 
command line args) so restoring the editor doesn't make much sense if it 
will be empty anyways.


Then I have to hide the menu bar, status bar and so on. So whenever 
the perspective is activated I want to strip down the GUI.
Is there a way to recall PostWindowCreate() and to give it a different 
configurer with the parameters what to show?
I don't have a connection between perspective and the workbench window 
advisor, do I?


Window advisors are one time hooks and cannot be triggered again for an 
existing window.


I have a different proposal: Make the container widget which holds the 
views and editors (excluding menu and tool bars etc.) full screen, using 
Qt methods (reparenting it, setting the correct window flags, etc.). You 
could probably even have a floating/hovering leave fullscreen button. 
One complication could be the part activation logic, which is triggered 
through a global event filter on the QApplication instance, but this 
need to be tried out.


This could be implemented in a separate plug-in for any application and 
perspective.


Cheers,
Sascha

Ther once was a fullscreen mode but I didn't find it. Any one also 
requesting something similar?

;),
Ingmar


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] DataStorage in module

2015-07-22 Thread Sascha Zelzer
Hi,

In the writer case, the assumption was that a BaseData object is 
self-contained. Can you had the required information during reading as 
BaseData properties, so you can access them in the writer?

However, I currently cannot think of a reason why we couldn't add a 
write method to IFileWriter which takes two arguments, the BaseData and 
the DataStorage it is contained in. You might want to add a feature 
request to Bugzilla and / or trigger a specific discussion about that 
topic on the mailing list.

Best,
Sascha

On 07/22/2015 04:07 PM, Nil Goyette wrote:
 Hi Sascha,

 Nice, I wasn't aware of the Read(DataStorage) method. It does what I need.
 Except I also need the DataStorage in the writer class, which, afaik,
 can't access the DataStorage.

 As I don't see any alternative, I'll keep my hack as-is for now. It's a
 singleton in the FiberTracking module. A kind of service I guess :)

 I added a comment in bug #17912, so it got a little attention! Thank you
 for your help.

 Nil

 Le 2015-07-22 02:35, Sascha Zelzer a écrit :
 Hi Nil,

 there is a feature request about moving the IDataStorageService class
 to a module and make it accessible from a module context (which would
 publish it as a service for plugins as well) but it didn't get much
 attention yet: http://bugs.mitk.org/show_bug.cgi?id=17912

 You are talking about an IO module, so assuming you have your own
 reader for trk files, there is an overload of IFileReader::Read which
 is passed the data storage instance which is to be filled with the
 read data. The workbench open file action always calls this method and
 allows you inspect the current contents.

 If you are not using your own reader, how are you listening to load
 events of trk files?

 Best,
 Sascha

 On 07/21/2015 08:08 PM, Nil Goyette wrote:
 Hi all,

 I know it's possible to access the DataStorage in a view (with
 GetDataStorage) and in a plugin (with the plugin's context and
 IDataStorageService), but I have a special case where I need the
 DataStorage in a IO module. Before you tell me Don't do that, here's
 my use-case :)

 The user loads a .trk file, which may be linked to a reference image, so
 before loading the trk, we check the DataStorage if such an image exists
 and use its affine transformation if it does. Here I say a .trk file,
 but I will have the same problem with surfaces (some are not in world
 position)

 I currently handle the situation with a ugly hack, but I would be
 interested in a cleaner solution if there's one.
 Thank you.

 Nil


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] app crashes at start

2015-07-14 Thread Sascha Zelzer

Hi Miklos,

the stack trace suggests that the segfault happens during shutdown of 
the CTK plugin framework. The question is, why is it shutting down?


Could you provide a real stack trace (using the debugger) and the 
console output with --BlueBerry.consoleLog ?


Thanks,
Sascha

On 07/13/2015 07:52 PM, Miklos Espak wrote:

Hi,

we have upgraded to MITK 2015.05.0. The code compiles, but our app 
segfaults at start.


Any clue what the problem can be?

The stack trace:

0ctkPluginContextPrivate::isPluginContextValidctkPluginContext.cpp420x75cf0cf2
1ctkPluginContext::getServiceReferencesctkPluginContext.cpp1420x75cf160c
2ctkPluginContext::getServiceReferencesctkApplicationHandlectkPluginContext.h3240x7fffeafe63bd
3berry::ApplicationContainer::StopAllAppsberryApplicationContainer.cpp4900x7fffeafe188c
4berry::ApplicationContainer::PluginChangedberryApplicationContainer.cpp4840x7fffeafe17ee
5berry::ApplicationContainer::qt_static_metacallmoc_berryApplicationContainer.cxx490x7fffeb06e7f9
6QMetaObject::activate(QObject*, QMetaObject const*, int, 
void**)/build/opt/qt-4.8.7/lib/libQtCore.so.40x77a82cea

7ctkPluginFrameworkListeners::pluginChangedDirectmoc_ctkPluginFrameworkListeners_p.cxx1090x75d4ea86
8ctkPluginFrameworkListeners::emitPluginChangedctkPluginFrameworkListeners.cpp1740x75d12720
9ctkPluginFrameworkPrivate::shutdown0ctkPluginFramework_p.cpp1780x75d17f93
10QtConcurrent::VoidStoredMemberFunctionPointerCall2void, 
ctkPluginFrameworkPrivate, bool, bool, bool, 
bool::runFunctorqtconcurrentstoredfunctioncall.h6150x75d1b8a8

11QtConcurrent::RunFunctionTaskvoid::runqtconcurrentrunbase.h1340x75d18ecf
12??/build/opt/qt-4.8.7/lib/libQtCore.so.40x7796072e
13??/build/opt/qt-4.8.7/lib/libQtCore.so.40x7796c7ef
14start_thread3120x76bba182
15clone1110x76eca47d


In (2) clazz is 
org.commontk.service.application.ApplicationHandle, filter is 
(!(application.state=STOPPING))



I guess it is related to the new application launcher mechanism.

Our main function looks like this:

int  main(int  argc,  char**  argv)
{
   //  Create  a  QApplication  instance  first
   mitk::BaseApplication  app(argc,  argv);
   app.setApplicationName(NiftyView);
   app.setOrganizationName(CMIC);
   //  Preload  the  org.mitk.gui.qt.common  plug-in  (and  hence  also  Qmitk) 
 to  speed
   //  up  a  clean-cache  start.  This  also  works  around  bugs  in  older  
gcc  and  glibc  implementations,
   //  which  have  difficulties  with  multiple  dynamic  opening  and  
closing  of  shared  libraries  with
   //  many  global  static  initializers.  It  also  helps  if  dependent  
libraries  have  weird  static
   //  initialization  methods  and/or  missing  de-initialization  code.
   QStringList  preloadLibs;
   preloadLibsliborg_mitk_gui_qt_common;
   app.setPreloadLibraries(preloadLibs);
   app.setProperty(mitk::BaseApplication::PROP_APPLICATION,  
uk.ac.ucl.cmic.gui.qt.niftyview);
   return  app.run();
}

Cheers,
Miklos




--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] MITK Workbench problem

2015-07-14 Thread Sascha Zelzer

Hi,

If I remember correctly, version 2014.03 had some issues with 
pre-loading libraries. Do you happen to have non-ascii characters in 
your build-path?


I also suggest to use the latest version 2015.05 which contains many bug 
fixes, also for the pre-load functionality.


Cheers,

Sascha

On 07/14/2015 10:59 AM, Panchatcharam Mariappan wrote:
If I use MITK binaries installer, I am able to open the MITKWorkbench 
without any problem.


I tried to build MITK from version 2014.03.0 git repo and I am able to 
build MITKWorkbench.

I used Qt4.8.6.

But I am not able to open MITKWorkbench, it says Pre-loading library 
F failed:

Cannot load library F: The specified module could not be found

Also it says close or debug the program. I trace the error, it shows 
the following
liborg_blueberry_osgi.dll!berry::Starter::Run(int  argc, char * * 
argv, Poco::Util::AbstractConfiguration * config) Line 56
liborg_blueberry_osgi.dll!mbilog::PseudoStream::operatorchar const 
*(const char * const  data) Line 107
liborg_blueberry_osgi.dll!berry::InternalPlatform::Initialize(int  
argc, char * * argv, Poco::Util::AbstractConfiguration * config) Line 245


Also it says unable to read memory

Inline images 1
Any idea what is going wrong?
--
Best Regards
Panchatcharam Mariappan


--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Disable / change Department Logo; LogoOverlay

2015-07-07 Thread Sascha Zelzer

Hi,

the preference value needs to contain an absolute file system path 
(relative paths might work, depending on your current working directory).


In order to use a Qt resource, the mentioned 
WorkbenchUtil::SetDepartmentLogoPreference method can be used, which 
internally writes the embedded Qt resource to a file on the disk. Why 
this stopped working with 2015.05, I don't know.


Best,
Sascha

On 07/01/2015 08:23 PM, Nil Goyette wrote:

Hi all,

I can't get it to work either. In fact, it did work, using the full path:
berry::Platform::GetPreferencesService()-GetSystemPreferences()-Node(org.mitk.editors.stdmultiwidget)-Put(
DepartmentLogo, C:\\Users\\Nil\\.png);
but it never works using a Qt ressource. I followed the execution in 
mitk::LogoOverlay::UpdateVtkOverlay and it actually tries to open 
(fopen) the file, which is a Qt ressource path, so it fails. It's 
supposed to use a Qt class somewhere to work with ressources.


Le 2015-07-01 10:10, Fitze Thomas (fitz) a écrit :

Hey all

I moved our codebase to 2015.05 and the department logo replacement 
stopped working. I can disable it with Christophs aproach, but trying 
to set it to something else does not work anymore. This used to work 
under 2014.10:

mitk::WorkbenchUtil::SetDepartmentLogoPreference(:/PluginResources/logo.png,context);
But it does not seem to do anything in 2015.05.

Regards,
Thomas

On 29.06.2015, at 16:36, Christoph Kolb c.k...@dkfz-heidelberg.de 
mailto:c.k...@dkfz-heidelberg.de wrote:


Hello Ingmar,

I think that mitk::WorkbenchUtil::SetDepartmentLogoPreference does 
not work because it checks if the image path is valid. I will look 
into this eventually.

However, there are two other ways to disable / change the logo:

1. You can set it in the preferences of the respective editor
berry::Platform::GetPreferencesService()-GetSystemPreferences()
-Node(QmitkStdMultiWidgetEditor::EDITOR_ID)-Put(DepartmentLogo, );

Or, if you do not want the dependency to QmitkStdMultiWidgetEditor, 
just pass the correct Id:


berry::Platform::GetPreferencesService()-GetSystemPreferences()
-Node(org.mitk.editors.stdmultiwidget)-Put(DepartmentLogo, );

2.  The other way is to disable the logo decoration in the 
RenderWindowPart. This can be done in a view (deriving from 
QmitkAbstractView)

  QStringList decorations;
  decorations  mitk::IRenderWindowPart::DECORATION_LOGO;
this-GetRenderWindowPart()-EnableDecorations(false,decorations);

Regards,
Christoph

On 06/24/2015 02:24 PM, Ingmar Wegner wrote:

In addition to that
there is a utility method in mitkWorkbenchUtil
mitk::WorkbenchUtil::SetDepartmentLogoPreference(, context);
but that doesn't work either because there the approach with the 
preferences service is used. This is outdated I guess.

Miklos, did you disable the logo? You originally opened the bug [1].
Best Regards,
Ingmar
[1] http://bugs.mitk.org/show_bug.cgi?id=18594 
http://bugs.mitk.org/show_bug.cgi?id=18594

*Gesendet:* Mittwoch, 24. Juni 2015 um 12:59 Uhr
*Von:* Ingmar Wegner iweg...@gmx.de
*An:* 'mitk-users@lists.sourceforge.net' 
mitk-users@lists.sourceforge.net

*Betreff:* [mitk-users] Disable / change Department Logo; LogoOverlay
Hi all,
I am facing problems to access the mitkLogoOverlay to disable the 
DepartmentLogo.

According to [1] it is fixed in the latest release.
The logo is hidden if an empty path is set.
But I don't see how I can set the path. It can't be set by 
preference service as before because the overlays use their own 
properties (equal to mitk::DataNode does).
In [2] I get how the overlay works in general. The OverlayManager 
can be received via the BaseRenderer.
But how to access the special overlay? In [3] I don't see a 
GetOverlay() method or so.

Could anyone give me another highly appreciated hint?
Or do I have to access it via the StdMultiWidget?
mitk::WorkbenchUtil::SetDepartmentLogoPreference(, context);
doesn't work...
Best,
Ingmar
[1] http://bugs.mitk.org/show_bug.cgi?id=18594
[2] http://docs.mitk.org/2015.05/OverlaysPage.html
[3] http://docs.mitk.org/2015.05/classmitk_1_1OverlayManager.html
-- 
Monitor 25 network devices or servers for free with OpManager! 
OpManager is web-based network management software that monitors 
network devices and physical  virtual servers, alerts via email  
sms for fault. Monitor 25 devices for free with no restriction. 
Download now 
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o___ 
mitk-users mailing list mitk-users@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical  virtual servers, alerts via email  sms
for fault. Monitor 25 devices for free with no restriction. 

Re: [mitk-users] Proper way to fire data node selection

2015-07-03 Thread Sascha Zelzer

Hi,

judging by the code you pasted below, this question is about the 
BlueBerry selection service. I didn't fully understand the relationship 
with the segmentation plugin, however.


There are few things to take into account when working with the 
selection service:


- Selections in the workbench are by design controlled by the user. 
Changing selections due to some internal logic is not recommended.

- A selection is a global concept for the whole workbench window.
- The current selection is the selection in the currently active part. 
This implies that programmatically changing the selection of a part 
(e.g. a view) which is not active will only have an immediate effect in 
very special cases. Usually, the selection change only propagates to 
listeners when that part becomes active.
- Some views in MITK unfortunately listen to data manager selection 
events only, which is most often an unnecessary limitation.
- The selection service is conceptually equivalent to the Eclipse 
Workbench Selection Service and Google search hits about Eclipse will 
equally well apply to BlueBerry / MITK


Hope that helps,

Sascha

On 07/03/2015 08:32 AM, Pukhlikov Mikhail wrote:

Hello, I need to change selected data node

Currently I'm using this method:

...
m_SelectedNode-SetVisibility(true);
...

  QList mitk::DataNode::Pointer qSelectionList;
  qSelectionList.push_back(m_SelectedNode);
  this-FireNodesSelected(qSelectionList);
mitk::RenderingManager::GetInstance()-RequestUpdateAll();

It changes selected image in multiwidget but when I'm using 
segmentation plugin then resulting segmentation on image has offset 
from position where I used to create it. Sometimes when I open 
datamanager and pick node there everything works fine however data 
manager selection process looks complicated.


What's wrong in changing selection with FireNodesSelected method? Can 
I use it? What should I do in addition to it to make it work properly?


Thank you


--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] project dependencies in the new build structure

2015-06-23 Thread Sascha Zelzer
Hi,

It looks like you found a bug. The ITK line shoud contain a DEPENDS 
GDCM but since GDCM is ON by default and nobody is switching it OFF, we 
didn't notice.

Best,
Sascha

On 06/23/2015 08:06 PM, Miklos Espak wrote:
 Hi,

 I am trying to mock the same build structure in our project that the 
 new MITK release does.

 What is the right way of defining project dependencies? The top level 
 cmakelists file has this:

 mitkFunctionAddExternalProject(NAME ITK ON NO_CACHE)

 Other EPs have a DEPENDS clause here.

 But the CMakeExternals/ITK.cmake defines a dependency on GDCM.

 Is it a problem? Which is the right place for declaring a dependency?

 Cheers,
 Miklos



--
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical  virtual servers, alerts via email  sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] How to access multiwidget editor from Core DisplayInteractor

2015-06-22 Thread Sascha Zelzer

Hi,

there is the mitk::RenderingManager singleton which you could may be use 
to get a list of all registered render windows. If I remember correctly, 
the render windows of the multi widget are registered with the global 
rendering manager singleton. The problem is, that there could be other 
render windows registered, not related to the multi widget.


Best,
Sascha

On 06/22/2015 08:35 AM, Pukhlikov Mikhail wrote:

Hello,

I'm trying to implement experimental feature for myself

By point selection / click on 3D view in multiwidget I want also 
select this point in other (2D) multiwidget views. I can get point 
click event from DisplayInteractor, I can get coordinates 
with vtkInteractorObserver::ComputeDisplayToWorld but I can't access 
multiwidget and multiwidget interfaces from there (from Core) because 
they are parts of plugin. How can I do it? Or shoul I move such 
functional into new plugin or add/implement interactor for multiwidget 
plugin somehow?


Thank you.


--
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical  virtual servers, alerts via email  sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] CTK setup for external projects broken

2015-06-13 Thread Sascha Zelzer

Hi,

from the CMake stack trace you can see that the wrong CTKConfig.cmake 
file is included. This file was configured for install trees and would 
be copied to its proper location by a make install within the CTK build.


I don't know where c:/mitk/2015.05.0/cmake/mitkConfig.cmakeis coming 
from, it doesn't look like the official MITK directory layout. Anyway, 
the find_package(CTK) call (which is probably in that file) picks up the 
wrong CTKConfig.cmake file (the one intended for CTK install trees). The 
MITK super-build does not support CTK install trees yet, we are 
including the CTK-build/CTKConfig.cmake file (at least, that's the file 
which is supposed to be found by find_package).


You could check your CMAKE_INSTALL_PREFX and CTK_DIR variables. On 
Windows, also check the registry...


The external MITK-ProjectTemplate and the PluginGenerator are part of 
the nightly test builds. So yes, every build is usually tested against 
two external projects.


Best,
Sascha

On 06/12/2015 07:38 PM, Ingmar Wegner wrote:

Hi everyone,
as I was too desperate to wait longer for the release I checked out 
git tag v2015.05.
I have setup ITK, VTK and DCMTK as external projects. For this I had 
to fix external library dirs [1].
Then I deactivated OpenViewCore module in ModuleList.cmake and 
integrated open pull request of bug 16811 (print out base data 
properties).
Now I am facing a cmake error that I think comes from the folder 
restructuring (ep subfolder).
CMake Error at 
C:/mitk/2015.05.0/build/ep/src/CTK-build/CTK-build/CMakeFiles/CTKConfig.cmake:19 
(message):

File or directory
C:/mitk/2015.05.0/build/ep/src/lib/ctk-0.1/CMake
referenced by variable CTK_CMAKE_UTILITIES_DIR does not exist !
Call Stack (most recent call first):
C:/mitk/2015.05.0/build/ep/src/CTK-build/CTK-build/CMakeFiles/CTKConfig.cmake:32 
(set_and_check)

c:/mitk/2015.05.0/cmake/mitkConfig.cmake:41 (include)
After restructuring there is only one folder ctk-0.1 located at
build/ep/src/CTK-build/CTK-build/CMake/LastConfigureStep/CMakeFiles/Export/lib/ctk-0.1/CMake
but it looks at
build/ep/src/lib/ctk-0.1/CMake
so
/CTK-build/CTK-build/CMake/LastConfigureStep/CMakeFiles/Export
would be missing after src.
The line where the error occurs is:
set_and_check(CTK_CMAKE_DIR ${PACKAGE_PREFIX_DIR}/lib/ctk-0.1/CMake)
and the following lines as well.
When I use the superbuild this file doesn't cause problems.
Is the build already tested against an external project (external 
Project Template)?
I can keep on testing if it makes sense and send the error reports / 
bug reports or pull requests but I don't want to run into a false 
direction here...

Best Regards and a great weekend,
Ingmar
[1] 
https://github.com/MITK/MITK/commit/775ab3134299581a1ac3aa4680c47e4e1447af6a


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Static build

2015-05-27 Thread Sascha Zelzer
Hi Federico,

unfortunately, static builds are currently broken. Most likely 2014.03 
is affected as well. Last year we made some progress with repairing 
static builds but didn't completely finish these efforts. For MITK 
Modules, there are in principle no major obstacles I know of for 
enabling static linking again. MITK Workbench applications are a 
different matter, because the CTK Plugin Framework does not support 
static linking.

If you need static linking support for your applications and are willing 
to invest some time, I could probably give you some pointers how to 
resolve the upcoming issues.

Best,
Sascha

On 05/27/2015 05:18 PM, Federico Milano wrote:
 Hi. I'm trying to build (using the Superbuild solution) a static 
 version MITK 2014.03 with the BUILD_SHARED_LIBS CMake option in OFF 
 state and I'm getting linking errors and some compiling errors.

 I've already built the same version of MITK with the BUILD_SHARED_LIBS 
 ON with no problems at all.

 Do you know what could be happening?

 Thanks in advance,

 Federico


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Hide DataManager

2015-05-21 Thread Sascha Zelzer

Hi,

the cleanest way would be to just not build the 
org.mitk.gui.qt.datamanager plugin (or remove the entry in the 
MitkWorkbench.provisioning file if you are not building the 
MitkWorkbench yourself).


If you need more hints, please describe your set-up (own application, 
custom MITK build, etc.) in more detail.


Best,
Sascha

On 05/21/2015 02:33 PM, Noll, Matthias wrote:


Hi all,

is it possible to hide the data manager of MITK.

We like to have no interaction possibility through the DataManager. 
Everything will be done using the dropboxes and so on. In this case, 
the DataManager case unnecessary and allows for interaction 
possibilities which are not desired. Therefore we like to hide the 
DataManager completely. Though, since he is responsible for all render 
window initialization and updates, our attempts to do so failed so far.


Does anybody have some insights in hiding the DataManager without 
compromising the render window initialization and updates?


Best regards,

Matthias



--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Building mitk in vs 2012

2015-04-29 Thread Sascha Zelzer
Hi,

it looks like your VTK build was not successful. Please right-click on 
the VTK project within the MITK-superbuild.sln solution and select 
Build Only / Rebuild only VTK and check if there are error message 
specific to the VTK build. If not, you need to look carefully through 
the complete log output to spot the actual error, the excerpt you pasted 
below is likely just a follow-up error and doesn't reveal the actual 
problem.

- Sascha

On 04/27/2015 11:14 AM, vahid kadivarkadivar wrote:
 Hi Dears,
 I have some errors in during building mitk in vs 2012 these error are 
 following below:
 My work is followed by these setting :
 1:qt  4.8.6
 2:vs 2012 build for vs x64
 3:MITK-2014.10.0

 CMake Error at CMake/PackageDepends/MITK_VTK_Config.cmake:1 
 (find_package):
 By not providing FindVTK.cmake in CMAKE_MODULE_PATH this project has
 asked CMake to find a package configuration file provided by 
 VTK, but
 CMake did not find one.
 Could not find a package configuration file provided by VTK with 
 any of
 the following names:
   VTKConfig.cmake
   vtk-config.cmake
 Add the installation prefix of VTK to CMAKE_PREFIX_PATH or set 
 VTK_DIR
 to a directory containing one of the above files.  If VTK provides a
 separate development package or SDK, be sure it has been installed.
   Call Stack (most recent call first):
 CMake/mitkFunctionUseModules.cmake:161 (include)
 CMake/mitkFunctionCreateModule.cmake:535 (mitk_use_modules)
 Core/Code/CMakeLists.txt:17 (MITK_CREATE_MODULE)
   -- Configuring incomplete, errors occurred!
   See also C:/vahid/mitk/2012-32/MITK-build/CMakeFiles/CMakeOutput.log.
   See also C:/vahid/mitk/2012-32/MITK-build/CMakeFiles/CMakeError.log.
 C:\Program Files 
 (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): 
 error MSB6006: cmd.exe exited with code 1.
 -- Build started: Project: MITK-build, Configuration: Debug x64 --
   Building Custom Rule C:/vahid/mitk/MITK-2014.10.0/CMakeLists.txt
   CMake does not need to re-run because 
 C:\vahid\mitk\2012-32\CMakeFiles\generate.stamp is up-to-date.
 CUSTOMBUILD : error : could not find CMAKE_GENERATOR in Cache
 == Build: 15 succeeded, 4 failed, 1 up-to-date, 0 skipped 
 ==

 Thanks in advance.


--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Displaying Real-time streamed images Cannot queue arguments of type 'QTextCursor'

2015-04-29 Thread Sascha Zelzer
Hi,

it looks like you are trying to use a QTextCursor object as an argument 
in a Qt slot wich you are connecting to a signal via a queued 
connection. Since QTextCursor is not a type known natively to the Qt 
meta-object system, you need to call qRegisterMetaType for QTextCursor 
yourself, like the error message suggests. This is really a Qt related 
issue.

Best,
Sascha

On 04/28/2015 02:07 PM, Gomez, Alberto wrote:
 Dear all,

 I am trying to display a stream of images that I have access to at a
 certain frame rate. For simplicity, let's assume they are 2D images,
 they all have the same size/extent etc and only the actual pixel data
 changes.

 I have been looking at the US module, and particularly at
 UltrasoundSupport.cpp, Where they do the following:

 void UltrasoundSupport::DisplayImage()
 {
 //Update device
 m_Device-Modified();
 m_Device-Update();

 //Only update the view if the image is shown
 if(m_Controls.m_ShowImageStream-isChecked())
 {
 //Update data node
 mitk::Image::Pointer curOutput = m_Device-GetOutput();
 m_Node-SetData(curOutput);

 // if the geometry changed: reinitialize the ultrasound image
 if((m_OldGeometry.IsNotNull()) 
(curOutput-GetGeometry() != NULL) 
 (!mitk::Equal(m_OldGeometry.GetPointer(),curOutput-GetGeometry(),0.0001,false))
   )
 {
   mitk::IRenderWindowPart* renderWindow = this-GetRenderWindowPart();
   if ( (renderWindow != NULL) 
 (curOutput-GetTimeGeometry()-IsValid()) 
 (m_Controls.m_ShowImageStream-isChecked()) )
   {
 renderWindow-GetRenderingManager()-InitializeViews(
 curOutput-GetGeometry(),
 mitk::RenderingManager::REQUEST_UPDATE_ALL, true );
 renderWindow-GetRenderingManager()-RequestUpdateAll();
   }
   m_CurrentImageWidth = curOutput-GetDimension(0);
   m_CurrentImageHeight = curOutput-GetDimension(1);
   m_OldGeometry =
 dynamic_castmitk::SlicedGeometry3D*(curOutput-GetGeometry());
 }
 //if not: only update the view
 else
 {
   this-RequestRenderWindowUpdate();
 }
 }

 I am basically doing the same thing, with just minor differences due to
 my data structure:


 void StreamingView::ImagingHandler(LayerObject::Pointer tlo){

 DNLDataHandler::Pointer dataHandler =  DNLDataHandler::Pointer(new
 DNLDataHandler());

   std::vector vtkSmartPointervtkImageData  imageData;
   {
   imageData = dataHandler-createImage(tlo);
   }
   if (!imageData.size()){
   return;
   }

   this-m_FrameCounter++;

   /// Add the data to the viewer
   {

   /// Option 1: attempt to get data from my RT source
   mitk::Image::Pointer mitkImage = mitk::Image::New();
   mitkImage-Initialize(imageData[0]);
 mitkImage-SetVolume(imageData[0]-GetScalarPointer());
   this-m_Node-SetData(mitkImage);

   /// Option 2: generate a random image
   // mitk::Image::Pointer dummyImage =
 mitk::ImageGenerator::GenerateRandomImagefloat(100, 100, 100, 1, 1, 1,
 1, 255,0);
   // this-m_Node-SetData(dummyImage);

if((this-m_OldGeometry.IsNotNull()) 
 (mitkImage-GetGeometry() != NULL) 
 (!mitk::Equal(m_OldGeometry.GetPointer(),mitkImage-GetGeometry(),0.0001,false)))
 {
   mitk::IRenderWindowPart* renderWindow =
 this-GetRenderWindowPart();
   if ( (renderWindow != NULL) 
 (mitkImage-GetTimeGeometry()-IsValid()) ) // 
 (this-m_Controls.m_ShowImageStream-isChecked()) )
   {
 renderWindow-GetRenderingManager()-InitializeViews(
   mitkImage-GetGeometry(),
 mitk::RenderingManager::REQUEST_UPDATE_ALL, true );
 renderWindow-GetRenderingManager()-RequestUpdateAll();
   }
   this-m_OldGeometry =
 dynamic_castmitk::SlicedGeometry3D*(mitkImage-GetGeometry());
   }
   else
   { //if not: only update the view
   this-RequestRenderWindowUpdate();
 mitk::RenderingManager::GetInstance()-RequestUpdateAll();
   }

   }
 }

 The above function is called every time there is a new image available,
 which happens roughly every 50 ms. Unfortunately when I run  my plugin,
 the app crashes giving the following error:

 [Tue Apr 28 12:55:13 20150.573] Logfile:
 xxx/data/13/mitk-0.log
 [1.036] [BlueBerry] LOG: Warning: Detected recursive attempt by part
 org.mitk.views.datamanager to create itself (this is probably, but not
 necessarily, a bug)
 [1.209] [BlueBerry] BlueBerry Workbench ready
 QObject::connect: Cannot queue arguments of type 'QTextCursor'
 (Make sure 'QTextCursor' is registered using qRegisterMetaType().)
 Aborted (core dumped)

 Now, if I add a line
   std::this_thread::sleep_for(std::chrono::milliseconds(1000));
 just before this-m_Node-SetData(mitkImage);

 It does not crash for a little while, shows me the images flowing
 through (for some reason the coronal view does not update , although the
 coronal slice in the 3D view does ) 

Re: [mitk-users] Qt version in the template project

2015-04-15 Thread Sascha Zelzer

Hi,

Rostislav is right, you probably used the tip of the master branch of 
the MITK-ProjectTemplate repository. This is synced with the master 
branch of the MITK repository.


Unless you explicitly need the development version (master branch), you 
should use the MITK 2014.10 release and this link [1] for the 
MITK-ProjectTemplate with that release.


The link to the build instructions (with nightly-qt4 suffix) is 
deprecated and the new version is here [2] which mentions Qt5. It looks 
like we missed changing a reference to the old documentation somewhere.


Best,
Sascha

[1] https://github.com/MITK/MITK-ProjectTemplate/archive/v2014.10.tar.gz
[2] http://docs.mitk.org/nightly/BuildInstructionsPage.html

On 04/15/2015 05:00 PM, Rostislav Khlebnikov wrote:


Hi Alberto,

I believe you're using the latest release 2014.10. So you will need 
the project template synced with this version. One way to get it is to 
find the commit that mentions this release version and use that as 
your project template.


Rostislav.

On 15 Apr 2015, at 15:09, Gomez, Alberto alberto.go...@kcl.ac.uk 
mailto:alberto.go...@kcl.ac.uk wrote:


Dear all,

I am trying to get started with building my first MITK
application. I am confused about the QT version though. In am
using Ubuntu 14.04 64b

In the website here

http://docs.mitk.org/nightly-qt4/BuildInstructionsPage.html#BuildInstructions_Prerequisites
it says QT 4.x preferred, however when I download the tarbal from
here https://github.com/MITK/MITK-ProjectTemplate and run CMake,
it seems to be looking for QT5. In here
https://github.com/MITK/MITK-ProjectTemplate it actually says QT
5.0 or newer, so I wonder if it is still possible to build using
4.7+ in linux? Is it advisable to use Qt5.0 instead?

Thanks,

Alberto


-- 
Dr Alberto Gomez

Research Associate
Department of Biomedical Engineering
King's College London

020 7188 7188 ext 50871
4th North Wing
St Thomas' Hospital
SE1 7EH London, UK



BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF



mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users



--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Tests for MicroServices

2015-04-15 Thread Sascha Zelzer
Hi,

I'm not sure I get you. Every module always has a name. Of coude using 
code like context-GetModule(name) couples the caller with the module 
name via the character constant which is usually to be avoided.

I was thinking that every module (also auto-load modules) gets its own 
test driver (under the modules test directory). So the coupling via 
the name would only be between the module and its specific test driver, 
which would still be quite local.

However, using a pid is a more common solution to identify specific 
services. Of course they become public API of that service and can't 
be changed easily.

Best,
Sascha

On 04/15/2015 10:29 AM, Clarkson, Matt wrote:
 Hi Sascha,

 do you know how you might implement this?
 We can’t just remove the module name, or else every test driver will need 
 updating.
 Will you provide an extra flag to say its only ever an auto-load module?
 Or if a module is only ever auto-loaded along with another module, then that 
 should be the dependency?

 M


 On 11 Apr 2015, at 19:11, Sascha Zelzer s.zel...@dkfz-heidelberg.de wrote:

 Hi,

 good catch. We should probably not automatically add the linker dependency 
 in case of a test driver being created for an auto-load module. I will 
 change this ASAP (test drivers could still add the dependency explicitly 
 themselves).

 As a note, if you want to work with a specific service implementation in 
 your test, you could use:

 - A service property (e.g. service.pid, for persistent identifier) to 
 identify the service object registered by the auto-load module or
 - Get the services registered by the auto-load module in your test via 
 context-GetModule(auto-load-module-name)-GetRegisteredServices()

 Best,
 Sascha

 On 04/11/2015 04:20 PM, Clarkson, Matt wrote:
 Hi there,

 If I have a module that ONLY contains MicroServices eg. New IO stuff, using 
 the IFileReader and IFileWriter type interfaces, then as I understand it, 
 nothing should need to link to this module. The module should be 
 auto-loaded and services registered when autoloading. This includes unit 
 tests.

 So, I have some Readers/Writers in a dedicated module, niftkCoreIO. This 
 niftkCoreIO depends on MitkCore, and should be autoloaded. All code is in 
 an “Internal” folder, and no symbols exported.

 But the CMake macro to create unit tests seems to create a specific 
 dependency on niftkCoreIO.

 Is this right?

 https://github.com/MITK/MITK/blob/master/CMake/mitkMacroCreateModuleTests.cmake#L38

 Thanks

 Matt


 --
 BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
 Develop your own process in accordance with the BPMN 2 standard
 Learn Process modeling best practices with Bonita BPM through live exercises
 http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
 source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF
 ___
 mitk-users mailing list
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users


--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Do you ever review github pull requests

2015-03-24 Thread Sascha Zelzer

Hi,

yes, we do:

12 open
85 closed

we know that some PRs are already open for some time. In some cases it 
also takes longer for an initial response. Please note that GitHub is 
not our main development platform and only a small number of MITK 
developers get GitHub PR notifications. Our contribution process is 
described in [1].


If you need immediate feedback on a PR, please use the mitk-users 
mailing list [2] as you just did and/or enter a bug ticket [3].


Thanks,
Sascha

[1] http://mitk.org/wiki/How_to_contribute
[2] http://mitk.org/wiki/MITK_Mailinglist
[3] http://bugs.mitk.org/


On 03/24/2015 02:34 PM, Pukhlikov Mikhail wrote:

Hello

Do you ever review github pull requests?


--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Enabling / Disabling department logo

2015-03-24 Thread Sascha Zelzer

Hi,

this is being worked on in bug

http://bugs.mitk.org/show_bug.cgi?id=18594

Best,
Sascha

On 03/20/2015 04:14 PM, Ingmar Wegner wrote:

Hi all,
previously there was a way to disable the department logo by setting 
an empty path to the logo.
Now (checkout from 2015/03/04 with hash [1] before switching to new 
ITK version)
if the file is not found a fallback with generating the mbi logo is 
enabled.
I found bug #18594 [2] but IMO it is not that straight forward to go 
via the StdMultiWidgetEditor (plugin) to enable / disable it.
[3] explains how overlays are used in general. But there is no way to 
parse through the overlays and to reach an already added overlay in 
order to change it.

Could someone explain how to disable the logo?
Bes regards,
Ingmar
[1] hash: 24826b0ededbd3160482bb61da434b08b2bd7bed
[2] http://bugs.mitk.org/show_bug.cgi?id=18594
[3] 
http://mitk.org/images/d/d1/BugSquashingSeminars%24Overlays_in_MITK.pdf


--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Scale Range

2015-03-24 Thread Sascha Zelzer
Hi Christian,

this is unfortunately a known bug:

http://bugs.mitk.org/show_bug.cgi?id=14652

The Basic Image Processing plug-in should be able to rescale float 
images. However, it is not included in the binary MITK Workbench 
installer and you would need to compile MITK yourself.

Best,
Sascha

On 03/10/2015 11:41 AM, Christian Dávid wrote:
 Hello,

 I have many images with pixel values in the order of 1e-9 and alike. With
 these images I cannot change the window for the grey value mapping with the
 mouse because the steps achieved this way are too large. Is there something I
 failed to see?

 If there is no easy way to solve this, I could rescale the images to another
 range. Is there a module/plugin in MITK to do this?

 Greetings
 Christian Dávid


 --
 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
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users


--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] IFileReaders and FileReaderRegistry

2015-03-19 Thread Sascha Zelzer

Hi,

On 02/20/2015 05:08 PM, Clarkson, Matt wrote:

Hi Sascha et. al.

As an update, in the unit test i mention here:
https://github.com/MattClarkson/MITK/commit/2514bfad99ea3bc627362e235104438550231d8b



Thanks for providing the code with the unit test, this helped a lot.

I am not sure if this was just for demonstrating the core problem, but 
one general issue with the new unit test in that branch is the following:


IO libraries like MitkDiffusionIO are meant to be auto-loaded. Auto-load 
modules reside in sub-directories and for the sake of simplicity 
should/must not be linked against. Typically, such libraries do not 
provide any public symbols and just register stuff.


Creating a test driver for an auto-load module using the MITK CMake 
macros leads to a linker dependency from the test driver executable to 
the auto-load module. Usually, no symbols are used from that module but 
depending on the linker involved the link-time dependendy might be kept 
or removed. This could lead to PATH (Windows) or DYLD_LIBRARY_PATH 
(MacOS) issues, depending on the overall set-up.


to get it to work, I first had to add US_INITIALIZE_MODULE. In 
addition to this, I had to set my DYLD_LIBRARY_PATH to include all 
ITK, VTK, GDCM libraries. I believe this is due to MitkCore itself 
requiring these libraries, and we are building our code and linking 
against libraries kept within the install folder, which don’t have the 
RPATHs compiled in.


Regarding DYLD_LIBRARY_PATH: In the recent MITK master and its 
super-build set-up, we tried hard to configure external projects like 
ITK, VTK, GDCM, etc. with correct (relative) install names and rpaths 
for the install-tree. For MITK, we do not need to set DYLD_LIBRARY_PATH. 
Are you maybe building these external projects yourself without custom 
install name and rpath tweaks?




Also, I noticed that there were two readers for .trk files registered. 
Would you expect this to be the case? 


No, I would expect only one being registered. This could be a follow-up 
bug due to the other issues involved.




So, does every unit test, and every executable need to have 
US_INITIALIZE_MODULE? We have many many command line apps. Do they all 
need one if they want to do IO via MitkCore?


No, definitely not. In your case, you are using MITK API which relies on 
a special function default argument (us::GetModuleContext()) which in 
turn needs US_INITIALIZE_MODULE to function properly. So you would need 
US_INITIALIZE_MODULE only when using specific MITK classes.


The crash is definitely a bug in MITK (CppMicroServices), described in 
http://bugs.mitk.org/show_bug.cgi?id=18872 . I will fix this probably 
today and there will be a log message if you are using API which needs a 
US_INITIALIZE_MODULE macro but you don't provide one.




So, once I got the above MITK based unit test to work, I similarly got 
my unit test to work for our NifTK code, so its the same problem. So, 
maybe I just need to understand more about what is required for 
getting the microservices to run, when I am running a non GUI 
application, or a 3rd party applications. Im also surprised that most 
MITK unit tests don’t require this… I only see US_INITIALIZE_MODULE in 
mitkOclResourceServiceTest.cpp (as of 2014.10 release).


I guess most MITK unit tests don't use that special MITK API subset yet. 
I will just add a US_INITIALIZE_MODULE call to each test driver 
generated via the standard MITK CMake macros.


Thanks for all the debugging,

Sascha




Thanks as always.

Matt




On 16 Feb 2015, at 20:19, Clarkson, Matt m.clark...@ucl.ac.uk 
mailto:m.clark...@ucl.ac.uk wrote:



Hi Sascha,

I just did this unit test with a fresh clone of MITK.
https://github.com/MattClarkson/MITK/commit/71aea5ebd1a00b9ae442fba256771aab40d70583

Same problem occurs when trying to write a unit test load load one of 
the diffusion imaging file formats.

Any idea?

Its entirely possible that I’m doing something wrong. i.e. the Unit 
test needs to have other services up and running at the time you ask 
the File Reader Registry to return something.
But when I was writing my unit test, I based it on an existing 
mitk::PointSet reader unit test, and did that same sort of thing. So 
I can’t see anything that Im meant to add.

i.e. I dont know what I dont know.

So, that said, the provided unit test seg-faults in an identical (to 
my eyes) way as previously described.


Hope that helps.
Thanks

Matt


On 13 Feb 2015, at 14:01, Sascha Zelzer s.zel...@dkfz-heidelberg.de 
mailto:s.zel...@dkfz-heidelberg.de wrote:



Okay, this is bad news.

Is the stack trace still the same (with the CoreServicePointer 
changes) for the crash you are experiencing?


Thanks,
Sascha

On 02/11/2015 04:14 PM, Miklos Espak wrote:
I am afraid, the clean build did not solve the problem. Moreover, 
this is not clang-specific, our unit test crashes on Linux as well, 
with gcc.


It seems to me that the problem is the order in which modules are 
initialised and accessed

Re: [mitk-users] IFileWriter registered twice? Bug?

2015-03-18 Thread Sascha Zelzer
Hi,

this sounds like a bug to me. The count should be 1. How are you 
registering the writer as a service? Can you rule out the effect for 
MITK writers?

Thanks,
Sascha

On 03/13/2015 10:51 PM, Clarkson, Matt wrote:
 Hi there,

 I have a unit test that retrieves an IFileWriter for our own file type:

mitk::CoordinateAxesData::Pointer cad = mitk::CoordinateAxesData::New(); 
 // for reading/writing .4x4 files
mitk::FileWriterSelector writerSelector(cad.GetPointer());
std::vectormitk::FileWriterSelector::Item writers = writerSelector.Get();
for (int i = 0; i  writers.size(); i++)
{
  std::cerr  Matt, got writer:  writers[i].GetDescription()  ,  
  writers[i].GetServiceId()  std::endl;
}

 This outputs:

 Matt, registering mimetype application/vnd.mitk.4x4
 Matt, registering mimetype application/vnd.mitk.ppm
 Matt, CoordinateAxesDataWriterService::CoordinateAxesDataWriterService()
 Testing invocation. [PASSED]
 Testing matrix instantiation. [PASSED]
 Matt, got writer:NifTK Coordinate Axes Writer, 135
 Matt, got writer:NifTK Coordinate Axes Writer, 119

 So I can see the mimetype vnd.mitk.4x4 is registered.
 We have a debug statement coming from the CoordinateAxesDataWriterService 
 constructor, which is called once.
 But there appears to be two NifTK Coordinate Axes Writer” returned from the 
 mitk::FileWriterSelector, each with a different service ID.

 Is that right? My unit test was expecting only 1.

 Thanks

 M




 --
 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
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users


--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Acces current cross-hair position in custom mapper

2015-03-12 Thread Sascha Zelzer
Hi,

here is a summary of what we discussed off-line already:

By registering a mitk::InteractionEventObserver sub-class as a micro 
service you can get notified about interactions, e.g. by casting the 
InteractionEvent object to an InteractionPositionEvent you can retrieve 
the position in the render window.

It might be a good idea to decouple the event observation from the 
mapper by introducing a datanode property which contains the relevant 
position and is read by the mapper. That property can be set by the 
interaction event observer and the component which is in charge of 
instantiating the mapper would register the event observer as well and 
couple them through the data node property.

Best,
Sascha

On 02/27/2015 03:51 PM, Floca, Ralf Omar wrote:
 Hello everybody,

 what would be a sound way to get the current cross-hair position in the 
 GenerateDataForRenderer() of a custom mapper implementation?

 On a view level I can access this information via 
 IRenderWindowPart::GetSelectedPosition(). But I have not found a simple way 
 to receive this information in the mapper.

 Background is, that the rendering of the mapper depends on the current 
 selected position. E.G. if I want to use a vtkImageRectilinearWipe for the 
 visualization and have to specify the cross hair position as the wipe 
 position for the 2D plane if the render window.

 Thank you very much.

 Best regards,
 Ralf

 --
 Dr. Ralf Floca
 Software development for Integrated Diagnostic and Therapy (SIDT)
 Group leader

 German Cancer Research Center (DKFZ)
 Foundation under Public Law
 Im Neuenheimer Feld 280
 69120 Heidelberg
 Germany
 phone: +49 6221 42-2560

 r.fl...@dkfz.de
 www.dkfz.de



 Management Board: Prof. Dr. Dr. h.c. Otmar D. Wiestler, Prof. Dr. Josef Puchta
 VAT-ID No.: DE143293537


 Confidentiality Note:
 This message is intended only for the use of the named recipient(s) and may 
 obtain confidential and/or privileged information. If you are not the 
 intended recipient, please contact the sender and delete the message. Any 
 unauthorized use of the information contained in this message is prohibited.


 --
 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
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users


--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Exception running Command Line program

2015-03-11 Thread Sascha Zelzer
Hi,

just for reference, the discussion about this continues in bug

http://bugs.mitk.org/show_bug.cgi?id=18819

Thanks,

Sascha

On 03/05/2015 05:00 PM, Clarkson, Matt wrote:
 Hi there,

 In MITK 2014.03, we could run CL programs that generated .csv files, and this 
 was OK:
 https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleRunner.cpp#L409

 i.e. the call to mitk::IOUtil::LoadFiles would fail to read a file with 
 unrecognised file extension, and issue a warning, but continue, like here:
 https://github.com/MITK/MITK/blob/eb025ddf02d2d7c60eada2f68dab39274420dea8/Core/Code/IO/mitkIOUtil.cpp#L465

 Now in 2014.10 and master, it will throw an exception. For example this:
 https://github.com/MITK/MITK/blob/master/Modules/Core/src/IO/mitkIOUtil.cpp#L675

 leads to:
 https://github.com/MITK/MITK/blob/master/Modules/Core/src/IO/mitkIOUtil.cpp#L565

 So, the process is now stricter.

 What would be your preferred solution?
a) Test for a readable file extension in the CLM plugin before trying to 
 load
b) Try/Catch in CLM plugin
c) Other?

 Thanks

 Matt


 --
 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
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users


--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Help with Linking?

2015-03-11 Thread Sascha Zelzer
Hi,

this typically occurs if a call like

find_package(ITK)

is missing in your project. The parsed ITKConfig.cmake file introduces 
imported targets, e.g. itkvnl_algo and CMake can then extract the 
absolute library path when linking to the imported target. Without the 
find_package call, the itkvnl_algo string is just a string and treated 
as such when building the linker command line.

With the next MITK release, the MITKConfig.cmake file will take care of 
making the appropriate find_package() calls implicitly for MITK 
dependencies when you do find_package(MITK). Until then, you probably 
are just missing the relevant find_packge() calls yourself.

Best,
Sascha

On 02/25/2015 05:56 PM, Clarkson, Matt wrote:
 Hi there,

 I am writing a command line app, and Im currently working with MITK circa 
 2014.10. I see from the DiffusionMiniApps that it should be possible to do 
 something like:


mitk_create_executable(DiffusionMiniApps
  DEPENDS MitkDiffusionCore MitkFiberTracking MitkConnectomics
  PACKAGE_DEPENDS ITK|ITKDiffusionTensorImage
)

 BUT: When I use the mitk_create_executable macro, the linking to ITK fails. 
 All library paths are like -litkvnl_algo, where the link line does not have 
 library folders specified using -L so the linking fails.

 IF I write stuff like:

   add_executable(${_APP_NAME} ${_APP_NAME}.cxx )
  target_link_libraries(${_APP_NAME} ${_APP_TARGET_LIBRARIES} )
  MITK_INSTALL(TARGETS ${_APP_NAME})


 then it would seem that all my ITK libraries are specified with an absolute 
 path, and the app links.

 So my question is, when mitk_create_executable runs, what might cause all the 
 ITK dependencies to be specified as -litkvnl_algo rather than an absolute 
 path to a library.

 Thanks

 Matt



 --
 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
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users


--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Creating a new MITK project

2015-03-10 Thread Sascha Zelzer
Hi Yari,

you would need the correct version of the MITK-ProjectTemplate project 
for your MITK 2014.10 build. You can use the following URL to download 
the 2014.10 version of the MITK-ProjectTemplate:

https://github.com/MITK/MITK-ProjectTemplate/archive/v2014.10.zip

Best,
Sascha


On 03/10/2015 04:56 PM, yari mattei wrote:
 Hi Caspar,

 after few days of test I partially solve the problem.

 I rebuild all the Qt framework and I have found out some issue with
 Visual Studio 2013 that I manage to solve.

 I downloaded the MITK 2014.10.0 archive from
 http://mitk.org/wiki/Downloads I follow the guide but using the content
 of the archive as source directory in cmake.

 This is finally build well :) Now I can run StartVS.bat select
 MITKworkbench and run it.

 The problem is that I don't have a project for edit the code. Can I use
 one of the project created with this procedure?

 Once with the MITK 2014.10.0 archive everything was working I tried
 again with the project-template but when I build it it return this error :

 5  CMake Error at CMakeLists.txt:118 (find_package):
 5By not providing FindMITK.cmake in CMAKE_MODULE_PATH this
 project has
 5asked CMake to find a package configuration file provided by
 MITK, but
 5CMake did not find one.
 5
 5Could not find a package configuration file provided by MITK
 (requested
 5version 2014.10.99) with any of the following names:
 5
 5  MITKConfig.cmake
 5  mitk-config.cmake
 5
 5Add the installation prefix of MITK to CMAKE_PREFIX_PATH or set
 5MITK_DIR to a directory containing one of the above files.  If
 MITK
 5provides a separate development package or SDK, be sure it has been
 5installed.
 5
 5
 5  -- Configuring incomplete, errors occurred!
 5  See also
 E:/MITK_dev/AwesomeProject-superbuild/AwesomeProject-build/CMakeFiles/CMakeOutput.log.
 5C:\Program Files
 (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): 
 error
 MSB6006: cmd.exe exited with code 1.
 6-- Build started: Project: AwesomeProject-build, Configuration:
 Debug Win32 --
 6  Building Custom Rule E:/MITK_dev/AwesomeProject/CMakeLists.txt
 6  CMake does not need to re-run because
 E:\MITK_dev\AwesomeProject-superbuild\CMakeFiles\generate.stamp is
 up-to-date.
 6CUSTOMBUILD : error : could not find CMAKE_GENERATOR in Cache

 But I can't fix it.

 Do you have any advice?

 I will really thank you for all the help.

 Thank you very much

 Yari

 Il 06.03.2015 10:25, Goch, Caspar Jonas ha scritto:
 Hi Yari,

 I cannot say for certain, as these are all Qxt build problems, but could you 
 check, that you:

 a) build your Qt according to our build instructions[1]:
 configure.exe -prefix C:\Qt\4.7.4_vc9_x64 -debug-and-release -qt-sql-sqlite 
 -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend 
 -no-declarative -mp -nomake examples -nomake demos -nomake docs

 b) deleted the entire superbuild directory after switching the project 
 template versions and your Qt? This is required so that the correct sources 
 for your version of the project template are downloaded

 Best,
 Caspar

 [1] http://docs.mitk.org/2014.10/BuildInstructionsPage.html
 -Ursprüngliche Nachricht-
 Von: yari mattei [mailto:yari.mat...@student.supsi.ch]
 Gesendet: Donnerstag, 5. März 2015 17:04
 An: mitk-users@lists.sourceforge.net
 Betreff: Re: [mitk-users] Creating a new MITK project

 Hi Caspar,

 Yes, I took the wrong binaries. I had to build the source with VS because 
 for the 2013 the are not the binaries.

 Now I have another small problem. All the project build well biside the 
 Qxt which return the following error:

 1E:\MITK_Qt4\MITK-superbuild\Qxt-build\src\network\moc_qxtsslserver.cxx(39):
 error C2653: 'QxtSslServer' : is not a class or namespace name
 1E:\MITK_Qt4\MITK-superbuild\Qxt-build\src\network\moc_qxtsslserver.cxx(47):
 error C2653: 'QxtSslServer' : is not a class or namespace name
 1E:\MITK_Qt4\MITK-superbuild\Qxt-build\src\network\moc_qxtsslserver.cxx(51):
 error C2653: 'QxtSslServer' : is not a class or namespace name
 1E:\MITK_Qt4\MITK-superbuild\Qxt-build\src\network\moc_qxtsslserver.cxx(60):
 error C2653: 'QxtSslServer' : is not a class or namespace name
 1E:\MITK_Qt4\MITK-superbuild\Qxt-build\src\network\moc_qxtsslserver.cxx(61):
 error C2270: 'metaObject' : modifiers not allowed on nonmember functions
 1E:\MITK_Qt4\MITK-superbuild\Qxt-build\src\network\moc_qxtsslserver.cxx(62):
 error C2227: left of '-metaObject' must point to class/struct/union/generic 
 type
 1E:\MITK_Qt4\MITK-superbuild\Qxt-build\src\network\moc_qxtsslserver.cxx(65):
 error C2653: 'QxtSslServer' : is not a class or namespace name
 1E:\MITK_Qt4\MITK-superbuild\Qxt-build\src\network\moc_qxtsslserver.cxx(69):
 error C2061: syntax error : identifier 'QxtSslServer'
 1E:\MITK_Qt4\MITK-superbuild\Qxt-build\src\network\moc_qxtsslserver.cxx(69):
 error C2146: syntax error : missing '(' before identifier 'QxtSslServer'
 

Re: [mitk-users] Migration to MicroService based IO

2015-02-18 Thread Sascha Zelzer

Hi,

quick answer:

Please read [1] for the module name stuff.

The auto-load directory settings (search paths and module directory) is 
explained in [2].


I might be able to look into it in more detail later.

Best,
Sascha

[1] http://docs.mitk.org/2014.10/MicroServices_TheModuleContext.html

[2] http://docs.mitk.org/2014.10/MicroServices_AutoLoading.html

On 02/18/2015 02:29 PM, Ingmar Wegner wrote:

Hi Sascha,
once more thank you for your patience.
I invested some time in getting the other io modules to also be loaded 
from their /modulename/build_type directory and didn't get it to 
work. I started with a new target directory to prevent the build 
system to load variables that might have been definded during my tests.
Turned out, that my current approach was noch working. The 
MicroService auto load section doesn't scan for my mesh dir any longer.
So I asume, that something got set up while I was trying to get it 
working. As I also tested with cmake calls I compared the working 
target dir with the new one.
But the problem is that the working one contains as well definitions 
from an older mitk version, (2014.10.0) where the new directory 
structure was not in place.
I searched for a list that contains all auto load modules and found 
the modulesConf.cmake files, that are no longer in the new structure, 
right?
I also tried to debug up where the module strings (info) comes from 
but got lost in the US_GLOBAL_STATIC_WITH_ARGS method in 
usStaticInit_p.h. That sounds like a possible source though.

I asume, that if I would use the CreateModule macro everything would work.
*As we are using our own cmake structure could you possibly explain 
how the module name gets into the list of scaned directories?*

Best Regards,
Ingmar
*Gesendet:* Mittwoch, 18. Februar 2015 um 09:21 Uhr
*Von:* Ingmar Wegner iweg...@gmx.de
*An:* Sascha Zelzer s.zel...@dkfz-heidelberg.de
*Cc:* mitk-users mitk-users@lists.sourceforge.net
*Betreff:* Re: [mitk-users] Migration to MicroService based IO
Hi Sascha,
thank's alot for the advice.
I got it to work for the one module. Below is a log of my setup.
In CMakeLists.txt of my module I am calling
...
set(module_name ${PROJECT_NAME})
set(US_MODULE_INIT_TEMPLATE 
${MITK_SOURCE_DIR}/Modules/CppMicroServices/CMake/usModuleInit.cpp)

# a us_init.cpp file will be generated and has to be added to sources
list (APPEND _SRC_FILES ${CMAKE_CURRENT_BINARY_DIR}/us_init.cpp)
usFunctionGenerateModuleInit(_SRC_FILES)
add_library(
...(continued in my original/first post of this thread)
When I additionally call US_INITIALIZE_MODULE in the  module activator 
below US_EXPORT_MODULE_ACTIVATOR(MY_NAMESPACE::MeshActivator) then the 
compiler argues: mesh_activator.obj : error LNK2005: 
_us_import_module_initializer_mesh already defined in us_init.obj
A us_init.cpp is generated in my target/my_module directory, so that 
works.
Debugging MITKWorkbench I can see that initializing CppMicroServices 
the app looks for
Z:\build\MITK-build\bin\Debug\CppMicroServices (which doesn't exist) 
then for Z:\build\MITK-build\bin\CppMicroServices\Debug (which 
doesn't exist either).
Then after no service was found it continues with MITKCore, calls 
MitkCoreActivator::Load(...) and then checks for 
Z:\build\MITK-build\bin\Debug\MitkCore where it doesn't find a 
directory and continues with Z:\build\MITK-build\bin\MitkCore\Debug 
where it finally finds the directory. By the way, same is done with 
search string MitkMapperExt and a lot of other module names but all 
without success (path invalid).

So I debugged my application and placed the mesh.dll in
...target_win64-vc12\_runtime\MitkCore\Debug and then the module was 
auto-loaded.
Afterwards AutoLoadModulesFromPath(...) looks for mesh so I can also 
place it into ..target_win64-vc12\_runtime\mesh\Debug and it will work.
Continuing, it also tries to find all mitk auto load modules in by 
apps target directory. Is this worth optimizing towards only checking 
the ones that we know they are in the target folder?
Thanks for your great work; we all appreciate the work you all do on 
MITK a lot.

Ingmar
*Gesendet:* Dienstag, 17. Februar 2015 um 21:49 Uhr
*Von:* Sascha Zelzer s.zel...@dkfz-heidelberg.de
*An:* Ingmar Wegner iweg...@gmx.de
*Cc:* mitk-users mitk-users@lists.sourceforge.net
*Betreff:* Re: Aw: Re: Re: Re: Re: [mitk-users] Migration to 
MicroService based IO

Hi,

does your executable contain module initialization code as mentioned?

Did you try the MitkCore sub-directory?

In your MITK (not superbuild) CMake cache, you can set the 
US_ENABLE_DEBUG_OUTPUT variable to ON (needs to be manually added in 
the CMake GUI or on the command line). After recompiling MITK, this 
will give you debug messages including auto-load stuff.


The relevant code is here:

https://github.com/MITK/MITK/blob/master/Modules/CppMicroServices/core/src/util/usUtils.cpp#L109

Thanks,

Sascha

On 02/17/2015 09:34 PM, Ingmar Wegner wrote:

Hi Sascha,
I tried the following situation

Re: [mitk-users] New cmake build structure and external libraries

2015-02-17 Thread Sascha Zelzer

Hi,

the problem with external _DIR variables is that it is in general not 
straight-forward to determine the correct runtime path for the external 
project (which contains the .dll files).


Only a few projects provide in the projectConfig.cmake file a 
RUNTIME_DIRS variable pointing to the correct directory. In general, 
the _DIR variable can point to a build or install tree, with the 
projectConfig.cmake file potentially being located in nested 
sub-directories. Previously, we used an ugly heuristic to populate the 
PATH variable based on _DIR variables but this became unmanageable and 
did not reliably work for all cases anyway.


So currently, we require external users to set the PATH variable 
themselves if they use the EXTERNAL_lib_DIR variables to inject 
third-party dependencies.


The mid-term plan is that you should be able to do a make install at 
the MITK-superbuild level which could be configured to use the same 
CMAKE_INSTALL_PREFIX as your external ITK, VTK, etc. projects. So 
*everything* should again end up in a common ${CMAKE_INSTALL_PREFIX}/bin 
directory.


Best,
Sascha

On 02/17/2015 12:29 PM, Ingmar Wegner wrote:

Hi MITK community,
I recently updated my mitk fork to the mitk master (#250e22e from 16 
Feb 2015) and saw that the build system is currently under refactoring 
towards cmake targets, which is very nice by the way.
I am building the mitk project with externally build libraries (ann, 
dcmtk, gdcm, itk, vtk, tinyxml) and specify those as 
EXTERNAL_${LIB}_DIR which compiles fine.
The paths of these libraries though aren't incorporated into the path 
within the StartVS_debug/release.bat scripts.
So the application complains during startup that some modules can't be 
loaded (due to the missing path extension).
Is this a bug or will the incorporation of external lib paths be 
handled differently in the future?
I wouldn't prefer to copy external libs into 
MITK_EXTERNAL_PROJECT_PREFIX which points to the ep supfolder in 
parallel to MITK-Build.

Is the install script then under heavy development as well?
;) Have a nice day,
Ingmar


--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631iu=/4140/ostg.clktrk___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Migration to MicroService based IO

2015-02-17 Thread Sascha Zelzer

Hi Ingmar,

On 02/17/2015 12:09 PM, Ingmar Wegner wrote:

HI Sascha,
with your hint I was able to register the io service.
Still have to set the io lib as pre-load library parameter though.


What happens if you don't? For auto-load modules, this is redundant (if 
the auto-loading works).


Best,
Sascha

But I will continue my work on this once I have everything compiling 
and running.
As I recently updated my fork to the mitk master I now have problems 
with the new directory structure.

I will write a seperate mail on this.
So thank you for your help,
;) Ingmar
*Gesendet:* Freitag, 13. Februar 2015 um 16:07 Uhr
*Von:* Sascha Zelzer s.zel...@dkfz-heidelberg.de
*An:* Ingmar Wegner iweg...@gmx.de, mitk-users 
mitk-users@lists.sourceforge.net

*Betreff:* Re: Aw: Re: [mitk-users] Migration to MicroService based IO
Hi,

we essentially have the same set-up with our internal code base.

Please read [1] for information about auto-load paths. The activator 
of the MitkCore module adds the path containing the running executable 
to the list of auto-load paths, so putting your module's shared 
library into your-exec-path/main (if your executable contains 
CppMicroService initialization code) or your-exec-path/MitkCore 
should work out of the box.


Best,
Sascha

[1] http://docs.mitk.org/2014.10/MicroServices_AutoLoading.html

On 02/13/2015 03:51 PM, Ingmar Wegner wrote:

Hi Sascha,
in general I build up linker dependencies to the modules in my
plugins. And before I had an awkward dependency from the app
plugin to the modules that provide IO functionalites. In my
WorkbenchWindowAdvisor I was registering the ObjectFactory of each
module, so to say.
This time, with the micro service, I hoped to have a loose way of
loading the services during startup and have them automatically
registered to the MITK IO service in case they are there.
As I have an external project that links aginst MITK the solution
with copying the shared lib into MITK-build is not possible. How
does it work in the installed case by the way?
Is it possible to add a directory that has to be parsed for
auto-loading?
Thanks for the quick response,
Ingmar
*Gesendet:* Freitag, 13. Februar 2015 um 15:14 Uhr
*Von:* Sascha Zelzer s.zel...@dkfz-heidelberg.de
*An:* Ingmar Wegner iweg...@gmx.de, Mitk Users
mitk-users@lists.sourceforge.net
*Betreff:* Re: [mitk-users] Migration to MicroService based IO
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

Re: [mitk-users] Migration to MicroService based IO

2015-02-17 Thread Sascha Zelzer

Hi,

as explained below, the auto-load module must be placed in a 
subdirectory name main or MitkCore which is located at the same 
level as your application's executable (not in the same directory as 
your executable).


Best,
Sascha

On 02/17/2015 02:47 PM, Ingmar Wegner wrote:

Hi Sascha,
then the library is not loaded and the Load() method of my module 
activator is never called.
The module lib is located in the same directory as my application and 
my plugins. We don't consider having a dedicated plugins folder for now.

Best,
Ingmar
*Gesendet:* Dienstag, 17. Februar 2015 um 14:22 Uhr
*Von:* Sascha Zelzer s.zel...@dkfz-heidelberg.de
*An:* Ingmar Wegner iweg...@gmx.de
*Cc:* mitk-users mitk-users@lists.sourceforge.net
*Betreff:* Re: Aw: Re: Re: [mitk-users] Migration to MicroService based IO
Hi Ingmar,

On 02/17/2015 12:09 PM, Ingmar Wegner wrote:

HI Sascha,
with your hint I was able to register the io service.
Still have to set the io lib as pre-load library parameter though.


What happens if you don't? For auto-load modules, this is redundant 
(if the auto-loading works).


Best,
Sascha

But I will continue my work on this once I have everything
compiling and running.
As I recently updated my fork to the mitk master I now have
problems with the new directory structure.
I will write a seperate mail on this.
So thank you for your help,
;) Ingmar
*Gesendet:* Freitag, 13. Februar 2015 um 16:07 Uhr
*Von:* Sascha Zelzer s.zel...@dkfz-heidelberg.de
*An:* Ingmar Wegner iweg...@gmx.de, mitk-users
mitk-users@lists.sourceforge.net
*Betreff:* Re: Aw: Re: [mitk-users] Migration to MicroService based IO
Hi,

we essentially have the same set-up with our internal code base.

Please read [1] for information about auto-load paths. The
activator of the MitkCore module adds the path containing the
running executable to the list of auto-load paths, so putting your
module's shared library into your-exec-path/main (if your
executable contains CppMicroService initialization code) or
your-exec-path/MitkCore should work out of the box.

Best,
Sascha

[1] http://docs.mitk.org/2014.10/MicroServices_AutoLoading.html

On 02/13/2015 03:51 PM, Ingmar Wegner wrote:

Hi Sascha,
in general I build up linker dependencies to the modules in my
plugins. And before I had an awkward dependency from the app
plugin to the modules that provide IO functionalites. In my
WorkbenchWindowAdvisor I was registering the ObjectFactory of
each module, so to say.
This time, with the micro service, I hoped to have a loose way
of loading the services during startup and have them
automatically registered to the MITK IO service in case they
are there.
As I have an external project that links aginst MITK the
solution with copying the shared lib into MITK-build is not
possible. How does it work in the installed case by the way?
Is it possible to add a directory that has to be parsed for
auto-loading?
Thanks for the quick response,
Ingmar
*Gesendet:* Freitag, 13. Februar 2015 um 15:14 Uhr
*Von:* Sascha Zelzer s.zel...@dkfz-heidelberg.de
*An:* Ingmar Wegner iweg...@gmx.de, Mitk Users
mitk-users@lists.sourceforge.net
*Betreff:* Re: [mitk-users] Migration to MicroService based IO
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

Re: [mitk-users] Migration to MicroService based IO

2015-02-17 Thread Sascha Zelzer

Hi,

does your executable contain module initialization code as mentioned?

Did you try the MitkCore sub-directory?

In your MITK (not superbuild) CMake cache, you can set the 
US_ENABLE_DEBUG_OUTPUT variable to ON (needs to be manually added in the 
CMake GUI or on the command line). After recompiling MITK, this will 
give you debug messages including auto-load stuff.


The relevant code is here:

https://github.com/MITK/MITK/blob/master/Modules/CppMicroServices/core/src/util/usUtils.cpp#L109

Thanks,

Sascha

On 02/17/2015 09:34 PM, Ingmar Wegner wrote:

Hi Sascha,
I tried the following situation, but nothing worked out.
The application is in:
target_win64-vc12\_runtime\debug\my_application.exe
I tried
target_win64-vc12\_runtime\debug\main\my_module.dll
target_win64-vc12\_runtime\debug\main\debug\my_module.dll
target_win64-vc12\_runtime\main\my_module.dll
target_win64-vc12\_runtime\main\debug\my_module.dll
target_win64-vc12\main\my_module.dll
target_win64-vc12\main\debug\my_module.dll
Could you possibly point out where the auto-load plugin code is 
situated? Then I can debug it more closely.

Besides, did anyone also experience the warning messages in the console?
It states 2x4 times at the end of startup:
void __cdecl QWindow::setTransientParent(class QWindow *) 
QWidgetWindow(0x61f7fc0, name = QWidgetClassWindow) must be a top 
level window.

This is surely QT5 related.
Have an nice evening,
Ingmar
*Gesendet:* Dienstag, 17. Februar 2015 um 15:49 Uhr
*Von:* Sascha Zelzer s.zel...@dkfz-heidelberg.de
*An:* Ingmar Wegner iweg...@gmx.de
*Cc:* mitk-users mitk-users@lists.sourceforge.net
*Betreff:* Re: Aw: Re: Re: Re: [mitk-users] Migration to MicroService 
based IO

Hi,

as explained below, the auto-load module must be placed in a 
subdirectory name main or MitkCore which is located at the same 
level as your application's executable (not in the same directory as 
your executable).


Best,
Sascha

On 02/17/2015 02:47 PM, Ingmar Wegner wrote:

Hi Sascha,
then the library is not loaded and the Load() method of my module
activator is never called.
The module lib is located in the same directory as my application
and my plugins. We don't consider having a dedicated plugins
folder for now.
Best,
Ingmar
*Gesendet:* Dienstag, 17. Februar 2015 um 14:22 Uhr
*Von:* Sascha Zelzer s.zel...@dkfz-heidelberg.de
*An:* Ingmar Wegner iweg...@gmx.de
*Cc:* mitk-users mitk-users@lists.sourceforge.net
*Betreff:* Re: Aw: Re: Re: [mitk-users] Migration to MicroService
based IO
Hi Ingmar,

On 02/17/2015 12:09 PM, Ingmar Wegner wrote:

HI Sascha,
with your hint I was able to register the io service.
Still have to set the io lib as pre-load library parameter though.


What happens if you don't? For auto-load modules, this is
redundant (if the auto-loading works).

Best,
Sascha

But I will continue my work on this once I have everything
compiling and running.
As I recently updated my fork to the mitk master I now have
problems with the new directory structure.
I will write a seperate mail on this.
So thank you for your help,
;) Ingmar
*Gesendet:* Freitag, 13. Februar 2015 um 16:07 Uhr
*Von:* Sascha Zelzer s.zel...@dkfz-heidelberg.de
*An:* Ingmar Wegner iweg...@gmx.de, mitk-users
mitk-users@lists.sourceforge.net
*Betreff:* Re: Aw: Re: [mitk-users] Migration to MicroService
based IO
Hi,

we essentially have the same set-up with our internal code base.

Please read [1] for information about auto-load paths. The
activator of the MitkCore module adds the path containing the
running executable to the list of auto-load paths, so putting
your module's shared library into your-exec-path/main (if
your executable contains CppMicroService initialization code)
or your-exec-path/MitkCore should work out of the box.

Best,
Sascha

[1] http://docs.mitk.org/2014.10/MicroServices_AutoLoading.html

On 02/13/2015 03:51 PM, Ingmar Wegner wrote:

Hi Sascha,
in general I build up linker dependencies to the modules
in my plugins. And before I had an awkward dependency from
the app plugin to the modules that provide IO
functionalites. In my WorkbenchWindowAdvisor I was
registering the ObjectFactory of each module, so to say.
This time, with the micro service, I hoped to have a loose
way of loading the services during startup and have them
automatically registered to the MITK IO service in case
they are there.
As I have an external project that links aginst MITK the
solution with copying the shared lib into MITK-build is
not possible. How does it work in the installed case by
the way

Re: [mitk-users] Query about pre-loading library

2015-02-13 Thread Sascha Zelzer

Hi,

some libraries have version numbers appended to their names and some 
don't. For example CTK libraries. We used to pre-load CTK libraries but 
this is not necessary any more. The code is still there for reference.


- Sascha

On 02/13/2015 12:54 PM, Ingmar Wegner wrote:

Hi,
I recently had a look onto that, too.
In MitkWorkbench.cpp (shouldn't it be names mitkWorkbench?) the variable
QMapQString, QString preloadLibVersion;
is left unmodified.
Later on it is supposed to extend the pre-load library strings by the 
version.

preloadConfig += preloadLib + preloadLibVersion[preloadLib] + ,;
Is that ment to be an example but not used within mitkWorkbench?
I see in ctkPluginFrameworkContext::init() that the pure name without 
the version is working as well.

Can you give a use case to load a library of a different version?
Have a nice weekend,
Ingmar

From: Sascha Zelzer s.zelzer@... 
http://gmane.org/get-address.php?address=s.zelzer%2dGRhmXdRlXueislwNonOVwoQuADTiUCJX%40public.gmane.org
Subject: Re: Query about pre-loading library 
http://news.gmane.org/find-root.php?message_id=54B79D32.8090701%40dkfz%2dheidelberg.de
Newsgroups: gmane.comp.lib.mitk.user 
http://news.gmane.org/gmane.comp.lib.mitk.user

Date: 2015-01-15 10:57:54 GMT (4 weeks, 1 day and 4 minutes ago)
Hi,

On 01/15/2015 09:59 AM, Clarkson, Matt wrote:
 Hi there,

 following our upgrade to MITK 2014.10, it looks to me like the code 
for*preload*ing libraries in MITK
Workbench is a bit  … er … not what I expect.

 In 2014.03 we had:
https://github.com/MITK/MITK/blob/eb025ddf02d2d7c60eada2f68dab39274420dea8/Applications/Workbench/MitkWorkbench.cpp

 In the latest master we have:
https://github.com/MITK/MITK/blob/master/Applications/Workbench/MitkWorkbench.cpp

 So, in 2014.03 we try to pre-load both liborg_mitk_gui_qt_ext and 
CTKDICOMCore (on non-windows platforms).
 In 2014.10 we try to load only liborg_mitk_gui_qt_ext.

Yes, we fixed error/warning messages of libraries not being found on
Windows and MacOS during pre-loading.


 Q1: Is CTKDICOMCore no longer needed to be pre-loaded. I seem to remember 
that some install path in some
version of DCMTK was fixed (Andreas/Sascha maybe) so, maybe we don’t need 
to*preload*  it.
CTKDICOMCore was pre-loaded as a work-around to buggy static init/deinit
code in static dcmtk libraries for Linux. Since some time, we are
building dcmtk as a shared*library*  which fixed the static issues we had.


 Q2: In both of these cases, the code looks to me like it will only pre-load 
one*library*. If you wanted to
specify a list of libraries to pre-load, the 2014.03 version doesn’t contain a 
loop to set the path
correctly for each*library*. In the latest master, there is a loop over the 
entries in a QStringList, which
calculates either the build-tree path or the install-tree path, but then 
the*preload*Config variable
simply ignores it, so the final value passed to
extConfig-setString(berry::Platform::ARG_*PRELOAD*_*LIBRARY*,*preload*Config.toStdString());
will never contain the right path (on a Mac at least).

 Any thoughts? It looks wrong to me…. or I need more coffee today.

More Coffee might help;-)  The first for loop calculates absolute paths
and changes the entries in*preload*Libs in-place. The second Q_FOREACH
loop appends all*library*  paths to the*preload*Config string variable
(comma separated).

Best,
Sascha

--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet


--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Migration to MicroService based IO

2015-02-13 Thread Sascha Zelzer

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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Developing with MITK Application Framework

2015-02-13 Thread Sascha Zelzer
Hi,

of course you can still use MITK without the application framework, 
building a new GUI from scratch and integrating specific parts from MITK 
like the render windows, Qt widgets, etc. You can also use the CTK 
plugin framework to make your application modular (this is what 
BlueBerry is doing to a large extent). There are a couple of Qt example 
applications in MITK's Examples folder which do not use BlueBerry.

Using the MITK application framework (BlueBerry) is certainly easier to 
start with and gives you access to more ready-to-use functionality 
(contained in existing MITK plug-ins which require BlueBerry).

Best,
Sascha

On 02/12/2015 10:03 AM, Goch, Caspar Jonas wrote:
 Hi Hongzhi,

 yes, you will need the BlueBerry framework as it provides the application 
 framework for MITK. One way to start with developing without worrying too 
 much about learning the ins and outs directly is by using the 
 MITK-ProjectTemplate[1]. Which provides an example application you can then 
 adapt to your own needs when you feel confident to do so.

 Best,
 Caspar

 [1] https://github.com/MITK/MITK-ProjectTemplate
 
 Von: Hongzhi Lan [h1...@eng.ucsd.edu]
 Gesendet: Mittwoch, 11. Februar 2015 22:47
 An: mitk-users@lists.sourceforge.net
 Betreff: [mitk-users] Developing with MITK Application Framework

 Hi,

 I'm new to MITK and considering to use its application framework to develop 
 my own project with new GUI (not just plug-ins). Although the plug-in system 
 migrated to CTK, MITK still needs blueberry for application framework as the 
 developer manual mentions, right? So for my case, I still need to care about 
 blueberry framework? Just a little confused.

 Thanks a lot.
 Hongzhi

 --
 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
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users


--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] IFileReaders and FileReaderRegistry

2015-02-10 Thread Sascha Zelzer

Hi,

I pushed branch 
bug-18731-hide-template-definitions-with-special-default-arguments based 
on the 2014.10 release. Could you give it a try please and report back?


Thanks,
Sascha

On 02/09/2015 09:00 PM, Clarkson, Matt wrote:

Currently, Mac OSX 10.9.5 and

/usr/bin/c++ --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix


Thanks

M

On 9 Feb 2015, at 19:53, Sascha Zelzer s.zel...@dkfz-heidelberg.de 
mailto:s.zel...@dkfz-heidelberg.de wrote:



Hi,

before going into details, on which OS and compiler are you getting this?

Thanks,

Sascha

On 02/09/2015 01:23 PM, Clarkson, Matt wrote:

Hi there,

Im trying to change one of our file reader/writes to the new framework.

I have code like this:
   mitk::FileReaderRegistry readerRegistry;
  std::vectormitk::IFileReader* readers = 
readerRegistry.GetReaders(mitk::FileReaderRegistry::GetMimeTypeForFile(4x4));
  MITK_TEST_CONDITION_REQUIRED(readers.size() == 1, Testing for 1 registered 
readers”)

that fails (seg fault) on call to readerRegistry.GetReaders(..)

But the GUI program successfully loads/saves these files.
The unit test is for our own file type in our own module.

I based my code on the mitkPointSetReaderTest.cpp. In the diffusion 
modules there are examples of new file readers/writers, but no unit 
tests that i could find that use the FileReaderRegistry. So, I must 
be missing something in my unit test, failing to instantiate some 
class/service. Is it possible that the PointSetReaderTest works 
because the mitkCoreActivator is instantiating a lot of stuff, 
whereas my unit test is not? i.e. I dont know what Im supposed to 
look for.


Can anyone help? See 2 screenshots of stack trace.

Thanks

Matt







--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Compilation error in different compilers

2015-02-10 Thread Sascha Zelzer

Hi,

in general I think this is a good idea. Please enter a feature request 
in the bug tracker for this.


Thanks,
Sascha

On 02/10/2015 09:57 PM, Federico Milano wrote:
Hi. I was porting plugin code developed using g++ to VS2010 when I 
stumbled with the error C2057 
https://msdn.microsoft.com/en-us/library/eff825eh.aspxin VS2010 
(about trying to initialize an array with a non constant expression). 
After researching a bit I have found that MITK 2014.03 (the version 
I'm actually using) is not compiling with the 'pedantic' switch in the 
gnu compiler, that would, otherwise, had detected that error in g++. 
Do you think it would be wise to add that switch to MITK's build 
system? Should I report this as a bug?


Thanks in advance,

Federico


--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] IFileReaders and FileReaderRegistry

2015-02-10 Thread Sascha Zelzer
That sould do it. At least it fixed similar issues for me when building 
with clang on Fedora...


On 02/10/2015 09:59 PM, Clarkson, Matt wrote:

Hi there,

I pulled that branch, and re-built MITK, and rebuilt our code, and 
can’t see any difference.
I also changed into the source folder to check that I had got the 
updated file and I have.


Do I need a full clean build?

M

On 10 Feb 2015, at 17:45, Sascha Zelzer s.zel...@dkfz-heidelberg.de 
mailto:s.zel...@dkfz-heidelberg.de wrote:



Hi,

I pushed branch 
bug-18731-hide-template-definitions-with-special-default-arguments 
based on the 2014.10 release. Could you give it a try please and 
report back?


Thanks,
Sascha

On 02/09/2015 09:00 PM, Clarkson, Matt wrote:

Currently, Mac OSX 10.9.5 and

/usr/bin/c++ --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix


Thanks

M

On 9 Feb 2015, at 19:53, Sascha Zelzer s.zel...@dkfz-heidelberg.de 
mailto:s.zel...@dkfz-heidelberg.de wrote:



Hi,

before going into details, on which OS and compiler are you getting 
this?


Thanks,

Sascha

On 02/09/2015 01:23 PM, Clarkson, Matt wrote:

Hi there,

Im trying to change one of our file reader/writes to the new 
framework.


I have code like this:
 mitk::FileReaderRegistry readerRegistry;
  std::vectormitk::IFileReader* readers = 
readerRegistry.GetReaders(mitk::FileReaderRegistry::GetMimeTypeForFile(4x4));
  MITK_TEST_CONDITION_REQUIRED(readers.size() == 1, Testing for 1 registered 
readers”)

that fails (seg fault) on call to readerRegistry.GetReaders(..)

But the GUI program successfully loads/saves these files.
The unit test is for our own file type in our own module.

I based my code on the mitkPointSetReaderTest.cpp. In the 
diffusion modules there are examples of new file readers/writers, 
but no unit tests that i could find that use the 
FileReaderRegistry. So, I must be missing something in my unit 
test, failing to instantiate some class/service. Is it possible 
that the PointSetReaderTest works because the mitkCoreActivator is 
instantiating a lot of stuff, whereas my unit test is not? i.e. I 
dont know what Im supposed to look for.


Can anyone help? See 2 screenshots of stack trace.

Thanks

Matt











--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] IFileReaders and FileReaderRegistry

2015-02-09 Thread Sascha Zelzer

Hi,

before going into details, on which OS and compiler are you getting this?

Thanks,

Sascha

On 02/09/2015 01:23 PM, Clarkson, Matt wrote:

Hi there,

Im trying to change one of our file reader/writes to the new framework.

I have code like this:
   mitk::FileReaderRegistry readerRegistry;
  std::vectormitk::IFileReader* readers = 
readerRegistry.GetReaders(mitk::FileReaderRegistry::GetMimeTypeForFile(4x4));
  MITK_TEST_CONDITION_REQUIRED(readers.size() == 1, Testing for 1 registered 
readers”)

that fails (seg fault) on call to readerRegistry.GetReaders(..)

But the GUI program successfully loads/saves these files.
The unit test is for our own file type in our own module.

I based my code on the mitkPointSetReaderTest.cpp. In the diffusion 
modules there are examples of new file readers/writers, but no unit 
tests that i could find that use the FileReaderRegistry. So, I must be 
missing something in my unit test, failing to instantiate some 
class/service. Is it possible that the PointSetReaderTest works 
because the mitkCoreActivator is instantiating a lot of stuff, whereas 
my unit test is not? i.e. I dont know what Im supposed to look for.


Can anyone help? See 2 screenshots of stack trace.

Thanks

Matt



--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] How to replace ITK reader?

2015-02-02 Thread Sascha Zelzer
Hi,

the class is now exported. Branch

bug-14866-export-itkimageio-class

which is based on 2014.10 and merged into the master. Let me know if you 
need changes to that class to ease your implementation efforts.

Thanks,
Sascha

On 01/31/2015 08:21 PM, Miklos Espak wrote:

 I had a look how it is done in the DiffusionImaging module. It seems 
 to me too restrictive in the sense that the pixel types and dimensions 
 are hard coded in the Read / Write functions.

 mitk::ItkImageIO looks like a more general approach to me.

 Could you please export it so that people could wrap their custom ITK 
 ImageIO classes?

 Thank you,
 Miklos



--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] How to replace ITK reader?

2015-01-30 Thread Sascha Zelzer
I see, thanks. The approach proposed by Caspar is probably the most 
straight forward.


And we could export the mitk::ItkImageIO class to better support such 
use cases.


Best,
Sascha

On 01/30/2015 11:37 AM, Miklos Espak wrote:

Yes.

So, we have DRCAnalyzeImageIO3160 that derives from AnalyzeImageIO3160 
that derives from ImageIOBase.
And we have NiftiImageIO3201 that derives from NiftiImageIO3201 that 
derives from ImageIOBase.


And we have a NiftkItkImageFileReader that derives from 
mitk::ItkImageFileReader (now deprecated) and selects the right io 
base to use if there is any applicable. The NiftkItkImageFileReader is 
registered from the NifTKItkImageFileIOFactory constructor by this call:


  this-RegisterOverride(mitkIOAdapter,
 mitkNifTKItkImageFileReader,
 NifTK specific ITK based image IO,
 1,
 itk::CreateObjectFunctionIOAdapterNifTKItkImageFileReader ::New());


The code is executed but NiftkItkImageFileReader is never instantiated.

As my limited understanding, instead of registering your reader to the 
ITK object factories, now you should register them to 
mitk::FileReaderRegistry. So, I tried to wrap our io base classes so 
that I can add them to the registry.


The MitkCore activator does the same. It goes through the image io-s 
that are already registered. The problem is that our readers are not 
available by the time it does that. So, I wanted to repeat the same 
process when our core module is loaded.


I check what Caspar suggested as well.

Cheers,
Miklos


On 29 January 2015 at 21:17, Sascha Zelzer 
s.zel...@dkfz-heidelberg.de mailto:s.zel...@dkfz-heidelberg.de wrote:


Sure. Why do you want to replicate mitk::ItkImageIO then? Does
your reader derive from itk::ImageIOBase?

On 01/29/2015 09:26 PM, Miklos Espak wrote:


I want our reader. Not the ITK one and not the MITK one.

Just like you guys replaced the ITK reader to have your own, I
want the same, just with ours.

On 29 Jan 2015 17:17, Sascha Zelzer
s.zel...@dkfz-heidelberg.de
mailto:s.zel...@dkfz-heidelberg.de wrote:

I don't understand. You are saying you do have a custom Nifti
reader. But then you would still like to wrap the ITK one?

On 01/29/2015 06:02 PM, Miklos Espak wrote:

On 29 January 2015 at 16:40, Sascha Zelzer
s.zel...@dkfz-heidelberg.de
mailto:s.zel...@dkfz-heidelberg.de wrote:

Hi,

there is no recommended way for wrapping ITK reader,
especially since
MITK is doing that already. Why would you want to wrap
the ITK Nifti
reader again? (maybe there is another approach).



Because we have a custom Nifti reader, not the ITK one, and
not the MITK one.



In general, you would create our own Nifti reader,
associate it with the
mime-type name mitk::IOMimeTypes::NIFTI_MIMETYPE_NAME()
and register it
with a higher ranking the MITK's one (which defaults to 0).


So, it means that I need to duplicate mitk::ItkImageIO.cpp
in our codebase, as it is internal in MITK?

I am evaluating this solution now, but it seems a bit ugly.

Miklos


Best,
Sascha

On 01/29/2015 05:11 PM, Miklos Espak wrote:
 Hi,

 we have a custom NIfTI reader, and MITK also has one.
As I see, the
 activator of the the MitkCore module goes through the
ImageIOs
 registered by ITK, skips the nifti one and registers
MITK's own version.

 What shall I do to replace the MITK's nifti reader
with ours?

 I tried to mock what's in the CoreActivator, but it uses
 mitk::ItkImageIO that is an internal class.

 Is there a recommended way of wrapping ITK image io-s?

 Cheers,
 Miklos










--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] How to replace ITK reader?

2015-01-29 Thread Sascha Zelzer
I don't understand. You are saying you do have a custom Nifti reader. 
But then you would still like to wrap the ITK one?


On 01/29/2015 06:02 PM, Miklos Espak wrote:
On 29 January 2015 at 16:40, Sascha Zelzer 
s.zel...@dkfz-heidelberg.de mailto:s.zel...@dkfz-heidelberg.de wrote:


Hi,

there is no recommended way for wrapping ITK reader, especially since
MITK is doing that already. Why would you want to wrap the ITK Nifti
reader again? (maybe there is another approach).



Because we have a custom Nifti reader, not the ITK one, and not the 
MITK one.




In general, you would create our own Nifti reader, associate it
with the
mime-type name mitk::IOMimeTypes::NIFTI_MIMETYPE_NAME() and
register it
with a higher ranking the MITK's one (which defaults to 0).


So, it means that I need to duplicate mitk::ItkImageIO.cpp in our 
codebase, as it is internal in MITK?


I am evaluating this solution now, but it seems a bit ugly.

Miklos


Best,
Sascha

On 01/29/2015 05:11 PM, Miklos Espak wrote:
 Hi,

 we have a custom NIfTI reader, and MITK also has one. As I see, the
 activator of the the MitkCore module goes through the ImageIOs
 registered by ITK, skips the nifti one and registers MITK's own
version.

 What shall I do to replace the MITK's nifti reader with ours?

 I tried to mock what's in the CoreActivator, but it uses
 mitk::ItkImageIO that is an internal class.

 Is there a recommended way of wrapping ITK image io-s?

 Cheers,
 Miklos





--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] How to replace ITK reader?

2015-01-29 Thread Sascha Zelzer
Sure. Why do you want to replicate mitk::ItkImageIO then? Does your 
reader derive from itk::ImageIOBase?


On 01/29/2015 09:26 PM, Miklos Espak wrote:


I want our reader. Not the ITK one and not the MITK one.

Just like you guys replaced the ITK reader to have your own, I want 
the same, just with ours.


On 29 Jan 2015 17:17, Sascha Zelzer s.zel...@dkfz-heidelberg.de 
mailto:s.zel...@dkfz-heidelberg.de wrote:


I don't understand. You are saying you do have a custom Nifti
reader. But then you would still like to wrap the ITK one?

On 01/29/2015 06:02 PM, Miklos Espak wrote:

On 29 January 2015 at 16:40, Sascha Zelzer
s.zel...@dkfz-heidelberg.de
mailto:s.zel...@dkfz-heidelberg.de wrote:

Hi,

there is no recommended way for wrapping ITK reader,
especially since
MITK is doing that already. Why would you want to wrap the
ITK Nifti
reader again? (maybe there is another approach).



Because we have a custom Nifti reader, not the ITK one, and not
the MITK one.



In general, you would create our own Nifti reader, associate
it with the
mime-type name mitk::IOMimeTypes::NIFTI_MIMETYPE_NAME() and
register it
with a higher ranking the MITK's one (which defaults to 0).


So, it means that I need to duplicate mitk::ItkImageIO.cpp in our
codebase, as it is internal in MITK?

I am evaluating this solution now, but it seems a bit ugly.

Miklos


Best,
Sascha

On 01/29/2015 05:11 PM, Miklos Espak wrote:
 Hi,

 we have a custom NIfTI reader, and MITK also has one. As I
see, the
 activator of the the MitkCore module goes through the ImageIOs
 registered by ITK, skips the nifti one and registers MITK's
own version.

 What shall I do to replace the MITK's nifti reader with ours?

 I tried to mock what's in the CoreActivator, but it uses
 mitk::ItkImageIO that is an internal class.

 Is there a recommended way of wrapping ITK image io-s?

 Cheers,
 Miklos







--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Delete nodes in tree

2015-01-23 Thread Sascha Zelzer

Hi Nil,

thanks a lot for your testing.

It looks like I missed changing line mitkStandaloneDataStorage.cpp:120 
in the patch. Do you mind testing the patch again + changing


  mitk::DataNode::ConstPointer nodeGuard(node);

to

  DoubleDeletionGuard guard(node);

in your MITK build?

Thanks again,

Sascha


On 01/23/2015 06:22 PM, Nil Goyette wrote:

Hi Sascha,

As requested, I removed the all fixes proposed in this thread, tested 
and saw the error again, 50% of the time.

Then I applied your patch and tested again.
In release, it fails every time.
In debug, it failed after 5 tests on line
- mitkStandaloneDataStorage.cpp 120 : mitk::DataNode::ConstPointer 
nodeGuard(node);

- itkSmartPointer.h 152 : if ( m_Pointer ) { m_Pointer-Register(); }
So, it's exactly the same behavior I had before.

I'll keep the other patches for the time being ;)

Le 2015-01-22 12:04, Sascha Zelzer a écrit :

Hi Nil,

I just entered bug

http://bugs.mitk.org/show_bug.cgi?id=18672

for this. Could you please try the attached patch for me (based on 
2014.10), without any other proposed fixes from this mail thread?


Thanks,

Sascha


On 01/12/2015 08:18 PM, Nil Goyette wrote:

Hi all,

I have at least two nodes (I have drawn more, but I can reproduce 
the bug with 2 nodes)

- Node1
--- Node2  (child of Node1)
--- Node3
- Node4
- Node5
- Some other nodes

When the user deletes Node1, I want to delete all children nodes (2, 
3, 4, 5).
To do so, I use NodeDeleted(), I ask the DataStorage for all 
derivative nodes of the deleted node and delete them all.
A problem arises when the user highlights all nodes and delete them. 
Some nodes are deleted more then one time. Of course, there are 
conditions in mitk and in my own code that check if the node is 
null, but it still fails about half of the time. Since the 
NodeRemoved() event is thrown *before* the actual deletion, the 
null/exists checks are useless.


I'm probably not the first that want to delete all the children of a 
node. I feel that this should be simple. Is there a feature to do it 
that I'm not aware of?






--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] make install fails after MITK upgrade

2015-01-22 Thread Sascha Zelzer
Hi,

hard to tell, you could please post the complete output (I know, it is big).

One issue could be missing search paths if you are using additional 
external libraries which need to be resolved by the BundeUtitlites scripts.

Best,
Sascha

On 12/11/2014 02:20 PM, Miklos Espak wrote:
 Hi,

 I get this error when doing make install from our external MITK 
 application on an ubuntu machine.

 -- executable file 196: 
 /build/opt/niftk-b3845-release/bin/niftkBreastDicomSeriesReadImageWrite
 -- verified='0'
 -- info='external prerequisites found:
 f='/build/opt/niftk-b3845-release/bin/NiftyView'
 external_prereqs='/build/opt/qt-4.8.6/lib/libQtCore.so.4;/build/opt/qt-4.8.6/lib/libQtSql.so.4;/build/src/niftk-b3845-debug/CTK-build/CTK-build/bin/libCTKCore.so.0.1;/build/src/niftk-b3845-debug/
 CTK-build/CTK-build/bin/libCTKPluginFramework.so.0.1;/build/src/niftk-b3845-debug/MITK-build/MITK-build/bin/plugins/liborg_blueberry_osgi.so'
 '
 -- 
 CMake Error at 
 /build/src/niftk-b3845-debug/MITK-src/CMake/BundleUtilities.cmake:773 
 (message):
   error: verify_app failed
 Call Stack (most recent call first):
 /build/src/niftk-b3845-debug/MITK-src/CMake/BundleUtilities.cmake:655 
 (verify_app)
   Code/Gui/MITK/Apps/NiftyView/cmake_install.cmake:3015 (fixup_bundle)
   Code/Gui/MITK/Apps/cmake_install.cmake:37 (include)
   Code/Gui/MITK/cmake_install.cmake:59 (include)
   Code/Gui/cmake_install.cmake:37 (include)
   Code/cmake_install.cmake:40 (include)
   cmake_install.cmake:229 (include)


 I used CMake 3.0.2.

 The libraries mentioned in external_prereqs all exist.

 Not sure what's wrong. Do I need to update some CMake files after the 
 upgrade?

 Cheers,
 Miklos




--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] application hangs at exit when stopping org.mitk.gui.qt.common.legacy

2015-01-22 Thread Sascha Zelzer
Hi Miklos,

happy new year! Well, a little late... sorry for that.

Do still have that issue? If yes, could you please post the stack traces 
of all threads involved in the dead-lock?

Thanks,
Sascha

On 01/08/2015 09:05 PM, Miklos Espak wrote:
 Hi Sascha,


 Happy New Year!

 I need your help again. So, I close the workbench, on the console I
 see something like this:



 [2.954] [BlueBerry] Closing workbench...

 [3.135] closing logfile
 (/home/espakm/.local/share/data/CMIC/NiftyMIDAS_65794558/data/13/mitk-0.log)



 but do not get back the prompt. I found that it's a locking issue in
 ctkPluginPrivate. It happens when the common.legacy plugin's state
 would be set to 'installed'.


 Stack trace:


 0 syscall 38 0x74381399

 1 ?? /build/opt/qt-4.8.6/lib/libQtCore.so.4 0x764ed293

 2 QMutex::lockInternal() /build/opt/qt-4.8.6/lib/libQtCore.so.4 0x764e9735

 3 ctkPluginPrivate::LockObject::lock ctkPlugin_p.cpp 46 0x719cb723

 4 ctkPluginPrivate::Locker::Locker ctkPlugin_p.h 81 0x719a7f17

 5 ctkPluginPrivate::setStateInstalled ctkPlugin_p.cpp 226 0x719cce90

 6 ctkPluginFrameworkPrivate::stopAllPlugins ctkPluginFramework_p.cpp
 195 0x719c2fe2

 7 ctkPluginFrameworkPrivate::shutdown0 ctkPluginFramework_p.cpp 119
 0x719c29d2

 8 QtConcurrent::VoidStoredMemberFunctionPointerCall2void,
 ctkPluginFrameworkPrivate, bool, bool, bool, bool::runFunctor
 qtconcurrentstoredfunctioncall.h 615 0x719c532a

 9 QtConcurrent::RunFunctionTaskvoid::run qtconcurrentrunbase.h 134
 0x719c383f

 10 ?? /build/opt/qt-4.8.6/lib/libQtCore.so.4 0x764e272e

 11 ?? /build/opt/qt-4.8.6/lib/libQtCore.so.4 0x764ee7ef

 12 start_thread 312 0x7534a182

 13 clone 111 0x74386fbd



 I also found that the start0 and stop0 functions are not called for
 this plugin. The problem might be related to this.

 Any clue?

 Thanks,
 Miklos


 (This legacy plugin should really be removed soon...)

 --
 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
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users


--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Delete nodes in tree

2015-01-22 Thread Sascha Zelzer

Hi Nil,

I just entered bug

http://bugs.mitk.org/show_bug.cgi?id=18672

for this. Could you please try the attached patch for me (based on 
2014.10), without any other proposed fixes from this mail thread?


Thanks,

Sascha


On 01/12/2015 08:18 PM, Nil Goyette wrote:

Hi all,

I have at least two nodes (I have drawn more, but I can reproduce the 
bug with 2 nodes)

- Node1
--- Node2  (child of Node1)
--- Node3
- Node4
- Node5
- Some other nodes

When the user deletes Node1, I want to delete all children nodes (2, 
3, 4, 5).
To do so, I use NodeDeleted(), I ask the DataStorage for all 
derivative nodes of the deleted node and delete them all.
A problem arises when the user highlights all nodes and delete them. 
Some nodes are deleted more then one time. Of course, there are 
conditions in mitk and in my own code that check if the node is null, 
but it still fails about half of the time. Since the NodeRemoved() 
event is thrown *before* the actual deletion, the null/exists checks 
are useless.


I'm probably not the first that want to delete all the children of a 
node. I feel that this should be simple. Is there a feature to do it 
that I'm not aware of?


--
Logo Imeka http://imeka.ca/ Nil Goyette, M.Sc.
www.imeka.ca http://imeka.ca/



diff --git a/Core/Code/DataManagement/mitkStandaloneDataStorage.cpp b/Core/Code/DataManagement/mitkStandaloneDataStorage.cpp
index 207cfbb..12d124e 100644
--- a/Core/Code/DataManagement/mitkStandaloneDataStorage.cpp
+++ b/Core/Code/DataManagement/mitkStandaloneDataStorage.cpp
@@ -24,6 +24,26 @@ See LICENSE.txt or http://www.mitk.org for details.
 #include itkSimpleFastMutexLock.h
 #include itkMutexLockHolder.h
 
+class DoubleDeletionGuard
+{
+public:
+  DoubleDeletionGuard(const itk::Object* obj)
+: m_Obj(const_castitk::Object*(obj))
+, m_ObjDeleted(obj == NULL ? false : obj-GetReferenceCount() == 0)
+  {
+if (m_ObjDeleted) m_Obj-SetReferenceCount(1);
+  }
+
+  ~DoubleDeletionGuard()
+  {
+if (m_ObjDeleted) m_Obj-SetReferenceCount(0);
+  }
+
+private:
+  itk::Object* m_Obj;
+  bool m_ObjDeleted;
+};
+
 
 mitk::StandaloneDataStorage::StandaloneDataStorage()
 : mitk::DataStorage()
@@ -128,11 +148,16 @@ void mitk::StandaloneDataStorage::Remove(const mitk::DataNode* node)
 bool mitk::StandaloneDataStorage::Exists(const mitk::DataNode* node) const
 {
   itk::MutexLockHolderitk::SimpleFastMutexLock locked(m_Mutex);
-  return (m_SourceNodes.find(node) != m_SourceNodes.end());
+  // avoid possible double deletion
+  DoubleDeletionGuard guard(node);
+  return m_SourceNodes.find(node) != m_SourceNodes.end();
 }
 
 void mitk::StandaloneDataStorage::RemoveFromRelation(const mitk::DataNode* node, AdjacencyList relation)
 {
+  // avoid possible double deletion
+  DoubleDeletionGuard guard(node);
+
   for (AdjacencyList::const_iterator mapIter = relation.begin(); mapIter != relation.end(); ++mapIter)  // for each node in the relation
 if (mapIter-second.IsNotNull())  // if node has a relation list
 {
@@ -173,6 +198,9 @@ mitk::DataStorage::SetOfObjects::ConstPointer mitk::StandaloneDataStorage::GetRe
   if (node == NULL)
 throw std::invalid_argument(invalid node);
 
+  // avoid possible double deletion
+  DoubleDeletionGuard guard(node);
+
   /* Either read direct relations directly from adjacency list */
   if (onlyDirectlyRelated)
   {
--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] cmake issue

2015-01-21 Thread Sascha Zelzer
Hi Johannes,

the target might not exist after mitk_create_module() if the 
dependencies for that module could not be resolved. Depending on your 
CMake set-up, the target name could have a prefix as well. In general, 
you should use code like this after a mitk_create_module() call:

if(TARGET ${MODULE_TARGET})
   # do things with ${MODULE_TARGET})
endif()

Best,
Sascha

On 01/21/2015 04:18 PM, Johannes Totz wrote:
 Hi there,

 I'm currently trying to upgrade some of our code to a new(er) MITK
 version. Problem I'm facing is this:

 CMake Error at Code/Gui/MITK/Modules/niftkIGIGui/CMakeLists.txt:36 
 (set_target_properties):
set_target_properties Can not find target to add properties to: 
 niftkIGIGui
 For a snippet that looks like:

 MITK_CREATE_MODULE(niftkIGIGui
EXPORT_DEFINE NIFTKIGIGUI_EXPORT
INCLUDE_DIRS ...stuff...
DEPENDS ...stuff...
PACKAGE_DEPENDS ...stuff...
 )

 if(MSVC)
if(OPENMP_FOUND)
  set_target_properties(${MODULE_TARGET} PROPERTIES COMPILE_FLAGS 
 ${OpenMP_CXX_FLAGS})
endif()
 endif()
 This happens only for two modules in the source, the others are fine.
 I have been banging my head against the wall for some time now but can't
 make heads or tails of this.
 Any idea why the target would not exist after MITK_CREATE_MODULE?

 I've tried this with cmake 3.02 and 3.1, on Windows with VS2012.


 Thanks,

 Johannes


 --
 New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
 GigeNET is offering a free month of service with a new server in Ashburn.
 Choose from 2 high performing configs, both with 100TB of bandwidth.
 Higher redundancy.Lower latency.Increased capacity.Completely compliant.
 http://p.sf.net/sfu/gigenet
 ___
 mitk-users mailing list
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users


--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] cmake issue

2015-01-21 Thread Sascha Zelzer
On 01/21/2015 06:17 PM, Johannes Totz wrote:
 On 21/01/2015 16:59, Sascha Zelzer wrote:
 Hi Johannes,

 the target might not exist after mitk_create_module() if the
 dependencies for that module could not be resolved.
 Ahah! That was it, missing dependency. Nothing appeared in the log
 though. I noticed that there still was MitkExt on the DEPENDS list
 (which was deprecated previously?). Removing that makes configure work.

MitkExt has been split into several new modules (with other names, 
obviously).

To get a log of enabled modules and missing dependencies, you can put 
something like this at the end of your top-level CMakeLists.txt file:

feature_summary(
   DESCRIPTION --- FEATURE SUMMARY FOR ${PROJECT_NAME} ---
   WHAT ALL
)


- Sascha


 Thanks for the pointer!

 Depending on your
 CMake set-up, the target name could have a prefix as well. In general,
 you should use code like this after a mitk_create_module() call:

 if(TARGET ${MODULE_TARGET})
 # do things with ${MODULE_TARGET})
 endif()

 Best,
 Sascha

 On 01/21/2015 04:18 PM, Johannes Totz wrote:
 Hi there,

 I'm currently trying to upgrade some of our code to a new(er) MITK
 version. Problem I'm facing is this:

 CMake Error at Code/Gui/MITK/Modules/niftkIGIGui/CMakeLists.txt:36 
 (set_target_properties):
 set_target_properties Can not find target to add properties to: 
 niftkIGIGui
 For a snippet that looks like:

 MITK_CREATE_MODULE(niftkIGIGui
 EXPORT_DEFINE NIFTKIGIGUI_EXPORT
 INCLUDE_DIRS ...stuff...
 DEPENDS ...stuff...
 PACKAGE_DEPENDS ...stuff...
 )

 if(MSVC)
 if(OPENMP_FOUND)
   set_target_properties(${MODULE_TARGET} PROPERTIES COMPILE_FLAGS 
 ${OpenMP_CXX_FLAGS})
 endif()
 endif()
 This happens only for two modules in the source, the others are fine.
 I have been banging my head against the wall for some time now but can't
 make heads or tails of this.
 Any idea why the target would not exist after MITK_CREATE_MODULE?

 I've tried this with cmake 3.02 and 3.1, on Windows with VS2012.


 Thanks,

 Johannes



 --
 New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
 GigeNET is offering a free month of service with a new server in Ashburn.
 Choose from 2 high performing configs, both with 100TB of bandwidth.
 Higher redundancy.Lower latency.Increased capacity.Completely compliant.
 http://p.sf.net/sfu/gigenet
 ___
 mitk-users mailing list
 mitk-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mitk-users


--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Query about pre-loading library

2015-01-15 Thread Sascha Zelzer
Hi,

On 01/15/2015 09:59 AM, Clarkson, Matt wrote:
 Hi there,

 following our upgrade to MITK 2014.10, it looks to me like the code for 
 preloading libraries in MITK Workbench is a bit  … er … not what I expect.

 In 2014.03 we had:
 https://github.com/MITK/MITK/blob/eb025ddf02d2d7c60eada2f68dab39274420dea8/Applications/Workbench/MitkWorkbench.cpp

 In the latest master we have:
 https://github.com/MITK/MITK/blob/master/Applications/Workbench/MitkWorkbench.cpp

 So, in 2014.03 we try to pre-load both liborg_mitk_gui_qt_ext and 
 CTKDICOMCore (on non-windows platforms).
 In 2014.10 we try to load only liborg_mitk_gui_qt_ext.

Yes, we fixed error/warning messages of libraries not being found on 
Windows and MacOS during pre-loading.


 Q1: Is CTKDICOMCore no longer needed to be pre-loaded. I seem to remember 
 that some install path in some version of DCMTK was fixed (Andreas/Sascha 
 maybe) so, maybe we don’t need to preload it.
CTKDICOMCore was pre-loaded as a work-around to buggy static init/deinit 
code in static dcmtk libraries for Linux. Since some time, we are 
building dcmtk as a shared library which fixed the static issues we had.


 Q2: In both of these cases, the code looks to me like it will only pre-load 
 one library. If you wanted to specify a list of libraries to pre-load, the 
 2014.03 version doesn’t contain a loop to set the path correctly for each 
 library. In the latest master, there is a loop over the entries in a 
 QStringList, which calculates either the build-tree path or the install-tree 
 path, but then the preloadConfig variable simply ignores it, so the final 
 value passed to extConfig-setString(berry::Platform::ARG_PRELOAD_LIBRARY, 
 preloadConfig.toStdString()); will never contain the right path (on a Mac at 
 least).

 Any thoughts? It looks wrong to me…. or I need more coffee today.

More Coffee might help ;-) The first for loop calculates absolute paths 
and changes the entries in preloadLibs in-place. The second Q_FOREACH 
loop appends all library paths to the preloadConfig string variable 
(comma separated).

Best,
Sascha

--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Loggin in MITK without Blueberry framework

2015-01-09 Thread Sascha Zelzer
Hi Arpit,

MITK has a BlueBerry independent logging system. You can have a look at 
these logging classes:

http://docs.mitk.org/2014.10/namespacembilog.html

There is also a mitk::LoggingBackend class (in the mitkLog.h header) 
which you can re-use. It allows for setting a custom log file name and 
optionally printing to the console.

Best,
Sascha

On 01/04/2015 07:45 PM, Arpit Paliwal wrote:
 Hi,

 I am new to MITK. I am developing a standalone application without 
 using Blueberry framework. I can see all the logging messages from ITK 
 / VTK / My application in debug window.

 Is there any way to direct all this information to a custom log file 
 without using Blueberry framework files ?

 Best Regards,
 Arpit


--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] ctest exceptions on 2014.10

2015-01-09 Thread Sascha Zelzer

Hi,

as you probably imagine, I unfortunately also can't tell you why that 
line breaks something. We didn't move all IO classes to the new concept 
yet simply because whe didn't have enough time before the 2014.10 
release (and the parallel support for the old system seemed to work 
well). During the next weeks, we will however start moving all IO stuff 
to the new concept and remove the old deprecated classes/methods. Maybe 
we will stumble across a similar problem then.


Best,
Sascha

On 01/05/2015 09:06 PM, Nil Goyette wrote:

Hi all,

AUTOLOAD_WITH is not the problem. I managed to track down the problem 
to a single line in one of the non-test normal code.
We created our own PlanarFigure called PlanarPointToLine, which need 
to be serialized like all other mitk::PlanarFigure. To do so, I read 
the code in mitk::PlanarFigureReader and I realized that there's no 
practical way to add our own PlanarFigure. So, I copied 
mitk::PlanarFigureReader into our project, modified it to fit the new 
IO concept (mitk::AbstractFileReader) and changed the big if else if 
block near line 160 into:

mitk::PlanarFigure::Pointer planarFigure = nullptr;
if (type == PlanarPointToLine)
{
  // This simple line breaks my tests, but our application still works.
  planarFigure = mitk::PlanarPointToLine::New();
}
else
{
  // use mitk::PlanarPointToLine to read it
  planarFigure = ...
}
... the rest of the code is almost identical to mitk's code.

Of course, I have no idea why that line breaks my tests; they are not 
even related. Maybe you know?


I don't know who is in charge of Modules/PlanarFigure/IO/* but I 
wonder why it is still using the old IO concept (mitk::FileReader). 
Did you try it and revert after because there was a problem? Or you 
simply didn't have enough time do to it? I also had PlanarPointToLine 
with mitk 2014.03 (old IO concept) and had no such troubles.


Le 2014-12-15 16:30, Nil Goyette a écrit :

Hi all, Hi Sascha,

I did more tests and discovered that my tests stopped working when I 
added AUTOLOAD_WITH MitkCore to my IO module. When I remove it, 
clean and build again, ctest outputs normal messages like
1/N Test  #1: BoneDensityTest999 
.***Failed0.34 sec
2/N Test #18: BoundingObjectTest1 
***Exception: SegFault  6.33 sec

which can now be runned and debugged.

As I wrote in my first message, we added a AUTOLOAD_WITH MitkCore 
in our IO module because I think it's mandatory for the Activator to 
Register all the readers and writers. I simply copied what I saw in 
MITK IOExt. What is the right way to do that? Should I use one of our 
own module instead of MitkCore?


Le 2014-12-10 08:25, Nil Goyette a écrit :

Hi Sascha,

Thank you for your answer. Yes, I built our applications from a 
fresh cmake Configure/Generate when I started. Just to be sure , I 
deleted my build directory and built everything again. It didn't 
change anything. I still have the same problems I described in my 
last message.


Le 2014-12-09 14:06, Sascha Zelzer a écrit :

Hi Nil,

this looks like some strange build tree artifacts, so before 
further investigations I need to ask if you did a clean build or 
re-used an existing build tree during the migration.


Thanks,
Sascha

On 12/09/2014 07:12 PM, Nil Goyette wrote:

Hi all,

I ported our applications to MITK 2014.10 and several tests fail 
since. I investigated and found some facts which will hopefully 
help you help me :)


They do nothing if I start them individually with *TestDriver.exe. 
They simpy print \n and return to the command line.
One time though, I was able to run one test, not sure what I did. 
It printed:
3: 0.18 core.int.coreAct WARNING: In 
`anonymous-namespace'::load_impl at 
..\..\..\..\..\Core\CppMicroServices\core\src\util\usUtils.cpp:90 
: L'accès à cet emplacement de la mémoire n'est pas valide.(French 
for: Access to this memory address is invalid)
3: 0.18 core.int.coreAct WARNING: In us::AutoLoadModulesFromPath 
at 
..\..\..\..\..\Core\CppMicroServices\core\src\util\usUtils.cpp:176 
: Auto-loading of module 
C:\Imeka\plitk\imeka-plitk\_VS12_x32_2014.10\bin\MitkCore\Release\ImekaIO.dll 
failed.

Available tests:
  0. VFFReaderTest
I understand the second message. We added a AUTOLOAD_WITH 
MitkCore in our IO module because I think it's mandatory for the 
Activator to Register all the readers and writers. Is there 
another way?


The error messages doesn't help me much:
18/N Test #18: BoundingObjectTest1 
***Exception: Other  0.37 sec
19/N Test #19: VFFReaderTest1 
.***Exception: Other 0.41 sec

... and it's  not better with -VV

Running one of the failing test in debug (to understand what Other 
Exception is) leads me to a strange place. The place itself 
(dbgheap.c) is probably uninteresting to MITK, but the stack trace 
might be of interest. Take a look at the attachment. We can see 
that it never enters the test. It just kills

Re: [mitk-users] DEPENDS MitkDiffusionIO

2015-01-09 Thread Sascha Zelzer

Hi,

the MitkDiffusionIO module is a auto-load module which *should* only 
provide IO classes for diffusion related types. Such a module usually 
does not export any symbols and hence does not have a public API. 
Although you can technically link to it (by writing DEPENDS 
MitkDiffusionIO) there are two issues:


1. The module usually does not have a public API
2. The module's runtime file (.so, .dll, .dylib) is located in a special 
sub-directory which leads to runtime linker errors due to missing PATH 
entries on Windows


In your case, the mitk::FiberBundleXMapper2D is not exported and hence 
not public API. You might argue that it should be moved e.g. into the 
MitkFiberTracking module and be exported for re-use. This is a decision 
for our diffusion sub-group and you might want to discuss this in a 
separate mail.


Best,
Sascha

On 01/07/2015 06:41 PM, Nil Goyette wrote:

Hi all,

I'm trying to extend mitk::FiberBundleXMapper2D to change its behavior.
To do so, I created my own class where I changed one of the virtual 
method and added MitkDiffusionIO to my cmakelist

MITK_CREATE_MODULE( ImekaFiber
  DEPENDS MitkDataTypesExt MitkDiffusionIO ...
  PACKAGE_DEPENDS Qt4|QtCore
  EXPORT_DEFINE IMEKAFIBER_EXPORT
)
Yes, I use IMEKAFIBER_EXPORT with my class.

The problem is, I have some external errors that I don't understand:
PeaksMapper2D.obj : error LNK2001: unresolved external symbol...
  public: virtual class vtkProp * __cdecl 
mitk::FiberBundleXMapper2D::GetVtkProp(class mitk::BaseRenderer *)
  protected: __cdecl 
mitk::FiberBundleXMapper2D::FiberBundleXMapper2D(void)
  protected: virtual __cdecl 
mitk::FiberBundleXMapper2D::~FiberBundleXMapper2D(void)
  protected: virtual void __cdecl 
mitk::FiberBundleXMapper2D::GenerateDataForRenderer(class 
mitk::BaseRenderer *)


On another module, I use the MitkFiberTracking module and it works. 
The only difference I can see is that MitkDiffusionIO has 
AUTOLOAD_WITH MitkCore in its cmakelist. Is it possible to depend on 
a module that uses autoload? Thank you for your time.


--
Logo Imeka http://imeka.ca/ Nil Goyette, M.Sc.
www.imeka.ca http://imeka.ca/



--
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
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


  1   2   3   4   5   6   >