comparison UnitTestsSources/FromDcmtkTests.cpp @ 3520:77bede920d22

merge
author amazy
date Thu, 19 Sep 2019 13:11:11 +0200
parents a57c8163d9ae
children 94f4a18a79cc
comparison
equal deleted inserted replaced
3519:fc26659493b6 3520:77bede920d22
1613 DicomMap m; 1613 DicomMap m;
1614 m.FromDicomWeb(visitor.GetResult()); 1614 m.FromDicomWeb(visitor.GetResult());
1615 ASSERT_EQ(2u, m.GetSize()); 1615 ASSERT_EQ(2u, m.GetSize());
1616 1616
1617 std::string s; 1617 std::string s;
1618 ASSERT_TRUE(m.CopyToString(s, DICOM_TAG_SPECIFIC_CHARACTER_SET, false)); 1618 ASSERT_TRUE(m.LookupStringValue(s, DICOM_TAG_SPECIFIC_CHARACTER_SET, false));
1619 ASSERT_EQ("ISO 2022 IR 149", s); 1619 ASSERT_EQ("ISO 2022 IR 149", s);
1620 1620
1621 ASSERT_TRUE(m.CopyToString(s, DICOM_TAG_PATIENT_NAME, false)); 1621 ASSERT_TRUE(m.LookupStringValue(s, DICOM_TAG_PATIENT_NAME, false));
1622 std::vector<std::string> v; 1622 std::vector<std::string> v;
1623 Toolbox::TokenizeString(v, s, '='); 1623 Toolbox::TokenizeString(v, s, '=');
1624 ASSERT_EQ(3u, v.size()); 1624 ASSERT_EQ(3u, v.size());
1625 ASSERT_EQ("Hong^Gildong", v[0]); 1625 ASSERT_EQ("Hong^Gildong", v[0]);
1626 ASSERT_EQ(utf8, s); 1626 ASSERT_EQ(utf8, s);
1710 DicomMap m; 1710 DicomMap m;
1711 m.FromDicomWeb(visitor.GetResult()); 1711 m.FromDicomWeb(visitor.GetResult());
1712 ASSERT_EQ(2u, m.GetSize()); 1712 ASSERT_EQ(2u, m.GetSize());
1713 1713
1714 std::string s; 1714 std::string s;
1715 ASSERT_TRUE(m.CopyToString(s, DICOM_TAG_SPECIFIC_CHARACTER_SET, false)); 1715 ASSERT_TRUE(m.LookupStringValue(s, DICOM_TAG_SPECIFIC_CHARACTER_SET, false));
1716 ASSERT_EQ("ISO 2022 IR 87", s); 1716 ASSERT_EQ("ISO 2022 IR 87", s);
1717 1717
1718 ASSERT_TRUE(m.CopyToString(s, DICOM_TAG_PATIENT_NAME, false)); 1718 ASSERT_TRUE(m.LookupStringValue(s, DICOM_TAG_PATIENT_NAME, false));
1719 std::vector<std::string> v; 1719 std::vector<std::string> v;
1720 Toolbox::TokenizeString(v, s, '='); 1720 Toolbox::TokenizeString(v, s, '=');
1721 ASSERT_EQ(3u, v.size()); 1721 ASSERT_EQ(3u, v.size());
1722 ASSERT_EQ("Yamada^Tarou", v[0]); 1722 ASSERT_EQ("Yamada^Tarou", v[0]);
1723 ASSERT_EQ(utf8, s); 1723 ASSERT_EQ(utf8, s);