-
jcfr authored
This commit will ensure that ITK IO factory are properly registered on all supported platforms. When ITKv4 is build shared, the library holding the factory registration code are build statically. As a consequence, when CLI module are loaded as library the factory are registered multiple times. Around 800 factories where registered and this was leading to poor performance when loading images. This commit enable the building of a shared library named ITKFactoryRegistration that should be linked against to ensure loading of the factory. This approach can succeed thanks to the help of the ITK variable ITK_NO_IO_FACTORY_REGISTER_MANAGER. This variable allow to disable the automatic registration of factory in selected part of the code. The following two cases are handled: - Registration of the factories within the Slicer executable. - Registration of the factories within CLI executable. Fixes #2813 From: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com> git-svn-id: http://svn.slicer.org/Slicer4/trunk@21592 3bd1e089-480b-0410-8dfb-8563597acbee
03b89614