]> Creatis software - gdcm.git/blobdiff - src/gdcmDictEntry.cxx
COMP: dmc is assigned a value that is never user
[gdcm.git] / src / gdcmDictEntry.cxx
index e8366b249a14629b65a172b1064f0207de5cadad..ad21049b400fd6a77527507b4b09a86ad1ddc7bc 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 15:07:41 $
-  Version:   $Revision: 1.45 $
+  Date:      $Date: 2005/06/07 14:50:36 $
+  Version:   $Revision: 1.48 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -22,6 +22,7 @@
 
 #include <iomanip> // for std::ios::left, ...
 #include <fstream>
+#include <stdio.h> // for sprintf, grrrr
 
 namespace gdcm 
 {
@@ -94,7 +95,14 @@ void DictEntry::SetVM(TagName const &vm)
  */
 TagKey DictEntry::TranslateToKey(uint16_t group, uint16_t elem)
 {
-   return Util::Format("%04x|%04x", group, elem);
+   // according to 'Purify', TranslateToKey is one of the most
+   // time consuming methods.
+   // Let's try to shorten it !
+   //return Util::Format("%04x|%04x", group, elem); // too much time !
+   char res[10];
+   sprintf(res,"%04x|%04x", group, elem);
+   return res;
 }
 
 //-----------------------------------------------------------------------------