changeset 17:7c8500991a12

karsten
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Jun 2015 08:56:52 +0200
parents 04fa104ab63b
children 16c37933384d
files Database/KarstenHilbertRF.dcm Database/README.txt Tests/Tests.py
diffstat 3 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
Binary file Database/KarstenHilbertRF.dcm has changed
--- a/Database/README.txt	Fri Jun 19 08:34:24 2015 +0200
+++ b/Database/README.txt	Fri Jun 19 08:56:52 2015 +0200
@@ -48,6 +48,7 @@
 - Issue19.dcm : From Chris Hafey on Google Code (YBR_FULL are not decoded incorrectly)
 - Issue22.dcm : From Emsy Chan on Google Code (Error decoding multi-frame instances)
 - Issue32.dcm : From aceberg93 on Google Code (Cyrillic symbols)
+- KarstenHilbertRF.dcm : From Karsten Hilbert
 - Knee/* : From OsiriX, "KNEE".
 - Multiframe.dcm : From GDCM, "images_of_interest/PHILIPS_Integris_H-8-MONO2-Multiframe.dcm"
 - Phenix/* : From OsiriX, "PHENIX".
--- a/Tests/Tests.py	Fri Jun 19 08:34:24 2015 +0200
+++ b/Tests/Tests.py	Fri Jun 19 08:56:52 2015 +0200
@@ -988,20 +988,19 @@
         self.assertEqual(1, len(series))
         
 
-    @unittest.skip("This test fails, to fix")
     def test_incoming_movescu(self):
         def CallMoveScu(args):
             subprocess.check_call([ 'movescu', 
-                                    '--move', _LOCAL['DicomAet'],     # Target AET (i.e. storescp)
-                                    '--call', _REMOTE['DicomAet'],    # Called AET (i.e. Orthanc)
-                                    '--aetitle', _LOCAL['DicomAet'],  # Calling AET (i.e. storescp)
+                                    '--move', _LOCAL['DicomAet'],      # Target AET (i.e. storescp)
+                                    '--call', _REMOTE['DicomAet'],     # Called AET (i.e. Orthanc)
+                                    '--aetitle', _LOCAL['DicomAet'],   # Calling AET (i.e. storescp)
                                     _REMOTE['Server'], str(_REMOTE['DicomPort'])  ] + args,
                                   stderr=subprocess.PIPE)
 
         UploadInstance(_REMOTE, 'Multiframe.dcm')
         
         self.assertEqual(0, len(DoGet(_LOCAL, '/patients')))
-        #CallMoveScu([ '--patient', '-k', '0008,0052=PATIENT', '-k', 'PatientID=none' ])
+        CallMoveScu([ '--patient', '-k', '0008,0052=PATIENT', '-k', 'PatientID=none' ])
         self.assertEqual(0, len(DoGet(_LOCAL, '/patients')))
         CallMoveScu([ '--patient', '-k', '0008,0052=PATIENT', '-k', 'PatientID=12345678' ])
         self.assertEqual(1, len(DoGet(_LOCAL, '/patients')))
@@ -1715,3 +1714,10 @@
             self.assertEqual('My Medical Device', re.search('"StationName">(.*?)<', routed).group(1).strip())
             self.assertEqual(None, re.search('"MilitaryRank"', routed))
             self.assertEqual(None, re.search('"0051,0010"', routed))  # A private tag
+
+
+    def test_storescu_rf(self):
+        i = UploadInstance(_REMOTE, 'KarstenHilbertRF.dcm')['ID']
+        self.assertEqual(0, len(DoGet(_LOCAL, '/instances')))
+        j = DoPost(_REMOTE, '/modalities/orthanctest/store', str(i), 'text/plain')
+        self.assertEqual(1, len(DoGet(_LOCAL, '/instances')))