diff --git a/Plugins/PluginList.cmake b/Plugins/PluginList.cmake
index 3599933f46..3a271d14b4 100644
--- a/Plugins/PluginList.cmake
+++ b/Plugins/PluginList.cmake
@@ -1,49 +1,50 @@
# Plug-ins must be ordered according to their dependencies
set(MITK_EXT_PLUGINS
org.mitk.core.services:ON
org.mitk.gui.common:ON
org.mitk.planarfigure:ON
org.mitk.core.ext:OFF
org.mitk.core.jobs:OFF
org.mitk.diffusionimaging:OFF
org.mitk.simulation:OFF
org.mitk.gui.qt.application:ON
org.mitk.gui.qt.coreapplication:OFF
org.mitk.gui.qt.ext:OFF
org.mitk.gui.qt.extapplication:OFF
org.mitk.gui.qt.common:ON
org.mitk.gui.qt.stdmultiwidgeteditor:ON
org.mitk.gui.qt.common.legacy:OFF
org.mitk.gui.qt.cmdlinemodules:OFF
org.mitk.gui.qt.diffusionimagingapp:OFF
org.mitk.gui.qt.datamanager:ON
org.mitk.gui.qt.datamanagerlight:OFF
org.mitk.gui.qt.properties:ON
org.mitk.gui.qt.basicimageprocessing:OFF
org.mitk.gui.qt.dicom:OFF
org.mitk.gui.qt.diffusionimaging:OFF
org.mitk.gui.qt.dtiatlasapp:OFF
org.mitk.gui.qt.examples:OFF
org.mitk.gui.qt.examplesopencv:OFF
org.mitk.gui.qt.igtexamples:OFF
org.mitk.gui.qt.igttracking:OFF
org.mitk.gui.qt.imagecropper:OFF
org.mitk.gui.qt.imagenavigator:ON
org.mitk.gui.qt.materialeditor:OFF
org.mitk.gui.qt.measurementtoolbox:OFF
org.mitk.gui.qt.meshdecimation:OFF
org.mitk.gui.qt.moviemaker:OFF
org.mitk.gui.qt.pointsetinteraction:OFF
org.mitk.gui.qt.python:OFF
org.mitk.gui.qt.registration:OFF
org.mitk.gui.qt.remeshing:OFF
org.mitk.gui.qt.segmentation:OFF
org.mitk.gui.qt.simulation:OFF
org.mitk.gui.qt.toftutorial:OFF
org.mitk.gui.qt.tofutil:OFF
org.mitk.gui.qt.ugvisualization:OFF
org.mitk.gui.qt.ultrasound:OFF
org.mitk.gui.qt.volumevisualization:OFF
+ org.mitk.gui.qt.xnatinterface:ON
)
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/CMakeLists.txt b/Plugins/org.mitk.gui.qt.xnatinterface/CMakeLists.txt
new file mode 100644
index 0000000000..2e42281c93
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.xnatinterface/CMakeLists.txt
@@ -0,0 +1,7 @@
+project(org_mitk_gui_qt_xnatinterface)
+
+MACRO_CREATE_MITK_CTK_PLUGIN(
+ EXPORT_DIRECTIVE XNATINTERFACE_EXPORT
+ EXPORTED_INCLUDE_SUFFIXES src
+ MODULE_DEPENDENCIES QmitkExt Poco
+)
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/documentation/UserManual/Manual.dox b/Plugins/org.mitk.gui.qt.xnatinterface/documentation/UserManual/Manual.dox
new file mode 100644
index 0000000000..34bb17bd89
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.xnatinterface/documentation/UserManual/Manual.dox
@@ -0,0 +1,19 @@
+/**
+\bundlemainpage{org.mitk.gui.qt.xnatinterface} Xnatinterface
+
+\image html icon.xpm "Icon of Xnatinterface"
+
+Available sections:
+ - \ref org.mitk.gui.qt.xnatinterfaceOverview
+
+\section org.mitk.gui.qt.xnatinterfaceOverview
+Describe the features of your awesome plugin here
+
+- Increases productivity
+
- Creates beautiful images
+
- Generates PhD thesis
+
- Brings world peace
+
+
+*/
+
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/documentation/UserManual/icon.xpm b/Plugins/org.mitk.gui.qt.xnatinterface/documentation/UserManual/icon.xpm
new file mode 100644
index 0000000000..83e48be4d8
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.xnatinterface/documentation/UserManual/icon.xpm
@@ -0,0 +1,21 @@
+/* XPM */
+static const char * icon_xpm[] = {
+"16 16 2 1",
+" c #FF0000",
+". c #000000",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/documentation/doxygen/modules.dox b/Plugins/org.mitk.gui.qt.xnatinterface/documentation/doxygen/modules.dox
new file mode 100644
index 0000000000..544c184396
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.xnatinterface/documentation/doxygen/modules.dox
@@ -0,0 +1,16 @@
+/**
+ \defgroup org_mitk_gui_qt_xnatinterface org.mitk.gui.qt.xnatinterface
+ \ingroup MITKPlugins
+
+ \brief Describe your plugin here.
+
+*/
+
+/**
+ \defgroup org_mitk_gui_qt_xnatinterface_internal Internal
+ \ingroup org_mitk_gui_qt_xnatinterface
+
+ \brief This subcategory includes the internal classes of the org.mitk.gui.qt.xnatinterface plugin. Other
+ plugins must not rely on these classes. They contain implementation details and their interface
+ may change at any time. We mean it.
+*/
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/files.cmake b/Plugins/org.mitk.gui.qt.xnatinterface/files.cmake
new file mode 100644
index 0000000000..ad289ff3eb
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.xnatinterface/files.cmake
@@ -0,0 +1,43 @@
+set(SRC_CPP_FILES
+
+)
+
+set(INTERNAL_CPP_FILES
+ org_mitk_gui_qt_xnatinterface_Activator.cpp
+ XNATProjects.cpp
+)
+
+set(UI_FILES
+ src/internal/XNATProjectsControls.ui
+)
+
+set(MOC_H_FILES
+ src/internal/org_mitk_gui_qt_xnatinterface_Activator.h
+ src/internal/XNATProjects.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
+ src/internal/images.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.xnatinterface/manifest_headers.cmake b/Plugins/org.mitk.gui.qt.xnatinterface/manifest_headers.cmake
new file mode 100644
index 0000000000..1e94b944fd
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.xnatinterface/manifest_headers.cmake
@@ -0,0 +1,5 @@
+set(Plugin-Name "Xnatinterface")
+set(Plugin-Version "0.1")
+set(Plugin-Vendor "DKFZ, Medical and Biological Informatics")
+set(Plugin-ContactAddress "")
+set(Require-Plugin org.mitk.gui.qt.common)
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/plugin.xml b/Plugins/org.mitk.gui.qt.xnatinterface/plugin.xml
new file mode 100644
index 0000000000..76ec9b3883
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.xnatinterface/plugin.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/resources/icon.xpm b/Plugins/org.mitk.gui.qt.xnatinterface/resources/icon.xpm
new file mode 100644
index 0000000000..83e48be4d8
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.xnatinterface/resources/icon.xpm
@@ -0,0 +1,21 @@
+/* XPM */
+static const char * icon_xpm[] = {
+"16 16 2 1",
+" c #FF0000",
+". c #000000",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/XNATProjects.cpp b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/XNATProjects.cpp
new file mode 100644
index 0000000000..b4c498f94b
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/XNATProjects.cpp
@@ -0,0 +1,434 @@
+/*=========================================================================
+
+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.
+
+=========================================================================*/
+
+
+// Standard
+#include
+#include
+#include
+
+// Blueberry
+#include
+#include
+
+// Qmitk
+#include "XNATProjects.h"
+
+// Qt
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+// Poco
+#include "Poco/Net/HTTPClientSession.h"
+#include "Poco/Net/HTTPRequest.h"
+#include "Poco/Net/HTTPResponse.h"
+#include "Poco/Net/HTTPBasicCredentials.h"
+#include "Poco/DOM/NodeList.h"
+#include "Poco/SAX/InputSource.h"
+#include "Poco/URI.h"
+#include "Poco/NumberParser.h"
+#include "Poco/SAX/SAXParser.h"
+#include "Poco/DOM/DOMParser.h"
+#include "Poco/DOM/Document.h"
+#include "Poco/DOM/NodeIterator.h"
+#include "Poco/DOM/NodeFilter.h"
+#include "Poco/DOM/AutoPtr.h"
+#include "Poco/DOM/Node.h"
+#include "Poco/StreamCopier.h"
+
+// Boost
+//#include "boost/smart_ptr.h"
+
+//qRestAPI
+//konnte noch nicht eingebunden werden deshalb wird Poco benutzt
+
+const std::string XNATProjects::VIEW_ID = "org.mitk.views.xnatprojects";
+const std::string QUERY_PATH = "/data/archive/projects?format=xml";
+const std::string QUERY = "";
+const int COUNT_PROJECT_COLUMNS_OR_ROWS = 7;
+
+void XNATProjects::SetFocus()
+{
+ m_Controls.buttonGetAllProjects->setFocus();
+}
+
+void XNATProjects::CreateQtPartControl( QWidget *parent )
+{
+ // create GUI widgets from the Qt Designer's .ui file
+ m_Controls.setupUi( parent );
+ connect( m_Controls.buttonGetAllProjects, SIGNAL(clicked()), this, SLOT(GetAllProjects()) );
+}
+
+void XNATProjects::OnSelectionChanged( berry::IWorkbenchPart::Pointer /*source*/,
+ const QList& nodes )
+{
+ // iterate all selected objects, adjust warning visibility
+ //foreach( mitk::DataNode::Pointer node, nodes )
+ //{
+ // if( node.IsNotNull() && dynamic_cast(node->GetData()) )
+ // {
+ // m_Controls.labelWarning->setVisible( false );
+ // m_Controls.buttonGetAllProjects->setEnabled( true );
+ // return;
+ // }
+ //}
+
+ //m_Controls.labelWarning->setVisible( true );
+ //m_Controls.buttonGetAllProjects->setEnabled( false );
+}
+
+
+void XNATProjects::GetAllProjects()
+{
+ //***********************************************
+ /*******************MockUpCode*******************
+ //XNATProjects::model.reset(new StandardItemModel());
+ QStandardItemModel* projectModel = new QStandardItemModel();
+ QStandardItemModel* detailModel = new QStandardItemModel();
+ QStandardItemModel* subjectModel = new QStandardItemModel();
+ QStandardItemModel* experimentModel = new QStandardItemModel();
+ //QScopePointer::QScopedPointer projectModelScopedPtr(new QStandardItemModel());
+
+ QStringList project(QString("Projects"));
+ QStringList detail(QString("Details of the chosen project"));
+ QStringList subject(QString("Subjects"));
+ QStringList experiment(QString("Experiments"));
+
+ projectModel->setHorizontalHeaderLabels(project);
+ detailModel->setHorizontalHeaderLabels(detail);
+ subjectModel->setHorizontalHeaderLabels(subject);
+ experimentModel->setHorizontalHeaderLabels(experiment);
+
+ QTreeView* projectView = m_Controls.projectTreeView;
+ QTreeView* detailView = m_Controls.detailTreeView;
+ QTreeView* subjectView = m_Controls.subjectTreeView;
+ QTreeView* experimentView = m_Controls.experimentTreeView;
+
+ //QStandardItem* projectRoot = projectModel->invisibleRootItem();
+ //QStandardItem* detailRoot = detailModel->invisibleRootItem();
+ //QStandardItem* subjectRoot = subjectModel->invisibleRootItem();
+ //QStandardItem* experimentRoot = experimentModel->invisibleRootItem();
+
+ projectModel->appendRow(new QStandardItem("prj001"));
+ detailModel->appendRow(new QStandardItem("Secondary_ID"));
+ subjectModel->appendRow(new QStandardItem("prj001_sub001"));
+ experimentModel->appendRow(new QStandardItem("prj001_sub001_exp001"));
+
+ projectView->setModel(projectModel);
+ detailView->setModel(detailModel);
+ subjectView->setModel(subjectModel);
+ experimentView->setModel(experimentModel);
+
+ projectView->show();
+ detailView->show();
+ subjectView->show();
+ experimentView->show();
+
+ **********************************************/
+
+ /* ********************AUSKOMMENTIERT ZU MOCKUP ZWECKEN ************************
+ ********************************************************************************
+ */// AUSKOMMENTIERT ZU MOCKUP ZWECKEN ******************************************
+
+ // Assign existing treeView to mytree(View)
+ QTreeView* myTree = m_Controls.projectTreeView;
+
+ // MEMBER SCOPED POINTER
+ projectModel.reset(new QStandardItemModel());
+ QStandardItemModel* model = projectModel.data();
+
+ // Normaler RAW Pointer
+ //QStandardItemModel* model = new QStandardItemModel();
+ /*QList columns;
+ columns.append(new QStandardItem("Projects"));
+ columns.append(new QStandardItem("Subjects"));
+ columns.append(new QStandardItem("Experiments"));
+ model->appendColumn(columns);*/
+
+ // Clear existing treeView
+ myTree->setModel(model);
+ myTree->show();
+
+ // Validate user input
+ if ( m_Controls.inHostAddress->text().isEmpty() || m_Controls.inUser->text().isEmpty() || m_Controls.inPassword->text().isEmpty() ) {
+ if ( m_Controls.inHostAddress->text().isEmpty() )
+ {
+ MITK_INFO << "No host address!";
+ m_Controls.inHostAddress->setStyleSheet("QLineEdit{ background-color: rgb(255,0,0) }");
+ }
+
+ if ( m_Controls.inUser->text().isEmpty() ) {
+ MITK_INFO << "No user !";
+ m_Controls.inUser->setStyleSheet("QLineEdit{ background-color: rgb(255,0,0) }");
+ }
+
+ if ( m_Controls.inPassword->text().isEmpty() ) {
+ MITK_INFO << "No password!";
+ m_Controls.inPassword->setStyleSheet("QLineEdit{ background-color: rgb(255,0,0) }");
+ }
+ return;
+ }
+ else
+ {
+ m_Controls.inHostAddress->setStyleSheet("QLineEdit{ background-color: rgb(255,255,255) }");
+ m_Controls.inUser->setStyleSheet("QLineEdit{ background-color: rgb(255,255,255) }");
+ m_Controls.inPassword->setStyleSheet("QLineEdit{ background-color: rgb(255,255,255) }");
+ }
+
+ // Set input URI from MITK user
+ std::string uri = m_Controls.inHostAddress->text().toStdString();
+ uri += QUERY_PATH;
+ Poco::URI projectURI = Poco::URI(uri);
+
+ // Regular Expression for uri
+ std::string uriregex = "^(https?)://([a-zA-Z0-9\.]+):([0-9]+)(/[^ /]+)*$";
+
+ // Validate address
+ if ( ! std::tr1::regex_match( m_Controls.inHostAddress->text().toStdString(), std::tr1::regex(uriregex) ) )
+ {
+ MITK_INFO << m_Controls.inHostAddress->text().toStdString();
+ MITK_INFO << "Host address not valid";
+ m_Controls.inHostAddress->setStyleSheet("QLineEdit{ background-color: rgb(255,0,0) }");
+ return;
+ }
+ else
+ {
+ m_Controls.inHostAddress->setStyleSheet("QLineEdit{ background-color: rgb(255,255,255) }");
+ }
+
+ // Set query path
+ std::string path = projectURI.getPathAndQuery();
+
+ // Create session and request
+ Poco::Net::HTTPClientSession session(projectURI.getHost(), projectURI.getPort());
+ Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, path, Poco::Net::HTTPMessage::HTTP_1_1);
+
+ // Add username and password (HTTP basic authentication) to the request.
+ Poco::Net::HTTPBasicCredentials cred(m_Controls.inUser->text().toStdString(), m_Controls.inPassword->text().toStdString());
+ cred.authenticate(request);
+
+ // Send the request
+ session.sendRequest(request);
+
+ // Receive the response.
+ Poco::Net::HTTPResponse response;
+ std::istream& rs = session.receiveResponse(response);
+
+ MITK_INFO << "HTTP Statuscode: " << response.getStatus();
+
+ // Checks th HTTP Statuscode
+ if ( response.getStatus() != Poco::Net::HTTPResponse::HTTP_OK )
+ {
+ MITK_ERROR << "HTTP STATUSCODE NOT OK";
+ MITK_ERROR << "Getting all projects failed!";
+ return;
+ }
+
+ //TEST für ausgabe ohne QTreeView (nur Konsole)
+ //Poco::StreamCopier::copyStream(rs, std::cout);
+
+ Poco::XML::InputSource inXML(rs);
+
+ Poco::XML::DOMParser parser;
+ Poco::AutoPtr pDoc = parser.parse(&inXML);
+ Poco::XML::NodeIterator it(pDoc, Poco::XML::NodeFilter::SHOW_ALL);
+ Poco::XML::Node* pNode = it.nextNode();
+
+
+ QStandardItem* rootNode = model->invisibleRootItem();
+
+ // Set header label
+ QStringList strlist(QString("Projects"));
+ model->setHorizontalHeaderLabels(strlist);
+
+ //defining list
+ QList list;
+
+ while (pNode)
+ {
+ //Converting
+ QString text = ConvertFromXMLString(pNode->nodeName());
+
+ if (text == QString("row"))
+ {
+ pNode = it.nextNode();
+ text = ConvertFromXMLString(pNode->nodeName());
+
+ if ( text == QString("cell") ){
+ pNode = it.nextNode();
+ text = QString("ID: ") + ConvertFromXMLString(pNode->nodeValue()).toStdString().c_str();
+ QStandardItem* id = new QStandardItem(text);
+ rootNode->appendRow(id);
+
+ //defining Items
+ QStandardItem* details = new QStandardItem("Details");
+ QStandardItem* secondaryId = new QStandardItem("secondary_ID");
+ QStandardItem* name = new QStandardItem("name");
+ QStandardItem* description = new QStandardItem("description");
+ QStandardItem* piFirstname = new QStandardItem("pi_firstname");
+ QStandardItem* piLastname = new QStandardItem("pi_lastname");
+ QStandardItem* uri = new QStandardItem("URI");
+
+ //filling list
+ list.append(secondaryId);
+ list.append(name);
+ list.append(description);
+ list.append(piFirstname);
+ list.append(piLastname);
+ list.append(uri);
+
+ //refering
+ id->appendRow(details);
+ details->appendRows(list);
+
+ //clear list
+ list.clear();
+
+ //next cell
+ pNode = it.nextNode();
+ QString wstr = ConvertFromXMLString(pNode->nodeName());
+
+ for ( int i = 0; i < 6; i++ )
+ {
+ if ( wstr == QString("cell") )
+ {
+ pNode = it.nextNode();
+
+ //breaks if a cell has no value and node is "cell" again
+ if ( ConvertFromXMLString(pNode->nodeName()) == QString("cell") )
+ continue;
+
+ text = ConvertFromXMLString(pNode->nodeValue());
+ QStandardItem* item0 = new QStandardItem();
+ QStandardItem* item1 = new QStandardItem();
+ QStandardItem* item2 = new QStandardItem();
+ QStandardItem* item3 = new QStandardItem();
+ QStandardItem* item4 = new QStandardItem();
+ QStandardItem* item5 = new QStandardItem();
+
+ //generating and refering
+ switch(i)
+ {
+ case 0:
+ item0->setText(text);
+ secondaryId->appendRow(item0);
+ break;
+ case 1:
+ item1->setText(text);
+ name->appendRow(item1);
+ break;
+ case 2:
+ item2->setText(text);
+ description->appendRow(item2);
+ break;
+ case 3:
+ item3->setText(text);
+ piFirstname->appendRow(item3);
+ break;
+ case 4:
+ item4->setText(text);
+ piLastname->appendRow(item4);
+ break;
+ case 5:
+ item5->setText(text);
+ uri->appendRow(item5);
+ break;
+ default:
+ MITK_ERROR << "Fatal Error! Please call your Administrator!";
+ break;
+ }
+ //next cell
+ pNode = it.nextNode();
+ wstr = ConvertFromXMLString(pNode->nodeName());
+ }
+ }
+ //clear list
+ list.clear();
+ }
+ }
+ if ( !(ConvertFromXMLString(pNode->nodeName()) == QString("row")) )
+ pNode = it.nextNode();
+ }
+ MITK_INFO << "Project tree has been drawn";
+
+ // Set tree visible
+ myTree->setModel(model);
+ myTree->show();
+}
+
+/**
+\brief ******** SEARCH ********
+*/
+void XNATProjects::SearchWithXmlFilePath(QString filepath){
+/*
+
+ // Search-URI
+ Poco::URI searchUri("http://localhost:12345/xnat/data/search");
+ searchUri.setQuery("format=xml&body=" + filepath);
+
+ // Create session and request
+ Poco::Net::HTTPClientSession session(projectURI.getHost(), projectURI.getPort());
+ Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, searchUri.getPathAndQuery();, Poco::Net::HTTPMessage::HTTP_1_1);
+
+ // Add username and password (HTTP basic authentication) to the request.
+ Poco::Net::HTTPBasicCredentials cred("admin", "admin");
+ cred.authenticate(request);
+
+ // Fill request-body with xml-file
+ request.setContentType("text/xml; charset=utf-8");
+ request.setContentLength();
+ request <<
+
+ // Send the request
+ session.sendRequest(request);
+
+ // Receive the response.
+ Poco::Net::HTTPResponse response;
+ std::istream& rs = session.receiveResponse(response);
+
+ std::ifstream fis("C:/Users/knorr/Desktop/einfacheSubjectIdAbfrage.xml");
+
+ Poco::XML::InputSource inXML(fis);
+
+ Poco::XML::DOMParser parser;
+ Poco::AutoPtr pDoc = parser.parse(&inXML);
+ Poco::XML::Document(pDoc.get());
+ Poco::XML::NodeIterator it(pDoc, Poco::XML::NodeFilter::SHOW_ALL);
+ Poco::XML::Node* pNode = it.nextNode();
+
+ while(pNode){
+ request
+ it.nextNode();
+ }
+*/
+}
+
+/**
+\brief Converts a Poco::XML::XMLString to QString
+*/
+QString XNATProjects::ConvertFromXMLString(const Poco::XML::XMLString xmlstr)
+{
+ const char* cstr = (Poco::XML::fromXMLString(xmlstr).c_str());
+ QString qstr = cstr;
+ return qstr;
+}
\ No newline at end of file
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/XNATProjects.h b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/XNATProjects.h
new file mode 100644
index 0000000000..8c8c5c1a36
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/XNATProjects.h
@@ -0,0 +1,82 @@
+/*=========================================================================
+
+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 XNATProjects_h
+#define XNATProjects_h
+
+#include
+
+#include
+
+#include "ui_XNATProjectsControls.h"
+
+#include "Poco/DOM/Node.h"
+#include "Poco/URI.h"
+
+#include
+#include
+
+/*!
+\brief XNATProjects
+
+\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 XNATProjects : 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:
+ QScopedPointer projectModel;
+ QScopedPointer subjectModel;
+ QScopedPointer experimentModel;
+
+ static const std::string VIEW_ID;
+
+ virtual void CreateQtPartControl(QWidget *parent);
+
+ void SearchWithXmlFilePath(QString filepath);
+
+ protected slots:
+
+ /// \brief Called when the user clicks the GUI button
+ void GetAllProjects();
+
+protected:
+
+ virtual void SetFocus();
+
+ /// \brief called by QmitkFunctionality when DataManager's selection has changed
+ virtual void OnSelectionChanged( berry::IWorkbenchPart::Pointer source,
+ const QList& nodes );
+
+ Ui::XNATProjectsControls m_Controls;
+
+
+private:
+
+ QString ConvertFromXMLString(const Poco::XML::XMLString);
+
+};
+
+#endif // XNATProjects_h
+
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/XNATProjectsControls.ui b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/XNATProjectsControls.ui
new file mode 100644
index 0000000000..ca1d8c9555
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/XNATProjectsControls.ui
@@ -0,0 +1,159 @@
+
+
+ XNATProjectsControls
+
+
+
+ 0
+ 0
+ 838
+ 975
+
+
+
+
+ 0
+ 0
+
+
+
+ QmitkTemplate
+
+
+
+ xnat_icon.icoxnat_icon.ico
+
+
+ -
+
+
+ QLabel { color: rgb(255, 0, 0) }
+
+
+ Please insert your XNAT host address:
+
+
+
+ -
+
+
-
+
+
+
+ 230
+ 0
+
+
+
+ <html><head/><body><p>Example: "http://localhost:8080/xnat"</p><p>Example: "http://central.xnat.org:80"</p><p>Example: "https://xnat.myserver.de:443"</p></body></html>
+
+
+ http(s)://host:port/pathToXnatServerInstance
+
+
+
+ -
+
+
-
+
+
+ User
+
+
+
+ -
+
+
+
+ 53
+ 0
+
+
+
+ QLineEdit::Password
+
+
+ Password
+
+
+
+
+
+
+
+ -
+
+
+ Example: "http://localhost:8080/xnat"
+
+
+ Example: "http://localhost:8080/xnat"
+
+
+
+ -
+
+
+ Example: "http://central.xnat.org:80"
+
+
+
+ -
+
+
+ Example: "https://xnat.myserver.de:443"
+
+
+
+ -
+
+
+ true
+
+
+ Get all projects
+
+
+ Get all projects
+
+
+
+ -
+
+
-
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
-
+
+
+ Download
+
+
+
+ -
+
+
+ Upload
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/images.qrc b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/images.qrc
new file mode 100644
index 0000000000..e890d9e8ba
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/images.qrc
@@ -0,0 +1,5 @@
+
+
+ xnat_icon.ico
+
+
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/org_mitk_gui_qt_xnatinterface_Activator.cpp b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/org_mitk_gui_qt_xnatinterface_Activator.cpp
new file mode 100644
index 0000000000..8805dfc959
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/org_mitk_gui_qt_xnatinterface_Activator.cpp
@@ -0,0 +1,39 @@
+/*=========================================================================
+
+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.
+
+=========================================================================*/
+
+
+#include "org_mitk_gui_qt_xnatinterface_Activator.h"
+
+#include
+
+#include "XNATProjects.h"
+
+namespace mitk {
+
+void org_mitk_gui_qt_xnatinterface_Activator::start(ctkPluginContext* context)
+{
+ BERRY_REGISTER_EXTENSION_CLASS(XNATProjects, context)
+}
+
+void org_mitk_gui_qt_xnatinterface_Activator::stop(ctkPluginContext* context)
+{
+ Q_UNUSED(context)
+}
+
+}
+
+Q_EXPORT_PLUGIN2(org_mitk_gui_qt_xnatinterface, mitk::org_mitk_gui_qt_xnatinterface_Activator)
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/org_mitk_gui_qt_xnatinterface_Activator.h b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/org_mitk_gui_qt_xnatinterface_Activator.h
new file mode 100644
index 0000000000..033fd35117
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/org_mitk_gui_qt_xnatinterface_Activator.h
@@ -0,0 +1,41 @@
+/*=========================================================================
+
+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 org_mitk_gui_qt_xnatinterface_Activator_h
+#define org_mitk_gui_qt_xnatinterface_Activator_h
+
+#include
+
+namespace mitk {
+
+class org_mitk_gui_qt_xnatinterface_Activator :
+ public QObject, public ctkPluginActivator
+{
+ Q_OBJECT
+ Q_INTERFACES(ctkPluginActivator)
+
+public:
+
+ void start(ctkPluginContext* context);
+ void stop(ctkPluginContext* context);
+
+}; // org_mitk_gui_qt_xnatinterface_Activator
+
+}
+
+#endif // org_mitk_gui_qt_xnatinterface_Activator_h
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/xnat_icon.ico b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/xnat_icon.ico
new file mode 100644
index 0000000000..4a1c5402ea
Binary files /dev/null and b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/xnat_icon.ico differ
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/xnat_icon.jpg b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/xnat_icon.jpg
new file mode 100644
index 0000000000..9366e1a6a1
Binary files /dev/null and b/Plugins/org.mitk.gui.qt.xnatinterface/src/internal/xnat_icon.jpg differ
diff --git a/Plugins/org.mitk.gui.qt.xnatinterface/target_libraries.cmake b/Plugins/org.mitk.gui.qt.xnatinterface/target_libraries.cmake
new file mode 100644
index 0000000000..173ab6e139
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.xnatinterface/target_libraries.cmake
@@ -0,0 +1,9 @@
+# See CMake/ctkFunctionGetTargetLibraries.cmake
+#
+# This file should list the libraries required to build the current CTK plugin.
+# For specifying required plugins, see the manifest_headers.cmake file.
+#
+
+set(target_libraries
+ CTKXNATWidgets
+)