diff --git a/Modules/Bundles/CMakeLists.txt b/Modules/Bundles/CMakeLists.txt index 0d77175930..863e18e312 100644 --- a/Modules/Bundles/CMakeLists.txt +++ b/Modules/Bundles/CMakeLists.txt @@ -1,54 +1,55 @@ 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.gui.qt.segmentation org.mitk.planarfigure org.mitk.gui.qt.igtnavigationtoolmanager org.mitk.gui.qt.igttrackingtoolbox org.mitk.gui.qt.igttoolpairnavigation org.mitk.gui.qt.basicimageprocessing org.mitk.gui.qt.colourimageprocessing org.mitk.gui.qt.navigationdataplayer org.mitk.gui.qt.tofutil org.mitk.gui.qt.imagenavigator org.mitk.gui.qt.moviemaker org.mitk.gui.qt.deformableregistration org.mitk.gui.qt.rigidregistration org.mitk.gui.qt.imagestatistics + org.mitk.gui.qt.materialeditor ) 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 0b340558ea..776b884a3e 100644 --- a/Modules/Bundles/PluginList.cmake +++ b/Modules/Bundles/PluginList.cmake @@ -1,25 +1,26 @@ 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.gui.qt.segmentation:OFF 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:OFF org.mitk.gui.qt.deformableregistration:ON org.mitk.gui.qt.rigidregistration:ON org.mitk.gui.qt.imagestatistics:OFF org.mitk.gui.qt.volumetry:OFF + org.mitk.gui.qt.materialeditor:OFF ) diff --git a/Modules/Bundles/org.mitk.gui.qt.materialeditor/CMakeLists.txt b/Modules/Bundles/org.mitk.gui.qt.materialeditor/CMakeLists.txt index 64bffecf36..d1cdb61faf 100644 --- a/Modules/Bundles/org.mitk.gui.qt.materialeditor/CMakeLists.txt +++ b/Modules/Bundles/org.mitk.gui.qt.materialeditor/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_materialeditor) -MACRO_CREATE_MITK_PLUGIN(Qmitk) +MACRO_CREATE_MITK_CTK_PLUGIN( + EXPORT_DIRECTIVE MATERIALEDITOR_EXPORTS + EXPORTED_INCLUDE_SUFFIXES src + MODULE_DEPENDENCIES Qmitk +) diff --git a/Modules/Bundles/org.mitk.gui.qt.materialeditor/META-INF/MANIFEST.MF b/Modules/Bundles/org.mitk.gui.qt.materialeditor/META-INF/MANIFEST.MF deleted file mode 100644 index ea8811b4f0..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.materialeditor/META-INF/MANIFEST.MF +++ /dev/null @@ -1,7 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Name: Surface Material Editor -Bundle-SymbolicName: org.mitk.gui.qt.materialeditor -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.materialeditor/files.cmake b/Modules/Bundles/org.mitk.gui.qt.materialeditor/files.cmake index 36ac7c3643..5ff2c78cd7 100644 --- a/Modules/Bundles/org.mitk.gui.qt.materialeditor/files.cmake +++ b/Modules/Bundles/org.mitk.gui.qt.materialeditor/files.cmake @@ -1,35 +1,34 @@ SET(SRC_CPP_FILES ) SET(INTERNAL_CPP_FILES QmitkMITKSurfaceMaterialEditorView.cpp - + mitkMaterialEditorPluginActivator.cpp ) SET(UI_FILES src/internal/QmitkMITKSurfaceMaterialEditorViewControls.ui ) SET(MOC_H_FILES src/internal/QmitkMITKSurfaceMaterialEditorView.h + src/internal/mitkMaterialEditorPluginActivator.h ) -SET(RESOURCE_FILES +SET(CACHED_RESOURCE_FILES resources/SurfaceMaterialEditor.png + plugin.xml ) -SET(RES_FILES +SET(QRC_FILES resources/QmitkMITKSurfaceMaterialEditorView.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.materialeditor/manifest.cpp b/Modules/Bundles/org.mitk.gui.qt.materialeditor/manifest.cpp deleted file mode 100644 index 795e24d6cd..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.materialeditor/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/QmitkMITKSurfaceMaterialEditorView.h" - - -POCO_BEGIN_NAMED_MANIFEST(berryIViewPart, berry::IViewPart) - POCO_EXPORT_CLASS(::QmitkMITKSurfaceMaterialEditorView) -POCO_END_MANIFEST diff --git a/Modules/Bundles/org.mitk.gui.qt.materialeditor/manifest_headers.cmake b/Modules/Bundles/org.mitk.gui.qt.materialeditor/manifest_headers.cmake new file mode 100644 index 0000000000..8f72fc2fe3 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.materialeditor/manifest_headers.cmake @@ -0,0 +1,5 @@ +set(Plugin-Name "MITK Material Editor") +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.materialeditor/plugin.xml b/Modules/Bundles/org.mitk.gui.qt.materialeditor/plugin.xml index afb7807725..2046abdd81 100644 --- a/Modules/Bundles/org.mitk.gui.qt.materialeditor/plugin.xml +++ b/Modules/Bundles/org.mitk.gui.qt.materialeditor/plugin.xml @@ -1,11 +1,11 @@ diff --git a/Modules/Bundles/org.mitk.gui.qt.materialeditor/src/MaterialeditorDll.h b/Modules/Bundles/org.mitk.gui.qt.materialeditor/src/MaterialeditorDll.h deleted file mode 100644 index d0685e818a..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.materialeditor/src/MaterialeditorDll.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 _MATERIALEDITOR_EXPORTS_DLL_H_ -#define _MATERIALEDITOR_EXPORTS_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_materialeditor_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_materialeditor_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_materialeditor_EXPORTS) - #define MATERIALEDITOR_EXPORTS __declspec(dllexport) - #else - #define MATERIALEDITOR_EXPORTS __declspec(dllimport) - #endif -#endif - - -#if !defined(MATERIALEDITOR_EXPORTS) - #define MATERIALEDITOR_EXPORTS -#endif - -#endif /*_MATERIALEDITOR_EXPORTS_DLL_H_*/ diff --git a/Modules/Bundles/org.mitk.gui.qt.materialeditor/src/internal/QmitkMITKSurfaceMaterialEditorView.h b/Modules/Bundles/org.mitk.gui.qt.materialeditor/src/internal/QmitkMITKSurfaceMaterialEditorView.h index 0b16d668b0..07f5f6dc6a 100644 --- a/Modules/Bundles/org.mitk.gui.qt.materialeditor/src/internal/QmitkMITKSurfaceMaterialEditorView.h +++ b/Modules/Bundles/org.mitk.gui.qt.materialeditor/src/internal/QmitkMITKSurfaceMaterialEditorView.h @@ -1,125 +1,131 @@ /*========================================================================= 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 _QMITKMITKSURFACEMATERIALEDITORVIEW_H_INCLUDED #define _QMITKMITKSURFACEMATERIALEDITORVIEW_H_INCLUDED #include #include #include #include #include "ui_QmitkMITKSurfaceMaterialEditorViewControls.h" /* #include #include #include #include #include #include #include "QtGui/QMenubarUpdatedEvent" */ #include "QmitkRenderWindow.h" #include "mitkCommon.h" #include "mitkDataStorage.h" #include "mitkDataNode.h" #include "mitkShaderProperty.h" #include "mitkSurface.h" #include "vtkRenderer.h" #include "vtkTextActor.h" /*! \brief QmitkMITKSurfaceMaterialEditorView \sa QmitkFunctionality \ingroup Functionalities */ class QmitkMITKSurfaceMaterialEditorView : 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; QmitkMITKSurfaceMaterialEditorView(); + QmitkMITKSurfaceMaterialEditorView(const QmitkMITKSurfaceMaterialEditorView& other) + { + Q_UNUSED(other) + throw std::runtime_error("Copy constructor not implemented"); + } + virtual ~QmitkMITKSurfaceMaterialEditorView(); 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(); virtual void OnSelectionChanged(std::vector nodes); protected slots: void SurfaceSelected(); protected: Ui::QmitkMITKSurfaceMaterialEditorViewControls* m_Controls; QmitkStdMultiWidget* m_MultiWidget; private: mitk::Surface::Pointer m_Surface; mitk::DataStorage::Pointer m_DataTree; mitk::DataNode::Pointer m_DataNode; mitk::DataNode::Pointer m_SelectedDataNode; std::list fixedProperties; std::list shaderProperties; unsigned long observerIndex; bool observerAllocated; mitk::ShaderProperty::Pointer observedProperty; void InitPreviewWindow(); int usedTimer; void timerEvent( QTimerEvent *e ); void RefreshPropertiesList(); void postRefresh(); void shaderEnumChange(const itk::Object *caller, const itk::EventObject &event); berry::IStructuredSelection::ConstPointer m_CurrentSelection; berry::ISelectionListener::Pointer m_SelectionListener; }; #endif // _QMITKMITKSURFACEMATERIALEDITORVIEW_H_INCLUDED diff --git a/Modules/Bundles/org.mitk.gui.qt.materialeditor/src/internal/mitkMaterialEditorPluginActivator.cpp b/Modules/Bundles/org.mitk.gui.qt.materialeditor/src/internal/mitkMaterialEditorPluginActivator.cpp new file mode 100644 index 0000000000..4b302006d9 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.materialeditor/src/internal/mitkMaterialEditorPluginActivator.cpp @@ -0,0 +1,21 @@ +#include "mitkMaterialEditorPluginActivator.h" + +#include "QmitkMITKSurfaceMaterialEditorView.h" + +#include + +namespace mitk { + + void MaterialEditorPluginActivator::start(ctkPluginContext* context) + { + BERRY_REGISTER_EXTENSION_CLASS(QmitkMITKSurfaceMaterialEditorView, context) + } + + void MaterialEditorPluginActivator::stop(ctkPluginContext* context) + { + Q_UNUSED(context) + } + +} + +Q_EXPORT_PLUGIN2(org_mitk_gui_qt_materialeditor, mitk::MaterialEditorPluginActivator) \ No newline at end of file diff --git a/Modules/Bundles/org.mitk.gui.qt.materialeditor/src/internal/mitkMaterialEditorPluginActivator.h b/Modules/Bundles/org.mitk.gui.qt.materialeditor/src/internal/mitkMaterialEditorPluginActivator.h new file mode 100644 index 0000000000..fa8dfef736 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.materialeditor/src/internal/mitkMaterialEditorPluginActivator.h @@ -0,0 +1,23 @@ +#ifndef MITKMATERIALEDITORPLUGINACTIVATOR_H +#define MITKMATERIALEDITORPLUGINACTIVATOR_H + +#include + +namespace mitk { + + class MaterialEditorPluginActivator : + public QObject, public ctkPluginActivator + { + Q_OBJECT + Q_INTERFACES(ctkPluginActivator) + + public: + + void start(ctkPluginContext* context); + void stop(ctkPluginContext* context); + + }; // MaterialEditorPluginActivator + +} + +#endif // MITKMATERIALEDITORPLUGINACTIVATOR_H \ No newline at end of file