diff --git a/Modules/Bundles/CMakeLists.txt b/Modules/Bundles/CMakeLists.txt index 9ac77952a4..be6be55104 100644 --- a/Modules/Bundles/CMakeLists.txt +++ b/Modules/Bundles/CMakeLists.txt @@ -1,44 +1,45 @@ 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.igttoolpairnavigation + org.mitk.gui.qt.navigationdataplayer ) 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) diff --git a/Modules/Bundles/PluginList.cmake b/Modules/Bundles/PluginList.cmake index f27a357751..9e23bc5cec 100644 --- a/Modules/Bundles/PluginList.cmake +++ b/Modules/Bundles/PluginList.cmake @@ -1,14 +1,15 @@ 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.igttoolpairnavigation:ON org.mitk.gui.qt.igttrackingtoolbox:OFF org.mitk.gui.qt.regiongrowing:OFF + org.mitk.gui.qt.navigationdataplayer:ON ) diff --git a/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/CMakeLists.txt b/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/CMakeLists.txt index 3fa8aadb8b..8f027a3ce9 100644 --- a/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/CMakeLists.txt +++ b/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/CMakeLists.txt @@ -1,2 +1,6 @@ +PROJECT(org_mitk_gui_qt_navigationdataplayer) -MACRO_CREATE_MITK_PLUGIN(QmitkExt MitkIGTUI MitkIGT) \ No newline at end of file +MACRO_CREATE_MITK_CTK_PLUGIN( + EXPORT_DIRECTIVE MITK_QT_NAVIGATIONDATAPLAYER + EXPORTED_INCLUDE_SUFFIXES src + MODULE_DEPENDENCIES QmitkExt MitkIGTUI MitkIGT) diff --git a/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/files.cmake b/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/files.cmake index d17000428e..2d06a02052 100644 --- a/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/files.cmake +++ b/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/files.cmake @@ -1,35 +1,37 @@ SET(SRC_CPP_FILES ) SET(INTERNAL_CPP_FILES + mitkNavigationDataPlayerPluginActivator.cpp QmitkNavigationDataPlayerView.cpp - ) SET(UI_FILES src/internal/QmitkNavigationDataPlayerViewControls.ui ) SET(MOC_H_FILES src/internal/QmitkNavigationDataPlayerView.h + src/internal/mitkNavigationDataPlayerPluginActivator.h ) -SET(RESOURCE_FILES +SET(CACHED_RESOURCE_FILES + plugin.xml resources/icon.png ) -SET(RES_FILES +SET(QRC_FILES resources/QmitkNavigationDataPlayerView.qrc ) -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.navigationdataplayer/manifest.cpp b/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/manifest.cpp deleted file mode 100644 index 4860b13718..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/manifest.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/*========================================================================= - -Program: Medical Imaging & Interaction Toolkit -Language: C++ -Date: $Date$ -Version: $Revision$ - -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 "src/internal/QmitkNavigationDataPlayerView.h" - -POCO_BEGIN_NAMED_MANIFEST(berryIViewPart, berry::IViewPart) - POCO_EXPORT_CLASS(::QmitkNavigationDataPlayerView) -POCO_END_MANIFEST diff --git a/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/plugin.xml b/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/plugin.xml index 82831636fc..b3f0bf4277 100644 --- a/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/plugin.xml +++ b/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/plugin.xml @@ -1,12 +1,12 @@ diff --git a/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/src/NavigationdataplayerDll.h b/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/src/NavigationdataplayerDll.h deleted file mode 100644 index cd105c39da..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/src/NavigationdataplayerDll.h +++ /dev/null @@ -1,43 +0,0 @@ -/*========================================================================= - -Program: Medical Imaging & Interaction Toolkit -Language: C++ -Date: $Date$ -Version: $Revision$ - -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 _NAVIGATIONDATAPLAYER_EXPORT_DLL_H_ -#define _NAVIGATIONDATAPLAYER_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_navigationdataplayer_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_navigationdataplayer_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_navigationdataplayer_EXPORTS) - #define NAVIGATIONDATAPLAYER_EXPORT __declspec(dllexport) - #else - #define NAVIGATIONDATAPLAYER_EXPORT __declspec(dllimport) - #endif -#endif - - -#if !defined(NAVIGATIONDATAPLAYER_EXPORT) - #define NAVIGATIONDATAPLAYER_EXPORT -#endif - -#endif /*_NAVIGATIONDATAPLAYER_EXPORT_DLL_H_*/ diff --git a/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/src/internal/QmitkNavigationDataPlayerView.h b/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/src/internal/QmitkNavigationDataPlayerView.h index 57dc0d41d5..1920f42db8 100644 --- a/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/src/internal/QmitkNavigationDataPlayerView.h +++ b/Modules/Bundles/org.mitk.gui.qt.navigationdataplayer/src/internal/QmitkNavigationDataPlayerView.h @@ -1,179 +1,184 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2010-03-31 16:40:27 +0200 (Mi, 31 Mrz 2010) $ Version: $Revision: 21975 $ 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 QmitkNavigationDataPlayerView_h #define QmitkNavigationDataPlayerView_h #include //Qmitk #include #include #include #include // ui #include "ui_QmitkNavigationDataPlayerViewControls.h" //mitk #include #include /*! \brief QmitkNavigationDataPlayerView \warning This application module is not yet documented. Use "svn blame/praise/annotate" and ask the author to provide basic documentation. \sa QmitkFunctionality \ingroup Functionalities */ class QmitkNavigationDataPlayerView : public QmitkFunctionality { // this is needed for all Qt objects that should have a Qt meta-object // (everything that derives from QObject and wants to have signal/slots) Q_OBJECT public: static const std::string VIEW_ID; QmitkNavigationDataPlayerView(); + QmitkNavigationDataPlayerView(const QmitkNavigationDataPlayerView& other) + { + Q_UNUSED(other) + throw std::runtime_error("Copy constructor not implemented"); + } virtual ~QmitkNavigationDataPlayerView(); virtual void CreateQtPartControl(QWidget *parent); /** \brief This method creates this bundle's SIGNAL and SLOT connections */ virtual void CreateConnections(); virtual void StdMultiWidgetAvailable (QmitkStdMultiWidget &stdMultiWidget); virtual void StdMultiWidgetNotAvailable(); protected slots: /*! \brief Creates DataNodes for all available playback objects */ void OnCreatePlaybackVisualization(); /*! \brief Assigns position changings from the player widget to the visualization objects */ void OnPerformPlaybackVisualization(); /*! \brief Reinits this player. Cleans all timers and trajectory data */ void OnReinit(); /*! \brief Shows trajectory of tool with index */ void OnShowTrajectory(int index); /*! \brief Cleans trajectory data before playing is started */ void OnPlayingStarted(); /*! \brief Enables or disables trajectory visualization with splines */ void OnEnableSplineTrajectoryMapper(bool enable); protected: enum TrajectoryStyle { Points = 1, Splines = 2 }; void CreateBundleWidgets(QWidget* parent); /** \brief Refreshes the visualization of the playback object DataNodes. */ void RenderScene(); /** \brief Creates representation DataNode with given name and color */ mitk::DataNode::Pointer CreateRepresentationObject( const std::string& name , const mitk::Color color ); /** \brief Adds representation DataNode to the DataStorage */ void AddRepresentationObject(mitk::DataStorage* ds, mitk::DataNode::Pointer reprObject); /** \brief Removes representation DataNode from the DataStorage */ void RemoveRepresentationObject(mitk::DataStorage* ds, mitk::DataNode::Pointer reprObject); /** \brief Adds trajectory DataNode to the DataStorage */ void AddTrajectory(mitk::DataStorage* ds, mitk::DataNode::Pointer trajectoryNode); /** \brief Creates a trajectory DataNode from given PointSet with given name and color */ mitk::DataNode::Pointer CreateTrajectory( mitk::PointSet::Pointer points, const std::string& name, const mitk::Color color ); Ui::QmitkNavigationDataPlayerViewControls* m_Controls; QmitkStdMultiWidget* m_MultiWidget; QmitkIGTPlayerWidget* m_PlayerWidget; ///< this bundle's playback widget mitk::NavigationDataObjectVisualizationFilter::Pointer m_Visualizer; ///< this filter visualizes the navigation data std::vector m_RepresentationObjects; ///< vector for current visualization objects mitk::DataNode::Pointer m_Trajectory; ///< main trajectory visualization DataNode mitk::PointSet::Pointer m_TrajectoryPointSet; ///< PointSet with all points for trajectory int m_TrajectoryIndex; ///< trajectory tool index bool m_ReloadData; ///< flag needed for refresh of visualization if needed bool m_ShowTrajectory; ///< flag needed for trajectory visualization mitk::SplineVtkMapper3D::Pointer m_SplineMapper; ///< spline trajectory mapper mitk::PointSetVtkMapper3D::Pointer m_PointSetMapper; ///< standard trajectroy mapper private: /** \brief Returns color from colorcycle with given index */ mitk::Color GetColorCircleColor(int index); /** \brief Returns the trajectory mapper for the given style if stıle is not Points or Splines NULL will be returned. */ mitk::PointSetVtkMapper3D::Pointer GetTrajectoryMapper(TrajectoryStyle style); }; #endif // _QMITKNAVIGATIONDATAPLAYERVIEW_H_INCLUDED