Browse Source

ENH: AppHosting: First experimental plugins for dicom app hosting

Sascha Zelzer 14 years ago
parent
commit
b9b0c0501c

+ 52 - 0
Applications/ctkExampleHost/CMakeLists.txt

@@ -0,0 +1,52 @@
+PROJECT(ctkExampleHost)
+
+#
+# See CTK/CMake/ctkMacroBuildApp.cmake for details
+#
+
+SET(KIT_SRCS
+  ctkExampleHostMain.cpp
+)
+
+# Headers that should run through moc
+SET(KIT_MOC_SRCS
+
+)
+
+# UI files
+SET(KIT_UI_FORMS
+  
+)
+
+# Resources
+SET(KIT_resources
+  
+)
+
+# Target libraries - See CMake/ctkMacroGetTargetLibraries.cmake
+# The following macro will read the target libraries from the file 'target_libraries.cmake'
+ctkMacroGetTargetLibraries(KIT_target_libraries)
+
+# Additional directories to include - Note that CTK_INCLUDE_LIBRARIES is already included
+SET(KIT_include_directories
+)
+
+# Fix this after having discussed include dependencies with Jc
+FOREACH(_dep ${${PROJECT_NAME}_DEPENDENCIES})
+  INCLUDE_DIRECTORIES(${${_dep}_SOURCE_DIR} ${${_dep}_BINARY_DIR})
+ENDFOREACH()
+
+ctkMacroBuildApp(
+  NAME ${PROJECT_NAME}
+  INCLUDE_DIRECTORIES ${KIT_include_directories}
+  SRCS ${KIT_SRCS}
+  MOC_SRCS ${KIT_MOC_SRCS}
+  UI_FORMS ${KIT_UI_FORMS}
+  TARGET_LIBRARIES ${KIT_target_libraries}
+  RESOURCES ${KIT_resources}
+  )
+
+# Testing
+IF(BUILD_TESTING)
+#   ADD_SUBDIRECTORY(Testing)
+ENDIF(BUILD_TESTING)

+ 87 - 0
Applications/ctkExampleHost/ctkExampleHostMain.cpp

@@ -0,0 +1,87 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) 2010 German Cancer Research Center,
+    Division of Medical and Biological Informatics
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+#include <ctkPluginFrameworkFactory.h>
+#include <ctkPluginFramework.h>
+#include <ctkPluginException.h>
+
+#include <QApplication>
+#include <QString>
+#include <QStringList>
+#include <QDirIterator>
+#include <QWidget>
+
+int main(int argv, char** argc)
+{
+  QApplication app(argv, argc);
+
+  qApp->setOrganizationName("CTK");
+  qApp->setOrganizationDomain("commontk.org");
+  qApp->setApplicationName("ctkExampleHost");
+
+  ctkPluginFrameworkFactory fwFactory;
+  ctkPluginFramework* framework = fwFactory.getFramework();
+
+  try {
+    framework->init();
+  }
+  catch (const ctkPluginException& exc)
+  {
+    qCritical() << "Failed to initialize the plug-in framework:" << exc;
+    exit(1);
+  }
+
+#ifdef CMAKE_INTDIR
+  QString pluginPath = qApp->applicationDirPath() + "/../plugins/" CMAKE_INTDIR "/";
+#else
+  QString pluginPath = qApp->applicationDirPath() + "/plugins/";
+#endif
+
+  qApp->addLibraryPath(pluginPath);
+
+//  QStringList libFilter;
+//  libFilter << "*.dll" << "*.so" << "*.dylib";
+//  QDirIterator dirIter(pluginPath, libFilter, QDir::Files);
+//  while(dirIter.hasNext())
+//  {
+//    try
+//    {
+//      QString fileLocation = dirIter.next();
+//      if (fileLocation.contains("org_commontk_dicom_wg23"))
+//      {
+//        ctkPlugin* plugin = framework->getPluginContext()->installPlugin(QUrl::fromLocalFile(fileLocation));
+//        plugin->start(ctkPlugin::START_TRANSIENT);
+//      }
+//    }
+//    catch (const ctkPluginException& e)
+//    {
+//      qCritical() << e.what();
+//    }
+//  }
+
+  framework->start();
+
+  QWidget placeholder;
+  placeholder.show();
+
+  return app.exec();
+
+}

