changeset 23:30ecc857fa07

test latin-2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 23 Jun 2015 13:49:53 +0200
parents 8f4b70c89467
children a430777e35a4
files Database/MarekLatin2.dcm Database/README.txt Tests/Tests.py
diffstat 3 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
Binary file Database/MarekLatin2.dcm has changed
--- a/Database/README.txt	Mon Jun 22 16:29:08 2015 +0200
+++ b/Database/README.txt	Tue Jun 23 13:49:53 2015 +0200
@@ -42,15 +42,16 @@
 - 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, Debian bug #698417
+- ColorTestMalaterre.dcm : From Mathieu Malaterre <mathieu.malaterre@gmail.com>, Debian bug #698417
 - DummyCT.dcm : From Osirix, "KNIX" with PixelData removed.
 - 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)
 - Issue32.dcm : From aceberg93 on Google Code (Cyrillic symbols)
-- KarstenHilbertRF.dcm : From Karsten Hilbert.
+- KarstenHilbertRF.dcm : From Karsten Hilbert <karsten.hilbert@gmx.net>.
 - Knee/* : From OsiriX, "KNEE" (sample of JPEG2000).
 - Knix/* : From OsiriX, "KNIX" (sample of lossless JPEG).
+- MarekLatin2.dcm : From Marek Święcicki <mswiecicki@archimedic.pl>.
 - Multiframe.dcm : From GDCM, "images_of_interest/PHILIPS_Integris_H-8-MONO2-Multiframe.dcm"
 - Phenix/* : From OsiriX, "PHENIX" (sample of uncompressed data).
 - PilatesArgenturGEUltrasoundOsiriX.dcm: From https://groups.google.com/d/msg/orthanc-users/m3zQLyl_jNc/TUrR462UKSMJ
--- a/Tests/Tests.py	Mon Jun 22 16:29:08 2015 +0200
+++ b/Tests/Tests.py	Tue Jun 23 13:49:53 2015 +0200
@@ -1980,6 +1980,15 @@
 
 
     def test_encodings(self):
+        # Latin-1 (ISO_IR 100)
         brainix = UploadInstance(_REMOTE, 'Brainix/Epi/IM-0001-0001.dcm')['ID']
         tags = DoGet(_REMOTE, '/instances/%s/tags?simplify' % brainix)
         self.assertEqual(u'IRM cérébrale, neuro-crâne', tags['StudyDescription'])
+
+        # Latin-2 (ISO_IR 101)
+        a = UploadInstance(_REMOTE, 'MarekLatin2.dcm')['ID']
+        i = DoGet(_REMOTE, '/instances/%s/simplified-tags' % a)
+        # dcm2xml MarekLatin2.dcm | iconv -f latin2 -t utf-8 | xmllint --format -
+        self.assertEqual('Imię i Nazwisko osoby opisującej', 
+                         i['ContentSequence'][4]['ConceptNameCodeSequence'][0]['CodeMeaning'].encode('utf-8'))
+