diff --git a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/files.cmake b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/files.cmake
index 0265dbbb0b..41465cf2b8 100644
--- a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/files.cmake
+++ b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/files.cmake
@@ -1,67 +1,70 @@
SET(SRC_CPP_FILES
QmitkDiffusionImagingAppApplication.cpp
QmitkDiffusionImagingAppWorkbenchAdvisor.cpp
)
SET(INTERNAL_CPP_FILES
mitkPluginActivator.cpp
QmitkDiffusionImagingAppIntroPart.cpp
QmitkDiffusionImagingAppPerspective.cpp
QmitkWelcomePerspective.cpp
QmitkReconstructionPerspective.cpp
QmitkTrackingPerspective.cpp
+ QmitkFileImportPerspective.cpp
)
SET(UI_FILES
src/internal/QmitkWelcomeScreenViewControls.ui
)
SET(MOC_H_FILES
src/internal/QmitkDiffusionImagingAppIntroPart.h
src/internal/mitkPluginActivator.h
src/QmitkDiffusionImagingAppApplication.h
src/internal/QmitkDiffusionImagingAppPerspective.h
src/internal/QmitkWelcomePerspective.h
src/internal/QmitkReconstructionPerspective.h
src/internal/QmitkTrackingPerspective.h
+ src/internal/QmitkFileImportPerspective.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
)
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 96eb491fb2..c590248052 100644
--- a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/plugin.xml
+++ b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/plugin.xml
@@ -1,39 +1,46 @@
+
+
+
+
diff --git a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkFileImportPerspective.cpp b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkFileImportPerspective.cpp
new file mode 100644
index 0000000000..554b99ebc7
--- /dev/null
+++ b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkFileImportPerspective.cpp
@@ -0,0 +1,38 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date: 2009-10-23 02:59:36 +0200 (Fr, 23 Okt 2009) $
+ Version: $Revision: 19652 $
+
+ 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 "QmitkFileImportPerspective.h"
+
+void QmitkFileImportPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout)
+{
+ std::string editorArea = layout->GetEditorArea();
+
+ layout->AddStandaloneView("org.mitk.views.datamanager", false, berry::IPageLayout::LEFT, 0.3f, editorArea);
+
+ layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview",
+ false, berry::IPageLayout::BOTTOM, .2f, "org.mitk.views.datamanager");
+
+ berry::IFolderLayout::Pointer left =
+ layout->CreateFolder("org.mitk.leftcontrols",
+ berry::IPageLayout::BOTTOM, 0.2f, "org.mitk.views.controlvisualizationpropertiesview");
+
+ left->AddView("org.mitk.views.diffusiondicomimport");
+
+
+ berry::IViewLayout::Pointer lo = layout->GetViewLayout("org.mitk.views.diffusiondicomimport");
+ lo->SetCloseable(false);
+}
diff --git a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkFileImportPerspective.h b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkFileImportPerspective.h
new file mode 100644
index 0000000000..86884e6811
--- /dev/null
+++ b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkFileImportPerspective.h
@@ -0,0 +1,42 @@
+/*=========================================================================
+
+ Program: BlueBerry Platform
+ Language: C++
+ Date: $Date: 2009-10-23 02:59:36 +0200 (Fr, 23 Okt 2009) $
+ Version: $Revision: 19652 $
+
+ 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 QmitkFileImportPerspective_H_
+#define QmitkFileImportPerspective_H_
+
+#include
+
+class QmitkFileImportPerspective : public QObject, public berry::IPerspectiveFactory
+{
+ Q_OBJECT
+ Q_INTERFACES(berry::IPerspectiveFactory)
+
+public:
+
+ QmitkFileImportPerspective() {}
+ QmitkFileImportPerspective(const QmitkFileImportPerspective& other)
+ {
+ Q_UNUSED(other)
+ throw std::runtime_error("Copy constructor not implemented");
+ }
+ ~QmitkFileImportPerspective() {}
+
+ void CreateInitialLayout(berry::IPageLayout::Pointer layout);
+};
+
+#endif /* QmitkFileImportPerspective_H_ */
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 0eb1324a31..f0730fda18 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,126 +1,128 @@
/*=========================================================================
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 "QmitkDiffusionImagingAppIntroPart.h"
#include "QmitkDiffusionImagingAppPerspective.h"
#include "QmitkWelcomePerspective.h"
#include "QmitkReconstructionPerspective.h"
#include "QmitkTrackingPerspective.h"
+#include "QmitkFileImportPerspective.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(QmitkDiffusionImagingAppPerspective, context)
//BERRY_REGISTER_EXTENSION_CLASS(QmitkWelcomePerspective, context)
+ BERRY_REGISTER_EXTENSION_CLASS(QmitkFileImportPerspective, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkReconstructionPerspective, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkTrackingPerspective, 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)