comparison Plugins/DicomWeb/Run.py @ 319:de6e73e4df60 Orthanc-1.7.2

leaving bitbucket
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 30 Jun 2020 16:14:30 +0200
parents bac7cc80f240
children 3c8c6b41eec4
comparison
equal deleted inserted replaced
318:bac7cc80f240 319:de6e73e4df60
358 self.assertEqual(1, int(t[COUNT])) 358 self.assertEqual(1, int(t[COUNT]))
359 359
360 360
361 def test_bitbucket_issue_53(self): 361 def test_bitbucket_issue_53(self):
362 # DICOMWeb plugin support for "limit" and "offset" parameters in QIDO-RS 362 # DICOMWeb plugin support for "limit" and "offset" parameters in QIDO-RS
363 # https://bitbucket.org/sjodogne/orthanc/issues/53 363 # https://bugs.orthanc-server.com/show_bug.cgi?id=53
364 364
365 UploadInstance(ORTHANC, 'Brainix/Flair/IM-0001-0001.dcm') 365 UploadInstance(ORTHANC, 'Brainix/Flair/IM-0001-0001.dcm')
366 UploadInstance(ORTHANC, 'Knee/T1/IM-0001-0001.dcm') 366 UploadInstance(ORTHANC, 'Knee/T1/IM-0001-0001.dcm')
367 367
368 brainix = '2.16.840.1.113669.632.20.1211.10000357775' 368 brainix = '2.16.840.1.113669.632.20.1211.10000357775'
387 self.assertTrue(knee in b) 387 self.assertTrue(knee in b)
388 388
389 389
390 def test_bitbucket_issue_111(self): 390 def test_bitbucket_issue_111(self):
391 # Wrong serialization of empty values 391 # Wrong serialization of empty values
392 # https://bitbucket.org/sjodogne/orthanc/issues/111 392 # https://bugs.orthanc-server.com/show_bug.cgi?id=111
393 # https://bitbucket.org/sjodogne/orthanc-dicomweb/issues/3/ 393 # https://bitbucket.org/sjodogne/orthanc-dicomweb/issues/3
394 394
395 # According to the standard, section F.2.5 395 # According to the standard, section F.2.5
396 # (http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_F.2.5.html), 396 # (http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_F.2.5.html),
397 # null values behave as follows: If an attribute is present in 397 # null values behave as follows: If an attribute is present in
398 # DICOM but empty (i.e., Value Length is 0), it shall be 398 # DICOM but empty (i.e., Value Length is 0), it shall be
399 # preserved in the DICOM JSON attribute object containing no 399 # preserved in the DICOM JSON attribute object containing no
400 # "Value", "BulkDataURI" or "InlineBinary". 400 # "Value", "BulkDataURI" or "InlineBinary".
401 # https://bitbucket.org/sjodogne/orthanc/issues/111/qido-rs-wrong-serialization-of-empty 401 # https://bugs.orthanc-server.com/show_bug.cgi?id=111
402 402
403 UploadInstance(ORTHANC, 'Issue111.dcm') 403 UploadInstance(ORTHANC, 'Issue111.dcm')
404 404
405 # Test WADO-RS 405 # Test WADO-RS
406 a = DoGet(ORTHANC, '/dicom-web/studies/1.2.276.0.7230010.3.1.2.8323329.30185.1551199973.371589/metadata') 406 a = DoGet(ORTHANC, '/dicom-web/studies/1.2.276.0.7230010.3.1.2.8323329.30185.1551199973.371589/metadata')
481 study = '1.2.840.113619.2.115.147416.1094281639.0.29' 481 study = '1.2.840.113619.2.115.147416.1094281639.0.29'
482 series = '1.2.840.113619.2.115.147416.1094281639.0.30' 482 series = '1.2.840.113619.2.115.147416.1094281639.0.30'
483 sop = '1.2.840.113619.2.115.147416.1094281639.0.38' 483 sop = '1.2.840.113619.2.115.147416.1094281639.0.38'
484 484
485 # WARNING: This test will fail on Orthanc <= 1.5.5, because 485 # WARNING: This test will fail on Orthanc <= 1.5.5, because
486 # the following fix is not included yet: 486 # the following fix was not included yet:
487 # https://bitbucket.org/sjodogne/orthanc/commits/b88937ef597b33c4387a546c751827019bcdc205 487 # https://hg.orthanc-server.com/orthanc/rev/b88937ef597b
488 488
489 a = DoGet(ORTHANC, '/dicom-web/studies/%s/metadata' % study) 489 a = DoGet(ORTHANC, '/dicom-web/studies/%s/metadata' % study)
490 self.assertEqual(1, len(a)) 490 self.assertEqual(1, len(a))
491 491
492 BASE_URI = '/dicom-web/studies/%s/series/%s/instances/%s/bulk' % (study, series, sop) 492 BASE_URI = '/dicom-web/studies/%s/series/%s/instances/%s/bulk' % (study, series, sop)
505 self.assertEqual(b, c[0]) 505 self.assertEqual(b, c[0])
506 506
507 507
508 def test_bitbucket_issue_112(self): 508 def test_bitbucket_issue_112(self):
509 # Wrong serialization of number values 509 # Wrong serialization of number values
510 # https://bitbucket.org/sjodogne/orthanc/issues/112 510 # https://bugs.orthanc-server.com/show_bug.cgi?id=112
511 # https://bitbucket.org/sjodogne/orthanc-dicomweb/issues/4/ 511 # https://bitbucket.org/sjodogne/orthanc-dicomweb/issues/4/
512 512
513 UploadInstance(ORTHANC, 'DummyCT.dcm') 513 UploadInstance(ORTHANC, 'DummyCT.dcm')
514 study = '1.2.840.113619.2.176.2025.1499492.7391.1171285944.390' 514 study = '1.2.840.113619.2.176.2025.1499492.7391.1171285944.390'
515 515
537 self.assertEqual(1, b) 537 self.assertEqual(1, b)
538 538
539 539
540 def test_bitbucket_issue_113(self): 540 def test_bitbucket_issue_113(self):
541 # Wrong serialization of PN VR 541 # Wrong serialization of PN VR
542 # https://bitbucket.org/sjodogne/orthanc/issues/113 542 # https://bugs.orthanc-server.com/show_bug.cgi?id=113
543 # https://bitbucket.org/sjodogne/orthanc-dicomweb/issues/2/ 543 # https://bitbucket.org/sjodogne/orthanc-dicomweb/issues/2/
544 544
545 # Make sure UTF-8 encoding is used 545 # Make sure UTF-8 encoding is used
546 self.assertEqual('Utf8', DoPut(ORTHANC, '/tools/default-encoding', 'Utf8')) 546 self.assertEqual('Utf8', DoPut(ORTHANC, '/tools/default-encoding', 'Utf8'))
547 547
569 self.assertEqual(u'王^小東', pn['Value'][0]['Ideographic']) 569 self.assertEqual(u'王^小東', pn['Value'][0]['Ideographic'])
570 570
571 571
572 def test_bitbucket_issue_96(self): 572 def test_bitbucket_issue_96(self):
573 # WADO-RS RetrieveFrames rejects valid accept headers 573 # WADO-RS RetrieveFrames rejects valid accept headers
574 # https://bitbucket.org/sjodogne/orthanc/issues/96 574 # https://bugs.orthanc-server.com/show_bug.cgi?id=96
575 # https://bitbucket.org/sjodogne/orthanc-dicomweb/issues/5/ 575 # https://bitbucket.org/sjodogne/orthanc-dicomweb/issues/5/
576 576
577 UploadInstance(ORTHANC, 'Brainix/Epi/IM-0001-0001.dcm') 577 UploadInstance(ORTHANC, 'Brainix/Epi/IM-0001-0001.dcm')
578 578
579 a = DoGet(ORTHANC, '/dicom-web/instances') 579 a = DoGet(ORTHANC, '/dicom-web/instances')
757 757
758 758
759 def test_bitbucket_issue_143(self): 759 def test_bitbucket_issue_143(self):
760 # WADO-RS metadata request returns "500 Internal Server Error" 760 # WADO-RS metadata request returns "500 Internal Server Error"
761 # instead of "404 Not Found" for missing instance 761 # instead of "404 Not Found" for missing instance
762 # https://bitbucket.org/sjodogne/orthanc/issues/143 762 # https://bugs.orthanc-server.com/show_bug.cgi?id=143
763 UploadInstance(ORTHANC, 'Issue143.dcm') 763 UploadInstance(ORTHANC, 'Issue143.dcm')
764 764
765 try: 765 try:
766 DoGet(ORTHANC, '/dicom-web/studies/1.2.840.113619.2.55.3.671756986.106.1316467036.460/series/1.2.840.113619.2.55.3.671756986.106.1316467036.465/instances/0.0.0.0.0/metadata') 766 DoGet(ORTHANC, '/dicom-web/studies/1.2.840.113619.2.55.3.671756986.106.1316467036.460/series/1.2.840.113619.2.55.3.671756986.106.1316467036.465/instances/0.0.0.0.0/metadata')
767 self.assertFail() 767 self.assertFail()
1001 1001
1002 1002
1003 #@unittest.skip("Skip this test on GDCM 2.8.4") 1003 #@unittest.skip("Skip this test on GDCM 2.8.4")
1004 def test_bitbucket_issue_164(self): 1004 def test_bitbucket_issue_164(self):
1005 # WARNING - This makes GDCM 2.8.4 crash 1005 # WARNING - This makes GDCM 2.8.4 crash
1006 # https://bitbucket.org/sjodogne/orthanc/issues/164 1006 # https://bugs.orthanc-server.com/show_bug.cgi?id=164
1007 UploadInstance(ORTHANC, 'Issue164.dcm') 1007 UploadInstance(ORTHANC, 'Issue164.dcm')
1008 1008
1009 p = DoGetMultipart(ORTHANC, 'dicom-web/studies/1.2.276.0.26.1.1.1.2.2020.45.52293.1506048/series/1.2.276.0.26.1.1.1.2.2020.45.52293.6384450/instances/1.2.276.0.26.1.1.1.2.2020.45.52366.2551599.179568640/frames/5') 1009 p = DoGetMultipart(ORTHANC, 'dicom-web/studies/1.2.276.0.26.1.1.1.2.2020.45.52293.1506048/series/1.2.276.0.26.1.1.1.2.2020.45.52293.6384450/instances/1.2.276.0.26.1.1.1.2.2020.45.52366.2551599.179568640/frames/5')
1010 self.assertEqual(1, len(p)) 1010 self.assertEqual(1, len(p))
1011 self.assertEqual(743 * 975 * 3, len(p[0])) 1011 self.assertEqual(743 * 975 * 3, len(p[0]))
1021 1021
1022 def test_bitbucket_issue_168(self): 1022 def test_bitbucket_issue_168(self):
1023 # "Plugins can't read private tags from the configuration 1023 # "Plugins can't read private tags from the configuration
1024 # file" This test will fail if DCMTK <= 3.6.1 (e.g. on Ubuntu 1024 # file" This test will fail if DCMTK <= 3.6.1 (e.g. on Ubuntu
1025 # 16.04), or if Orthanc <= 1.5.8 1025 # 16.04), or if Orthanc <= 1.5.8
1026 # https://bitbucket.org/sjodogne/orthanc/issues/168/ 1026 # https://bugs.orthanc-server.com/show_bug.cgi?id=168
1027 1027
1028 UploadInstance(ORTHANC, 'Issue168.dcm') 1028 UploadInstance(ORTHANC, 'Issue168.dcm')
1029 1029
1030 a = DoGet(ORTHANC, '/dicom-web/studies') 1030 a = DoGet(ORTHANC, '/dicom-web/studies')
1031 self.assertEqual(1, len(a)) 1031 self.assertEqual(1, len(a))
1129 1129
1130 1130
1131 def test_bitbucket_issue_56(self): 1131 def test_bitbucket_issue_56(self):
1132 # "Case-insensitive matching over accents" => DICOMweb part 1132 # "Case-insensitive matching over accents" => DICOMweb part
1133 # from AlexanderM on 2020-03-20 1133 # from AlexanderM on 2020-03-20
1134 # https://bitbucket.org/sjodogne/orthanc/issues/56/ 1134 # https://bugs.orthanc-server.com/show_bug.cgi?id=56
1135 UploadInstance(ORTHANC, 'Issue56-NoPixelData.dcm') 1135 UploadInstance(ORTHANC, 'Issue56-NoPixelData.dcm')
1136 1136
1137 self.assertEqual(1, len(DoPost(ORTHANC, '/tools/find', { 1137 self.assertEqual(1, len(DoPost(ORTHANC, '/tools/find', {
1138 'Level' : 'Patient', 1138 'Level' : 'Patient',
1139 'Query' : { 1139 'Query' : {