X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=src%2FgdcmTS.cxx;h=392cc548e5c97b9c9d402200cf2370e6fec0f776;hb=8a69df0f4018beae8c78a35bef30590e318128e5;hp=f0f2049c98b396da2975088157dc1df339c6db42;hpb=31c63a6cb25b49a119e0132201c051ade2e17704;p=gdcm.git diff --git a/src/gdcmTS.cxx b/src/gdcmTS.cxx index f0f2049c..392cc548 100644 --- a/src/gdcmTS.cxx +++ b/src/gdcmTS.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmTS.cxx,v $ Language: C++ - Date: $Date: 2005/01/11 16:44:43 $ - Version: $Revision: 1.35 $ + Date: $Date: 2005/01/18 08:01:42 $ + Version: $Revision: 1.37 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -110,7 +110,6 @@ TS::~TS() //----------------------------------------------------------------------------- // Print /** - * \ingroup VR * \brief Print all * @param os The output stream to be written to. */ @@ -134,7 +133,14 @@ int TS::Count(TSKey const &key) TSAtr const & TS::GetValue(TSKey const &key) { - TSHT::const_iterator it = TsMap.find(key); + // First thing clean up the string sometime the transfer syntax is padded with spaces + std::string copy = key; + while ( copy.size() && !isdigit((unsigned char)copy[copy.size()-1]) ) + { + copy.erase(copy.size()-1, 1); + } + + TSHT::const_iterator it = TsMap.find(copy); if (it == TsMap.end()) { return GDCM_UNFOUND;