X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=src%2FgdcmFile.cxx;h=da87e9ab9b2fd010ac2a2e53bdbf5dd72b6be98d;hb=c003ab063e99853986884357c1284dfbabc4afff;hp=189987accea4fe82f10ee617dc004136775a3ac2;hpb=4f189b7cd8d7aff962887245b7b30ede39b7856c;p=gdcm.git diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index 189987ac..da87e9ab 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFile.cxx,v $ Language: C++ - Date: $Date: 2005/10/24 16:00:48 $ - Version: $Revision: 1.290 $ + Date: $Date: 2005/10/25 12:41:30 $ + Version: $Revision: 1.293 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -1659,7 +1659,7 @@ void File::ComputeJPEGFragmentInfo() /** * \brief Assuming the internal file pointer \ref Document::Fp - * is placed at the beginning of a tag check whether this + * is placed at the beginning of a tag, check whether this * tag is (TestGroup, TestElem). * \warning On success the internal file pointer \ref Document::Fp * is modified to point after the tag. @@ -1694,15 +1694,17 @@ bool File::ReadTag(uint16_t testGroup, uint16_t testElem) return false; } if ( itemTagGroup != testGroup || itemTagElem != testElem ) - { - gdcmErrorMacro( "Wrong Item Tag found:" - << " We should have found tag (" - << DictEntry::TranslateToKey(testGroup,testElem) << ")" << std::endl - << " but instead we encountered tag (" - << DictEntry::TranslateToKey(itemTagGroup,itemTagElem) << ")" - << " at address: " << " 0x(" << std::hex - << (unsigned int)currentPosition << std::dec << ")" - ) ; + { + // in order not to pollute output we don't warn on 'delimitors' + if (itemTagGroup != 0xfffe || testGroup != 0xfffe ) + gdcmErrorMacro( "Wrong Item Tag found:" + << " We should have found tag (" + << DictEntry::TranslateToKey(testGroup,testElem) << ")" << std::endl + << " but instead we encountered tag (" + << DictEntry::TranslateToKey(itemTagGroup,itemTagElem) << ")" + << " at address: " << " 0x(" << std::hex + << (unsigned int)currentPosition << std::dec << ")" + ) ; Fp->seekg(positionOnEntry, std::ios::beg); return false; @@ -1729,7 +1731,9 @@ uint32_t File::ReadTagLength(uint16_t testGroup, uint16_t testElem) if ( !ReadTag(testGroup, testElem) ) { - gdcmErrorMacro( "ReadTag did not succeed for (" + // Avoid polutting output + if ( testGroup != 0xfffe ) + gdcmErrorMacro( "ReadTag did not succeed for (" << DictEntry::TranslateToKey(testGroup,testElem) << ")..." ); return 0;