]> Creatis software - clitk.git/commitdiff
set VV Dicom client parameter
authorcervenansky <frederic.cervenansky@creatis.insa-lyon.fr>
Mon, 15 Jul 2013 08:51:02 +0000 (10:51 +0200)
committercervenansky <frederic.cervenansky@creatis.insa-lyon.fr>
Mon, 15 Jul 2013 08:51:02 +0000 (10:51 +0200)
vv/vvMainWindow.cxx
vv/vvQPacsConnection.cxx
vv/vvUtils.cxx
vv/vvUtils.h

index fcce5729b3b0b8b94f7e262ef89c428b49d94593..36d42c591f216c1244bb38b13baba499b484b9d7 100644 (file)
@@ -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;
index 8c5ebc007e851c018482befbc1ef29b2f49d8850..175f3de3f8180a59f0f1e526bc41985787469fe6 100644 (file)
@@ -494,8 +494,8 @@ void vvQPacsConnection::on_importButton_clicked()
 
                gdcm::SmartPointer<gdcm::BaseRootQuery> 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();
index 86b20dbe1ef496a1a13b1b07593a2a465779618f..05f5af1e6297769df876efb83f983c692b10dafd 100644 (file)
@@ -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)
 {
index 6aabdbeae647a73d1bef044fd0da5d86f55d1e55..416af5644c601028c74e55db138d843ec4c226de 100644 (file)
@@ -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 <std::string,std::string > getDicomServer(QString nickname);
 #endif