diff --git a/Plugins/org.mitk.gui.qt.exampleplugin/CMakeLists.txt b/Plugins/org.mitk.gui.qt.exampleplugin/CMakeLists.txt
new file mode 100644
index 0000000000..5a4ef3741d
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.exampleplugin/CMakeLists.txt
@@ -0,0 +1,7 @@
+project(org_mitk_gui_qt_exampleplugin)
+
+mitk_create_plugin(
+ EXPORT_DIRECTIVE EXAMPLEPLUGIN_EXPORT
+ EXPORTED_INCLUDE_SUFFIXES src
+ MODULE_DEPENDS MitkQtWidgetsExt
+)
diff --git a/Plugins/org.mitk.gui.qt.exampleplugin/documentation/UserManual/Manual.dox b/Plugins/org.mitk.gui.qt.exampleplugin/documentation/UserManual/Manual.dox
new file mode 100644
index 0000000000..b5f52b08e2
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.exampleplugin/documentation/UserManual/Manual.dox
@@ -0,0 +1,17 @@
+/**
+\page org_mitk_gui_qt_exampleplugin The Exampleplugin
+
+\imageMacro{icon.png,"Icon of Exampleplugin",2.00}
+
+\tableofcontents
+
+\section org_mitk_gui_qt_examplepluginOverview Overview
+Describe the features of your awesome plugin here
+
+- Increases productivity
+
- Creates beautiful images
+
- Generates PhD thesis
+
- Brings world peace
+
+
+*/
diff --git a/Plugins/org.mitk.gui.qt.exampleplugin/documentation/UserManual/icon.xpm b/Plugins/org.mitk.gui.qt.exampleplugin/documentation/UserManual/icon.xpm
new file mode 100644
index 0000000000..9057c20bc6
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.exampleplugin/documentation/UserManual/icon.xpm
@@ -0,0 +1,21 @@
+/* XPM */
+static const char * icon_xpm[] = {
+"16 16 2 1",
+" c #FF0000",
+". c #000000",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/Plugins/org.mitk.gui.qt.exampleplugin/documentation/doxygen/modules.dox b/Plugins/org.mitk.gui.qt.exampleplugin/documentation/doxygen/modules.dox
new file mode 100644
index 0000000000..edc0d79003
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.exampleplugin/documentation/doxygen/modules.dox
@@ -0,0 +1,16 @@
+/**
+ \defgroup org_mitk_gui_qt_exampleplugin org.mitk.gui.qt.exampleplugin
+ \ingroup MITKPlugins
+
+ \brief Describe your plugin here.
+
+*/
+
+/**
+ \defgroup org_mitk_gui_qt_exampleplugin_internal Internal
+ \ingroup org_mitk_gui_qt_exampleplugin
+
+ \brief This subcategory includes the internal classes of the org.mitk.gui.qt.exampleplugin plugin. Other
+ plugins must not rely on these classes. They contain implementation details and their interface
+ may change at any time. We mean it.
+*/
diff --git a/Plugins/org.mitk.gui.qt.exampleplugin/files.cmake b/Plugins/org.mitk.gui.qt.exampleplugin/files.cmake
new file mode 100644
index 0000000000..fd65fd8739
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.exampleplugin/files.cmake
@@ -0,0 +1,42 @@
+set(SRC_CPP_FILES
+
+)
+
+set(INTERNAL_CPP_FILES
+ org_mitk_gui_qt_exampleplugin_Activator.cpp
+ ExampleView.cpp
+)
+
+set(UI_FILES
+ src/internal/ExampleViewControls.ui
+)
+
+set(MOC_H_FILES
+ src/internal/org_mitk_gui_qt_exampleplugin_Activator.h
+ src/internal/ExampleView.h
+)
+
+# list of resource files which can be used by the plug-in
+# system without loading the plug-ins shared library,
+# for example the icon used in the menu and tabs for the
+# plug-in views in the workbench
+set(CACHED_RESOURCE_FILES
+ resources/icon.xpm
+ plugin.xml
+)
+
+# list of Qt .qrc files which contain additional resources
+# specific to this plugin
+set(QRC_FILES
+
+)
+
+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/Plugins/org.mitk.gui.qt.exampleplugin/manifest_headers.cmake b/Plugins/org.mitk.gui.qt.exampleplugin/manifest_headers.cmake
new file mode 100644
index 0000000000..5980a48217
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.exampleplugin/manifest_headers.cmake
@@ -0,0 +1,5 @@
+set(Plugin-Name "Exampleplugin")
+set(Plugin-Version "0.1")
+set(Plugin-Vendor "DKFZ")
+set(Plugin-ContactAddress "")
+set(Require-Plugin org.mitk.gui.qt.common)
diff --git a/Plugins/org.mitk.gui.qt.exampleplugin/plugin.xml b/Plugins/org.mitk.gui.qt.exampleplugin/plugin.xml
new file mode 100644
index 0000000000..ecdc330c5a
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.exampleplugin/plugin.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
diff --git a/Plugins/org.mitk.gui.qt.exampleplugin/resources/icon.xpm b/Plugins/org.mitk.gui.qt.exampleplugin/resources/icon.xpm
new file mode 100644
index 0000000000..9057c20bc6
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.exampleplugin/resources/icon.xpm
@@ -0,0 +1,21 @@
+/* XPM */
+static const char * icon_xpm[] = {
+"16 16 2 1",
+" c #FF0000",
+". c #000000",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/ExampleView.cpp b/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/ExampleView.cpp
new file mode 100644
index 0000000000..d07989e916
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/ExampleView.cpp
@@ -0,0 +1,102 @@
+/*===================================================================
+
+The Medical Imaging Interaction Toolkit (MITK)
+
+Copyright (c) German Cancer Research Center,
+Division of Medical and Biological Informatics.
+All rights reserved.
+
+This software is distributed WITHOUT ANY WARRANTY; without
+even the implied warranty of MERCHANTABILITY or FITNESS FOR
+A PARTICULAR PURPOSE.
+
+See LICENSE.txt or http://www.mitk.org for details.
+
+===================================================================*/
+
+
+// Blueberry
+#include
+#include
+
+// Qmitk
+#include "ExampleView.h"
+
+// Qt
+#include
+
+// mitk image
+#include
+
+const std::string ExampleView::VIEW_ID = "org.mitk.views.exampleview";
+
+void ExampleView::SetFocus()
+{
+ m_Controls.buttonPerformImageProcessing->setFocus();
+}
+
+void ExampleView::CreateQtPartControl(QWidget *parent)
+{
+ // create GUI widgets from the Qt Designer's .ui file
+ m_Controls.setupUi(parent);
+ connect(m_Controls.buttonPerformImageProcessing, &QPushButton::clicked, this, &ExampleView::DoImageProcessing);
+}
+
+void ExampleView::OnSelectionChanged(berry::IWorkbenchPart::Pointer /*source*/,
+ const QList &nodes)
+{
+ // iterate all selected objects, adjust warning visibility
+ foreach (mitk::DataNode::Pointer node, nodes)
+ {
+ if (node.IsNotNull() && dynamic_cast(node->GetData()))
+ {
+ m_Controls.labelWarning->setVisible(false);
+ m_Controls.buttonPerformImageProcessing->setEnabled(true);
+ return;
+ }
+ }
+
+ m_Controls.labelWarning->setVisible(true);
+ m_Controls.buttonPerformImageProcessing->setEnabled(false);
+}
+
+void ExampleView::DoImageProcessing()
+{
+ QList nodes = this->GetDataManagerSelection();
+ if (nodes.empty())
+ return;
+
+ mitk::DataNode *node = nodes.front();
+
+ if (!node)
+ {
+ // Nothing selected. Inform the user and return
+ QMessageBox::information(nullptr, "Template", "Please load and select an image before starting image processing.");
+ return;
+ }
+
+ // here we have a valid mitk::DataNode
+
+ // a node itself is not very useful, we need its data item (the image)
+ mitk::BaseData *data = node->GetData();
+ if (data)
+ {
+ // test if this data item is an image or not (could also be a surface or something totally different)
+ mitk::Image *image = dynamic_cast(data);
+ if (image)
+ {
+ std::stringstream message;
+ std::string name;
+ message << "Performing image processing for image ";
+ if (node->GetName(name))
+ {
+ // a property called "name" was found for this DataNode
+ message << "'" << name << "'";
+ }
+ message << ".";
+ MITK_INFO << message.str();
+
+ // actually do something here...
+ }
+ }
+}
diff --git a/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/ExampleView.h b/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/ExampleView.h
new file mode 100644
index 0000000000..adf8e39f67
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/ExampleView.h
@@ -0,0 +1,59 @@
+/*===================================================================
+
+The Medical Imaging Interaction Toolkit (MITK)
+
+Copyright (c) German Cancer Research Center,
+Division of Medical and Biological Informatics.
+All rights reserved.
+
+This software is distributed WITHOUT ANY WARRANTY; without
+even the implied warranty of MERCHANTABILITY or FITNESS FOR
+A PARTICULAR PURPOSE.
+
+See LICENSE.txt or http://www.mitk.org for details.
+
+===================================================================*/
+
+
+#ifndef ExampleView_h
+#define ExampleView_h
+
+#include
+
+#include
+
+#include "ui_ExampleViewControls.h"
+
+/**
+ \brief ExampleView
+
+ \warning This class is not yet documented. Use "git blame" and ask the author to provide basic documentation.
+
+ \sa QmitkAbstractView
+ \ingroup ${plugin_target}_internal
+*/
+class ExampleView : public QmitkAbstractView
+{
+ // 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;
+
+protected:
+ virtual void CreateQtPartControl(QWidget *parent) override;
+
+ virtual void SetFocus() override;
+
+ /// \brief called by QmitkFunctionality when DataManager's selection has changed
+ virtual void OnSelectionChanged(berry::IWorkbenchPart::Pointer source,
+ const QList &nodes) override;
+
+ /// \brief Called when the user clicks the GUI button
+ void DoImageProcessing();
+
+ Ui::ExampleViewControls m_Controls;
+};
+
+#endif // ExampleView_h
diff --git a/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/ExampleViewControls.ui b/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/ExampleViewControls.ui
new file mode 100644
index 0000000000..2b5d3f6ca5
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/ExampleViewControls.ui
@@ -0,0 +1,64 @@
+
+
+ ExampleViewControls
+
+
+
+ 0
+ 0
+ 222
+ 161
+
+
+
+
+ 0
+ 0
+
+
+
+ QmitkTemplate
+
+
+ -
+
+
+ QLabel { color: rgb(255, 0, 0) }
+
+
+ Please select an image!
+
+
+
+ -
+
+
+ Do image processing
+
+
+ Do Something
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Expanding
+
+
+
+ 20
+ 220
+
+
+
+
+
+
+
+
+
+
diff --git a/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/org_mitk_gui_qt_exampleplugin_Activator.cpp b/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/org_mitk_gui_qt_exampleplugin_Activator.cpp
new file mode 100644
index 0000000000..c0c95c2e20
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/org_mitk_gui_qt_exampleplugin_Activator.cpp
@@ -0,0 +1,29 @@
+/*===================================================================
+
+The Medical Imaging Interaction Toolkit (MITK)
+
+Copyright (c) German Cancer Research Center,
+Division of Medical and Biological Informatics.
+All rights reserved.
+
+This software is distributed WITHOUT ANY WARRANTY; without
+even the implied warranty of MERCHANTABILITY or FITNESS FOR
+A PARTICULAR PURPOSE.
+
+See LICENSE.txt or http://www.mitk.org for details.
+
+===================================================================*/
+
+
+#include "org_mitk_gui_qt_exampleplugin_Activator.h"
+#include "ExampleView.h"
+
+namespace mitk
+{
+ void org_mitk_gui_qt_exampleplugin_Activator::start(ctkPluginContext *context)
+ {
+ BERRY_REGISTER_EXTENSION_CLASS(ExampleView, context)
+ }
+
+ void org_mitk_gui_qt_exampleplugin_Activator::stop(ctkPluginContext *context) { Q_UNUSED(context) }
+}
diff --git a/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/org_mitk_gui_qt_exampleplugin_Activator.h b/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/org_mitk_gui_qt_exampleplugin_Activator.h
new file mode 100644
index 0000000000..d9976e7658
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/org_mitk_gui_qt_exampleplugin_Activator.h
@@ -0,0 +1,38 @@
+/*===================================================================
+
+The Medical Imaging Interaction Toolkit (MITK)
+
+Copyright (c) German Cancer Research Center,
+Division of Medical and Biological Informatics.
+All rights reserved.
+
+This software is distributed WITHOUT ANY WARRANTY; without
+even the implied warranty of MERCHANTABILITY or FITNESS FOR
+A PARTICULAR PURPOSE.
+
+See LICENSE.txt or http://www.mitk.org for details.
+
+===================================================================*/
+
+
+#ifndef org_mitk_gui_qt_exampleplugin_Activator_h
+#define org_mitk_gui_qt_exampleplugin_Activator_h
+
+#include
+
+namespace mitk
+{
+ class org_mitk_gui_qt_exampleplugin_Activator : public QObject, public ctkPluginActivator
+ {
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_exampleplugin")
+ Q_INTERFACES(ctkPluginActivator)
+
+ public:
+ void start(ctkPluginContext *context);
+ void stop(ctkPluginContext *context);
+
+ }; // org_mitk_gui_qt_exampleplugin_Activator
+}
+
+#endif // org_mitk_gui_qt_exampleplugin_Activator_h