From 3e9d685712165fd64d0fb8834829563e2441796e Mon Sep 17 00:00:00 2001 From: jpr Date: Tue, 7 Jun 2005 08:59:39 +0000 Subject: [PATCH] // according to 'Purify', TranslateToKey is one of the most // time consuming methods. // Let's try to shorten it ! --- src/gdcmDictEntry.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/gdcmDictEntry.cxx b/src/gdcmDictEntry.cxx index e8366b24..f47d5276 100644 --- a/src/gdcmDictEntry.cxx +++ b/src/gdcmDictEntry.cxx @@ -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 08:59:39 $ + Version: $Revision: 1.46 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -94,7 +94,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); + char res[10]; + sprintf(res,"%04x|%04x", group, elem); + return res; } //----------------------------------------------------------------------------- -- 2.48.1