diff --git a/Plugins/PluginList.cmake b/Plugins/PluginList.cmake index 03f3de6e54..2f936ee4e9 100644 --- a/Plugins/PluginList.cmake +++ b/Plugins/PluginList.cmake @@ -1,102 +1,103 @@ # 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.diffusionimagingapp:OFF org.mitk.gui.qt.datamanager:ON org.mitk.gui.qt.datamanagerlight: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.tbss: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.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.cest:OFF ) diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/CMakeLists.txt b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/CMakeLists.txt new file mode 100644 index 0000000000..9ebdcdfd8e --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/CMakeLists.txt @@ -0,0 +1,7 @@ +project(org_mitk_gui_qt_photoacoustics_pausmotioncompensation) + +mitk_create_plugin( + EXPORT_DIRECTIVE PAUSMOTIONCOMPENSATION_EXPORT + EXPORTED_INCLUDE_SUFFIXES src + MODULE_DEPENDS MitkQtWidgetsExt +) diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/documentation/UserManual/Manual.dox b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/documentation/UserManual/Manual.dox new file mode 100644 index 0000000000..4497cf1a23 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/documentation/UserManual/Manual.dox @@ -0,0 +1,17 @@ +/** +\page org_mitk_gui_qt_photoacoustics_pausmotioncompensation The Pausmotioncompensation + +\imageMacro{icon.png,"Icon of Pausmotioncompensation",2.00} + +\tableofcontents + +\section org_mitk_gui_qt_photoacoustics_pausmotioncompensationOverview Overview +Describe the features of your awesome plugin here + + +*/ diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/documentation/UserManual/icon.xpm b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/documentation/UserManual/icon.xpm new file mode 100644 index 0000000000..9057c20bc6 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/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.photoacoustics.pausmotioncompensation/documentation/doxygen/modules.dox b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/documentation/doxygen/modules.dox new file mode 100644 index 0000000000..a8a13b7f31 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/documentation/doxygen/modules.dox @@ -0,0 +1,16 @@ +/** + \defgroup org_mitk_gui_qt_photoacoustics_pausmotioncompensation org.mitk.gui.qt.photoacoustics.pausmotioncompensation + \ingroup MITKPlugins + + \brief Describe your plugin here. + +*/ + +/** + \defgroup org_mitk_gui_qt_photoacoustics_pausmotioncompensation_internal Internal + \ingroup org_mitk_gui_qt_photoacoustics_pausmotioncompensation + + \brief This subcategory includes the internal classes of the org.mitk.gui.qt.photoacoustics.pausmotioncompensation 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.photoacoustics.pausmotioncompensation/files.cmake b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/files.cmake new file mode 100644 index 0000000000..a7b041359d --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/files.cmake @@ -0,0 +1,42 @@ +set(SRC_CPP_FILES + +) + +set(INTERNAL_CPP_FILES + org_mitk_gui_qt_photoacoustics_pausmotioncompensation_Activator.cpp + PAUSMotionCompensation.cpp +) + +set(UI_FILES + src/internal/PAUSMotionCompensationControls.ui +) + +set(MOC_H_FILES + src/internal/org_mitk_gui_qt_photoacoustics_pausmotioncompensation_Activator.h + src/internal/PAUSMotionCompensation.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.photoacoustics.pausmotioncompensation/manifest_headers.cmake b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/manifest_headers.cmake new file mode 100644 index 0000000000..7a507c2915 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/manifest_headers.cmake @@ -0,0 +1,5 @@ +set(Plugin-Name "Pausmotioncompensation") +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.photoacoustics.pausmotioncompensation/plugin.xml b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/plugin.xml new file mode 100644 index 0000000000..f4ef869e08 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/plugin.xml @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/resources/icon.xpm b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/resources/icon.xpm new file mode 100644 index 0000000000..9057c20bc6 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/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.photoacoustics.pausmotioncompensation/src/internal/PAUSMotionCompensation.cpp b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/src/internal/PAUSMotionCompensation.cpp new file mode 100644 index 0000000000..932c8800a6 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/src/internal/PAUSMotionCompensation.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 "PAUSMotionCompensation.h" + +// Qt +#include + +// mitk image +#include + +const std::string PAUSMotionCompensation::VIEW_ID = "org.mitk.views.pausmotioncompensation"; + +void PAUSMotionCompensation::SetFocus() +{ + m_Controls.buttonPerformImageProcessing->setFocus(); +} + +void PAUSMotionCompensation::CreateQtPartControl(QWidget *parent) +{ + // create GUI widgets from the Qt Designer's .ui file + m_Controls.setupUi(parent); + connect(m_Controls.buttonPerformImageProcessing, &QPushButton::clicked, this, &PAUSMotionCompensation::DoImageProcessing); +} + +void PAUSMotionCompensation::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 PAUSMotionCompensation::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.photoacoustics.pausmotioncompensation/src/internal/PAUSMotionCompensation.h b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/src/internal/PAUSMotionCompensation.h new file mode 100644 index 0000000000..b36cca63ce --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/src/internal/PAUSMotionCompensation.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 PAUSMotionCompensation_h +#define PAUSMotionCompensation_h + +#include + +#include + +#include "ui_PAUSMotionCompensationControls.h" + +/** + \brief PAUSMotionCompensation + + \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 PAUSMotionCompensation : 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::PAUSMotionCompensationControls m_Controls; +}; + +#endif // PAUSMotionCompensation_h diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/src/internal/PAUSMotionCompensationControls.ui b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/src/internal/PAUSMotionCompensationControls.ui new file mode 100644 index 0000000000..6af8ca5d90 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/src/internal/PAUSMotionCompensationControls.ui @@ -0,0 +1,64 @@ + + + PAUSMotionCompensationControls + + + + 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.photoacoustics.pausmotioncompensation/src/internal/org_mitk_gui_qt_photoacoustics_pausmotioncompensation_Activator.cpp b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/src/internal/org_mitk_gui_qt_photoacoustics_pausmotioncompensation_Activator.cpp new file mode 100644 index 0000000000..ebdf2d8731 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/src/internal/org_mitk_gui_qt_photoacoustics_pausmotioncompensation_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_photoacoustics_pausmotioncompensation_Activator.h" +#include "PAUSMotionCompensation.h" + +namespace mitk +{ + void org_mitk_gui_qt_photoacoustics_pausmotioncompensation_Activator::start(ctkPluginContext *context) + { + BERRY_REGISTER_EXTENSION_CLASS(PAUSMotionCompensation, context) + } + + void org_mitk_gui_qt_photoacoustics_pausmotioncompensation_Activator::stop(ctkPluginContext *context) { Q_UNUSED(context) } +} diff --git a/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/src/internal/org_mitk_gui_qt_photoacoustics_pausmotioncompensation_Activator.h b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/src/internal/org_mitk_gui_qt_photoacoustics_pausmotioncompensation_Activator.h new file mode 100644 index 0000000000..5321560399 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.photoacoustics.pausmotioncompensation/src/internal/org_mitk_gui_qt_photoacoustics_pausmotioncompensation_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_photoacoustics_pausmotioncompensation_Activator_h +#define org_mitk_gui_qt_photoacoustics_pausmotioncompensation_Activator_h + +#include + +namespace mitk +{ + class org_mitk_gui_qt_photoacoustics_pausmotioncompensation_Activator : public QObject, public ctkPluginActivator + { + Q_OBJECT + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_photoacoustics_pausmotioncompensation") + Q_INTERFACES(ctkPluginActivator) + + public: + void start(ctkPluginContext *context); + void stop(ctkPluginContext *context); + + }; // org_mitk_gui_qt_photoacoustics_pausmotioncompensation_Activator +} + +#endif // org_mitk_gui_qt_photoacoustics_pausmotioncompensation_Activator_h