# HG changeset patch # User Sebastien Jodogne # Date 1622820673 -7200 # Node ID 62ee5e57ee05299c1f7bcf829f3b54dc46f4a59e # Parent 6bbc89c2c2d12ab632a38ab4d175fe97774dc64a test_anonymize_relationships_6 diff -r 6bbc89c2c2d1 -r 62ee5e57ee05 Database/2020-11-16-SalimKanounAnonymization.dcm Binary file Database/2020-11-16-SalimKanounAnonymization.dcm has changed diff -r 6bbc89c2c2d1 -r 62ee5e57ee05 Database/README.txt --- a/Database/README.txt Thu Jun 03 21:05:19 2021 +0200 +++ b/Database/README.txt Fri Jun 04 17:31:13 2021 +0200 @@ -55,6 +55,7 @@ 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 +- 2020-11-16-SalimKanounAnonymization.dcm: From https://groups.google.com/g/orthanc-users/c/T0IokiActrI/m/L9K0vfscAAAJ - 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 diff -r 6bbc89c2c2d1 -r 62ee5e57ee05 Tests/Tests.py --- a/Tests/Tests.py Thu Jun 03 21:05:19 2021 +0200 +++ b/Tests/Tests.py Fri Jun 04 17:31:13 2021 +0200 @@ -7071,3 +7071,33 @@ for t in [ tags2021b, tagsDefault ]: self.assertFalse('0050,0020' in t) # Device Description, anonymized between 2017c and 2019c self.assertEqual('', t['3006,0002']) # StructureSetLabel, anonymized between 2019c and 2021b + + + def test_anonymize_relationships_6(self): + # 2020-10-20 (Salim Kanoun): "I think I have hit an + # anonymization issue for the tag 0008,1250. This tags is a + # sequence containing StudyUID / Series UID of related series. + # [After anonymization,] this tag keep a reference of the + # original Study/Series UID. + # https://groups.google.com/g/orthanc-users/c/T0IokiActrI/m/L9K0vfscAAAJ + UploadInstance(_REMOTE, '2020-11-16-SalimKanounAnonymization.dcm') + + tags = DoGet(_REMOTE, '/instances/%s/tags?short' % DoGet(_REMOTE, '/instances') [0]) + self.assertEqual('1.2.840.113619.6.95.31.0.3.4.1.3175.13.6054282', + tags['0008,1250'][0]['0020,000d']) + self.assertEqual('1.3.12.2.1107.5.1.4.11047.30000019111306043635400005028', + tags['0008,1250'][0]['0020,000e']) + + a = DoGet(_REMOTE, '/studies') + self.assertEqual(1, len(a)) + b = DoPost(_REMOTE, '/studies/%s/anonymize' % a[0], {}) ['ID'] + + c = DoGet(_REMOTE, '/studies/%s/instances' % b) + self.assertEqual(1, len(c)) + tags = DoGet(_REMOTE, '/instances/%s/tags?short' % c[0]['ID']) + + # In Orthanc <= 1.9.3, the two tests below failed + self.assertNotEqual('1.2.840.113619.6.95.31.0.3.4.1.3175.13.6054282', + tags['0008,1250'][0]['0020,000d']) + self.assertNotEqual('1.3.12.2.1107.5.1.4.11047.30000019111306043635400005028', + tags['0008,1250'][0]['0020,000e'])