Mercurial > hg > orthanc-tests
comparison Tests/Tests.py @ 304:b8399213b840
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 19 May 2020 18:25:38 +0200 |
parents | 22b6dd0f8c84 |
children | ed20ead1a8b6 |
comparison
equal
deleted
inserted
replaced
303:cb56f56c98fb | 304:b8399213b840 |
---|---|
134 { | 134 { |
135 'StudyDescription': 'Sébastien^', | 135 'StudyDescription': 'Sébastien^', |
136 'StudyDate' : '19700202', | 136 'StudyDate' : '19700202', |
137 } | 137 } |
138 ] | 138 ] |
139 | |
140 | |
141 def HasGdcmPlugin(): | |
142 plugins = DoGet(_REMOTE, '/plugins') | |
143 return ('gdcm' in plugins) | |
144 | 139 |
145 | 140 |
146 class Orthanc(unittest.TestCase): | 141 class Orthanc(unittest.TestCase): |
147 def setUp(self): | 142 def setUp(self): |
148 if (sys.version_info >= (3, 0)): | 143 if (sys.version_info >= (3, 0)): |
1630 def test_googlecode_issue_19(self): | 1625 def test_googlecode_issue_19(self): |
1631 # This is an image with "YBR_FULL" photometric interpretation, it is not supported by Orthanc | 1626 # This is an image with "YBR_FULL" photometric interpretation, it is not supported by Orthanc |
1632 # gdcmconv -i /home/jodogne/DICOM/GdcmDatabase/US_DataSet/HDI5000_US/3EAF5E01 -w -o Issue19.dcm | 1627 # gdcmconv -i /home/jodogne/DICOM/GdcmDatabase/US_DataSet/HDI5000_US/3EAF5E01 -w -o Issue19.dcm |
1633 | 1628 |
1634 a = UploadInstance(_REMOTE, 'Issue19.dcm')['ID'] | 1629 a = UploadInstance(_REMOTE, 'Issue19.dcm')['ID'] |
1635 if not HasGdcmPlugin(): | 1630 if not HasGdcmPlugin(_REMOTE): |
1636 self.assertRaises(Exception, lambda: DoGet(_REMOTE, '/instances/941ad3c8-05d05b88-560459f9-0eae0e20-6cddd533/preview')) | 1631 self.assertRaises(Exception, lambda: DoGet(_REMOTE, '/instances/941ad3c8-05d05b88-560459f9-0eae0e20-6cddd533/preview')) |
1637 | 1632 |
1638 | 1633 |
1639 def test_googlecode_issue_37(self): | 1634 def test_googlecode_issue_37(self): |
1640 # Same test for issues 35 and 37. Fixed in Orthanc 0.9.1 | 1635 # Same test for issues 35 and 37. Fixed in Orthanc 0.9.1 |
3076 Check('1.2.840.10008.1.2.4.81', '801579ae7cbf28e604ea74f2c99fa2ca') | 3071 Check('1.2.840.10008.1.2.4.81', '801579ae7cbf28e604ea74f2c99fa2ca') |
3077 Check('1.2.840.10008.1.2.5', '6ff51ae525d362e0d04f550a64075a0e') # RLE, supported since Orthanc 1.0.1 | 3072 Check('1.2.840.10008.1.2.5', '6ff51ae525d362e0d04f550a64075a0e') # RLE, supported since Orthanc 1.0.1 |
3078 Check('1.2.840.10008.1.2', 'd54aed9f67a100984b42942cc2e9939b') | 3073 Check('1.2.840.10008.1.2', 'd54aed9f67a100984b42942cc2e9939b') |
3079 | 3074 |
3080 # JPEG2k image, not supported without GDCM plugin | 3075 # JPEG2k image, not supported without GDCM plugin |
3081 if not HasGdcmPlugin(): | 3076 if not HasGdcmPlugin(_REMOTE): |
3082 Check('1.2.840.10008.1.2.4.90', None) | 3077 Check('1.2.840.10008.1.2.4.90', None) |
3083 Check('1.2.840.10008.1.2.4.91', None) | 3078 Check('1.2.840.10008.1.2.4.91', None) |
3084 | 3079 |
3085 | 3080 |
3086 def test_raw_frame(self): | 3081 def test_raw_frame(self): |
5533 '1.2.840.10008.1.2.4.51', | 5528 '1.2.840.10008.1.2.4.51', |
5534 '1.2.840.10008.1.2.4.57', | 5529 '1.2.840.10008.1.2.4.57', |
5535 '1.2.840.10008.1.2.4.70', | 5530 '1.2.840.10008.1.2.4.70', |
5536 ] | 5531 ] |
5537 | 5532 |
5538 if HasGdcmPlugin(): | 5533 if HasGdcmPlugin(_REMOTE): |
5539 SYNTAXES = SYNTAXES + [ | 5534 SYNTAXES = SYNTAXES + [ |
5540 '1.2.840.10008.1.2.4.80', # This makes DCMTK 3.6.2 crash | 5535 '1.2.840.10008.1.2.4.80', # This makes DCMTK 3.6.2 crash |
5541 '1.2.840.10008.1.2.4.81', # This makes DCMTK 3.6.2 crash | 5536 '1.2.840.10008.1.2.4.81', # This makes DCMTK 3.6.2 crash |
5542 '1.2.840.10008.1.2.4.90', # JPEG2k, unavailable without GDCM | 5537 '1.2.840.10008.1.2.4.90', # JPEG2k, unavailable without GDCM |
5543 '1.2.840.10008.1.2.4.91', # JPEG2k, unavailable without GDCM | 5538 '1.2.840.10008.1.2.4.91', # JPEG2k, unavailable without GDCM |