diff OrthancServer/OrthancRestApi/OrthancRestModalities.cpp @ 3874:2effa961f67f transcoding

forcing use of DicomAssociationParameters if creating an SCU
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 30 Apr 2020 15:00:20 +0200
parents 09798f2b985f
children ea1d32861cfc
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestModalities.cpp	Thu Apr 30 14:49:35 2020 +0200
+++ b/OrthancServer/OrthancRestApi/OrthancRestModalities.cpp	Thu Apr 30 15:00:20 2020 +0200
@@ -86,7 +86,8 @@
 
     try
     {
-      DicomControlUserConnection connection(localAet, remote);
+      DicomAssociationParameters params(localAet, remote);
+      DicomControlUserConnection connection(params);
 
       // New in Orthanc 1.7.0
       if (timeout != -1)
@@ -214,7 +215,8 @@
     DicomFindAnswers answers(false);
 
     {
-      DicomControlUserConnection connection(localAet, remote);
+      DicomAssociationParameters params(localAet, remote);
+      DicomControlUserConnection connection(params);
       FindPatient(answers, connection, fields);
     }
 
@@ -248,7 +250,8 @@
     DicomFindAnswers answers(false);
 
     {
-      DicomControlUserConnection connection(localAet, remote);
+      DicomAssociationParameters params(localAet, remote);
+      DicomControlUserConnection connection(params);
       FindStudy(answers, connection, fields);
     }
 
@@ -283,7 +286,8 @@
     DicomFindAnswers answers(false);
 
     {
-      DicomControlUserConnection connection(localAet, remote);
+      DicomAssociationParameters params(localAet, remote);
+      DicomControlUserConnection connection(params);
       FindSeries(answers, connection, fields);
     }
 
@@ -319,7 +323,8 @@
     DicomFindAnswers answers(false);
 
     {
-      DicomControlUserConnection connection(localAet, remote);
+      DicomAssociationParameters params(localAet, remote);
+      DicomControlUserConnection connection(params);
       FindInstance(answers, connection, fields);
     }
 
@@ -357,7 +362,8 @@
     RemoteModalityParameters remote =
       MyGetModalityUsingSymbolicName(call.GetUriComponent("id", ""));
 
-    DicomControlUserConnection connection(localAet, remote);
+    DicomAssociationParameters params(localAet, remote);
+    DicomControlUserConnection connection(params);
     
     DicomFindAnswers patients(false);
     FindPatient(patients, connection, m);
@@ -1006,7 +1012,8 @@
     RemoteModalityParameters remote =
       MyGetModalityUsingSymbolicName(call.GetUriComponent("id", ""));
 
-    DicomStoreUserConnection connection(localAet, remote);
+    DicomAssociationParameters params(localAet, remote);
+    DicomStoreUserConnection connection(params);
 
     std::string sopClassUid, sopInstanceUid;
     connection.Store(sopClassUid, sopInstanceUid,
@@ -1053,7 +1060,8 @@
     const RemoteModalityParameters source =
       MyGetModalityUsingSymbolicName(call.GetUriComponent("id", ""));
 
-    DicomControlUserConnection connection(localAet, source);
+    DicomAssociationParameters params(localAet, source);
+    DicomControlUserConnection connection(params);
 
     if (timeout > -1)
     {
@@ -1341,7 +1349,8 @@
       DicomFindAnswers answers(true);
 
       {
-        DicomControlUserConnection connection(localAet, remote);
+        DicomAssociationParameters params(localAet, remote);
+        DicomControlUserConnection connection(params);
         connection.FindWorklist(answers, *query);
       }