]> Creatis software - gdcm.git/blob - src/gdcmDictEntry.h
* src/*.[h] all occurences of stl classes are now prefixed with
[gdcm.git] / src / gdcmDictEntry.h
1 // gdcmDictEntry.h
2
3 #ifndef GDCMDICTENTRY_H
4 #define GDCMDICTENTRY_H
5
6 #include "gdcmCommon.h"
7
8 class GDCM_EXPORT gdcmDictEntry {
9 private:
10    // FIXME : were are the group and element used except from building up
11    //         a TagKey. If the answer is nowhere then there is no need
12    //         to store the group and element independently.
13         guint16 group;       // e.g. 0x0010
14         guint16 element;     // e.g. 0x0103
15    std::string  vr;     // Value Representation i.e. some clue about the nature
16                              // of the data represented e.g. "FD" short for
17                              // "Floating Point Double"
18         // CLEANME: find the official dicom name for this field !
19    std::string  fourth; // Fourth field containing some semantics.
20                         //(Group Name abbr.)
21    std::string  name;   // e.g. "Patient_Name"
22         TagKey  key;         // Redundant with (group, element) but we add it
23                              // on efficiency purposes.
24         // DCMTK has many fields for handling a DictEntry (see below). What are the
25         // relevant ones for gdcmlib ?
26         //      struct DBI_SimpleEntry {
27         //         Uint16 upperGroup;
28         //         Uint16 upperElement;
29         //         DcmEVR evr;
30         //         const char* tagName;
31         //         int vmMin;
32         //         int vmMax;
33         //         const char* standardVersion;
34         //         DcmDictRangeRestriction groupRestriction;
35         //         DcmDictRangeRestriction elementRestriction;
36         //       };
37 public:
38         gdcmDictEntry(guint16 group, 
39                       guint16 element,
40                  std::string vr     = "Unknown",
41                  std::string fourth = "Unknown",
42                  std::string name   = "Unknown");
43                          
44         // fabrique une 'clĂ©' par concatĂ©nation du numGroupe et du numElement
45         static TagKey TranslateToKey(guint16 group, guint16 element);
46         
47         guint16      GetGroup(void)  { return group; };
48         guint16      GetElement(void){return element;};
49    std::string  GetVR(void)     {return vr;     };
50         void         SetVR(std::string);
51         void         SetKey(std::string k){ key = k; };
52         bool         IsVrUnknown(void);
53    std::string  GetFourth(void) {return fourth;};
54    std::string  GetName(void)   {return name;  };
55    std::string  GetKey(void)    {return key;   };
56 };
57
58 #endif