]> Creatis software - gdcm.git/commitdiff
* Remove missed FASTTAGKEY (due to the integration of the
authorregrain <regrain>
Thu, 20 Oct 2005 09:23:24 +0000 (09:23 +0000)
committerregrain <regrain>
Thu, 20 Oct 2005 09:23:24 +0000 (09:23 +0000)
     gdcm::TagKey class).
     Thx to Mathieu

src/gdcmDictSet.cxx
src/gdcmTagKey.h

index ec3301a4c573b873f3d3b15168e2dca32b3e7fe5..2e7167d098ee9354c956952543d67900a9e39f55 100644 (file)
@@ -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;
    
index 01b35d2b0276d9bfb8e3c53a54dcefa0a31085d1..a498b72a763805b1899b2ba34107f2c0124d1672 100644 (file)
@@ -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]; }