From: cervenansky Date: Mon, 15 Jul 2013 08:51:02 +0000 (+0200) Subject: set VV Dicom client parameter X-Git-Tag: v1.4.0~2^2~21 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=da2e843f73cad8d9116fce78361076c2e59a8941;p=clitk.git set VV Dicom client parameter --- diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index fcce572..36d42c5 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -125,7 +125,7 @@ It is distributed under dual licence vvMainWindow::vvMainWindow():vvMainWindowBase() { setupUi(this); // this sets up the GUI - + setDicomClient(); mInputPathName = ""; mMenuTools = menuTools; // mMenuSegmentation = menuSegmentation; diff --git a/vv/vvQPacsConnection.cxx b/vv/vvQPacsConnection.cxx index 8c5ebc0..175f3de 100644 --- a/vv/vvQPacsConnection.cxx +++ b/vv/vvQPacsConnection.cxx @@ -494,8 +494,8 @@ void vvQPacsConnection::on_importButton_clicked() gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, m_level ,fillMoveKeys(), true); - bool didItWork = gdcm::CompositeNetworkFunctions::CMove(m_adress.c_str(),atoi(m_port.c_str()), theQuery, 1234, - "VVCREATIS", m_aetitle.c_str(),"D:\\move" ); + bool didItWork = gdcm::CompositeNetworkFunctions::CMove(m_adress.c_str(),atoi(m_port.c_str()), theQuery, getDicomClientPort(), + getDicomClientAETitle().c_str(), m_aetitle.c_str(),"D:\\move" ); gdcm::Directory theDir; theDir.Load("D:\\move"); m_files = theDir.GetFilenames(); diff --git a/vv/vvUtils.cxx b/vv/vvUtils.cxx index 86b20db..05f5af1 100644 --- a/vv/vvUtils.cxx +++ b/vv/vvUtils.cxx @@ -48,6 +48,39 @@ FileListType GetRecentlyOpenedImages() return result; } +// Set parameters for VV (AETITLE, port-scu) to allow c-move. +void setDicomClient() +{ + QSettings settings(getVVSettingsPath(), getSettingsOptionFormat()); + settings.beginGroup(QString::fromStdString("DICOMCLIENT")); + settings.setValue("AETITLE",QString::fromStdString("VVDICOMSCU")); + settings.setValue("port",QString::number(1234)); + settings.endGroup(); +} + +// get VV-AETITLE for c-move. parameters +std::string getDicomClientAETitle() +{ + std::string result =""; + QSettings settings(getVVSettingsPath(), getSettingsOptionFormat()); + settings.beginGroup(QString::fromStdString("DICOMCLIENT")); + result = settings.value("AETITLE").toString().toStdString(); + settings.endGroup(); + return result; +} + + +// get VV-PORT-SCU for c-move. parameters +int getDicomClientPort() +{ + int result; + QSettings settings(getVVSettingsPath(), getSettingsOptionFormat()); + settings.beginGroup(QString::fromStdString("DICOMCLIENT")); + result = settings.value("port").toString().toInt(); + settings.endGroup(); + return result; +} + /// Add a new Dicom Server void AddDicomServer(std::string nickname, std::string aetitle, std::string adress, std::string port) { diff --git a/vv/vvUtils.h b/vv/vvUtils.h index 6aabdbe..416af56 100644 --- a/vv/vvUtils.h +++ b/vv/vvUtils.h @@ -42,5 +42,14 @@ void removeDicomServer(std::string nickname); // get List of Dicom Servers QStringList getDicomServers(); +// Set parameters for VV (AETITLE, port-scu) to allow c-move. +void setDicomClient(); + +// get VV-AETITLE for c-move parameters. +std::string getDicomClientAETitle(); + +// get VV-PORT-SCU for c-move parameters. +int getDicomClientPort(); + std::map getDicomServer(QString nickname); #endif