From 5d5da90b3d23814b13cfd60f77c4447cf3666556 Mon Sep 17 00:00:00 2001 From: regrain Date: Thu, 20 Oct 2005 09:23:24 +0000 Subject: [PATCH] * Remove missed FASTTAGKEY (due to the integration of the gdcm::TagKey class). Thx to Mathieu --- src/gdcmDictSet.cxx | 22 ++++++---------------- src/gdcmTagKey.h | 11 +++++++++-- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/gdcmDictSet.cxx b/src/gdcmDictSet.cxx index ec3301a4..2e7167d0 100644 --- a/src/gdcmDictSet.cxx +++ b/src/gdcmDictSet.cxx @@ -3,8 +3,8 @@ 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 @@ -112,21 +112,11 @@ DictEntry *DictSet::NewVirtualDictEntry( uint16_t group, { 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; diff --git a/src/gdcmTagKey.h b/src/gdcmTagKey.h index 01b35d2b..a498b72a 100644 --- a/src/gdcmTagKey.h +++ b/src/gdcmTagKey.h @@ -3,8 +3,8 @@ 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 @@ -36,6 +36,13 @@ public : 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]; } -- 2.45.1