diff --git a/Modules/Bundles/PluginList.cmake b/Modules/Bundles/PluginList.cmake index 184d21b005..9d629600a4 100644 --- a/Modules/Bundles/PluginList.cmake +++ b/Modules/Bundles/PluginList.cmake @@ -1,20 +1,21 @@ 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 org.mitk.gui.qt.basicimageprocessing:OFF org.mitk.gui.qt.colourimageprocessing:OFF org.mitk.gui.qt.tofutil:OFF org.mitk.gui.qt.imagenavigator:ON org.mitk.gui.qt.moviemaker:ON + org.mitk.gui.qt.volumetry:OFF ) diff --git a/Modules/Bundles/org.mitk.gui.qt.volumetry/CMakeLists.txt b/Modules/Bundles/org.mitk.gui.qt.volumetry/CMakeLists.txt index fba82a3726..cb8a81d45f 100644 --- a/Modules/Bundles/org.mitk.gui.qt.volumetry/CMakeLists.txt +++ b/Modules/Bundles/org.mitk.gui.qt.volumetry/CMakeLists.txt @@ -1,2 +1,9 @@ +# The project name must correspond to the directory name of your plug-in +# and must not contain periods. +PROJECT(org_mitk_gui_qt_volumetry) -MACRO_CREATE_MITK_PLUGIN(QmitkExt) +MACRO_CREATE_MITK_CTK_PLUGIN( + EXPORT_DIRECTIVE VOLUMETRY_EXPORT + EXPORTED_INCLUDE_SUFFIXES src + MODULE_DEPENDENCIES QmitkExt +) \ No newline at end of file diff --git a/Modules/Bundles/org.mitk.gui.qt.volumetry/META-INF/MANIFEST.MF b/Modules/Bundles/org.mitk.gui.qt.volumetry/META-INF/MANIFEST.MF deleted file mode 100644 index 5dcd5fc0dd..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.volumetry/META-INF/MANIFEST.MF +++ /dev/null @@ -1,7 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Name: Volumetry -Bundle-SymbolicName: org.mitk.gui.qt.volumetry -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.volumetry/files.cmake b/Modules/Bundles/org.mitk.gui.qt.volumetry/files.cmake index 0282a1a315..63cb79f877 100644 --- a/Modules/Bundles/org.mitk.gui.qt.volumetry/files.cmake +++ b/Modules/Bundles/org.mitk.gui.qt.volumetry/files.cmake @@ -1,35 +1,34 @@ SET(SRC_CPP_FILES ) SET(INTERNAL_CPP_FILES QmitkVolumetryView.cpp - + mitkVolumetryPluginActivator.cpp ) SET(UI_FILES src/internal/QmitkVolumetryViewControls.ui ) SET(MOC_H_FILES src/internal/QmitkVolumetryView.h + src/internal/mitkVolumetryPluginActivator.h ) -SET(RESOURCE_FILES +SET(CACHED_RESOURCE_FILES resources/volumetryIcon.xpm + plugin.xml ) -SET(RES_FILES +SET(QRC_FILES resources/QmitkVolumetryView.qrc ) -SET(CPP_FILES manifest.cpp) - 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}) - +endforeach(file ${INTERNAL_CPP_FILES}) \ No newline at end of file diff --git a/Modules/Bundles/org.mitk.gui.qt.volumetry/manifest.cpp b/Modules/Bundles/org.mitk.gui.qt.volumetry/manifest.cpp deleted file mode 100644 index 5220c43d43..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.volumetry/manifest.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/*========================================================================= - -Program: Medical Imaging & Interaction Toolkit -Language: C++ -Date: $Date: 2009-05-28 17:19:30 +0200 (Do, 28 Mai 2009) $ -Version: $Revision: 17495 $ - -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/QmitkVolumetryView.h" - - -POCO_BEGIN_NAMED_MANIFEST(berryIViewPart, berry::IViewPart) - POCO_EXPORT_CLASS(::QmitkVolumetryView) -POCO_END_MANIFEST diff --git a/Modules/Bundles/org.mitk.gui.qt.volumetry/manifest_headers.cmake b/Modules/Bundles/org.mitk.gui.qt.volumetry/manifest_headers.cmake new file mode 100644 index 0000000000..c1c1421988 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.volumetry/manifest_headers.cmake @@ -0,0 +1,5 @@ +set(Plugin-Name "MITK Volumetry") +set(Plugin-Version "0.9") +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.volumetry/plugin.xml b/Modules/Bundles/org.mitk.gui.qt.volumetry/plugin.xml index 2179244e56..7f155a86f6 100644 --- a/Modules/Bundles/org.mitk.gui.qt.volumetry/plugin.xml +++ b/Modules/Bundles/org.mitk.gui.qt.volumetry/plugin.xml @@ -1,12 +1,12 @@ diff --git a/Modules/Bundles/org.mitk.gui.qt.volumetry/src/VolumetryDll.h b/Modules/Bundles/org.mitk.gui.qt.volumetry/src/VolumetryDll.h deleted file mode 100644 index d54b8b3430..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.volumetry/src/VolumetryDll.h +++ /dev/null @@ -1,43 +0,0 @@ -/*========================================================================= - -Program: Medical Imaging & Interaction Toolkit -Language: C++ -Date: $Date: 2009-05-28 17:19:30 +0200 (Do, 28 Mai 2009) $ -Version: $Revision: 17495 $ - -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 _VOLUMETRY_EXPORT_DLL_H_ -#define _VOLUMETRY_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_volumetry_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_volumetry_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_volumetry_EXPORTS) - #define VOLUMETRY_EXPORT __declspec(dllexport) - #else - #define VOLUMETRY_EXPORT __declspec(dllimport) - #endif -#endif - - -#if !defined(VOLUMETRY_EXPORT) - #define VOLUMETRY_EXPORT -#endif - -#endif /*_VOLUMETRY_EXPORT_DLL_H_*/ diff --git a/Modules/Bundles/org.mitk.gui.qt.volumetry/src/internal/QmitkVolumetryView.h b/Modules/Bundles/org.mitk.gui.qt.volumetry/src/internal/QmitkVolumetryView.h index be4334e4df..e090d2d82e 100644 --- a/Modules/Bundles/org.mitk.gui.qt.volumetry/src/internal/QmitkVolumetryView.h +++ b/Modules/Bundles/org.mitk.gui.qt.volumetry/src/internal/QmitkVolumetryView.h @@ -1,114 +1,121 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2009-05-28 17:19:30 +0200 (Do, 28 Mai 2009) $ Version: $Revision: 17495 $ 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 _QMITKVOLUMETRYVIEW_H_INCLUDED #define _QMITKVOLUMETRYVIEW_H_INCLUDED #include #include #include "ui_QmitkVolumetryViewControls.h" /*! * \ingroup org_mitk_gui_qt_volumetry_internal * * \brief QmitkVolumetryView * * Document your class here. * * \sa QmitkFunctionality */ class QmitkVolumetryView : public QmitkFunctionality { // this is needed for all Qt objects that should have a MOC object (everything that derives from QObject) Q_OBJECT public: static const std::string VIEW_ID; QmitkVolumetryView(); + QmitkVolumetryView(const QmitkVolumetryView& other) + { + Q_UNUSED(other) + throw std::runtime_error("Copy constructor not implemented"); + } + + virtual ~QmitkVolumetryView(); virtual void CreateQtPartControl(QWidget *parent); /// \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: mitk::Image* GetImage(); mitk::DataNode* GetOverlayNode(); void CreateOverlayChild(); void UpdateSliderLabel(); void UpdateSlider(); const mitk::DataNode* GetImageNode(); protected slots: void OnCalculateVolume(); void OnTimeSeriesButtonClicked(); void OnThresholdSliderChanged( int value ); void OnSaveCsvButtonClicked(); void OnImageSelected(const mitk::DataNode* item); protected: Ui::QmitkVolumetryViewControls* m_Controls; QmitkStdMultiWidget* m_MultiWidget; /// store weak pointer of the DataNode mitk::WeakPointer m_SelectedDataNode; mitk::DataNode::Pointer m_OverlayNode; mitk::DataStorage::Pointer m_DataStorage; }; #endif // _QMITKVOLUMETRYVIEW_H_INCLUDED diff --git a/Modules/Bundles/org.mitk.gui.qt.volumetry/src/internal/mitkVolumetryPluginActivator.cpp b/Modules/Bundles/org.mitk.gui.qt.volumetry/src/internal/mitkVolumetryPluginActivator.cpp new file mode 100644 index 0000000000..10d12c7a49 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.volumetry/src/internal/mitkVolumetryPluginActivator.cpp @@ -0,0 +1,21 @@ +#include "mitkVolumetryPluginActivator.h" + +#include "QmitkVolumetryView.h" + +#include + +namespace mitk { + + void VolumetryPluginActivator::start(ctkPluginContext* context) + { + BERRY_REGISTER_EXTENSION_CLASS(QmitkVolumetryView, context) + } + + void VolumetryPluginActivator::stop(ctkPluginContext* context) + { + Q_UNUSED(context) + } + +} + +Q_EXPORT_PLUGIN2(org_mitk_gui_qt_volumetry, mitk::VolumetryPluginActivator) \ No newline at end of file diff --git a/Modules/Bundles/org.mitk.gui.qt.volumetry/src/internal/mitkVolumetryPluginActivator.h b/Modules/Bundles/org.mitk.gui.qt.volumetry/src/internal/mitkVolumetryPluginActivator.h new file mode 100644 index 0000000000..d37a4557f7 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.volumetry/src/internal/mitkVolumetryPluginActivator.h @@ -0,0 +1,23 @@ +#ifndef MITKVOLUMETRYPLUGINACTIVATOR_H +#define MITKVOLUMETRYPLUGINACTIVATOR_H + +#include + +namespace mitk { + + class VolumetryPluginActivator : + public QObject, public ctkPluginActivator + { + Q_OBJECT + Q_INTERFACES(ctkPluginActivator) + + public: + + void start(ctkPluginContext* context); + void stop(ctkPluginContext* context); + + }; // VolumetryPluginActivator + +} + +#endif // MITKVOLUMETRYPLUGINACTIVATOR_H \ No newline at end of file