5 gdcmDict::gdcmDict(char * FileName) {
6 std::ifstream from(FileName);
7 dbg.Error(!from, "gdcmDictSet::gdcmDictSet:",
8 "can't open dictionary");
9 guint16 group, element;
10 // CLEANME : use defines for all those constants
12 TagKey key, vr, fourth, name;
14 from >> hex >> group >> element;
16 from.getline(buff, 256, ' ');
19 from.getline(buff, 256, ' ');
21 from.getline(buff, 256, '\n');
23 gdcmDictEntry * newEntry = new gdcmDictEntry(group, element,
25 entries[gdcmDictEntry::TranslateToKey(group, element)] = newEntry;
30 void gdcmDict::Print(ostream& os) {
31 for (TagHT::iterator tag = entries.begin(); tag != entries.end(); ++tag){
33 os << "(" << hex << tag->second->GetGroup() << ',';
34 os << hex << tag->second->GetElement() << ") = " << dec;
35 os << tag->second->GetVR() << ", ";
36 os << tag->second->GetFourth() << ", ";
37 os << tag->second->GetName() << "." << endl;
41 gdcmDictEntry * gdcmDict::GetTag(guint32 group, guint32 element) {
42 TagKey key = gdcmDictEntry::TranslateToKey(group, element);
43 TagHT::iterator found = entries.find(key);