]> Creatis software - gdcm.git/blob - src/gdcmDictEntry.cxx
ddfd3e00ec7d45d626835bcab614bbde805558fe
[gdcm.git] / src / gdcmDictEntry.cxx
1 #include "gdcm.h"
2
3 gdcmDictEntry::gdcmDictEntry(guint16 InGroup, guint16 InElement,
4                              string  InVr, string InFourth, string InName) 
5 {
6         group = InGroup;
7         element = InElement;
8         vr = InVr;
9         fourth = InFourth;
10         name = InName;
11         key = TranslateToKey(group, element);
12 }
13
14 TagKey gdcmDictEntry::TranslateToKey(guint16 group, guint16 element) {
15         char trash[10];
16         TagKey key;
17         // CLEAN ME: better call the iostream<< with the hex manipulator on.
18         // This requires some reading of the stdlibC++ sources to make the
19         // proper call (or copy).
20         sprintf(trash, "%04x|%04x", group , element);
21         key = trash;  // Convertion through assignement
22         return key;
23 }