Mercurial > hg > orthanc-tests
comparison Tests/Tests.py @ 218:70fba41776be
test_findscu_missing_tags
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 21 Feb 2019 10:31:54 +0100 |
parents | a491d5ec370a |
children | 00e5aeea33dd |
comparison
equal
deleted
inserted
replaced
217:a491d5ec370a | 218:70fba41776be |
---|---|
4499 # first equal, then "ISO 2022 IR 87" (i.e. "JIS") for the | 4499 # first equal, then "ISO 2022 IR 87" (i.e. "JIS") for the |
4500 # remainer. Orthanc only takes into consideration the first | 4500 # remainer. Orthanc only takes into consideration the first |
4501 # codepage: This is a limitation. | 4501 # codepage: This is a limitation. |
4502 # gdcmraw -t 10,10 -i SCSH32 -o /tmp/tag && cut -d '=' -f 1 /tmp/tag | uconv -f SHIFT_JIS -t UTF-8 | 4502 # gdcmraw -t 10,10 -i SCSH32 -o /tmp/tag && cut -d '=' -f 1 /tmp/tag | uconv -f SHIFT_JIS -t UTF-8 |
4503 self.assertTrue(GetPatientName('Encodings/DavidClunie/SCSH32').startswith(u'ヤマダ^タロウ=')) | 4503 self.assertTrue(GetPatientName('Encodings/DavidClunie/SCSH32').startswith(u'ヤマダ^タロウ=')) |
4504 | |
4505 | |
4506 def test_findscu_missing_tags(self): | |
4507 # dcmodify -e Rows DummyCTInvalidRows.dcm -gst -gse -gin | |
4508 UploadInstance(_REMOTE, 'DummyCT.dcm') | |
4509 UploadInstance(_REMOTE, 'DummyCTInvalidRows.dcm') | |
4510 | |
4511 i = CallFindScu([ '-k', '0008,0052=IMAGES', '-k', 'Rows', '-k', 'PatientName' ]) | |
4512 | |
4513 # We have 2 instances... | |
4514 patientNames = re.findall('\(0010,0010\).*?\[(.*?)\]', i) | |
4515 self.assertEqual(2, len(patientNames)) | |
4516 self.assertEqual('KNIX', patientNames[0]) | |
4517 self.assertEqual('KNIX', patientNames[1]) | |
4518 | |
4519 # ...but only 1 value for the "Rows" tag | |
4520 rows = re.findall('\(0028,0010\) US ([0-9]+)', i) | |
4521 self.assertEqual(1, len(rows)) | |
4522 self.assertEqual('512', rows[0]) |