4 TagElValueHT & ElValSet::GetTagHt(void) {
8 void ElValSet::Add(ElValue * newElValue) {
9 tagHt[newElValue->GetKey()] = newElValue;
10 NameHt[newElValue->GetName()] = newElValue;
13 void ElValSet::Print(ostream & os) {
14 for (TagElValueHT::iterator tag = tagHt.begin();
17 os << tag->first << ": ";
18 os << "[" << tag->second->GetValue() << "]";
19 os << "[" << tag->second->GetName() << "]";
20 os << "[" << tag->second->GetVR() << "]" << endl;
24 void ElValSet::PrintByName(ostream & os) {
25 for (TagElValueNameHT::iterator tag = NameHt.begin();
28 os << tag->first << ": ";
29 os << "[" << tag->second->GetValue() << "]";
30 os << "[" << tag->second->GetKey() << "]";
31 os << "[" << tag->second->GetVR() << "]" << endl;
35 ElValue* ElValSet::GetElement(guint32 group, guint32 element) {
36 TagKey key = gdcmDictEntry::TranslateToKey(group, element);
37 if ( ! tagHt.count(key))
39 if (tagHt.count(key) > 1)
40 dbg.Verbose(0, "ElValSet::GetElValue",
41 "multiple entries for this key (FIXME) !");
42 return tagHt.find(key)->second;
45 string ElValSet::GetElValue(guint32 group, guint32 element) {
46 TagKey key = gdcmDictEntry::TranslateToKey(group, element);
47 if ( ! tagHt.count(key))
49 if (tagHt.count(key) > 1)
50 dbg.Verbose(0, "ElValSet::GetElValue",
51 "multiple entries for this key (FIXME) !");
52 return tagHt.find(key)->second->GetValue();
55 string ElValSet::GetElValue(string TagName) {
56 if ( ! NameHt.count(TagName))
58 if (NameHt.count(TagName) > 1)
59 dbg.Verbose(0, "ElValSet::GetElValue",
60 "multipe entries for this key (FIXME) !");
61 return NameHt.find(TagName)->second->GetValue();