+ 10 - 0
Applications/ctkExampleHost/target_libraries.cmake

@@ -0,0 +1,10 @@
+#
+# See CMake/ctkMacroGetTargetLibraries.cmake
+# 
+# This file should list the libraries required to build the current CTK application.
+# 
+
+SET(target_libraries
+  CTKPluginFramework
+  org_commontk_dicom_wg23_host
+  )

+ 39 - 0
CMakeExternals/QtSOAP.cmake

@@ -0,0 +1,39 @@
+#
+# QtSOAP
+#
+
+SET(QtSOAP_DEPENDS)
+ctkMacroShouldAddExternalProject(QTSOAP_LIBRARIES add_project)
+IF(${add_project})
+  
+  SET(proj QtSOAP)
+#  MESSAGE(STATUS "Adding project:${proj}")
+  SET(QtSOAP_DEPENDS ${proj})
+
+  IF(WIN32)
+    SET(_qtsoap_url "http://get.qt.nokia.com/qt/solutions/lgpl/qtsoap-2.7_1-opensource.zip")
+    SET(_make_cmd nmake)
+    IF(MINGW)
+      SET(_make_cmd mingw32-make)
+    ENDIF()
+  ELSE()
+    SET(_qtsoap_url "http://get.qt.nokia.com/qt/solutions/lgpl/qtsoap-2.7_1-opensource.tar.gz")
+    SET(_make_cmd make)
+  ENDIF()
+
+  SET(_qtsoap_patch_script "${CTK_BINARY_DIR}/Utilities/QtSOAP/AcceptLicense.cmake")
+  CONFIGURE_FILE("${CTK_SOURCE_DIR}/Utilities/QtSOAP/AcceptLicense.cmake.in" ${_qtsoap_patch_script})
+
+  ExternalProject_Add(${proj}
+    URL ${_qtsoap_url}
+    PATCH_COMMAND ${CMAKE_COMMAND} -P ${_qtsoap_patch_script}
+    CONFIGURE_COMMAND <SOURCE_DIR>/configure -library
+    BUILD_IN_SOURCE 1
+    BUILD_COMMAND ${QT_QMAKE_EXECUTABLE}
+    INSTALL_COMMAND ${_make_cmd} # misuse the install step for second build command
+  )
+
+  # Since the full path of PythonQt library is used, there is not need to add 
+  # its corresponding library output directory to CTK_EXTERNAL_LIBRARY_DIRS
+    
+ENDIF()

+ 5 - 0
CMakeLists.txt

