diff --git a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/files.cmake b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/files.cmake index e3d3041ce1..c620e67bf7 100644 --- a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/files.cmake +++ b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/files.cmake @@ -1,98 +1,95 @@ SET(SRC_CPP_FILES QmitkDiffusionImagingAppApplication.cpp QmitkDiffusionImagingAppWorkbenchAdvisor.cpp ) SET(INTERNAL_CPP_FILES mitkPluginActivator.cpp QmitkDiffusionImagingAppIntroPart.cpp - QmitkMasterView.cpp QmitkDiffusionImagingAppPerspective.cpp QmitkWelcomePerspective.cpp QmitkReconstructionPerspective.cpp QmitkTrackingPerspective.cpp QmitkFileImportPerspective.cpp QmitkQuantificationPerspective.cpp QmitkVolumeVisualizationPerspective.cpp QmitkDIAppConnectomicsPerspective.cpp QmitkDIAppDicomImportPerspective.cpp QmitkDIAppFiberTractographyPerspective.cpp QmitkDIAppIVIMPerspective.cpp QmitkDIAppPreprocessingReconstructionPerspective.cpp QmitkDIAppQuantificationPerspective.cpp QmitkDIAppScreenshotsMoviesPerspective.cpp QmitkDIAppTBSSPerspective.cpp QmitkDIAppVolumeVisualizationPerspective.cpp ) SET(UI_FILES src/internal/QmitkWelcomeScreenViewControls.ui - src/internal/QmitkMasterViewControls.ui ) SET(MOC_H_FILES src/internal/QmitkDiffusionImagingAppIntroPart.h src/internal/mitkPluginActivator.h src/internal/QmitkReconstructionPerspective.h src/internal/QmitkTrackingPerspective.h src/internal/QmitkFileImportPerspective.h src/internal/QmitkQuantificationPerspective.h src/internal/QmitkVolumeVisualizationPerspective.h #src/internal/QmitkDiffusionImagingAppApplicationPlugin.h - src/internal/QmitkMasterView.h src/QmitkDiffusionImagingAppApplication.h src/internal/QmitkDiffusionImagingAppPerspective.h src/internal/QmitkWelcomePerspective.h src/internal/QmitkDIAppConnectomicsPerspective.h src/internal/QmitkDIAppDicomImportPerspective.h src/internal/QmitkDIAppFiberTractographyPerspective.h src/internal/QmitkDIAppIVIMPerspective.h src/internal/QmitkDIAppPreprocessingReconstructionPerspective.h src/internal/QmitkDIAppQuantificationPerspective.h src/internal/QmitkDIAppScreenshotsMoviesPerspective.h src/internal/QmitkDIAppTBSSPerspective.h src/internal/QmitkDIAppVolumeVisualizationPerspective.h ) SET(CACHED_RESOURCE_FILES # 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 plugin.xml resources/icon_dicom.xpm resources/diffusionimaging.png resources/preprocessing.png resources/Measurement_48.png resources/volvis.png ) SET(QRC_FILES # uncomment the following line if you want to use Qt resources resources/welcome/QmitkWelcomeScreenView.qrc resources/org_mitk_gui_qt_diffusionimagingapp.qrc ) # 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}) #----------- Qt Help Collection Project -------------# IF (BLUEBERRY_USE_QT_HELP) SET(_plugin_qhcp_input "${CMAKE_CURRENT_SOURCE_DIR}/documentation/MitkDiffusionImagingAppQtHelpCollectionProject.qhcp") SET(_plugin_qhcp_output "${PLUGIN_OUTPUT_DIR}/resources/MitkDiffusionImagingAppQtHelpCollection_${MBI_WC_REVISION_HASH}.qhc") ADD_CUSTOM_COMMAND(OUTPUT ${_plugin_qhcp_output} COMMAND ${QT_COLLECTIONGENERATOR_EXECUTABLE} ${_plugin_qhcp_input} -o ${_plugin_qhcp_output} DEPENDS ${_plugin_qhcp_input} ) SET(FILE_DEPENDENCIES ${_plugin_qhcp_output}) ENDIF() diff --git a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/plugin.xml b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/plugin.xml index d40c00f69d..72364ae33c 100644 --- a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/plugin.xml +++ b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/plugin.xml @@ -1,100 +1,93 @@ - - - - - + diff --git a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkMasterView.cpp b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkMasterView.cpp deleted file mode 100644 index 46e401234d..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkMasterView.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/*========================================================================= - -Program: Medical Imaging & Interaction Toolkit -Language: C++ -Date: $Date$ -Version: $Revision$ - -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. - -=========================================================================*/ - - -// Blueberry -#include -#include -#include -#include -#include - -// Qmitk -#include "QmitkMasterView.h" -#include "QmitkStdMultiWidget.h" - -// Qt -#include - - -const std::string QmitkMasterView::VIEW_ID = "org.mitk.views.masterview"; - -QmitkMasterView::QmitkMasterView() - : QmitkFunctionality() -{ -} - -QmitkMasterView::~QmitkMasterView() -{ -} - -void QmitkMasterView::CreateQtPartControl( QWidget *parent ) -{ - // create GUI widgets from the Qt Designer's .ui file - m_Controls.setupUi( parent ); - CreateConnections(); - - berry::IPerspectiveRegistry* perspRegistry = GetSite()->GetPage()->GetWorkbenchWindow()->GetWorkbench()->GetPerspectiveRegistry(); - std::vector perspectives(perspRegistry->GetPerspectives()); - for (std::vector::iterator perspIt = perspectives.begin(); - perspIt != perspectives.end(); ++perspIt) - { - std::string perpid=((*perspIt)->GetId()); - MITK_INFO << perpid; - - } -} - -void QmitkMasterView::CreateConnections() -{ - connect( (QObject*)(m_Controls.m_OpenDicomImport), SIGNAL(clicked()),(QObject*) this, SLOT(OpenDicomImport())); - connect( (QObject*)(m_Controls.m_OpenPreprocessingReconstruction), SIGNAL(clicked()),(QObject*) this, SLOT(OpenPreprocessingReconstruction())); - connect( (QObject*)(m_Controls.m_OpenQuantification), SIGNAL(clicked()),(QObject*) this, SLOT(OpenQuantification())); - connect( (QObject*)(m_Controls.m_OpenTractography), SIGNAL(clicked()),(QObject*) this, SLOT(OpenTractography())); - connect( (QObject*)(m_Controls.m_OpenTBSS), SIGNAL(clicked()),(QObject*) this, SLOT(OpenTBSS())); - connect( (QObject*)(m_Controls.m_OpenConnectomics), SIGNAL(clicked()),(QObject*) this, SLOT(OpenConnectomics())); - connect( (QObject*)(m_Controls.m_OpenIVIM), SIGNAL(clicked()),(QObject*) this, SLOT(OpenIVIM())); - connect( (QObject*)(m_Controls.m_OpenVolumeVisualization), SIGNAL(clicked()),(QObject*) this, SLOT(OpenVolumeVisualization())); - connect( (QObject*)(m_Controls.m_OpenScreenshotsMovies), SIGNAL(clicked()),(QObject*) this, SLOT(OpenScreenshotsMovies())); -} - -void QmitkMasterView::OnSelectionChanged( std::vector nodes ) -{ -} - -void QmitkMasterView::OpenPerspective(std::string id) -{ - try - { - GetSite()->GetPage()->GetWorkbenchWindow()->GetWorkbench()->ShowPerspective(id, berry::IWorkbenchWindow::Pointer(GetSite()->GetPage()->GetWorkbenchWindow())); - } - catch (...) - { - QMessageBox::critical(0, "Opening Perspective Failed", QString("The perspective \"") + id.c_str() + "\" could not be opened.\nSee the log for details."); - } -} - -void QmitkMasterView::OpenDicomImport() -{ - OpenPerspective("org.mitk.diffusionimagingapp.perspectives.dicomimport"); -} - -void QmitkMasterView::OpenPreprocessingReconstruction() -{ - OpenPerspective("org.mitk.diffusionimagingapp.perspectives.preprocessingreconstruction"); -} - -void QmitkMasterView::OpenQuantification() -{ - OpenPerspective("org.mitk.diffusionimagingapp.perspectives.quantification"); -} - -void QmitkMasterView::OpenTractography() -{ - OpenPerspective("org.mitk.diffusionimagingapp.perspectives.tractography"); -} - -void QmitkMasterView::OpenTBSS() -{ - OpenPerspective("org.mitk.diffusionimagingapp.perspectives.tbss"); -} - -void QmitkMasterView::OpenConnectomics() -{ - OpenPerspective("org.mitk.diffusionimagingapp.perspectives.connectomics"); -} - -void QmitkMasterView::OpenIVIM() -{ - OpenPerspective("org.mitk.diffusionimagingapp.perspectives.ivim"); -} - -void QmitkMasterView::OpenVolumeVisualization() -{ - OpenPerspective("org.mitk.diffusionimagingapp.perspectives.volumevisualization"); -} - -void QmitkMasterView::OpenScreenshotsMovies() -{ - OpenPerspective("org.mitk.diffusionimagingapp.perspectives.screenshotsmovies"); -} - diff --git a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkMasterView.h b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkMasterView.h deleted file mode 100644 index 775ea51b8f..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkMasterView.h +++ /dev/null @@ -1,96 +0,0 @@ -/*========================================================================= - -Program: Medical Imaging & Interaction Toolkit -Language: C++ -Date: $Date$ -Version: $Revision$ - -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 QmitkMasterView_h -#define QmitkMasterView_h - -#include - -#include - -#include "ui_QmitkMasterViewControls.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -/*! - \brief QmitkMasterView - - \warning This class is not yet documented. Use "git blame" and ask the author to provide basic documentation. - - \sa QmitkFunctionality - \ingroup ${plugin_target}_internal -*/ -class QmitkMasterView : public QmitkFunctionality -{ - // 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; - - QmitkMasterView(); - virtual ~QmitkMasterView(); - - virtual void CreateQtPartControl(QWidget *parent); - - protected slots: - - void OpenDicomImport(); - void OpenPreprocessingReconstruction(); - void OpenQuantification(); - void OpenTractography(); - void OpenTBSS(); - void OpenConnectomics(); - void OpenIVIM(); - void OpenVolumeVisualization(); - void OpenScreenshotsMovies(); - -protected: - - void CreateConnections(); - - void OpenPerspective(std::string id); - - /// \brief called by QmitkFunctionality when DataManager's selection has changed - virtual void OnSelectionChanged( std::vector nodes ); - - Ui::QmitkMasterViewControls m_Controls; - - friend struct QmitkMasterViewListener; - -}; - -#endif // QmitkMasterView_h - diff --git a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkMasterViewControls.ui b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkMasterViewControls.ui deleted file mode 100644 index 3d5b3d5912..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkMasterViewControls.ui +++ /dev/null @@ -1,115 +0,0 @@ - - - QmitkMasterViewControls - - - - 0 - 0 - 253 - 381 - - - - - 0 - 0 - - - - QmitkTemplate - - - - 0 - - - 0 - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 0 - - - - - Dicom Import - - - - - - - Preprocessing / Reconstruction - - - - - - - Quantification - - - - - - - Tractography - - - - - - - TBSS - - - - - - - Connectomics - - - - - - - IVIM - - - - - - - Volume Visualization - - - - - - - Screenshots / Movies - - - - - - - - - - - - diff --git a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/mitkPluginActivator.cpp b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/mitkPluginActivator.cpp index bdece26bfc..406aed62b4 100644 --- a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/mitkPluginActivator.cpp +++ b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/mitkPluginActivator.cpp @@ -1,153 +1,151 @@ /*========================================================================= Program: BlueBerry Platform Language: C++ Date: $Date$ Version: $Revision$ 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 "mitkPluginActivator.h" #include #include #include #include "src/QmitkDiffusionImagingAppApplication.h" #include "QmitkWelcomePerspective.h" #include "QmitkReconstructionPerspective.h" #include "QmitkTrackingPerspective.h" #include "QmitkFileImportPerspective.h" #include "QmitkQuantificationPerspective.h" #include "QmitkVolumeVisualizationPerspective.h" #include "src/internal/QmitkDiffusionImagingAppIntroPart.h" #include "src/internal/QmitkDiffusionImagingAppPerspective.h" -#include "src/internal/QmitkMasterView.h" #include "src/internal/QmitkDIAppConnectomicsPerspective.h" #include "src/internal/QmitkDIAppDicomImportPerspective.h" #include "src/internal/QmitkDIAppFiberTractographyPerspective.h" #include "src/internal/QmitkDIAppIVIMPerspective.h" #include "src/internal/QmitkDIAppPreprocessingReconstructionPerspective.h" #include "src/internal/QmitkDIAppQuantificationPerspective.h" #include "src/internal/QmitkDIAppScreenshotsMoviesPerspective.h" #include "src/internal/QmitkDIAppTBSSPerspective.h" #include "src/internal/QmitkDIAppVolumeVisualizationPerspective.h" #include #include mitkPluginActivator* mitkPluginActivator::inst = 0; mitkPluginActivator::mitkPluginActivator() : pluginListener(0) { inst = this; } mitkPluginActivator::~mitkPluginActivator() { delete pluginListener; } mitkPluginActivator* mitkPluginActivator::GetDefault() { return inst; } void mitkPluginActivator::start(ctkPluginContext* context) { berry::AbstractUICTKPlugin::start(context); this->context = context; BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionImagingAppApplication, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionImagingAppIntroPart, context) - BERRY_REGISTER_EXTENSION_CLASS(QmitkMasterView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionImagingAppPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkFileImportPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkReconstructionPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkQuantificationPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkVolumeVisualizationPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkTrackingPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkWelcomePerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppConnectomicsPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppDicomImportPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppFiberTractographyPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppIVIMPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppPreprocessingReconstructionPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppQuantificationPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppScreenshotsMoviesPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppTBSSPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppVolumeVisualizationPerspective, context) // QString collectionFile = GetQtHelpCollectionFile(); // berry::QtAssistantUtil::SetHelpCollectionFile(collectionFile); // berry::QtAssistantUtil::SetDefaultHelpUrl("qthelp://org.mitk.gui.qt.diffusionimagingapp/bundle/index.html"); delete pluginListener; pluginListener = new berry::QCHPluginListener(context); context->connectPluginListener(pluginListener, SLOT(pluginChanged(ctkPluginEvent)), Qt::DirectConnection); // register all QCH files from all the currently installed plugins pluginListener->processPlugins(); } QString mitkPluginActivator::GetQtHelpCollectionFile() const { if (!helpCollectionFile.isEmpty()) { return helpCollectionFile; } QString collectionFilename; QString na("n/a"); // if (na != MITK_REVISION) // collectionFilename = "MitkDiffusionImagingAppQtHelpCollection_" MITK_REVISION ".qhc"; // else collectionFilename = "MitkDiffusionImagingAppQtHelpCollection.qhc"; QFileInfo collectionFileInfo = context->getDataFile(collectionFilename); QFileInfo pluginFileInfo = QFileInfo(QUrl(context->getPlugin()->getLocation()).toLocalFile()); if (!collectionFileInfo.exists() || pluginFileInfo.lastModified() > collectionFileInfo.lastModified()) { // extract the qhc file from the plug-in QByteArray content = context->getPlugin()->getResource(collectionFilename); if (content.isEmpty()) { BERRY_WARN << "Could not get plug-in resource: " << collectionFilename.toStdString(); } else { QFile file(collectionFileInfo.absoluteFilePath()); file.open(QIODevice::WriteOnly); file.write(content); file.close(); } } if (QFile::exists(collectionFileInfo.absoluteFilePath())) { helpCollectionFile = collectionFileInfo.absoluteFilePath(); } return helpCollectionFile; } Q_EXPORT_PLUGIN2(org_mitk_gui_qt_diffusionimagingapp, mitkPluginActivator)