diff --git a/Plugins/org.mitk.gui.qt.extapplication/documentation/UserManual/VisualizationPerspective.dox b/Plugins/org.mitk.gui.qt.extapplication/documentation/UserManual/VisualizationPerspective.dox new file mode 100644 index 0000000000..db3eb3a1f0 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.extapplication/documentation/UserManual/VisualizationPerspective.dox @@ -0,0 +1,13 @@ +/** +\page org_mitk_gui_qt_extapplication_perspectives_visualizations The Visualization Perspective + +\imageMacro{resources/perspectives/eye.png,"The icon of the visualization perspective",1} + +This perspective bundles some views which can be used to generate expressive images for presentations or publications. + +Using \ref org_mitk_views_volumevisualization you can display the image data as a 3D volume, where each voxel is colored depending on its value. This enables you to easily generate understandable 3D representations of your data. + +With \ref org_mitk_views_screenshotmaker you can generate high quality screenshots of the different display windows. + +With \ref org_mitk_views_moviemaker you can capture videos of your data and automatically step through slices or rotate it in the 3D window. +*/ \ No newline at end of file diff --git a/Plugins/org.mitk.gui.qt.extapplication/files.cmake b/Plugins/org.mitk.gui.qt.extapplication/files.cmake index f3f6cce6a4..0a940c49ad 100644 --- a/Plugins/org.mitk.gui.qt.extapplication/files.cmake +++ b/Plugins/org.mitk.gui.qt.extapplication/files.cmake @@ -1,48 +1,51 @@ set(SRC_CPP_FILES ) set(INTERNAL_CPP_FILES QmitkExtApplication.cpp QmitkExtApplicationPlugin.cpp QmitkExtAppWorkbenchAdvisor.cpp QmitkMitkWorkbenchIntroPart.cpp perspectives/QmitkEditorPerspective.cpp perspectives/QmitkExtDefaultPerspective.cpp + perspectives/QmitkVisualizationPerspective.cpp ) set(MOC_H_FILES src/internal/QmitkExtApplication.h src/internal/QmitkExtApplicationPlugin.h src/internal/QmitkMitkWorkbenchIntroPart.h src/internal/perspectives/QmitkEditorPerspective.h src/internal/perspectives/QmitkExtDefaultPerspective.h + src/internal/perspectives/QmitkVisualizationPerspective.h ) set(UI_FILES src/internal/perspectives/QmitkWelcomeScreenViewControls.ui ) 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_research.xpm + resources/perspectives/eye.png ) set(QRC_FILES resources/QmitkExtApplication.qrc resources/welcome/QmitkWelcomeScreenView.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}) diff --git a/Plugins/org.mitk.gui.qt.extapplication/plugin.xml b/Plugins/org.mitk.gui.qt.extapplication/plugin.xml index 4cb8e70b51..b83147ebd2 100644 --- a/Plugins/org.mitk.gui.qt.extapplication/plugin.xml +++ b/Plugins/org.mitk.gui.qt.extapplication/plugin.xml @@ -1,33 +1,39 @@ + icon="resources/icon.png"> + + \ No newline at end of file diff --git a/Plugins/org.mitk.gui.qt.extapplication/resources/QmitkExtApplication.qrc b/Plugins/org.mitk.gui.qt.extapplication/resources/QmitkExtApplication.qrc index 9911682ee9..5ea77f15fb 100644 --- a/Plugins/org.mitk.gui.qt.extapplication/resources/QmitkExtApplication.qrc +++ b/Plugins/org.mitk.gui.qt.extapplication/resources/QmitkExtApplication.qrc @@ -1,5 +1,6 @@ icon.png + perspectives/eye.png diff --git a/Plugins/org.mitk.gui.qt.extapplication/resources/perspectives/eye.png b/Plugins/org.mitk.gui.qt.extapplication/resources/perspectives/eye.png new file mode 100644 index 0000000000..a02f21e8b2 Binary files /dev/null and b/Plugins/org.mitk.gui.qt.extapplication/resources/perspectives/eye.png differ diff --git a/Plugins/org.mitk.gui.qt.extapplication/src/internal/QmitkExtApplicationPlugin.cpp b/Plugins/org.mitk.gui.qt.extapplication/src/internal/QmitkExtApplicationPlugin.cpp index 88387262e0..55d66f1e9e 100644 --- a/Plugins/org.mitk.gui.qt.extapplication/src/internal/QmitkExtApplicationPlugin.cpp +++ b/Plugins/org.mitk.gui.qt.extapplication/src/internal/QmitkExtApplicationPlugin.cpp @@ -1,88 +1,90 @@ /*=================================================================== 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 "QmitkExtApplicationPlugin.h" #include "perspectives/QmitkExtDefaultPerspective.h" #include "perspectives/QmitkEditorPerspective.h" +#include "perspectives/QmitkVisualizationPerspective.h" #include "QmitkMitkWorkbenchIntroPart.h" #include "QmitkExtApplication.h" #include #include #include #include #include #include #include QmitkExtApplicationPlugin* QmitkExtApplicationPlugin::inst = 0; QmitkExtApplicationPlugin::QmitkExtApplicationPlugin() { inst = this; } QmitkExtApplicationPlugin::~QmitkExtApplicationPlugin() { } QmitkExtApplicationPlugin* QmitkExtApplicationPlugin::GetDefault() { return inst; } void QmitkExtApplicationPlugin::start(ctkPluginContext* context) { berry::AbstractUICTKPlugin::start(context); this->context = context; BERRY_REGISTER_EXTENSION_CLASS(QmitkExtDefaultPerspective, context); BERRY_REGISTER_EXTENSION_CLASS(QmitkEditorPerspective, context); BERRY_REGISTER_EXTENSION_CLASS(QmitkMitkWorkbenchIntroPart, context); BERRY_REGISTER_EXTENSION_CLASS(QmitkExtApplication, context); + BERRY_REGISTER_EXTENSION_CLASS(QmitkVisualizationPerspective, context); ctkServiceReference cmRef = context->getServiceReference(); ctkConfigurationAdmin* configAdmin = 0; if (cmRef) { configAdmin = context->getService(cmRef); } // Use the CTK Configuration Admin service to configure the BlueBerry help system if (configAdmin) { ctkConfigurationPtr conf = configAdmin->getConfiguration("org.blueberry.services.help", QString()); ctkDictionary helpProps; helpProps.insert("homePage", "qthelp://org.mitk.gui.qt.extapplication/bundle/index.html"); conf->update(helpProps); context->ungetService(cmRef); } else { MITK_WARN << "Configuration Admin service unavailable, cannot set home page url."; } } ctkPluginContext* QmitkExtApplicationPlugin::GetPluginContext() const { return context; } Q_EXPORT_PLUGIN2(org_mitk_gui_qt_extapplication, QmitkExtApplicationPlugin) diff --git a/Plugins/org.mitk.gui.qt.extapplication/src/internal/perspectives/QmitkVisualizationPerspective.cpp b/Plugins/org.mitk.gui.qt.extapplication/src/internal/perspectives/QmitkVisualizationPerspective.cpp new file mode 100644 index 0000000000..1119c9c3ec --- /dev/null +++ b/Plugins/org.mitk.gui.qt.extapplication/src/internal/perspectives/QmitkVisualizationPerspective.cpp @@ -0,0 +1,53 @@ +/*=================================================================== + +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 "QmitkVisualizationPerspective.h" +#include "berryIViewLayout.h" + +void QmitkVisualizationPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) +{ + ///////////////////////////////////////////////////// + // all di-app perspectives should have the following: + ///////////////////////////////////////////////////// + + std::string editorArea = layout->GetEditorArea(); + + layout->AddStandaloneView("org.mitk.views.datamanager", + false, berry::IPageLayout::LEFT, 0.3f, editorArea); + + berry::IFolderLayout::Pointer left = + layout->CreateFolder("org.mitk.extapplication.leftcontrols", + berry::IPageLayout::BOTTOM, 0.1f, "org.mitk.views.datamanager"); + + layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", + berry::IPageLayout::BOTTOM, .4f, "org.mitk.extapplication.leftcontrols", true); + + ///////////////////////////////////////////// + // here goes the perspective specific stuff + ///////////////////////////////////////////// + + left->AddView("org.mitk.views.volumevisualization"); + berry::IViewLayout::Pointer lo = layout->GetViewLayout("org.mitk.views.volumevisualization"); + lo->SetCloseable(true); + + left->AddView("org.mitk.views.screenshotmaker"); + lo = layout->GetViewLayout("org.mitk.views.screenshotmaker"); + lo->SetCloseable(true); + + left->AddView("org.mitk.views.moviemaker"); + lo = layout->GetViewLayout("org.mitk.views.moviemaker"); + lo->SetCloseable(true); +} diff --git a/Plugins/org.mitk.gui.qt.extapplication/src/internal/perspectives/QmitkVisualizationPerspective.h b/Plugins/org.mitk.gui.qt.extapplication/src/internal/perspectives/QmitkVisualizationPerspective.h new file mode 100644 index 0000000000..5e21abdb08 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.extapplication/src/internal/perspectives/QmitkVisualizationPerspective.h @@ -0,0 +1,36 @@ +/*=================================================================== + +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 QmitkVisualizationPerspective_H_ +#define QmitkVisualizationPerspective_H_ + +#include + +class QmitkVisualizationPerspective : public QObject, public berry::IPerspectiveFactory +{ + Q_OBJECT + Q_INTERFACES(berry::IPerspectiveFactory) + +public: + + QmitkVisualizationPerspective() {} + ~QmitkVisualizationPerspective() {} + + void CreateInitialLayout(berry::IPageLayout::Pointer layout); +}; + +#endif /* QmitkVisualizationPerspective_H_ */