comparison UnitTestsSources/FromDcmtk.cpp @ 782:a60040857ce6

reorganization
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 02 May 2014 12:59:05 +0200
parents
children efd0215736d9
comparison
equal deleted inserted replaced
780:e7eb70772fbe 782:a60040857ce6
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