@@ -288,6 +288,10 @@ SET(CTK_LIBS
 SET(CTK_PLUGINS
   org.commontk.eventbus:ON
   org.commontk.cli:OFF
+  org.commontk.dicom.wg23.app:OFF
+  org.commontk.dicom.wg23.core:OFF
+  org.commontk.dicom.wg23.host:OFF
+  org.commontk.example.dicomapp:OFF
   org.commontk.plugingenerator.core:OFF
   org.commontk.plugingenerator.ui:OFF
   )
@@ -302,6 +306,7 @@ SET(CTK_APPLICATIONS
   ctkDICOMDemoSCU:OFF
   ctkDICOMQuery:OFF
   ctkDICOMRetrieve:OFF
+  ctkExampleHost:OFF
   ctkPluginBrowser:OFF
   ctkPluginGenerator:OFF
   ctkSimplePythonShell:OFF

+ 33 - 0
Plugins/org.commontk.dicom.wg23.app/CMakeLists.txt

@@ -0,0 +1,33 @@
+PROJECT(org_commontk_dicom_wg23_app)
+
+SET(PLUGIN_export_directive "org_commontk_dicom_wg23_app_EXPORT")
+
+SET(PLUGIN_SRCS
+  ctkDicomWG23AppPlugin.cpp
+)
+
+# Files which should be processed by Qts moc
+SET(PLUGIN_MOC_SRCS
+  ctkDicomWG23AppPlugin_p.h
+)
+
+# Qt Designer files which should be processed by Qts uic
+SET(PLUGIN_UI_FORMS
+)
+
+# QRC Files which should be compiled into the plugin
+SET(PLUGIN_resources
+)
+
+#Compute the plugin dependencies
+ctkMacroGetTargetLibraries(PLUGIN_target_libraries)
+
+ctkMacroBuildPlugin(
+  NAME ${PROJECT_NAME}
+  EXPORT_DIRECTIVE ${PLUGIN_export_directive}
+  SRCS ${PLUGIN_SRCS}
+  MOC_SRCS ${PLUGIN_MOC_SRCS}
+  UI_FORMS ${PLUGIN_UI_FORMS}
+  RESOURCES ${PLUGIN_resources}
+  TARGET_LIBRARIES ${PLUGIN_target_libraries}
+)

+ 61 - 0
Plugins/org.commontk.dicom.wg23.app/ctkDicomWG23AppPlugin.cpp

@@ -0,0 +1,61 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) 2010 German Cancer Research Center,
+    Division of Medical and Biological Informatics
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+
+#include "ctkDicomWG23AppPlugin_p.h"
+#include <QtPlugin>
+
+ctkDicomWG23AppPlugin* ctkDicomWG23AppPlugin::instance = 0;
+
+ctkDicomWG23AppPlugin::ctkDicomWG23AppPlugin()
+  : context(0)
+{
+}
+
+ctkDicomWG23AppPlugin::~ctkDicomWG23AppPlugin()
+{
+  
+}
+
+void ctkDicomWG23AppPlugin::start(ctkPluginContext* context)
+{
+  instance = this;
+  this->context = context;
+}
+
+void ctkDicomWG23AppPlugin::stop(ctkPluginContext* context)
+{
+  Q_UNUSED(context)
+}
+
+ctkDicomWG23AppPlugin* ctkDicomWG23AppPlugin::getInstance()
+{
+  return instance;
+}
+
+ctkPluginContext* ctkDicomWG23AppPlugin::getPluginContext() const
+{
+  return context;
+}
+
+Q_EXPORT_PLUGIN2(org_commontk_dicom_wg23_app, ctkDicomWG23AppPlugin)
+
+

+ 55 - 0
Plugins/org.commontk.dicom.wg23.app/ctkDicomWG23AppPlugin_p.h

@@ -0,0 +1,55 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) 2010 German Cancer Research Center,
+    Division of Medical and Biological Informatics
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+
+#ifndef CTKDICOMWG23APPPLUGIN_P_H
+#define CTKDICOMWG23APPPLUGIN_P_H
+
+#include <ctkPluginActivator.h>
+
+class ctkDicomWG23AppPlugin :
+  public QObject, public ctkPluginActivator
+{
+  Q_OBJECT
+  Q_INTERFACES(ctkPluginActivator)
+
+public:
+
+  ctkDicomWG23AppPlugin();
+  ~ctkDicomWG23AppPlugin();
+
+  void start(ctkPluginContext* context);
+  void stop(ctkPluginContext* context);
+
+  static ctkDicomWG23AppPlugin* getInstance();
+
+  ctkPluginContext* getPluginContext() const;
+
+
+private:
+
+  static ctkDicomWG23AppPlugin* instance;
+  ctkPluginContext* context;
+
+
+}; // ctkDicomWG23AppPlugin
+
+#endif // CTKDICOMWG23APPPLUGIN_P_H

+ 1 - 0
Plugins/org.commontk.dicom.wg23.app/manifest_headers.cmake

@@ -0,0 +1 @@
+SET(Require-Plugin org.commontk.dicom.wg23.core)

+ 33 - 0
Plugins/org.commontk.dicom.wg23.core/CMakeLists.txt

@@ -0,0 +1,33 @@
+PROJECT(org_commontk_dicom_wg23_core)
+
+SET(PLUGIN_export_directive "org_commontk_dicom_wg23_core_EXPORT")
+
+SET(PLUGIN_SRCS
+  ctkDicomWG23CorePlugin.cpp
+)
+
+# Files which should be processed by Qts moc
+SET(PLUGIN_MOC_SRCS
+  ctkDicomWG23CorePlugin_p.h
+)
+
+# Qt Designer files which should be processed by Qts uic
+SET(PLUGIN_UI_FORMS
+)
+
+# QRC Files which should be compiled into the plugin
+SET(PLUGIN_resources
+)
+
+#Compute the plugin dependencies
+ctkMacroGetTargetLibraries(PLUGIN_target_libraries)
+
+ctkMacroBuildPlugin(
+  NAME ${PROJECT_NAME}
+  EXPORT_DIRECTIVE ${PLUGIN_export_directive}
+  SRCS ${PLUGIN_SRCS}
+  MOC_SRCS ${PLUGIN_MOC_SRCS}
+  UI_FORMS ${PLUGIN_UI_FORMS}
+  RESOURCES ${PLUGIN_resources}
+  TARGET_LIBRARIES ${PLUGIN_target_libraries}
+)

