diff --git a/Plugins/org.mitk.gui.qt.dicom/files.cmake b/Plugins/org.mitk.gui.qt.dicom/files.cmake
index 41eca590e4..b216a9a11f 100644
--- a/Plugins/org.mitk.gui.qt.dicom/files.cmake
+++ b/Plugins/org.mitk.gui.qt.dicom/files.cmake
@@ -1,54 +1,55 @@
set(SRC_CPP_FILES
)
set(INTERNAL_CPP_FILES
mitkPluginActivator.cpp
QmitkDicomBrowser.cpp
QmitkDicomDirectoryListener.cpp
QmitkStoreSCPLauncher.cpp
QmitkStoreSCPLauncherBuilder.cpp
QmitkDicomDataEventPublisher.cpp
DicomEventHandler.cpp
- #QmitkDicomPreferencePage.cpp
+ QmitkDicomPreferencePage.cpp
)
set(UI_FILES
src/internal/QmitkDicomBrowserControls.ui
+ src/internal/QmitkDicomPreferencePage.ui
)
set(MOC_H_FILES
src/internal/mitkPluginActivator.h
src/internal/QmitkDicomBrowser.h
src/internal/QmitkDicomDirectoryListener.h
src/internal/QmitkStoreSCPLauncher.h
src/internal/QmitkStoreSCPLauncherBuilder.h
src/internal/QmitkDicomDataEventPublisher.h
src/internal/DicomEventHandler.h
- #src/internal/QmitkDicomPreferencePage.h
+ src/internal/QmitkDicomPreferencePage.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
resources/dicom.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.dicom/plugin.xml b/Plugins/org.mitk.gui.qt.dicom/plugin.xml
index fcfa280798..5aa4809400 100644
--- a/Plugins/org.mitk.gui.qt.dicom/plugin.xml
+++ b/Plugins/org.mitk.gui.qt.dicom/plugin.xml
@@ -1,18 +1,20 @@
-
+
+
+
diff --git a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomBrowser.cpp b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomBrowser.cpp
index f084e5d70a..d1813888b9 100644
--- a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomBrowser.cpp
+++ b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomBrowser.cpp
@@ -1,200 +1,206 @@
/*===================================================================
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.
===================================================================*/
// Qmitk
#include "QmitkDicomBrowser.h"
#include "mitkPluginActivator.h"
+#include "berryIQtPreferencePage.h"
+#include
+#include
+#include
+#include
const std::string QmitkDicomBrowser::EDITOR_ID = "org.mitk.editors.dicombrowser";
const QString QmitkDicomBrowser::TEMP_DICOM_FOLDER_SUFFIX="TmpDicomFolder";
QmitkDicomBrowser::QmitkDicomBrowser()
: m_Thread(new QThread())
, m_DicomDirectoryListener(new QmitkDicomDirectoryListener())
, m_StoreSCPLauncher(new QmitkStoreSCPLauncher(&m_Builder))
, m_Publisher(new QmitkDicomDataEventPublisher())
{
}
QmitkDicomBrowser::~QmitkDicomBrowser()
{
m_Thread.quit();
m_Thread.wait(1000);
delete m_DicomDirectoryListener;
delete m_StoreSCPLauncher;
delete m_Handler;
delete m_Publisher;
}
void QmitkDicomBrowser::CreateQtPartControl(QWidget *parent )
{
m_Controls.setupUi( parent );
m_Controls.StoreSCPStatusLabel->setTextFormat(Qt::RichText);
m_Controls.StoreSCPStatusLabel->setText("");
TestHandler();
- SetPluginDirectory();
- SetDatabaseDirectory("DatabaseDirectory");
+ OnPreferencesChanged(0);
CreateTemporaryDirectory();
StartDicomDirectoryListener();
m_Controls.m_ctkDICOMQueryRetrieveWidget->useProgressDialog(false);
connect(m_Controls.tabWidget, SIGNAL(currentChanged(int)), this, SLOT(OnTabChanged(int)));
connect(m_Controls.externalDataWidget,SIGNAL(SignalStartDicomImport(const QStringList&)),
m_Controls.internalDataWidget,SLOT(OnStartDicomImport(const QStringList&)));
connect(m_Controls.externalDataWidget,SIGNAL(SignalDicomToDataManager(const QHash&)),
this,SLOT(OnViewButtonAddToDataManager(const QHash&)));
connect(m_Controls.internalDataWidget,SIGNAL(SignalFinishedImport()),this, SLOT(OnDicomImportFinished()));
connect(m_Controls.internalDataWidget,SIGNAL(SignalDicomToDataManager(const QHash&)),
this,SLOT(OnViewButtonAddToDataManager(const QHash&)));
}
void QmitkDicomBrowser::Init(berry::IEditorSite::Pointer site, berry::IEditorInput::Pointer input)
{
this->SetSite(site);
this->SetInput(input);
}
void QmitkDicomBrowser::SetFocus()
{
}
berry::IPartListener::Events::Types QmitkDicomBrowser::GetPartEventTypes() const
{
return Events::CLOSED | Events::HIDDEN | Events::VISIBLE;
}
void QmitkDicomBrowser::OnTabChanged(int page)
{
if (page == 2)//Query/Retrieve is selected
{
QString storagePort = m_Controls.m_ctkDICOMQueryRetrieveWidget->getServerParameters()["StoragePort"].toString();
QString storageAET = m_Controls.m_ctkDICOMQueryRetrieveWidget->getServerParameters()["StorageAETitle"].toString();
if(!((m_Builder.GetAETitle()->compare(storageAET,Qt::CaseSensitive)==0)&&
(m_Builder.GetPort()->compare(storagePort,Qt::CaseSensitive)==0)))
{
StopStoreSCP();
StartStoreSCP();
}
}
}
void QmitkDicomBrowser::OnDicomImportFinished()
{
m_Controls.tabWidget->setCurrentIndex(0);
}
void QmitkDicomBrowser::StartDicomDirectoryListener()
{
if(!m_Thread.isRunning())
{
m_DicomDirectoryListener->SetDicomListenerDirectory(m_TempDirectory);
m_DicomDirectoryListener->SetDicomFolderSuffix(TEMP_DICOM_FOLDER_SUFFIX);
connect(m_DicomDirectoryListener,SIGNAL(SignalStartDicomImport(const QStringList&)),m_Controls.internalDataWidget,SLOT(OnStartDicomImport(const QStringList&)),Qt::DirectConnection);
//connect(m_Controls.internalDataWidget,SIGNAL(SignalFinishedImport()),m_DicomDirectoryListener,SLOT(OnImportFinished()),Qt::DirectConnection);
m_DicomDirectoryListener->moveToThread(&m_Thread);
m_Thread.start();
}
}
void QmitkDicomBrowser::TestHandler()
{
m_Handler = new DicomEventHandler();
m_Handler->SubscribeSlots();
}
void QmitkDicomBrowser::OnViewButtonAddToDataManager(QHash eventProperties)
{
ctkDictionary properties;
// properties["PatientName"] = eventProperties["PatientName"];
// properties["StudyUID"] = eventProperties["StudyUID"];
// properties["StudyName"] = eventProperties["StudyName"];
// properties["SeriesUID"] = eventProperties["SeriesUID"];
// properties["SeriesName"] = eventProperties["SeriesName"];
properties["FilesForSeries"] = eventProperties["FilesForSeries"];
m_Publisher->PublishSignals(mitk::PluginActivator::getContext());
m_Publisher->AddSeriesToDataManagerEvent(properties);
}
void QmitkDicomBrowser::StartStoreSCP()
{
QString storagePort = m_Controls.m_ctkDICOMQueryRetrieveWidget->getServerParameters()["StoragePort"].toString();
QString storageAET = m_Controls.m_ctkDICOMQueryRetrieveWidget->getServerParameters()["StorageAETitle"].toString();
m_Builder.AddPort(storagePort)->AddAETitle(storageAET)->AddTransferSyntax()->AddOtherNetworkOptions()->AddMode()->AddOutputDirectory(m_TempDirectory);
m_StoreSCPLauncher = new QmitkStoreSCPLauncher(&m_Builder);
connect(m_StoreSCPLauncher, SIGNAL(SignalStatusOfStoreSCP(const QString&)), this, SLOT(OnStoreSCPStatusChanged(const QString&)));
connect(m_StoreSCPLauncher ,SIGNAL(SignalStartImport(const QStringList&)),m_Controls.internalDataWidget,SLOT(OnStartDicomImport(const QStringList&)));
connect(m_StoreSCPLauncher ,SIGNAL(SignalStoreSCPError(const QString&)),m_DicomDirectoryListener,SLOT(OnDicomNetworkError(const QString&)),Qt::DirectConnection);
connect(m_StoreSCPLauncher ,SIGNAL(SignalStoreSCPError(const QString&)),this,SLOT(OnDicomNetworkError(const QString&)),Qt::DirectConnection);
m_StoreSCPLauncher->StartStoreSCP();
-
}
void QmitkDicomBrowser::OnStoreSCPStatusChanged(const QString& status)
{
m_Controls.StoreSCPStatusLabel->setText(" "+status);
}
void QmitkDicomBrowser::OnDicomNetworkError(const QString& status)
{
m_Controls.StoreSCPStatusLabel->setText(" "+status);
}
void QmitkDicomBrowser::StopStoreSCP()
{
delete m_StoreSCPLauncher;
}
void QmitkDicomBrowser::SetPluginDirectory()
{
m_PluginDirectory = mitk::PluginActivator::getContext()->getDataFile("").absolutePath();
- m_PluginDirectory.append("/");
-}
-
-void QmitkDicomBrowser::SetDatabaseDirectory(const QString& databaseDirectory)
-{
- m_DatabaseDirectory.clear();
- m_DatabaseDirectory.append(m_PluginDirectory);
- m_DatabaseDirectory.append(databaseDirectory);
- m_Controls.internalDataWidget->SetDatabaseDirectory(m_DatabaseDirectory);
+ m_PluginDirectory.append("/database");
}
void QmitkDicomBrowser::CreateTemporaryDirectory()
{
- QDir tmp;
- QString tmpPath = QDir::tempPath();
- m_TempDirectory.clear();
- m_TempDirectory.append(tmpPath);
- m_TempDirectory.append(QString("/"));
- m_TempDirectory.append(TEMP_DICOM_FOLDER_SUFFIX);
- m_TempDirectory.append(QString("."));
- m_TempDirectory.append(QTime::currentTime().toString("hhmmsszzz"));
- m_TempDirectory.append(QString::number(QCoreApplication::applicationPid()));
- tmp.mkdir(QDir::toNativeSeparators( m_TempDirectory ));
-
-}
+ QDir tmp;
+ QString tmpPath = QDir::tempPath();
+ m_TempDirectory.clear();
+ m_TempDirectory.append(tmpPath);
+ m_TempDirectory.append(QString("/"));
+ m_TempDirectory.append(TEMP_DICOM_FOLDER_SUFFIX);
+ m_TempDirectory.append(QString("."));
+ m_TempDirectory.append(QTime::currentTime().toString("hhmmsszzz"));
+ m_TempDirectory.append(QString::number(QCoreApplication::applicationPid()));
+ tmp.mkdir(QDir::toNativeSeparators( m_TempDirectory ));
+}
+
+void QmitkDicomBrowser::OnPreferencesChanged(const berry::IBerryPreferences* prefs)
+{
+ SetPluginDirectory();
+ berry::IPreferencesService::Pointer prefService=
+ berry::Platform::GetServiceRegistry().GetServiceById(berry::IPreferencesService::ID);
+ std::string targetPath = prefService->GetSystemPreferences()->Node("/org.mitk.views.dicomreader")->Get("default dicom path", m_PluginDirectory.toStdString());
+
+ m_DatabaseDirectory.clear();
+ m_DatabaseDirectory.append(targetPath.c_str());
+ m_Controls.internalDataWidget->SetDatabaseDirectory(m_DatabaseDirectory);
+}
\ No newline at end of file
diff --git a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomBrowser.h b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomBrowser.h
index dfa44ce2b8..1d8d38dffe 100644
--- a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomBrowser.h
+++ b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomBrowser.h
@@ -1,150 +1,150 @@
/*=========================================================================
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 QmitkDicomBrowser_h
#define QmitkDicomBrowser_h
// Blueberry
#include
+#include
#include
#include
// MITK
#include "DicomEventHandler.h"
#include "QmitkDicomDataEventPublisher.h"
#include "QmitkDicomDirectoryListener.h"
#include "QmitkStoreSCPLauncher.h"
#include "QmitkStoreSCPLauncherBuilder.h"
#include "ui_QmitkDicomBrowserControls.h"
#include
// Qt
#include
#include
#include
#include
#include
/**
* \brief QmitkDicomBrowser is an editor providing functionality for dicom storage and import and query retrieve functionality.
*
* \sa berry::IPartListener
* \ingroup ${plugin_target}_internal
*/
class DICOM_EXPORT QmitkDicomBrowser : public berry::QtEditorPart, virtual public berry::IPartListener
{
// 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:
berryObjectMacro(QmitkDicomBrowser);
static const std::string EDITOR_ID;
static const QString TEMP_DICOM_FOLDER_SUFFIX;
/**
* \brief QmitkDicomBrowser constructor.
*/
QmitkDicomBrowser();
/**
* \brief QmitkDicomBrowser destructor.
*/
virtual ~QmitkDicomBrowser();
/**
* \brief Init initialize the editor.
*/
void Init(berry::IEditorSite::Pointer site, berry::IEditorInput::Pointer input);
void SetFocus();
void DoSave() {}
void DoSaveAs() {}
bool IsDirty() const { return false; }
bool IsSaveAsAllowed() const { return false; }
+ virtual void OnPreferencesChanged(const berry::IBerryPreferences* prefs);
+
signals:
/**
* \brief SignalStartDicomImport is enitted when dicom directory for import was selected.
*/
void SignalStartDicomImport(const QString&);
protected slots:
/// \brief Called when import is finished.
void OnDicomImportFinished();
/// \brief Called when Query Retrieve or Import Folder was clicked.
void OnTabChanged(int);
/// \brief Called when view button is clicked. Sends out an event for adding the current selected file to the mitkDataStorage.
void OnViewButtonAddToDataManager(QHash eventProperties);
/// \brief Called when status of dicom storage provider changes.
void OnStoreSCPStatusChanged(const QString& status);
/// \brief Called when dicom storage provider emits a network error.
void OnDicomNetworkError(const QString& status);
protected:
/// \brief StartStoreSCP starts dicom storage provider.
void StartStoreSCP();
/// \brief StopStoreSCP stops dicom storage provider.
void StopStoreSCP();
/// \brief TestHandler initializes event handler.
void TestHandler();
- /// \brief Sets database directory.
- void SetDatabaseDirectory(const QString& databaseDirectory);
-
/// \brief CreateTemporaryDirectory creates temporary directory in which temorary dicom objects are stored.
void CreateTemporaryDirectory();
/// \brief StartDicomDirectoryListener starts dicom directory listener.
void StartDicomDirectoryListener();
/**
* \brief CreateQtPartControl(QWidget *parent) sets the view objects from ui_QmitkDicomBrowserControls.h.
*
* \param parent is a pointer to the parent widget
*/
void CreateQtPartControl(QWidget *parent);
/// \brief SetPluginDirectory Sets plugin directory.
void SetPluginDirectory();
Events::Types GetPartEventTypes() const;
ctkFileDialog* m_ImportDialog;
Ui::QmitkDicomBrowserControls m_Controls;
QThread m_Thread;
QmitkDicomDirectoryListener* m_DicomDirectoryListener;
QmitkStoreSCPLauncherBuilder m_Builder;
QmitkStoreSCPLauncher* m_StoreSCPLauncher;
DicomEventHandler* m_Handler;
QmitkDicomDataEventPublisher* m_Publisher;
QString m_PluginDirectory;
QString m_TempDirectory;
QString m_DatabaseDirectory;
};
#endif // QmitkDicomBrowser_h
diff --git a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomPreferencePage.cpp b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomPreferencePage.cpp
index 6ae6730500..424284bd8d 100644
--- a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomPreferencePage.cpp
+++ b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomPreferencePage.cpp
@@ -1,101 +1,120 @@
/*===================================================================
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 "QmitkDicomPreferencePage.h"
-#include "QmitkDicomEditor.h"
#include
#include
#include
+#include "mitkPluginActivator.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+static QString CreateDefaultPath()
+{
+ QString path = mitk::PluginActivator::getContext()->getDataFile("").absolutePath();
+ path.append("/database");
+ return path;
+}
QmitkDicomPreferencePage::QmitkDicomPreferencePage()
-: m_MainControl(0)
+ : m_MainControl(0)
{
-
}
QmitkDicomPreferencePage::~QmitkDicomPreferencePage()
{
}
void QmitkDicomPreferencePage::Init(berry::IWorkbench::Pointer )
{
-
}
void QmitkDicomPreferencePage::CreateQtControl(QWidget* parent)
{
- berry::IPreferencesService::Pointer prefService=
- berry::Platform::GetServiceRegistry().GetServiceById(berry::IPreferencesService::ID);
-
- m_DicomPreferencesNode = prefService->GetSystemPreferences()->Node(QmitkDicomEditor::EDITOR_ID).Cast();;
- assert( m_DicomPreferencesNode );
-
- m_MainControl = new QWidget(parent);
- m_MainControl->setWindowTitle(QApplication::translate("DicomPreferencePage", "Form", 0, QApplication::UnicodeUTF8));
- formLayout = new QFormLayout(m_MainControl);
- formLayout->setObjectName(QString::fromUtf8("formLayout"));
- formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
- label = new QLabel(m_MainControl);
- label->setObjectName(QString::fromUtf8("label"));
- label->setText(QApplication::translate("DicomPreferencePage", "Database directory:", 0, QApplication::UnicodeUTF8));
-
- formLayout->setWidget(0, QFormLayout::LabelRole, label);
-
- DatabaseLineEdit = new QLineEdit(m_MainControl);
- DatabaseLineEdit->setObjectName(QString::fromUtf8("DatabaseLineEdit"));
+ berry::IPreferencesService::Pointer prefService=
+ berry::Platform::GetServiceRegistry().GetServiceById(berry::IPreferencesService::ID);
- formLayout->setWidget(0, QFormLayout::FieldRole, DatabaseLineEdit);
+ m_DicomPreferencesNode = prefService->GetSystemPreferences()->Node("/org.mitk.views.dicomreader");
- label_2 = new QLabel(m_MainControl);
- label_2->setObjectName(QString::fromUtf8("label_2"));
- label_2->setText(QApplication::translate("DicomPreferencePage", "Dicom listener directory:", 0, QApplication::UnicodeUTF8));
+ m_MainControl = new QWidget(parent);
- formLayout->setWidget(1, QFormLayout::LabelRole, label_2);
+ QFormLayout *formLayout = new QFormLayout;
+ formLayout->setHorizontalSpacing(8);
+ formLayout->setVerticalSpacing(24);
- ListenerLineEdit = new QLineEdit(m_MainControl);
- ListenerLineEdit->setObjectName(QString::fromUtf8("ListenerLineEdit"));
+ QHBoxLayout* displayOptionsLayout = new QHBoxLayout;
+ m_PathEdit = new QLineEdit(m_MainControl);
+ displayOptionsLayout->addWidget(m_PathEdit);
- formLayout->setWidget(1, QFormLayout::FieldRole, ListenerLineEdit);
+ m_PathSelect = new QPushButton("Select Path",m_MainControl);
+ displayOptionsLayout->addWidget(m_PathSelect);
- frame = new QFrame(m_MainControl);
- frame->setObjectName(QString::fromUtf8("frame"));
- frame->setFrameShape(QFrame::StyledPanel);
- frame->setFrameShadow(QFrame::Raised);
-
- formLayout->setWidget(3, QFormLayout::FieldRole, frame);
+ m_PathDefault = new QPushButton("Default",m_MainControl);
+ displayOptionsLayout->addWidget(m_PathDefault);
+ formLayout->addRow("Local database path:",displayOptionsLayout);
+ m_MainControl->setLayout(formLayout);
+ connect(m_PathDefault, SIGNAL(clicked()), this, SLOT(DefaultButtonPushed()));
+ connect(m_PathSelect, SIGNAL(clicked()), this, SLOT(PathSelectButtonPushed()));
+ this->Update();
}
QWidget* QmitkDicomPreferencePage::GetQtControl() const
{
- return m_MainControl;
+ return m_MainControl;
}
void QmitkDicomPreferencePage::PerformCancel()
{
}
bool QmitkDicomPreferencePage::PerformOk()
{
- return true;
+ m_DicomPreferencesNode->Put("default dicom path",m_PathEdit->text().toStdString());
+ return true;
}
void QmitkDicomPreferencePage::Update()
{
+ std::string path = m_DicomPreferencesNode->Get("default dicom path", CreateDefaultPath().toStdString());
+ m_PathEdit->setText(path.c_str());
+}
+
+void QmitkDicomPreferencePage::DefaultButtonPushed()
+{
+ m_PathEdit->setText(CreateDefaultPath());
+}
+
+void QmitkDicomPreferencePage::PathSelectButtonPushed()
+{
+ QString path = QFileDialog::getExistingDirectory(m_MainControl,"Folder for Dicom directory","dir",false);
+ if (!path.isEmpty())
+ {
+ m_PathEdit->setText(path);
+ }
}
\ No newline at end of file
diff --git a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomPreferencePage.h b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomPreferencePage.h
index 9dc547db54..1d1c75c972 100644
--- a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomPreferencePage.h
+++ b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomPreferencePage.h
@@ -1,81 +1,75 @@
/*===================================================================
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 QmitkDicomPreferencePage_h
#define QmitkDicomPreferencePage_h
#include
#include
-#include "ui_DicomPreferencePage.h"
-#include "berryIQtPreferencePage.h"
#include "berryIQtPreferencePage.h"
#include
#include
class QWidget;
class QCheckBox;
class QLineEdit;
+class QPushButton;
class DICOM_EXPORT QmitkDicomPreferencePage : public QObject, public berry::IQtPreferencePage
{
Q_OBJECT
Q_INTERFACES(berry::IPreferencePage)
public:
QmitkDicomPreferencePage();
virtual ~QmitkDicomPreferencePage();
void Init(berry::IWorkbench::Pointer workbench);
void CreateQtControl(QWidget* widget);
QWidget* GetQtControl() const;
///
/// \see IPreferencePage::PerformOk()
///
virtual bool PerformOk();
///
/// \see IPreferencePage::PerformCancel()
///
virtual void PerformCancel();
///
/// \see IPreferencePage::Update()
///
virtual void Update();
protected:
QWidget* m_MainControl;
- Ui::DicomPreferencePage* m_Controls;
berry::IPreferences::Pointer m_DicomPreferencesNode;
- QFormLayout *formLayout;
- QLabel *label;
- QLineEdit *DatabaseLineEdit;
- QLabel *label_2;
- QLineEdit *ListenerLineEdit;
- QFrame *frame;
- QHBoxLayout *horizontalLayout;
- QPushButton *pushButton;
- QPushButton *pushButton_2;
-
+ QLineEdit* m_PathEdit;
+ QPushButton* m_PathSelect;
+ QPushButton* m_PathDefault;
+protected slots:
+ void DefaultButtonPushed();
+ void PathSelectButtonPushed();
};
#endif // QmitkQmitkDicomPreferencePage_h
\ No newline at end of file
diff --git a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomPreferencePage.ui b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomPreferencePage.ui
new file mode 100644
index 0000000000..158750b628
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomPreferencePage.ui
@@ -0,0 +1,493 @@
+
+
+ QmitkSegmentationControls
+
+
+
+ 0
+ 0
+ 237
+ 591
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+
+ MS Shell Dlg 2
+ 8
+ 50
+ false
+ false
+ false
+ false
+
+
+
+ QmitkSegmentation
+
+
+
+ QLayout::SetMinimumSize
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Data Selection
+
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
-
+
+
+ QLayout::SetMinimumSize
+
+
+ 4
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Patient Image
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Segmentation
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Create a new segmentation
+
+
+ ...
+
+
+
+ :/segmentation/btnNew.png:/segmentation/btnNew.png
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 200
+ 0
+ 0
+
+
+
+
+
+
+ 200
+ 0
+ 0
+
+
+
+
+
+
+ 200
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 200
+ 0
+ 0
+
+
+
+
+
+
+ 200
+ 0
+ 0
+
+
+
+
+
+
+ 200
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 84
+ 82
+ 78
+
+
+
+
+
+
+ 84
+ 82
+ 78
+
+
+
+
+
+
+ 84
+ 82
+ 78
+
+
+
+
+
+
+
+
+ 50
+ false
+
+
+
+ Please load an image!
+
+
+ true
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Qt::LeftToRight
+
+
+ QTabWidget::tab-bar { alignment: middle; }
+
+
+ QTabWidget::North
+
+
+ QTabWidget::Triangular
+
+
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+ Qt::LeftToRight
+
+
+ false
+
+
+ 2D Tools
+
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ false
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ false
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ false
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+ 0
+ 0
+
+
+
+ 3D Tools
+
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ false
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ false
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QmitkDataStorageComboBox
+ QComboBox
+ QmitkDataStorageComboBox.h
+
+
+ QmitkToolSelectionBox
+ QWidget
+
+
+
+ QmitkSlicesInterpolator
+ QWidget
+ QmitkSlicesInterpolator.h
+
+
+ QmitkToolGUIArea
+ QWidget
+
+
+
+
+ QmitkToolReferenceDataSelectionBox.h
+ QmitkToolGUIArea.h
+ QmitkToolSelectionBox.h
+ QmitkSlicesInterpolator.h
+
+
+
+
+
+
diff --git a/Plugins/org.mitk.gui.qt.dicom/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.dicom/src/internal/mitkPluginActivator.cpp
index 516fd7e11e..29953d3894 100644
--- a/Plugins/org.mitk.gui.qt.dicom/src/internal/mitkPluginActivator.cpp
+++ b/Plugins/org.mitk.gui.qt.dicom/src/internal/mitkPluginActivator.cpp
@@ -1,47 +1,45 @@
/*===================================================================
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 "mitkPluginActivator.h"
#include
#include "QmitkDicomBrowser.h"
-//#include "QmitkDicomPreferencePage.h"
+#include "QmitkDicomPreferencePage.h"
namespace mitk {
-
ctkPluginContext* PluginActivator::pluginContext = 0;
void PluginActivator::start(ctkPluginContext* context)
{
BERRY_REGISTER_EXTENSION_CLASS(QmitkDicomBrowser, context)
- //BERRY_REGISTER_EXTENSION_CLASS(QmitkDicomPreferencePage, context)
+ BERRY_REGISTER_EXTENSION_CLASS(QmitkDicomPreferencePage, context)
pluginContext = context;
}
void PluginActivator::stop(ctkPluginContext* context)
{
Q_UNUSED(context)
pluginContext = NULL;
}
ctkPluginContext* PluginActivator::getContext()
{
return pluginContext;
}
-
}
-Q_EXPORT_PLUGIN2(org_mitk_gui_qt_dicom, mitk::PluginActivator)
+Q_EXPORT_PLUGIN2(org_mitk_gui_qt_dicom, mitk::PluginActivator)
\ No newline at end of file