changeset 316:bb01670b3b79 Orthanc-1.7.1

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 26 May 2020 16:56:50 +0200
parents 0124075797cd
children 5ea07ecade93
files Plugins/WSI/Run.py
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/WSI/Run.py	Tue May 26 12:37:25 2020 +0200
+++ b/Plugins/WSI/Run.py	Tue May 26 16:56:50 2020 +0200
@@ -113,14 +113,21 @@
 
     
 def CallDicomToTiff(suffix):
-    CallCommand([ args.to_tiff ] + suffix)
+    CallCommand([ args.to_tiff,
+                  '--username=%s' % args.username,
+                  '--password=%s' % args.password ] + suffix)
 
 
 def CallTiffInfoOnSeries(series):
     with tempfile.NamedTemporaryFile(delete = False) as temp:
         temp.close()
         CallDicomToTiff([ series, temp.name ])
-        tiff = subprocess.check_output([ 'tiffinfo', temp.name ])
+        try:
+            tiff = subprocess.check_output([ 'tiffinfo', temp.name ])
+        except:
+            print('\ntiffinfo is probably not installed => sudo apt-get install libtiff-tools\n')
+            tiff = None
+            
         os.unlink(temp.name)
 
     return tiff