+ 61 - 0
Plugins/org.commontk.dicom.wg23.core/ctkDicomWG23CorePlugin.cpp

@@ -0,0 +1,61 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) 2010 German Cancer Research Center,
+    Division of Medical and Biological Informatics
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+
+#include "ctkDicomWG23CorePlugin_p.h"
+#include <QtPlugin>
+
+ctkDicomWG23CorePlugin* ctkDicomWG23CorePlugin::instance = 0;
+
+ctkDicomWG23CorePlugin::ctkDicomWG23CorePlugin()
+  : context(0)
+{
+}
+
+ctkDicomWG23CorePlugin::~ctkDicomWG23CorePlugin()
+{
+  
+}
+
+void ctkDicomWG23CorePlugin::start(ctkPluginContext* context)
+{
+  instance = this;
+  this->context = context;
+}
+
+void ctkDicomWG23CorePlugin::stop(ctkPluginContext* context)
+{
+  Q_UNUSED(context)
+}
+
+ctkDicomWG23CorePlugin* ctkDicomWG23CorePlugin::getInstance()
+{
+  return instance;
+}
+
+ctkPluginContext* ctkDicomWG23CorePlugin::getPluginContext() const
+{
+  return context;
+}
+
+Q_EXPORT_PLUGIN2(org_commontk_dicom_wg23_core, ctkDicomWG23CorePlugin)
+
+

+ 55 - 0
Plugins/org.commontk.dicom.wg23.core/ctkDicomWG23CorePlugin_p.h

@@ -0,0 +1,55 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) 2010 German Cancer Research Center,
+    Division of Medical and Biological Informatics
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+
+#ifndef CTKDICOMWG23COREPLUGIN_P_H
+#define CTKDICOMWG23COREPLUGIN_P_H
+
+#include <ctkPluginActivator.h>
+
+class ctkDicomWG23CorePlugin :
+  public QObject, public ctkPluginActivator
+{
+  Q_OBJECT
+  Q_INTERFACES(ctkPluginActivator)
+
+public:
+
+  ctkDicomWG23CorePlugin();
+  ~ctkDicomWG23CorePlugin();
+
+  void start(ctkPluginContext* context);
+  void stop(ctkPluginContext* context);
+
+  static ctkDicomWG23CorePlugin* getInstance();
+
+  ctkPluginContext* getPluginContext() const;
+
+
+private:
+
+  static ctkDicomWG23CorePlugin* instance;
+  ctkPluginContext* context;
+
+
+}; // ctkDicomWG23CorePlugin
+
+#endif // CTKDICOMWG23COREPLUGIN_P_H

+ 10 - 0
Plugins/org.commontk.dicom.wg23.core/target_libraries.cmake

@@ -0,0 +1,10 @@
+# See CMake/ctkMacroGetTargetLibraries.cmake
+#
+# This file should list the libraries required to build the current CTK plugin.
+# For specifying required plugins, see the manifest_headers.cmake file.
+#
+
+SET(target_libraries
+  CTKPluginFramework
+  QTSOAP_LIBRARIES
+)

+ 33 - 0
Plugins/org.commontk.dicom.wg23.host/CMakeLists.txt

@@ -0,0 +1,33 @@
+PROJECT(org_commontk_dicom_wg23_host)
+
+SET(PLUGIN_export_directive "org_commontk_dicom_wg23_host_EXPORT")
+
+SET(PLUGIN_SRCS
+  ctkDicomWG23HostPlugin.cpp
+)
+
+# Files which should be processed by Qts moc
+SET(PLUGIN_MOC_SRCS
+  ctkDicomWG23HostPlugin_p.h
+)
+
+# Qt Designer files which should be processed by Qts uic
+SET(PLUGIN_UI_FORMS
+)
+
+# QRC Files which should be compiled into the plugin
+SET(PLUGIN_resources
+)
+
+#Compute the plugin dependencies
+ctkMacroGetTargetLibraries(PLUGIN_target_libraries)
+
+ctkMacroBuildPlugin(
+  NAME ${PROJECT_NAME}
+  EXPORT_DIRECTIVE ${PLUGIN_export_directive}
+  SRCS ${PLUGIN_SRCS}
+  MOC_SRCS ${PLUGIN_MOC_SRCS}
+  UI_FORMS ${PLUGIN_UI_FORMS}
+  RESOURCES ${PLUGIN_resources}
+  TARGET_LIBRARIES ${PLUGIN_target_libraries}
+)

