dcmtkpp
VRTraits.h
1 /*************************************************************************
2  * dcmtkpp - 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 namespace dcmtkpp
13 {
14 
22 template<DcmEVR VR>
23 struct VRTraits;
24 
25 #define DECLARE_VR_TRAITS(vr, value_type) \
26  \
27 template<> \
28 struct VRTraits<vr> \
29 { \
30  \
31  typedef value_type ValueType; \
32 };
33 
34 DECLARE_VR_TRAITS(EVR_AE, std::string)
35 DECLARE_VR_TRAITS(EVR_AS, std::string)
36 //DECLARE_VR_TRAITS(EVR_AT
37 DECLARE_VR_TRAITS(EVR_CS, std::string)
38 DECLARE_VR_TRAITS(EVR_DA, std::string)
39 DECLARE_VR_TRAITS(EVR_DS, Float64)
40 DECLARE_VR_TRAITS(EVR_DT, std::string)
41 DECLARE_VR_TRAITS(EVR_FD, Float64)
42 DECLARE_VR_TRAITS(EVR_FL, Float32)
43 DECLARE_VR_TRAITS(EVR_IS, Sint32)
44 DECLARE_VR_TRAITS(EVR_LO, std::string)
45 DECLARE_VR_TRAITS(EVR_LT, std::string)
46 DECLARE_VR_TRAITS(EVR_OB, std::vector<unsigned char>)
47 DECLARE_VR_TRAITS(EVR_OF, std::vector<unsigned char>)
48 DECLARE_VR_TRAITS(EVR_OW, std::vector<unsigned char>)
49 DECLARE_VR_TRAITS(EVR_PN, std::string)
50 DECLARE_VR_TRAITS(EVR_SH, std::string)
51 DECLARE_VR_TRAITS(EVR_SL, Sint32)
52 //DECLARE_VR_TRAITS(EVR_SQ
53 DECLARE_VR_TRAITS(EVR_SS, Sint16)
54 DECLARE_VR_TRAITS(EVR_ST, std::string)
55 DECLARE_VR_TRAITS(EVR_TM, std::string)
56 DECLARE_VR_TRAITS(EVR_UI, std::string)
57 DECLARE_VR_TRAITS(EVR_UL, Uint32)
58 DECLARE_VR_TRAITS(EVR_UN, std::vector<unsigned char>)
59 DECLARE_VR_TRAITS(EVR_US, Uint16)
60 DECLARE_VR_TRAITS(EVR_UT, std::string)
61 
62 #undef DECLARE_VR_TRAITS
63 
64 }
65 
66 #endif // _4f556093_02e3_4659_9026_2b16bc2c8a51
Definition: Association.cpp:22
Information related to VR.
Definition: VRTraits.h:23