00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 #ifndef _GDCMDICOMENTRY_H_
00020 #define _GDCMDICOMENTRY_H_
00021 
00022 #include "gdcmCommon.h"
00023 #include "gdcmRefCounter.h"
00024 #include "gdcmVRKey.h"
00025 #include "gdcmTagKey.h"
00026 
00027 namespace GDCM_NAME_SPACE
00028 {
00029 
00042 class GDCM_EXPORT DicomEntry : public RefCounter
00043 {
00044    gdcmTypeMacro(DicomEntry);
00045 
00046 public:
00047 
00048    void Print(std::ostream &os = std::cout, std::string const &indent = "");
00049 
00052    const uint16_t &GetGroup() const { return Tag[0]; }
00053 
00056    const uint16_t &GetElement() const { return Tag[1]; }
00057 
00060    const TagKey &GetKey() const { return Tag; }
00061    
00064    virtual void SetVR(VRKey const &vr) { VR = vr; }
00067    const VRKey &GetVR() const { return VR; }
00070    bool IsVRUnknown() const { return VR == GDCM_VRUNKNOWN; }
00071 
00072    const TagKey &GetKey() const { return Tag; }
00073 
00074 
00075    static TagKey TranslateToKey(uint16_t group, uint16_t elem)
00076                                 { return TagKey(group,elem); }
00077 
00078 protected:
00079    DicomEntry(const uint16_t &group,const uint16_t &elt,
00080               const VRKey &vr = GDCM_VRUNKNOWN);
00081    ~DicomEntry();
00082 
00083 private:
00085    TagKey Tag;
00086 
00091    VRKey VR;
00092 };
00093 } 
00094 
00095 #endif