Program: gdcm
Module: $RCSfile: gdcmDictSet.cxx,v $
Language: C++
- Date: $Date: 2005/10/18 12:58:27 $
- Version: $Revision: 1.69 $
+ Date: $Date: 2005/10/20 09:23:24 $
+ Version: $Revision: 1.70 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
DictEntry *entry;
- // Let's follow 'Purify' advice
- //
- // const std::string tag = DictEntry::TranslateToKey(group,elem)
- // + "#" + vr + "#" + vm + "#" + name;
-#if FASTTAGKEY && 0
- // FIXME
- TagKey tag;
- tag.tab[0] = group;
- tag.tab[1] = elem;
-#else
- char res[10];
- sprintf(res,"%04x|%04x", group, elem);
- ExtendedTagKey tag = res;
+ // Let's follow 'Purify' advice
+ // const std::string tag = DictEntry::TranslateToKey(group,elem)
+ // + "#" + vr + "#" + vm + "#" + name;
+ ExtendedTagKey tag = DictEntry::TranslateToKey(group,elem).str();
tag += "#" + vr.str() + "#" + vm + "#" + name;
-#endif
ExtendedTagKeyHT::iterator it;
Program: gdcm
Module: $RCSfile: gdcmTagKey.h,v $
Language: C++
- Date: $Date: 2005/10/19 13:17:05 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2005/10/20 09:23:24 $
+ Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
friend std::ostream& operator<<(std::ostream& _os, const TagKey &_val);
+ inline std::string str() const
+ {
+ char res[10];
+ sprintf(res,"%04x|%04x",tag[0],tag[1]);
+ return std::string(res);
+ }
+
inline void SetGroup(const uint16_t &val) { tag[0] = val; }
inline const uint16_t &GetGroup(void) { return tag[0]; }