Odil
A C++11 library for the DICOM standard
VRTraits.h
Go to the documentation of this file.
1/*************************************************************************
2 * odil - Copyright (C) Universite de Strasbourg
3 * Distributed under the terms of the CeCILL-B license, as published by
4 * the CEA-CNRS-INRIA. Refer to the LICENSE file or to
5 * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
6 * for details.
7 ************************************************************************/
8
9#ifndef _4f556093_02e3_4659_9026_2b16bc2c8a51
10#define _4f556093_02e3_4659_9026_2b16bc2c8a51
11
12#include <vector>
13
14#include <dcmtk/config/osconfig.h>
15#include <dcmtk/dcmdata/dcvr.h>
16
17namespace odil
18{
19
20namespace dcmtk
21{
22
30template<DcmEVR VR>
31struct VRTraits;
32
33#define DECLARE_VR_TRAITS(vr, value_type) \
34 \
35template<> \
36struct VRTraits<vr> \
37{ \
38 \
39 typedef value_type ValueType; \
40};
41
42DECLARE_VR_TRAITS(EVR_AE, std::string)
43DECLARE_VR_TRAITS(EVR_AS, std::string)
44//DECLARE_VR_TRAITS(EVR_AT
45DECLARE_VR_TRAITS(EVR_CS, std::string)
46DECLARE_VR_TRAITS(EVR_DA, std::string)
47DECLARE_VR_TRAITS(EVR_DS, Float64)
48DECLARE_VR_TRAITS(EVR_DT, std::string)
49DECLARE_VR_TRAITS(EVR_FD, Float64)
50DECLARE_VR_TRAITS(EVR_FL, Float32)
51DECLARE_VR_TRAITS(EVR_IS, Sint32)
52DECLARE_VR_TRAITS(EVR_LO, std::string)
53DECLARE_VR_TRAITS(EVR_LT, std::string)
54DECLARE_VR_TRAITS(EVR_OB, std::vector<unsigned char>)
55DECLARE_VR_TRAITS(EVR_OF, std::vector<unsigned char>)
56DECLARE_VR_TRAITS(EVR_OW, std::vector<unsigned char>)
57DECLARE_VR_TRAITS(EVR_PN, std::string)
58DECLARE_VR_TRAITS(EVR_SH, std::string)
59DECLARE_VR_TRAITS(EVR_SL, Sint32)
60//DECLARE_VR_TRAITS(EVR_SQ
61DECLARE_VR_TRAITS(EVR_SS, Sint16)
62DECLARE_VR_TRAITS(EVR_ST, std::string)
63DECLARE_VR_TRAITS(EVR_TM, std::string)
64DECLARE_VR_TRAITS(EVR_UI, std::string)
65DECLARE_VR_TRAITS(EVR_UL, Uint32)
66DECLARE_VR_TRAITS(EVR_UN, std::vector<unsigned char>)
67DECLARE_VR_TRAITS(EVR_US, Uint16)
68DECLARE_VR_TRAITS(EVR_UT, std::string)
69
70#undef DECLARE_VR_TRAITS
71
72}
73
74}
75
76#endif // _4f556093_02e3_4659_9026_2b16bc2c8a51
#define DECLARE_VR_TRAITS(vr, value_type)
Definition: VRTraits.h:33
Definition: Association.h:25
Definition: VRTraits.h:31