-void gdcmDict::PrintByName(ostream& os) {
- for (TagNameHT::iterator tag = NameHt.begin(); tag != NameHt.end(); ++tag){
- os << "Tag : ";
- os << tag->second->GetName() << ",";
- os << tag->second->GetVR() << ", ";
- os << tag->second->GetFourth() << ", ";
- os << "(" << hex << tag->second->GetGroup() << ',';
- os << hex << tag->second->GetElement() << ") = " << dec << endl;
- }
-}
-
-/**
- * \ingroup gdcmHeader
- * \brief Get the dictionnary entry identified by a given tag (group,element)
- * @param group group of the entry to be found
- * @param element element of the entry to be found
- * @return the corresponding dictionnary entry when existing, NULL otherwise
- */
-gdcmDictEntry * gdcmDict::GetTagByKey(guint16 group, guint16 element) {
- TagKey key = gdcmDictEntry::TranslateToKey(group, element);
- if ( ! KeyHt.count(key))
- return (gdcmDictEntry*)0;
- if (KeyHt.count(key) > 1)
- dbg.Verbose(0, "gdcmDict::GetTagByName",
- "multiple entries for this key (FIXME) !");
- return KeyHt.find(key)->second;
-}
-
-/**
- * \ingroup gdcmHeader
- * \brief Get the dictionnary entry identified by it's name.
- * @param name element of the ElVal to modify
- * @return the corresponding dictionnary entry when existing, NULL otherwise
- */
-gdcmDictEntry * gdcmDict::GetTagByName(TagName name) {
- if ( ! NameHt.count(name))
- return (gdcmDictEntry*)0;
- if (NameHt.count(name) > 1)
- dbg.Verbose(0, "gdcmDict::GetTagByName",
- "multiple entries for this key (FIXME) !");
- return NameHt.find(name)->second;
-}
-
-
-int gdcmDict::ReplaceEntry(gdcmDictEntry* NewEntry) {
- //JPRCLEAN
- // au cas ou la NewEntry serait incomplete
- // Question : cela peut-il se produire ?
- //
- // --> NON : voir constructeur
- //TagKey key;
- //key = NewEntry->GetKey();
- //if (key =="") {
- // NewEntry->gdcmDictEntry::SetKey(
- // gdcmDictEntry::TranslateToKey(NewEntry->GetGroup(), NewEntry->GetElement())
- // );
- //}
-
- KeyHt.erase (NewEntry->gdcmDictEntry::GetKey());
- KeyHt[ NewEntry->GetKey()] = NewEntry;
- return (1);
- // Question(jpr): Dans quel cas ça peut planter ?
- // Reponse(frog): dans les mauvais cas...