00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _GDCMDICTENTRY_H_
00020 #define _GDCMDICTENTRY_H_
00021
00022 #include "gdcmRefCounter.h"
00023 #include "gdcmTagKey.h"
00024 #include "gdcmVRKey.h"
00025
00026 namespace GDCM_NAME_SPACE
00027 {
00028
00029 class VRKey;
00030 class TagKey;
00042 class GDCM_EXPORT DictEntry : public RefCounter
00043 {
00044 gdcmTypeMacro(DictEntry);
00045
00046 public:
00047 static DictEntry *New(uint16_t group, uint16_t elem,
00048 VRKey const &vr = GDCM_VRUNKNOWN,
00049 TagName const &vm = GDCM_UNKNOWN,
00050 TagName const &name = GDCM_UNKNOWN);
00051
00052
00053 void Print(std::ostream &os = std::cout, std::string const &indent = "");
00054
00057 const uint16_t &GetGroup() const { return Tag[0]; }
00058
00061 const uint16_t &GetElement() const { return Tag[1]; }
00062
00065 virtual void SetVR(VRKey const &vr) { VR = vr; }
00068 const VRKey &GetVR() const { return VR; }
00071 bool IsVRUnknown() const { return VR == GDCM_VRUNKNOWN; }
00072
00073 const TagKey &GetKey() const { return Tag; }
00074
00075
00076 static TagKey TranslateToKey(uint16_t group, uint16_t elem);
00077
00080 const TagName &GetVM() const { return VM; }
00083 virtual void SetVM(TagName const &vm) { VM = vm; }
00086 bool IsVMUnknown() const { return VM == GDCM_UNKNOWN; }
00087
00091 const TagName &GetName() const { return Name; }
00092
00093 protected:
00094 DictEntry(uint16_t group, uint16_t elem,
00095 VRKey const &vr = GDCM_VRUNKNOWN,
00096 TagName const &vm = GDCM_UNKNOWN,
00097 TagName const &name = GDCM_UNKNOWN);
00098
00099 ~DictEntry();
00100
00101 private:
00103 TagKey Tag;
00104
00109 VRKey VR;
00110
00112 TagName VM;
00113
00115 TagName Name;
00116 };
00117 }
00118
00119 #endif