+ 61 - 0
Plugins/org.commontk.dicom.wg23.host/ctkDicomWG23HostPlugin.cpp

@@ -0,0 +1,61 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) 2010 German Cancer Research Center,
+    Division of Medical and Biological Informatics
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+
+#include "ctkDicomWG23HostPlugin_p.h"
+#include <QtPlugin>
+
+ctkDicomWG23HostPlugin* ctkDicomWG23HostPlugin::instance = 0;
+
+ctkDicomWG23HostPlugin::ctkDicomWG23HostPlugin()
+  : context(0)
+{
+}
+
+ctkDicomWG23HostPlugin::~ctkDicomWG23HostPlugin()
+{
+  
+}
+
+void ctkDicomWG23HostPlugin::start(ctkPluginContext* context)
+{
+  instance = this;
+  this->context = context;
+}
+
+void ctkDicomWG23HostPlugin::stop(ctkPluginContext* context)
+{
+  Q_UNUSED(context)
+}
+
+ctkDicomWG23HostPlugin* ctkDicomWG23HostPlugin::getInstance()
+{
+  return instance;
+}
+
+ctkPluginContext* ctkDicomWG23HostPlugin::getPluginContext() const
+{
+  return context;
+}
+
+Q_EXPORT_PLUGIN2(org_commontk_dicom_wg23_host, ctkDicomWG23HostPlugin)
+
+

+ 55 - 0
Plugins/org.commontk.dicom.wg23.host/ctkDicomWG23HostPlugin_p.h

@@ -0,0 +1,55 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) 2010 German Cancer Research Center,
+    Division of Medical and Biological Informatics
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+
+#ifndef CTKDICOMWG23HOSTPLUGIN_P_H
+#define CTKDICOMWG23HOSTPLUGIN_P_H
+
+#include <ctkPluginActivator.h>
+
+class ctkDicomWG23HostPlugin :
+  public QObject, public ctkPluginActivator
+{
+  Q_OBJECT
+  Q_INTERFACES(ctkPluginActivator)
+
+public:
+
+  ctkDicomWG23HostPlugin();
+  ~ctkDicomWG23HostPlugin();
+
+  void start(ctkPluginContext* context);
+  void stop(ctkPluginContext* context);
+
+  static ctkDicomWG23HostPlugin* getInstance();
+
+  ctkPluginContext* getPluginContext() const;
+
+
+private:
+
+  static ctkDicomWG23HostPlugin* instance;
+  ctkPluginContext* context;
+
+
+}; // ctkDicomWG23HostPlugin
+
+#endif // CTKDICOMWG23HOSTPLUGIN_P_H

+ 1 - 0
Plugins/org.commontk.dicom.wg23.host/manifest_headers.cmake

@@ -0,0 +1 @@
+SET(Require-Plugin org.commontk.dicom.wg23.core)

+ 33 - 0
Plugins/org.commontk.example.dicomapp/CMakeLists.txt

@@ -0,0 +1,33 @@
+PROJECT(org_commontk_example_dicomapp)
+
+SET(PLUGIN_export_directive "org_commontk_example_dicomapp_EXPORT")
+
+SET(PLUGIN_SRCS
+  ctkExampleDicomAppPlugin.cpp
+)
+
+# Files which should be processed by Qts moc
+SET(PLUGIN_MOC_SRCS
+  ctkExampleDicomAppPlugin_p.h
+)
+
+# Qt Designer files which should be processed by Qts uic
+SET(PLUGIN_UI_FORMS
+)
+
+# QRC Files which should be compiled into the plugin
+SET(PLUGIN_resources
+)
+
+#Compute the plugin dependencies
+ctkMacroGetTargetLibraries(PLUGIN_target_libraries)
+
+ctkMacroBuildPlugin(
+  NAME ${PROJECT_NAME}
+  EXPORT_DIRECTIVE ${PLUGIN_export_directive}
+  SRCS ${PLUGIN_SRCS}
+  MOC_SRCS ${PLUGIN_MOC_SRCS}
+  UI_FORMS ${PLUGIN_UI_FORMS}
+  RESOURCES ${PLUGIN_resources}
+  TARGET_LIBRARIES ${PLUGIN_target_libraries}
+)

