diff --git a/Plugins/PluginList.cmake b/Plugins/PluginList.cmake index 548f9f33b4..50874921eb 100644 --- a/Plugins/PluginList.cmake +++ b/Plugins/PluginList.cmake @@ -1,114 +1,115 @@ # Plug-ins must be ordered according to their dependencies set(MITK_PLUGINS org.blueberry.core.runtime:ON org.blueberry.core.expressions:OFF org.blueberry.core.commands:OFF org.blueberry.core.jobs:OFF org.blueberry.ui.qt:OFF org.blueberry.ui.qt.help:ON org.blueberry.ui.qt.log:ON org.blueberry.ui.qt.objectinspector:OFF #org.blueberry.test:ON #org.blueberry.uitest:ON #Testing/org.blueberry.core.runtime.tests:ON #Testing/org.blueberry.osgi.tests:ON org.mitk.core.services:ON org.mitk.gui.common:ON org.mitk.planarfigure:ON org.mitk.core.ext:OFF org.mitk.core.jobs:OFF org.mitk.gui.qt.application:ON org.mitk.gui.qt.coreapplication:OFF org.mitk.gui.qt.ext:OFF org.mitk.gui.qt.extapplication:OFF org.mitk.gui.qt.common:ON org.mitk.gui.qt.stdmultiwidgeteditor:ON org.mitk.gui.qt.common.legacy:OFF org.mitk.gui.qt.cmdlinemodules:OFF org.mitk.gui.qt.chartExample:OFF org.mitk.gui.qt.diffusionimagingapp:OFF org.mitk.gui.qt.datamanager:ON org.mitk.gui.qt.datamanagerlight:OFF org.mitk.gui.qt.datastorageviewertest:OFF org.mitk.gui.qt.properties:ON org.mitk.gui.qt.basicimageprocessing:OFF org.mitk.gui.qt.dicom:OFF org.mitk.gui.qt.dicominspector:OFF org.mitk.gui.qt.diffusionimaging:OFF org.mitk.gui.qt.diffusionimaging.connectomics:OFF org.mitk.gui.qt.diffusionimaging.denoising:OFF org.mitk.gui.qt.diffusionimaging.fiberfox:OFF org.mitk.gui.qt.diffusionimaging.fiberprocessing:OFF org.mitk.gui.qt.diffusionimaging.ivim:OFF org.mitk.gui.qt.diffusionimaging.odfpeaks:OFF org.mitk.gui.qt.diffusionimaging.partialvolume:OFF org.mitk.gui.qt.diffusionimaging.preprocessing:OFF org.mitk.gui.qt.diffusionimaging.reconstruction:OFF org.mitk.gui.qt.diffusionimaging.registration:OFF org.mitk.gui.qt.diffusionimaging.tractography:OFF org.mitk.gui.qt.diffusionimaging.python:OFF org.mitk.gui.qt.dosevisualization:OFF org.mitk.gui.qt.geometrytools:OFF org.mitk.gui.qt.igtexamples:OFF org.mitk.gui.qt.igttracking:OFF org.mitk.gui.qt.lasercontrol:OFF org.mitk.gui.qt.openigtlink:OFF org.mitk.gui.qt.imagecropper:OFF org.mitk.gui.qt.imagenavigator:ON org.mitk.gui.qt.viewnavigator:OFF org.mitk.gui.qt.materialeditor:OFF org.mitk.gui.qt.measurementtoolbox:OFF org.mitk.gui.qt.moviemaker:OFF org.mitk.gui.qt.pointsetinteraction:OFF org.mitk.gui.qt.pointsetinteractionmultispectrum:OFF org.mitk.gui.qt.python:OFF org.mitk.gui.qt.remeshing:OFF org.mitk.gui.qt.segmentation:OFF org.mitk.gui.qt.aicpregistration:OFF org.mitk.gui.qt.renderwindowmanager:OFF org.mitk.gui.qt.toftutorial:OFF org.mitk.gui.qt.tofutil:OFF org.mitk.gui.qt.tubegraph:OFF org.mitk.gui.qt.ugvisualization:OFF org.mitk.gui.qt.photoacoustics.pausviewer:OFF org.mitk.gui.qt.photoacoustics.pausmotioncompensation:OFF org.mitk.gui.qt.photoacoustics.imageprocessing:OFF org.mitk.gui.qt.photoacoustics.simulation:OFF org.mitk.gui.qt.photoacoustics.spectralunmixing:OFF org.mitk.gui.qt.ultrasound:OFF org.mitk.gui.qt.volumevisualization:OFF org.mitk.gui.qt.eventrecorder:OFF org.mitk.gui.qt.xnat:OFF org.mitk.gui.qt.igt.app.echotrack:OFF org.mitk.gui.qt.spectrocamrecorder:OFF org.mitk.gui.qt.classificationsegmentation:OFF org.mitk.gui.qt.overlaymanager:OFF org.mitk.gui.qt.igt.app.hummelprotocolmeasurements:OFF org.mitk.gui.qt.multilabelsegmentation:OFF org.mitk.matchpoint.core.helper:OFF org.mitk.gui.qt.matchpoint.algorithm.browser:OFF org.mitk.gui.qt.matchpoint.algorithm.control:OFF org.mitk.gui.qt.matchpoint.algorithm.batch:OFF org.mitk.gui.qt.matchpoint.mapper:OFF org.mitk.gui.qt.matchpoint.framereg:OFF org.mitk.gui.qt.matchpoint.visualizer:OFF org.mitk.gui.qt.matchpoint.evaluator:OFF org.mitk.gui.qt.matchpoint.manipulator:OFF org.mitk.gui.qt.preprocessing.resampling:OFF org.mitk.gui.qt.radiomics:OFF org.mitk.gui.qt.cest:OFF org.mitk.gui.qt.fit.demo:OFF org.mitk.gui.qt.fit.inspector:OFF org.mitk.gui.qt.fit.genericfitting:OFF org.mitk.gui.qt.pharmacokinetics.mri:OFF org.mitk.gui.qt.pharmacokinetics.pet:OFF org.mitk.gui.qt.pharmacokinetics.simulation:OFF org.mitk.gui.qt.pharmacokinetics.curvedescriptor:OFF org.mitk.gui.qt.pharmacokinetics.concentration.mri:OFF + org.mitk.gui.qt.exampleplugin:OFF ) 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 + + +*/ 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..c4b4cbb6b4 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/ExampleView.cpp @@ -0,0 +1,251 @@ +/*=================================================================== + +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 <-research +// Blueberry +#include +#include + +// Qmitk +#include "ExampleView.h" + +// Qt +#include +#include +#include +#include +#include +#include +#include + + +// mitk image +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#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); + mitk::TNodePredicateDataType::Pointer isImage = mitk::TNodePredicateDataType::New(); + m_Controls.comboBoxImageSelection->SetDataStorage(GetDataStorage()); + m_Controls.comboBoxImageSelection->SetPredicate(isImage); + connect(m_Controls.buttonPerformImageProcessing, &QPushButton::clicked, this, &ExampleView::DoImageStatistics); + connect(m_Controls.buttonGenerate, &QPushButton::clicked, this, &ExampleView::DoPixelMasking); + connect(m_Controls.comboBoxImageSelection, SIGNAL(OnSelectionChanged(const mitk::DataNode*)), this, SLOT(OnComboBoxImageSelectionChanged(const mitk::DataNode*))); +} + +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); + m_Controls.buttonGenerate->setEnabled(true); + m_Controls.spinboxThreshold->setEnabled(true); + return; + } + } + + m_Controls.labelWarning->setVisible(true); + m_Controls.buttonPerformImageProcessing->setEnabled(false); + m_Controls.buttonGenerate->setEnabled(false); + m_Controls.spinboxThreshold->setEnabled(false); */ +} + +void ExampleView::OnComboBoxImageSelectionChanged(const mitk::DataNode *node) +{ + if (node == nullptr) + { + m_Controls.labelWarning->setVisible(true); + m_Controls.buttonPerformImageProcessing->setEnabled(false); + m_Controls.buttonGenerate->setEnabled(false); + m_Controls.spinboxThreshold->setEnabled(false); + return; + } + m_Controls.labelWarning->setVisible(false); + m_Controls.buttonPerformImageProcessing->setEnabled(true); + m_Controls.buttonGenerate->setEnabled(true); + m_Controls.spinboxThreshold->setEnabled(true); +} + +void ExampleView::DoImageStatistics() +{ + auto node = m_Controls.comboBoxImageSelection->GetSelectedNode(); + if (node == nullptr) { + MITK_WARN << "no node selected"; + + } + + if (node == nullptr) + { + // Nothing selected. Inform the user and return + QMessageBox::information(nullptr, "Warning", "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) + { + auto statistics = image->GetStatistics(); + auto minPixelValue = statistics->GetScalarValueMin(); + auto maxPixelValue = statistics->GetScalarValueMax(); + + mitk::ImageStatisticsCalculator::Pointer imgStatisticsCalc= mitk::ImageStatisticsCalculator::New(); + imgStatisticsCalc->SetInputImage(image); + + mitk::ImageStatisticsCalculator::StatisticsContainer::Pointer imgStatisticsContained=imgStatisticsCalc->GetStatistics(); + + auto avgPixelValue = imgStatisticsContained->GetMedian(); + auto devPixelValue = imgStatisticsContained->GetUniformity(); + + //Output max + QString maxPixelValueString = QString::number(maxPixelValue); + QTableWidgetItem *max = new QTableWidgetItem(maxPixelValueString); + m_Controls.tableWidgetStatistics->setItem(0, 0, max); + + //Output min + QString minPixelValueString = QString::number(minPixelValue); + QTableWidgetItem *min = new QTableWidgetItem(minPixelValueString); + m_Controls.tableWidgetStatistics->setItem(1, 0, min); + + //Output avg + QString avgPixelValueString = QString::number(avgPixelValue); + QTableWidgetItem *avg = new QTableWidgetItem(avgPixelValueString); + m_Controls.tableWidgetStatistics->setItem(2, 0, avg); + + //Output dev + QString devPixelValueString = QString::number(devPixelValue); + QTableWidgetItem *dev = new QTableWidgetItem(devPixelValueString); + m_Controls.tableWidgetStatistics->setItem(3, 0, dev); + } + } +} + + + +void ExampleView::DoPixelMasking() +{ + int pixelValueMask = m_Controls.spinboxThreshold->value(); + this->ProcessImage(pixelValueMask); +} + +void ExampleView::ProcessImage(int pixelValueMask) +{ + // check for valid node selected + auto node = m_Controls.comboBoxImageSelection->GetSelectedNode(); + + if (node == nullptr) + { + // Nothing selected. Inform the user and return + QMessageBox::information(nullptr, "Warning", "Please load and select an image before starting image processing."); + return; + } + + mitk::BaseData* data = node->GetData(); //get data from node + if (data != nullptr) + { + //Ask for the name of the mask + bool ok = false; + QString name = QInputDialog::getText(QApplication::activeWindow() + , tr("Add masked image..."), tr("Enter name for the new masked image"), QLineEdit::Normal, tr("maskedImage"), &ok); + if (!ok || name.isEmpty()) + return; + + //Create cloned image + mitk::Image::Pointer image = dynamic_cast(data); + if (!image) + { + QMessageBox::information(nullptr, "Warning", "Please load and select an image before starting image processing."); + return; + } + mitk::Image::Pointer maskedImage = image->Clone(); + //Get Dimensions, first only 3d + if (image->GetDimension() != 3) + { + QMessageBox::information(nullptr, "Warning", "Please select a 3D image."); + return; + } + //Get pixel value + + mitk::ImagePixelWriteAccessor maskedImagePixelAccessor(maskedImage); + mitk::ImagePixelReadAccessor imagePixelAccessor(image); + int imageXLength = image->GetDimension(0); + int imageYLength = image->GetDimension(1); + int imageZLength = image->GetDimension(2); + itk::Index<3> index; + + for (int x = 0; x < imageXLength; x++) + { + for (int y = 0; y < imageYLength; y++) + { + for (int z = 0; z < imageZLength; z++) + { + index[0] = x; + index[1] = y; + index[2] = z; + if (imagePixelAccessor.GetPixelByIndex(index) >= pixelValueMask) + { + maskedImagePixelAccessor.SetPixelByIndex(index, 0); + } + } + } + } + + // Create a new data tree node + // + mitk::DataNode::Pointer maskedImageNode = mitk::DataNode::New(); + // + // fill the data tree node with the appropriate information + // + maskedImageNode->SetData(maskedImage); + maskedImageNode->SetProperty("name", mitk::StringProperty::New(name.toStdString())); + maskedImageNode->SetProperty("opacity", mitk::FloatProperty::New(1)); + // + // add the node to the ds + // + this->GetDataStorage()->Add(maskedImageNode); + } + +} \ No newline at end of file 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..8e3f8e8dab --- /dev/null +++ b/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/ExampleView.h @@ -0,0 +1,65 @@ +/*=================================================================== + +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 DoImageStatistics(); + void DoPixelMasking(); + void ProcessImage(int pixelValueMask); + + + Ui::ExampleViewControls m_Controls; +protected slots: + + void OnComboBoxImageSelectionChanged(const mitk::DataNode* node); +}; + +#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..7163ec0aaf --- /dev/null +++ b/Plugins/org.mitk.gui.qt.exampleplugin/src/internal/ExampleViewControls.ui @@ -0,0 +1,181 @@ + + + ExampleViewControls + + + + 0 + 0 + 222 + 481 + + + + + 0 + 0 + + + + QmitkTemplate + + + + + + Qt::RightToLeft + + + + 1 + + + + + Qt::LeftToRight + + + + + + + Image: + + + + + + + + + + QLabel { color: rgb(255, 0, 0) } + + + Please select an image! + + + + + + + false + + + Do image processing + + + Calculate + + + + + + + Statistics: + + + + + + + false + + + 4 + + + 1 + + + false + + + false + + + + max + + + + + min + + + + + median + + + + + uniformity + + + + + 0 + + + + + + + + Threshold + + + + + + + false + + + -1023 + + + 1361 + + + + + + + false + + + Generate + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 220 + + + + + + + + + + QmitkDataStorageComboBox + QComboBox +
QmitkDataStorageComboBox.h
+
+
+ + +
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