782
|
1 #include "gtest/gtest.h"
|
|
2
|
|
3 #include "../OrthancServer/FromDcmtkBridge.h"
|
|
4 #include "../OrthancServer/OrthancInitialization.h"
|
|
5
|
|
6 using namespace Orthanc;
|
|
7
|
|
8 TEST(DicomFormat, Tag)
|
|
9 {
|
|
10 ASSERT_EQ("PatientName", FromDcmtkBridge::GetName(DicomTag(0x0010, 0x0010)));
|
|
11
|
|
12 DicomTag t = FromDcmtkBridge::ParseTag("SeriesDescription");
|
|
13 ASSERT_EQ(0x0008, t.GetGroup());
|
|
14 ASSERT_EQ(0x103E, t.GetElement());
|
|
15
|
|
16 t = FromDcmtkBridge::ParseTag("0020-e040");
|
|
17 ASSERT_EQ(0x0020, t.GetGroup());
|
|
18 ASSERT_EQ(0xe040, t.GetElement());
|
|
19
|
|
20 // Test ==() and !=() operators
|
|
21 ASSERT_TRUE(DICOM_TAG_PATIENT_ID == DicomTag(0x0010, 0x0020));
|
|
22 ASSERT_FALSE(DICOM_TAG_PATIENT_ID != DicomTag(0x0010, 0x0020));
|
|
23 }
|
|
24
|
|
25
|