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
13 TagKey key, vr, fourth, name;
15 from >> hex >> group >> element;
17 from.getline(buff, 256, ' ');
20 from.getline(buff, 256, ' ');
22 from.getline(buff, 256, '\n');
24 gdcmDictEntry * newEntry = new gdcmDictEntry(group, element,
26 entries[gdcmDictEntry::TranslateToKey(group, element)] = newEntry;
31 void gdcmDict::Print(ostream& os) {
32 for (TagHT::iterator tag = entries.begin(); tag != entries.end(); ++tag){
34 os << "(" << hex << tag->second->GetGroup() << ',';
35 os << hex << tag->second->GetElement() << ") = " << dec;
36 os << tag->second->GetVR() << ", ";
37 os << tag->second->GetFourth() << ", ";
38 os << tag->second->GetName() << "." << endl;
42 gdcmDictEntry * gdcmDict::GetTag(guint32 group, guint32 element) {
43 TagKey key = gdcmDictEntry::TranslateToKey(group, element);
44 TagHT::iterator found = entries.find(key);