diff --git a/Plugins/PluginList.cmake b/Plugins/PluginList.cmake index 3f7a2ad870..4e73a65a56 100644 --- a/Plugins/PluginList.cmake +++ b/Plugins/PluginList.cmake @@ -1,77 +1,76 @@ # 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.mitk.core.services:ON org.mitk.gui.common:ON org.mitk.core.jobs:OFF org.mitk.gui.qt.application:ON org.mitk.gui.qt.ext:OFF org.mitk.gui.qt.extapplication:OFF org.mitk.gui.qt.mitkworkbench.intro:OFF org.mitk.gui.qt.common:ON org.mitk.gui.qt.stdmultiwidgeteditor:ON org.mitk.gui.qt.mxnmultiwidgeteditor:OFF org.mitk.gui.qt.chartExample: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.dicombrowser:OFF org.mitk.gui.qt.dicominspector:OFF org.mitk.gui.qt.dosevisualization:OFF org.mitk.gui.qt.igtexamples:OFF org.mitk.gui.qt.igttracking: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.measurementtoolbox:OFF org.mitk.gui.qt.moviemaker:OFF org.mitk.gui.qt.pointsetinteraction: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.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.ultrasoundtrackingnavigation:OFF org.mitk.gui.qt.overlaymanager:OFF org.mitk.gui.qt.igt.app.hummelprotocolmeasurements: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.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 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.concentration.mri:OFF org.mitk.gui.qt.pharmacokinetics.curvedescriptor: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.flowapplication:OFF org.mitk.gui.qt.flow.segmentation:OFF org.mitk.gui.qt.pixelvalue:ON ) diff --git a/Plugins/org.mitk.gui.qt.eventrecorder/CMakeLists.txt b/Plugins/org.mitk.gui.qt.eventrecorder/CMakeLists.txt deleted file mode 100644 index 2f08c6d36d..0000000000 --- a/Plugins/org.mitk.gui.qt.eventrecorder/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -project(org_mitk_gui_qt_eventrecorder) - -mitk_create_plugin( - EXPORT_DIRECTIVE EVENTRECORDER_EXPORT - EXPORTED_INCLUDE_SUFFIXES src - MODULE_DEPENDS MitkQtWidgetsExt -) diff --git a/Plugins/org.mitk.gui.qt.eventrecorder/files.cmake b/Plugins/org.mitk.gui.qt.eventrecorder/files.cmake deleted file mode 100644 index 858711fa87..0000000000 --- a/Plugins/org.mitk.gui.qt.eventrecorder/files.cmake +++ /dev/null @@ -1,46 +0,0 @@ -set(SRC_CPP_FILES - -) - -set(INTERNAL_CPP_FILES - org_mitk_gui_qt_eventrecorder_Activator.cpp - InteractionEventRecorder.cpp -) - -set(UI_FILES - src/internal/InteractionEventRecorderControls.ui -) - -set(MOC_H_FILES - src/internal/org_mitk_gui_qt_eventrecorder_Activator.h - src/internal/InteractionEventRecorder.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 - plugin.xml - resources/play.png - resources/rec.png - resources/stop_rec.png - resources/stop.png - resources/icon.png -) - -# 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.eventrecorder/manifest_headers.cmake b/Plugins/org.mitk.gui.qt.eventrecorder/manifest_headers.cmake deleted file mode 100644 index ea9bb6e6f3..0000000000 --- a/Plugins/org.mitk.gui.qt.eventrecorder/manifest_headers.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(Plugin-Name "Eventrecorder") -set(Plugin-Version "0.1") -set(Plugin-Vendor "German Cancer Research Center (DKFZ)") -set(Plugin-ContactAddress "") -set(Require-Plugin org.mitk.gui.qt.common) diff --git a/Plugins/org.mitk.gui.qt.eventrecorder/plugin.xml b/Plugins/org.mitk.gui.qt.eventrecorder/plugin.xml deleted file mode 100644 index c412788f66..0000000000 --- a/Plugins/org.mitk.gui.qt.eventrecorder/plugin.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - Records and plays interaction to test the GUI - - - - - - - - - - - diff --git a/Plugins/org.mitk.gui.qt.eventrecorder/resources/icon.png b/Plugins/org.mitk.gui.qt.eventrecorder/resources/icon.png deleted file mode 100644 index 7f2545d959..0000000000 Binary files a/Plugins/org.mitk.gui.qt.eventrecorder/resources/icon.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.eventrecorder/resources/play.png b/Plugins/org.mitk.gui.qt.eventrecorder/resources/play.png deleted file mode 100644 index b352da58ad..0000000000 Binary files a/Plugins/org.mitk.gui.qt.eventrecorder/resources/play.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.eventrecorder/resources/rec.png b/Plugins/org.mitk.gui.qt.eventrecorder/resources/rec.png deleted file mode 100644 index 26c424ca75..0000000000 Binary files a/Plugins/org.mitk.gui.qt.eventrecorder/resources/rec.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.eventrecorder/resources/stop.png b/Plugins/org.mitk.gui.qt.eventrecorder/resources/stop.png deleted file mode 100644 index e9e377b46c..0000000000 Binary files a/Plugins/org.mitk.gui.qt.eventrecorder/resources/stop.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.eventrecorder/resources/stop_rec.png b/Plugins/org.mitk.gui.qt.eventrecorder/resources/stop_rec.png deleted file mode 100644 index 25c782ac37..0000000000 Binary files a/Plugins/org.mitk.gui.qt.eventrecorder/resources/stop_rec.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/InteractionEventRecorder.cpp b/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/InteractionEventRecorder.cpp deleted file mode 100644 index cfdecd38f2..0000000000 --- a/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/InteractionEventRecorder.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/*============================================================================ - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center (DKFZ) -All rights reserved. - -Use of this source code is governed by a 3-clause BSD license that can be -found in the LICENSE file. - -============================================================================*/ - - -// Blueberry -#include -#include - -// Qmitk -#include "InteractionEventRecorder.h" - -// Qt -#include -#include -// us -#include "usGetModuleContext.h" -#include "usModuleContext.h" -#include "usModuleResource.h" - -#include -#include -#include -#include "QmitkRenderWindow.h" - - -US_INITIALIZE_MODULE - - -const std::string InteractionEventRecorder::VIEW_ID = "org.mitk.views.interactioneventrecorder"; - -void InteractionEventRecorder::SetFocus() -{ - m_Controls.textFileName->setFocus(); -} - -void InteractionEventRecorder::StartRecording() -{ - - MITK_INFO << "Start Recording"; - MITK_INFO << "Performing Reinit"; - mitk::RenderingManager::GetInstance()->InitializeViewsByBoundingObjects(this->GetDataStorage()); - - m_CurrentObserver->SetOutputFile(m_Controls.textFileName->text().toStdString()); - m_CurrentObserver->StartRecording(); -} - -void InteractionEventRecorder::StopRecording() -{ - MITK_INFO << "Stop Recording"; - m_CurrentObserver->StopRecording(); -} - -void InteractionEventRecorder::Play() -{ - std::ifstream xmlStream(m_Controls.textFileName->text().toStdString().c_str()); - mitk::XML2EventParser parser(xmlStream); - mitk::XML2EventParser::EventContainerType events = parser.GetInteractions(); - - MITK_INFO << "parsed events"; - - for (std::size_t i=0; i < events.size(); ++i) - events.at(i)->GetSender()->GetDispatcher()->ProcessEvent(events.at(i)); - - MITK_INFO << "DONE"; -} - -void InteractionEventRecorder::OpenFile() -{ - QString fn = QFileDialog::getOpenFileName(nullptr, "Open File...", - QString(), "All Files (*)"); - if (!fn.isEmpty()) - this->m_Controls.textFileName->setText(fn); -} - -void InteractionEventRecorder::RotatePlanes() -{ - mitk::Point3D center; - center.Fill(0); - mitk::Vector3D firstVec; - mitk::Vector3D secondVec; - - firstVec[0] = 1.0; - firstVec[1] = .5; - firstVec[2] = .25; - - secondVec[0] = 1; - secondVec[1] = .25; - secondVec[2] = 1; - - // Rotate Planes to a predefined state which can later be used again in tests - auto* axialRenderWindow = this->GetRenderWindowPart(mitk::WorkbenchUtil::OPEN)->GetQmitkRenderWindow("axial"); - axialRenderWindow->GetSliceNavigationController()->ReorientSlices( center, firstVec,secondVec ); - axialRenderWindow->GetRenderer()->RequestUpdate(); - -} - -void InteractionEventRecorder::RotateView() -{ - // Rotate the view in 3D to a predefined state which can later be used again in tests - // this simulates a prior VTK Interaction - auto allRenderWindows = mitk::BaseRenderer::GetAll3DRenderWindows(); - for (auto mapit = allRenderWindows.begin(); mapit != allRenderWindows.end(); ++mapit) - { - vtkRenderWindow* renderWindow = mapit->first; - if (renderWindow == nullptr) - continue; - - mitk::Stepper* stepper = mapit->second->GetCameraRotationController()->GetStepper(); - if (stepper == nullptr) - return; - - unsigned int newPos = 17; - stepper->SetPos(newPos); - } -} - -void InteractionEventRecorder::CreateQtPartControl( QWidget *parent ) -{ - // create GUI widgets from the Qt Designer's .ui file - m_Controls.setupUi( parent ); - connect( m_Controls.btnStopRecording, SIGNAL(clicked()), this, SLOT(StopRecording()) ); - connect( m_Controls.btnStartRecording, SIGNAL(clicked()), this, SLOT(StartRecording()) ); - connect( m_Controls.btnPlay, SIGNAL(clicked()), this, SLOT(Play()) ); - connect( m_Controls.btnOpenFile, SIGNAL(clicked()), this, SLOT(OpenFile()) ); - connect( m_Controls.rotatePlanes, SIGNAL(clicked()), this, SLOT(RotatePlanes()) ); - connect( m_Controls.rotate3D, SIGNAL(clicked()), this, SLOT(RotateView()) ); - - m_CurrentObserver = new mitk::EventRecorder(); - // Register as listener via micro services - us::ServiceProperties props; - - props["name"] = std::string("EventRecorder"); - m_ServiceRegistration = us::GetModuleContext()->RegisterService(m_CurrentObserver,props); - - - /* - -delete m_CurrentObserverDEBUG; - m_ServiceRegistrationDEBUG.Unregister(); - */ -} - - diff --git a/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/InteractionEventRecorder.h b/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/InteractionEventRecorder.h deleted file mode 100644 index c3a8fe5374..0000000000 --- a/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/InteractionEventRecorder.h +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================ - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center (DKFZ) -All rights reserved. - -Use of this source code is governed by a 3-clause BSD license that can be -found in the LICENSE file. - -============================================================================*/ - - -#ifndef InteractionEventRecorder_h -#define InteractionEventRecorder_h - -#include - -#include - -#include "ui_InteractionEventRecorderControls.h" - -#include "mitkInteractionEventObserver.h" -#include "mitkEventRecorder.h" - -/** - \brief InteractionEventRecorder - - Demontrates the use of InteractionOversers. - - Allows to record all mouse interaction in the renderwindows save it as XML file. And also replay the interaction. - - \sa QmitkAbstractView - \ingroup ${plugin_target}_internal -*/ -class InteractionEventRecorder : 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 slots: - - /// \brief Called when the user clicks the GUI button - - void StartRecording(); - void StopRecording(); - void OpenFile(); - void RotatePlanes(); - void RotateView(); - void Play(); - - protected: - - void CreateQtPartControl(QWidget *parent) override; - - void SetFocus() override; - - - - Ui::InteractionEventRecorderControls m_Controls; - - private: - mitk::EventRecorder* m_CurrentObserver; - - us::ServiceRegistration m_ServiceRegistration; - -}; - -#endif // InteractionEventRecorder_h diff --git a/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/InteractionEventRecorderControls.ui b/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/InteractionEventRecorderControls.ui deleted file mode 100644 index cbf775f228..0000000000 --- a/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/InteractionEventRecorderControls.ui +++ /dev/null @@ -1,197 +0,0 @@ - - - InteractionEventRecorderControls - - - - 0 - 0 - 432 - 359 - - - - - 0 - 0 - - - - QmitkTemplate - - - - - - Filename to store interaction - - - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 5 - 20 - - - - - - - - - 30 - 20 - - - - Open file - - - ... - - - - - - - - - - - Record - - - - - - - :/org.mitk.gui.qt.eventrecorder/resources/rec.png:/org.mitk.gui.qt.eventrecorder/resources/rec.png - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - Stop recording - - - - - - - :/org.mitk.gui.qt.eventrecorder/resources/stop_rec.png:/org.mitk.gui.qt.eventrecorder/resources/stop_rec.png - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - Play - - - - - - - :/org.mitk.gui.qt.eventrecorder/resources/play.png:/org.mitk.gui.qt.eventrecorder/resources/play.png - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Rotate 3D View - - - - - - - Rotated Planes - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 200 - - - - - - - - - - - - diff --git a/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/org_mitk_gui_qt_eventrecorder_Activator.cpp b/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/org_mitk_gui_qt_eventrecorder_Activator.cpp deleted file mode 100644 index ff11c49a72..0000000000 --- a/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/org_mitk_gui_qt_eventrecorder_Activator.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================ - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center (DKFZ) -All rights reserved. - -Use of this source code is governed by a 3-clause BSD license that can be -found in the LICENSE file. - -============================================================================*/ - -#include "org_mitk_gui_qt_eventrecorder_Activator.h" -#include "InteractionEventRecorder.h" - -namespace mitk { - -void org_mitk_gui_qt_eventrecorder_Activator::start(ctkPluginContext* context) -{ - BERRY_REGISTER_EXTENSION_CLASS(InteractionEventRecorder, context) -} - -void org_mitk_gui_qt_eventrecorder_Activator::stop(ctkPluginContext* context) -{ - Q_UNUSED(context) -} - -} diff --git a/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/org_mitk_gui_qt_eventrecorder_Activator.h b/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/org_mitk_gui_qt_eventrecorder_Activator.h deleted file mode 100644 index 1f340d2b3d..0000000000 --- a/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/org_mitk_gui_qt_eventrecorder_Activator.h +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================ - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center (DKFZ) -All rights reserved. - -Use of this source code is governed by a 3-clause BSD license that can be -found in the LICENSE file. - -============================================================================*/ - - -#ifndef org_mitk_gui_qt_eventrecorder_Activator_h -#define org_mitk_gui_qt_eventrecorder_Activator_h - -#include - -namespace mitk { - -class org_mitk_gui_qt_eventrecorder_Activator : - public QObject, public ctkPluginActivator -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_eventrecorder") - Q_INTERFACES(ctkPluginActivator) - -public: - - void start(ctkPluginContext* context) override; - void stop(ctkPluginContext* context) override; - -}; // org_mitk_gui_qt_eventrecorder_Activator - -} - -#endif // org_mitk_gui_qt_eventrecorder_Activator_h