+ 61 - 0
Plugins/org.commontk.example.dicomapp/ctkExampleDicomAppPlugin.cpp

@@ -0,0 +1,61 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) 2010 German Cancer Research Center,
+    Division of Medical and Biological Informatics
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+
+#include "ctkExampleDicomAppPlugin_p.h"
+#include <QtPlugin>
+
+ctkExampleDicomAppPlugin* ctkExampleDicomAppPlugin::instance = 0;
+
+ctkExampleDicomAppPlugin::ctkExampleDicomAppPlugin()
+  : context(0)
+{
+}
+
+ctkExampleDicomAppPlugin::~ctkExampleDicomAppPlugin()
+{
+  
+}
+
+void ctkExampleDicomAppPlugin::start(ctkPluginContext* context)
+{
+  instance = this;
+  this->context = context;
+}
+
+void ctkExampleDicomAppPlugin::stop(ctkPluginContext* context)
+{
+  Q_UNUSED(context)
+}
+
+ctkExampleDicomAppPlugin* ctkExampleDicomAppPlugin::getInstance()
+{
+  return instance;
+}
+
+ctkPluginContext* ctkExampleDicomAppPlugin::getPluginContext() const
+{
+  return context;
+}
+
+Q_EXPORT_PLUGIN2(org_commontk_example_dicomapp, ctkExampleDicomAppPlugin)
+
+

+ 55 - 0
Plugins/org.commontk.example.dicomapp/ctkExampleDicomAppPlugin_p.h

@@ -0,0 +1,55 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) 2010 German Cancer Research Center,
+    Division of Medical and Biological Informatics
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+
+#ifndef CTKEXAMPLEDICOMAPPPLUGIN_P_H
+#define CTKEXAMPLEDICOMAPPPLUGIN_P_H
+
+#include <ctkPluginActivator.h>
+
+class ctkExampleDicomAppPlugin :
+  public QObject, public ctkPluginActivator
+{
+  Q_OBJECT
+  Q_INTERFACES(ctkPluginActivator)
+
+public:
+
+  ctkExampleDicomAppPlugin();
+  ~ctkExampleDicomAppPlugin();
+
+  void start(ctkPluginContext* context);
+  void stop(ctkPluginContext* context);
+
+  static ctkExampleDicomAppPlugin* getInstance();
+
+  ctkPluginContext* getPluginContext() const;
+
+
+private:
+
+  static ctkExampleDicomAppPlugin* instance;
+  ctkPluginContext* context;
+
+
+}; // ctkExampleDicomAppPlugin
+
+#endif // CTKEXAMPLEDICOMAPPPLUGIN_P_H

+ 1 - 0
Plugins/org.commontk.example.dicomapp/manifest_headers.cmake

@@ -0,0 +1 @@
+SET(Require-Plugin org.commontk.dicom.wg23.app)

+ 2 - 0
SuperBuild.cmake

@@ -118,6 +118,7 @@ SET(external_projects
   DCMTK
   ZMQ
   QtMobility
+  QtSOAP
   OpenIGTLink
   VTK
   XIP
@@ -143,6 +144,7 @@ ExternalProject_Add(${proj}
     # Optionnal dependencies
     ${CTKData_DEPENDS}
     ${QtMobility_DEPENDS}
+    ${QtSOAP_DEPENDS}
     ${kwstyle_DEPENDS}
     ${DCMTK_DEPENDS}
     ${PythonQt_DEPENDS}

+ 4 - 0
Utilities/QtSOAP/AcceptLicense.cmake.in

@@ -0,0 +1,4 @@
+set(work_dir @ep_source_dir@)
+set(proj_dir ${work_dir}/@proj@)
+
+FILE(WRITE "${proj_dir}/.licenseAccepted" "license accepted\n")