Mercurial > hg > orthanc
comparison UnitTestsSources/FromDcmtkTests.cpp @ 3229:77e8378f0323
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 14 Feb 2019 19:52:35 +0100 |
parents | 4b9cfd92d1ae |
children | 9b0e67161600 |
comparison
equal
deleted
inserted
replaced
3228:4b9cfd92d1ae | 3229:77e8378f0323 |
---|---|
1685 { | 1685 { |
1686 // http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part05/sect_J.3.html | 1686 // http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part05/sect_J.3.html |
1687 | 1687 |
1688 static const uint8_t chinese[] = { | 1688 static const uint8_t chinese[] = { |
1689 0x57, 0x61, 0x6e, 0x67, 0x5e, 0x58, 0x69, 0x61, 0x6f, 0x44, 0x6f, | 1689 0x57, 0x61, 0x6e, 0x67, 0x5e, 0x58, 0x69, 0x61, 0x6f, 0x44, 0x6f, |
1690 0x6e, 0x67, 0x3d, 0xcd, 0xf5, 0x5e, 0xd0, 0xa1, 0xb6, 0xab, 0x3d | 1690 0x6e, 0x67, 0x3d, 0xcd, 0xf5, 0x5e, 0xd0, 0xa1, 0xb6, 0xab, 0x3d, 0x00 |
1691 }; | 1691 }; |
1692 | 1692 |
1693 ParsedDicomFile dicom(false); | 1693 ParsedDicomFile dicom(false); |
1694 dicom.ReplacePlainString(DICOM_TAG_SPECIFIC_CHARACTER_SET, "GB18030"); | 1694 dicom.ReplacePlainString(DICOM_TAG_SPECIFIC_CHARACTER_SET, "GB18030"); |
1695 ASSERT_TRUE(dicom.GetDcmtkObject().getDataset()->putAndInsertString | 1695 ASSERT_TRUE(dicom.GetDcmtkObject().getDataset()->putAndInsertString |
1741 0x65, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x73, 0xd6, 0xd0, 0xce, | 1741 0x65, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x73, 0xd6, 0xd0, 0xce, |
1742 0xc4, 0x2e, 0x0d, 0x0a, 0x54, 0x68, 0x65, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, | 1742 0xc4, 0x2e, 0x0d, 0x0a, 0x54, 0x68, 0x65, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, |
1743 0x64, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, | 1743 0x64, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, |
1744 0x65, 0x73, 0xd6, 0xd0, 0xce, 0xc4, 0x2c, 0x20, 0x74, 0x6f, 0x6f, 0x2e, 0x0d, | 1744 0x65, 0x73, 0xd6, 0xd0, 0xce, 0xc4, 0x2c, 0x20, 0x74, 0x6f, 0x6f, 0x2e, 0x0d, |
1745 0x0a, 0x54, 0x68, 0x65, 0x20, 0x74, 0x68, 0x69, 0x72, 0x64, 0x20, 0x6c, 0x69, | 1745 0x0a, 0x54, 0x68, 0x65, 0x20, 0x74, 0x68, 0x69, 0x72, 0x64, 0x20, 0x6c, 0x69, |
1746 0x6e, 0x65, 0x2e, 0x0d, 0x0a | 1746 0x6e, 0x65, 0x2e, 0x0d, 0x0a, 0x00 |
1747 }; | 1747 }; |
1748 | 1748 |
1749 static const uint8_t patternRaw[] = { | 1749 static const uint8_t patternRaw[] = { |
1750 0xe4, 0xb8, 0xad, 0xe6, 0x96, 0x87 | 1750 0xe4, 0xb8, 0xad, 0xe6, 0x96, 0x87 |
1751 }; | 1751 }; |
1785 // http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part05/sect_K.2.html | 1785 // http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part05/sect_K.2.html |
1786 | 1786 |
1787 static const uint8_t chinese[] = { | 1787 static const uint8_t chinese[] = { |
1788 0x5a, 0x68, 0x61, 0x6e, 0x67, 0x5e, 0x58, 0x69, 0x61, 0x6f, 0x44, 0x6f, | 1788 0x5a, 0x68, 0x61, 0x6e, 0x67, 0x5e, 0x58, 0x69, 0x61, 0x6f, 0x44, 0x6f, |
1789 0x6e, 0x67, 0x3d, 0x1b, 0x24, 0x29, 0x41, 0xd5, 0xc5, 0x5e, 0x1b, 0x24, | 1789 0x6e, 0x67, 0x3d, 0x1b, 0x24, 0x29, 0x41, 0xd5, 0xc5, 0x5e, 0x1b, 0x24, |
1790 0x29, 0x41, 0xd0, 0xa1, 0xb6, 0xab, 0x3d, 0x20 | 1790 0x29, 0x41, 0xd0, 0xa1, 0xb6, 0xab, 0x3d, 0x20, 0x00 |
1791 }; | 1791 }; |
1792 | 1792 |
1793 // echo -n "Zhang^XiaoDong=..." | hexdump -v -e '14/1 "0x%02x, "' -e '"\n"' | 1793 // echo -n "Zhang^XiaoDong=..." | hexdump -v -e '14/1 "0x%02x, "' -e '"\n"' |
1794 static const uint8_t utf8[] = { | 1794 static const uint8_t utf8[] = { |
1795 0x5a, 0x68, 0x61, 0x6e, 0x67, 0x5e, 0x58, 0x69, 0x61, 0x6f, 0x44, 0x6f, 0x6e, 0x67, | 1795 0x5a, 0x68, 0x61, 0x6e, 0x67, 0x5e, 0x58, 0x69, 0x61, 0x6f, 0x44, 0x6f, 0x6e, 0x67, |
1817 // http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part05/sect_K.2.html | 1817 // http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part05/sect_K.2.html |
1818 | 1818 |
1819 static const uint8_t chinese[] = { | 1819 static const uint8_t chinese[] = { |
1820 0x31, 0x2e, 0x1b, 0x24, 0x29, 0x41, 0xb5, 0xda, 0xd2, 0xbb, 0xd0, 0xd0, 0xce, 0xc4, 0xd7, 0xd6, 0xa1, 0xa3, 0x0d, 0x0a, | 1820 0x31, 0x2e, 0x1b, 0x24, 0x29, 0x41, 0xb5, 0xda, 0xd2, 0xbb, 0xd0, 0xd0, 0xce, 0xc4, 0xd7, 0xd6, 0xa1, 0xa3, 0x0d, 0x0a, |
1821 0x32, 0x2e, 0x1b, 0x24, 0x29, 0x41, 0xb5, 0xda, 0xb6, 0xfe, 0xd0, 0xd0, 0xce, 0xc4, 0xd7, 0xd6, 0xa1, 0xa3, 0x0d, 0x0a, | 1821 0x32, 0x2e, 0x1b, 0x24, 0x29, 0x41, 0xb5, 0xda, 0xb6, 0xfe, 0xd0, 0xd0, 0xce, 0xc4, 0xd7, 0xd6, 0xa1, 0xa3, 0x0d, 0x0a, |
1822 0x33, 0x2e, 0x1b, 0x24, 0x29, 0x41, 0xb5, 0xda, 0xc8, 0xfd, 0xd0, 0xd0, 0xce, 0xc4, 0xd7, 0xd6, 0xa1, 0xa3, 0x0d, 0x0a | 1822 0x33, 0x2e, 0x1b, 0x24, 0x29, 0x41, 0xb5, 0xda, 0xc8, 0xfd, 0xd0, 0xd0, 0xce, 0xc4, 0xd7, 0xd6, 0xa1, 0xa3, 0x0d, 0x0a, 0x00 |
1823 }; | 1823 }; |
1824 | 1824 |
1825 static const uint8_t line1[] = { | 1825 static const uint8_t line1[] = { |
1826 0x31, 0x2e, 0xe7, 0xac, 0xac, 0xe4, 0xb8, 0x80, 0xe8, 0xa1, 0x8c, 0xe6, 0x96, 0x87, | 1826 0x31, 0x2e, 0xe7, 0xac, 0xac, 0xe4, 0xb8, 0x80, 0xe8, 0xa1, 0x8c, 0xe6, 0x96, 0x87, |
1827 0xe5, 0xad, 0x97, 0xe3, 0x80, 0x82, '\r' | 1827 0xe5, 0xad, 0x97, 0xe3, 0x80, 0x82, '\r' |