Main Page | File List | Related Pages

gdcmDictEntry.h

00001 // gdcmDictEntry.h
00002 //-----------------------------------------------------------------------------
00003 #ifndef GDCMDICTENTRY_H
00004 #define GDCMDICTENTRY_H
00005 
00006 #include "gdcmCommon.h"
00007 
00008 //-----------------------------------------------------------------------------
00009 /*
00010  * \defgroup gdcmDictEntry
00011  * \brief
00012  * the gdcmDictEntry in an element contained by the gdcmDict.
00013  * It contains :
00014  *  - the key referenced by the DICOM norm or the constructor (for private keys)
00015  *  - the corresponding name in english (it's equivalent to a label)
00016  *  - the owner group
00017  *  - etc.
00018  */
00019 class GDCM_EXPORT gdcmDictEntry 
00020 {
00021 public:
00022    gdcmDictEntry(guint16 group, 
00023                  guint16 element,
00024                  std::string vr     = "Unknown",
00025                  std::string fourth = "Unknown",
00026                  std::string name   = "Unknown");
00027         
00028    static TagKey TranslateToKey(guint16 group, guint16 element);
00029 
00030    void SetVR(std::string);
00031 
00038    inline bool IsVRUnknown() {return vr == "??"; }
00039 
00045    inline guint16 GetGroup(void) { return group; }
00046   
00052    inline guint16 GetElement(void) { return element; }
00053  
00059    inline std::string GetVR(void) { return vr; }
00060  
00066    inline void SetKey(std::string k)  { key = k; }
00067  
00076    inline std::string GetFourth(void) { return fourth; } 
00077 
00084    inline std::string GetName(void) { return name; } 
00085  
00091    inline std::string GetKey(void) { return key; }
00092 
00093 private:
00094    // FIXME : were are the group and element used except from building up
00095    //         a TagKey. If the answer is nowhere then there is no need
00096    //         to store the group and element independently.
00097    guint16 group;   // e.g. 0x0010
00098    guint16 element; // e.g. 0x0103
00099    std::string vr; // Value Representation i.e. some clue about the nature
00100                         // of the data represented e.g. "FD" short for
00101                         // "Floating Point Double"
00102         // CLEANME: find the official dicom name for this field !
00103    std::string fourth; // Fourth field containing some semantics.
00104                        //(Group Name abbr.)
00105    std::string name; // e.g. "Patient_Name"
00106    TagKey  key;      // Redundant with (group, element) but we add it
00107                      // on efficiency purposes.
00108 
00109         // DCMTK has many fields for handling a DictEntry (see below). What are the
00110         // relevant ones for gdcmlib ?
00111         //      struct DBI_SimpleEntry {
00112         //         Uint16 upperGroup;
00113         //         Uint16 upperElement;
00114         //         DcmEVR evr;
00115         //         const char* tagName;
00116         //         int vmMin;
00117         //         int vmMax;
00118         //         const char* standardVersion;
00119         //         DcmDictRangeRestriction groupRestriction;
00120         //         DcmDictRangeRestriction elementRestriction;
00121         //       };
00122 };
00123 
00124 //-----------------------------------------------------------------------------
00125 #endif

Generated on Mon Feb 14 16:13:43 2005 for gdcm by doxygen 1.3.6