]> Creatis software - gdcm.git/blob - src/gdcmDictEntry.h
fc3817a61eb617dc30fd7f690b5bdbeecdb03d84
[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         
46         // Pourquoi fait-elle partie de DictEntry?
47         // elle pourrait etre utilisée egalement ailleurs, hors tout Dictionnaire
48         
49         // Pourquoi 'static'?
50         
51    static TagKey TranslateToKey(guint16 group, guint16 element);
52         
53    guint16      GetGroup(void)  {return group;  };
54    guint16      GetElement(void){return element;};
55    std::string  GetVR(void)     {return vr;     };
56    void         SetVR(std::string);
57    void         SetKey(std::string k){ key = k; };
58    bool         IsVrUnknown(void);
59    std::string  GetFourth(void) {return fourth;};
60    std::string  GetName(void)   {return name;  };
61    std::string  GetKey(void)    {return key;   };
62 };
63
64 #endif