Mercurial > hg > orthanc-tests
changeset 333:695be643b0f4
test_decode_elscint
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 12 Sep 2020 16:00:23 +0200 |
parents | dc41bfa4bda5 |
children | 971ff285302b |
files | Database/2020-09-11-Christopher-ELSCINT1-Raw.dcm Database/2020-09-12-ELSCINT1-PMSCT_RLE1.dcm Database/README.txt Tests/Tests.py |
diffstat | 4 files changed, 31 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Database/README.txt Tue Aug 25 17:05:34 2020 +0200 +++ b/Database/README.txt Sat Sep 12 16:00:23 2020 +0200 @@ -54,14 +54,15 @@ Here is the source of each set of sample images: +- 2020-09-12-ELSCINT1-PMSCT_RLE1.dcm: Anonymized from https://discourse.slicer.org/t/fail-to-load-pet-ct-gemini/8158 - Beaufix/* : From OsiriX, "BEAUFIX" (sample of JPEG2000). - Brainix/* : From OsiriX, "BRAINIX" (sample of uncompressed data). - ColorTestImageJ.dcm : From ImageJ, http://imagej.nih.gov/ij/images/cardio.dcm - ColorTestMalaterre.dcm : From Mathieu Malaterre <mathieu.malaterre@gmail.com>, Debian bug #698417 - Comunix/* : From OsiriX, "COMUNIX" (sample of PET/CT study). - DummyCT.dcm : From Osirix, "KNIX" with PixelData removed. +- HierarchicalAnonymization/RTH/* : From https://wiki.cancerimagingarchive.net/display/Public/Lung+CT+Segmentation+Challenge+2017 - HierarchicalAnonymization/StructuredReports/* : Courtesy of Collective Minds Radiology AB -- HierarchicalAnonymization/RTH/* : From https://wiki.cancerimagingarchive.net/display/Public/Lung+CT+Segmentation+Challenge+2017 - Issue16.dcm : From Chris Hafey on Google Code (AT VR's are not returned properly as JSON) - 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) @@ -78,7 +79,6 @@ - PrivateMDNTags.dcm : From University Hospital of Liege - PrivateTags.dcm : From GDCM, "images_of_interest/494APG9K.dcm" - SignedCT.dcm : From Sébastien Jodogne. -- TransferSyntaxes/1.2.840.10008.1.2.dcm : From Sébastien Barré (MR-MONO2-12-an2) - TransferSyntaxes/1.2.840.10008.1.2.1.dcm : From Sébastien Barré (US-RGB-8-esopecho) - TransferSyntaxes/1.2.840.10008.1.2.2.dcm : From Sébastien Barré (US-RGB-8-epicard) - TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm : From GDCM, "US_DataSet/Philips_US/3EAF5680_8b_YBR_jpeg.dcm" @@ -90,4 +90,9 @@ - TransferSyntaxes/1.2.840.10008.1.2.4.90.dcm : From DICOM WG04 (IMAGES/J2KR/NM1_J2KR) - TransferSyntaxes/1.2.840.10008.1.2.4.91.dcm : From DICOM WG04 (IMAGES/J2KI/CT1_J2KI) - TransferSyntaxes/1.2.840.10008.1.2.5.dcm : From DICOM WG04 (IMAGES/RLE/NM1_RLE) +- TransferSyntaxes/1.2.840.10008.1.2.dcm : From Sébastien Barré (MR-MONO2-12-an2) - UnknownSopClassUid.dcm : Same as "ColorTestMalaterre.dcm", with arbitrary SOP class UID. + +Sample images that are not listed above, were submitted by Orthanc +users, either in the "Orthanc Users" public discussion group or in the +Orthanc bug tracker.
--- a/Tests/Tests.py Tue Aug 25 17:05:34 2020 +0200 +++ b/Tests/Tests.py Sat Sep 12 16:00:23 2020 +0200 @@ -5961,3 +5961,27 @@ ]))) self.assertEqual(1, len(DoGet(_LOCAL, '/instances'))) DropOrthanc(_LOCAL) + + + def test_decode_elscint(self): + # https://groups.google.com/g/orthanc-users/c/d9anAx6lSis/m/qEzm1x3PAAAJ + a = UploadInstance(_REMOTE, '2020-09-12-ELSCINT1-PMSCT_RLE1.dcm')['ID'] + b = UploadInstance(_REMOTE, '2020-09-11-Christopher-ELSCINT1-Raw.dcm')['ID'] + + im = GetImage(_REMOTE, '/instances/%s/frames/0/preview' % a) + self.assertEqual("L", im.mode) + self.assertEqual(512, im.size[0]) + self.assertEqual(512, im.size[1]) + + im = GetImage(_REMOTE, '/instances/%s/frames/0/preview' % b) + self.assertEqual("L", im.mode) + self.assertEqual(512, im.size[0]) + self.assertEqual(512, im.size[1]) + + # The two tests below fail on Orthanc <= 1.7.3 + raw = DoGet(_REMOTE, '/instances/%s/frames/0/raw' % a) + self.assertEqual(512 * 512 * 2, len(raw)) + + raw = DoGet(_REMOTE, '/instances/%s/frames/0/raw' % b) + self.assertEqual(512 * 512 * 2, len(raw)) +