Bladeren bron

Adding interface to change orthanc parameters on the fly

Andrej 5 dagen geleden
bovenliggende
commit
87a75a134b
1 gewijzigde bestanden met toevoegingen van 11 en 0 verwijderingen
  1. 11 0
      orthancInterface.py

+ 11 - 0
orthancInterface.py

@@ -35,6 +35,17 @@ class orthancInterface:
 
     #password=self.connectionConfig['SSL']['keyPwd'],\ doesnt work until 1.25
 
+    def store(self):
+      #store current orthanc connection settings (server/user/password)
+      obj=self.connectionConfig['orthanc']
+      return {x:obj[x] for x in obj}
+
+    def set(self,obj):
+      #overload connection settings from object (server/user/password)
+      for x in obj:
+         self.connectionConfig['orthanc'][x]=obj[x]
+   
+
     def getBasicAuth(self):
         user=self.connectionConfig['orthanc']['user']
         pwd=self.connectionConfig['orthanc']['password']