diff --git a/Modules/Bundles/CMakeLists.txt b/Modules/Bundles/CMakeLists.txt index e61ab9f96e..3b6e783b98 100644 --- a/Modules/Bundles/CMakeLists.txt +++ b/Modules/Bundles/CMakeLists.txt @@ -1,43 +1,44 @@ IF(MITK_USE_BLUEBERRY) SET(MITK_DEFAULT_SUBPROJECTS MITK-Plugins) SET(_mitk_bundles_default ) IF(QT4_FOUND) LIST(APPEND _mitk_bundles_default "org.mitk.gui.qt.imagenavigator") # BlueBerry depends on CTK which depends on Qt, so we # need the Qt include direcotries INCLUDE(${QT_USE_FILE}) ENDIF() SET(PLUGIN_EXCLUDE_LIST org.mitk.core.ext org.mitk.gui.qt.volumetry org.mitk.core.jobs org.mitk.diffusionimaging org.mitk.gui.qt.diffusionimaging org.mitk.gui.qt.ext org.mitk.gui.qt.extapplication org.mitk.gui.qt.datamanager org.mitk.gui.qt.regiongrowing org.mitk.planarfigure org.mitk.gui.qt.igtnavigationtoolmanager org.mitk.gui.qt.igttrackingtoolbox + org.mitk.gui.qt.igttutorial ) MACRO_COLLECT_PLUGINS(OUTPUT_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ExtBundles CACHE_PLUGIN_SOURCE_DIRS MITK_MODULES_PLUGIN_SOURCE_DIRS CACHE_PLUGIN_OUTPUT_DIRS MITK_MODULES_PLUGIN_OUTPUT_DIRS CACHE_PLUGIN_TARGETS MITK_MODULES_ENABLED_PLUGINS BUNDLE_LIST_PATH "${MITK_BINARY_DIR}/Bundles/MITKModulesBundleList.cmake" CMAKE_CACHE_PREFIX "MITK" PLUGIN_DEFAULT_ON ${_mitk_bundles_default} PLUGIN_EXCLUDES ${PLUGIN_EXCLUDE_LIST} ${MITK_BUILD_ALL_PLUGINS_OPTION}) -ENDIF(MITK_USE_BLUEBERRY) +ENDIF(MITK_USE_BLUEBERRY) \ No newline at end of file diff --git a/Modules/Bundles/PluginList.cmake b/Modules/Bundles/PluginList.cmake index 91a7abde83..2bf187e570 100644 --- a/Modules/Bundles/PluginList.cmake +++ b/Modules/Bundles/PluginList.cmake @@ -1,13 +1,14 @@ SET(MITK_EXT_PLUGINS org.mitk.core.ext:ON org.mitk.core.jobs:OFF org.mitk.diffusionimaging:OFF org.mitk.gui.qt.diffusionimaging:OFF org.mitk.gui.qt.ext:ON org.mitk.gui.qt.extapplication:ON org.mitk.planarfigure:ON org.mitk.gui.qt.datamanager:ON org.mitk.gui.qt.igtnavigationtoolmanager:OFF org.mitk.gui.qt.igttrackingtoolbox:OFF org.mitk.gui.qt.regiongrowing:OFF - ) + org.mitk.gui.qt.igttutorial:OFF + ) \ No newline at end of file diff --git a/Modules/Bundles/org.mitk.gui.qt.igttutorial/CMakeLists.txt b/Modules/Bundles/org.mitk.gui.qt.igttutorial/CMakeLists.txt index 7401239daf..d4348126a9 100644 --- a/Modules/Bundles/org.mitk.gui.qt.igttutorial/CMakeLists.txt +++ b/Modules/Bundles/org.mitk.gui.qt.igttutorial/CMakeLists.txt @@ -1 +1 @@ -MACRO_CREATE_MITK_PLUGIN(QmitkExt MitkIGT) +# The project name must correspond to the directory name of your plug-in # and must not contain periods. PROJECT(org_mitk_gui_qt_igttutorial) MACRO_CREATE_MITK_CTK_PLUGIN( EXPORT_DIRECTIVE IGTTUTORIAL_EXPORT EXPORTED_INCLUDE_SUFFIXES src MODULE_DEPENDENCIES QmitkExt MitkIGT ) \ No newline at end of file diff --git a/Modules/Bundles/org.mitk.gui.qt.igttutorial/META-INF/MANIFEST.MF b/Modules/Bundles/org.mitk.gui.qt.igttutorial/META-INF/MANIFEST.MF deleted file mode 100644 index 409b249241..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.igttutorial/META-INF/MANIFEST.MF +++ /dev/null @@ -1,7 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Name: Image Guided Therapy Tutorial -Bundle-SymbolicName: org.mitk.gui.qt.igttutorial -Bundle-Version: 0.1 -Bundle-Vendor: DKFZ, Medical and Biological Informatics -Require-Bundle: org.mitk.gui.qt.common -Bundle-Activator: diff --git a/Modules/Bundles/org.mitk.gui.qt.igttutorial/files.cmake b/Modules/Bundles/org.mitk.gui.qt.igttutorial/files.cmake index 5de20f3dd5..c2f98cc6e0 100644 --- a/Modules/Bundles/org.mitk.gui.qt.igttutorial/files.cmake +++ b/Modules/Bundles/org.mitk.gui.qt.igttutorial/files.cmake @@ -1,35 +1,38 @@ SET(SRC_CPP_FILES - + ) SET(INTERNAL_CPP_FILES QmitkImageGuidedTherapyTutorialView.cpp - + mitkPluginActivator.cpp ) SET(UI_FILES src/internal/QmitkImageGuidedTherapyTutorialViewControls.ui ) SET(MOC_H_FILES src/internal/QmitkImageGuidedTherapyTutorialView.h + src/internal/mitkPluginActivator.h ) -SET(RES_FILES +SET(QRC_FILES #resources/QmitkImageGuidedTherapyTutorialView.qrc ) -SET(RESOURCE_FILES +SET(CACHED_RESOURCE_FILES resources/ImageGuidedTherapyTutorial.png + plugin.xml ) -SET(CPP_FILES manifest.cpp) +SET(CPP_FILES + +) foreach(file ${SRC_CPP_FILES}) SET(CPP_FILES ${CPP_FILES} src/${file}) endforeach(file ${SRC_CPP_FILES}) foreach(file ${INTERNAL_CPP_FILES}) SET(CPP_FILES ${CPP_FILES} src/internal/${file}) endforeach(file ${INTERNAL_CPP_FILES}) - diff --git a/Modules/Bundles/org.mitk.gui.qt.igttutorial/manifest.cpp b/Modules/Bundles/org.mitk.gui.qt.igttutorial/manifest.cpp deleted file mode 100644 index f6ddfa89c2..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.igttutorial/manifest.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/*========================================================================= - -Program: Medical Imaging & Interaction Toolkit -Language: C++ -Date: $Date: 2009-03-21 19:27:37 +0100 (Sa, 21 Mrz 2009) $ -Version: $Revision: 16719 $ - -Copyright (c) German Cancer Research Center, Division of Medical and -Biological Informatics. All rights reserved. -See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. - -This software is distributed WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ - -#include - -#include -#include "src/internal/QmitkImageGuidedTherapyTutorialView.h" - - -POCO_BEGIN_NAMED_MANIFEST(berryIViewPart, berry::IViewPart) - POCO_EXPORT_CLASS(::QmitkImageGuidedTherapyTutorialView) -POCO_END_MANIFEST diff --git a/Modules/Bundles/org.mitk.gui.qt.igttutorial/manifest_headers.cmake b/Modules/Bundles/org.mitk.gui.qt.igttutorial/manifest_headers.cmake new file mode 100644 index 0000000000..1ffbfabd10 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.igttutorial/manifest_headers.cmake @@ -0,0 +1,5 @@ +set(Plugin-Name "MITK-IGT Tutorial") +set(Plugin-Version "0.1") +set(Plugin-Vendor "DKFZ, Medical and Biological Informatics") +set(Plugin-ContactAddress "http://www.mitk.org") +set(Require-Plugin org.mitk.gui.qt.common) \ No newline at end of file diff --git a/Modules/Bundles/org.mitk.gui.qt.igttutorial/plugin.xml b/Modules/Bundles/org.mitk.gui.qt.igttutorial/plugin.xml index 23e331c17f..df793e674b 100644 --- a/Modules/Bundles/org.mitk.gui.qt.igttutorial/plugin.xml +++ b/Modules/Bundles/org.mitk.gui.qt.igttutorial/plugin.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/Modules/Bundles/org.mitk.gui.qt.igttutorial/src/IgttutorialDll.h b/Modules/Bundles/org.mitk.gui.qt.igttutorial/src/IgttutorialDll.h deleted file mode 100644 index 1d07b09d52..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.igttutorial/src/IgttutorialDll.h +++ /dev/null @@ -1,43 +0,0 @@ -/*========================================================================= - -Program: Medical Imaging & Interaction Toolkit -Language: C++ -Date: $Date: 2009-03-21 19:27:37 +0100 (Sa, 21 Mrz 2009) $ -Version: $Revision: 16719 $ - -Copyright (c) German Cancer Research Center, Division of Medical and -Biological Informatics. All rights reserved. -See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. - -This software is distributed WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ - -#ifndef _IGTTUTORIAL_EXPORT_DLL_H_ -#define _IGTTUTORIAL_EXPORT_DLL_H_ - - -// -// The following block is the standard way of creating macros which make exporting -// from a DLL simpler. All files within this DLL are compiled with the org_mitk_gui_qt_igttutorial_EXPORTS -// symbol defined on the command line. this symbol should not be defined on any project -// that uses this DLL. This way any other project whose source files include this file see -// org_mitk_gui_qt_igttutorial_EXPORTS functions as being imported from a DLL, wheras this DLL sees symbols -// defined with this macro as being exported. -// -#if defined(_WIN32) && !defined(MITK_STATIC) - #if defined(org_mitk_gui_qt_igttutorial_EXPORTS) - #define IGTTUTORIAL_EXPORT __declspec(dllexport) - #else - #define IGTTUTORIAL_EXPORT __declspec(dllimport) - #endif -#endif - - -#if !defined(IGTTUTORIAL_EXPORT) - #define IGTTUTORIAL_EXPORT -#endif - -#endif /*_IGTTUTORIAL_EXPORT_DLL_H_*/ diff --git a/Modules/Bundles/org.mitk.gui.qt.igttutorial/src/internal/QmitkImageGuidedTherapyTutorialView.h b/Modules/Bundles/org.mitk.gui.qt.igttutorial/src/internal/QmitkImageGuidedTherapyTutorialView.h index 916109cadd..cf8d5db58d 100644 --- a/Modules/Bundles/org.mitk.gui.qt.igttutorial/src/internal/QmitkImageGuidedTherapyTutorialView.h +++ b/Modules/Bundles/org.mitk.gui.qt.igttutorial/src/internal/QmitkImageGuidedTherapyTutorialView.h @@ -1,102 +1,106 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2009-03-21 19:27:37 +0100 (Sa, 21 Mrz 2009) $ -Version: $Revision: 16719 $ - +Version: $Revision: 16719 $ + Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef _QMITKIMAGEGUIDEDTHERAPYTUTORIALVIEW_H_INCLUDED #define _QMITKIMAGEGUIDEDTHERAPYTUTORIALVIEW_H_INCLUDED #include #include #include "ui_QmitkImageGuidedTherapyTutorialViewControls.h" #include "../IgttutorialDll.h" #include "mitkTrackingDeviceSource.h" #include "mitkNavigationDataObjectVisualizationFilter.h" /** * \brief QmitkIGTTutorial shows a small typically navigation MITK functionality. * -* Any kind of navigation application will start with the connection to a tracking system +* Any kind of navigation application will start with the connection to a tracking system * and as we do image guided procedures we want to show something on the screen. In this * tutorial we connect to the NDI Polaris tracking system (or alternatively use a virtual tracking device) * and we will show the movement of a tool as cone in the StdMultiWidget editor. -* -* \sa also take a look at the CMakeLists.txt of this functionality to see how to +* +* \sa also take a look at the CMakeLists.txt of this functionality to see how to * link to the mitkIGT library. * \sa QmitkFunctionality * \ingroup Functionalities */ class IGTTUTORIAL_EXPORT QmitkImageGuidedTherapyTutorialView : public QmitkFunctionality -{ +{ // this is needed for all Qt objects that should have a MOC object (everything that derives from QObject) Q_OBJECT - - public: + + public: static const std::string VIEW_ID; QmitkImageGuidedTherapyTutorialView(); + QmitkImageGuidedTherapyTutorialView(const QmitkImageGuidedTherapyTutorialView& other) + { + Q_UNUSED(other) + throw std::runtime_error("Copy constructor not implemented"); + } virtual ~QmitkImageGuidedTherapyTutorialView(); virtual void CreateQtPartControl(QWidget *parent); - /// \brief Creation of the connections of main and control widget + /// \brief Creation of the connections of main and control widget virtual void CreateConnections(); /// \brief Called when the functionality is activated virtual void Activated(); - + virtual void Deactivated(); virtual void StdMultiWidgetAvailable (QmitkStdMultiWidget &stdMultiWidget); virtual void StdMultiWidgetNotAvailable(); -protected slots: - +protected slots: + /** * \brief Execute MITK-IGT Tutorial */ void OnStartIGT(); /** * \brief stop IGT scene and clean up */ void OnStopIGT(); /** * \brief timer based update of IGT scene */ void OnTimer(); - -protected: - + +protected: + Ui::QmitkImageGuidedTherapyTutorialViewControls* m_Controls; QmitkStdMultiWidget* m_MultiWidget; ///< our display widget mitk::TrackingDeviceSource::Pointer m_Source; ///< source filer that connects to the tracking device mitk::NavigationDataObjectVisualizationFilter::Pointer m_Visualizer; ///< visualization filter uses output from m_Source QTimer* m_Timer; ///< timer for continuous tracking update }; #endif // _QMITKIMAGEGUIDEDTHERAPYTUTORIALVIEW_H_INCLUDED - diff --git a/Modules/Bundles/org.mitk.gui.qt.igttutorial/src/internal/mitkPluginActivator.cpp b/Modules/Bundles/org.mitk.gui.qt.igttutorial/src/internal/mitkPluginActivator.cpp new file mode 100644 index 0000000000..be634101a5 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.igttutorial/src/internal/mitkPluginActivator.cpp @@ -0,0 +1,20 @@ +#include "mitkPluginActivator.h" +#include "QmitkImageGuidedTherapyTutorialView.h" + +#include + +namespace mitk { + +void PluginActivator::start(ctkPluginContext* context) +{ + BERRY_REGISTER_EXTENSION_CLASS(QmitkImageGuidedTherapyTutorialView, context) +} + +void PluginActivator::stop(ctkPluginContext* context) +{ + Q_UNUSED(context) +} + +} + +Q_EXPORT_PLUGIN2(org_mitk_gui_qt_igttutorial, mitk::PluginActivator) \ No newline at end of file diff --git a/Modules/Bundles/org.mitk.gui.qt.igttutorial/src/internal/mitkPluginActivator.h b/Modules/Bundles/org.mitk.gui.qt.igttutorial/src/internal/mitkPluginActivator.h new file mode 100644 index 0000000000..70c968b98e --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.igttutorial/src/internal/mitkPluginActivator.h @@ -0,0 +1,23 @@ +#ifndef MITKPLUGINACTIVATOR_H +#define MITKPLUGINACTIVATOR_H + +#include + +namespace mitk { + +class PluginActivator : + public QObject, public ctkPluginActivator +{ + Q_OBJECT + Q_INTERFACES(ctkPluginActivator) + +public: + + void start(ctkPluginContext* context); + void stop(ctkPluginContext* context); + +}; // PluginActivator + +} + +#endif // MITKPLUGINACTIVATOR_H \ No newline at end of file