From 644b593cd2531a6f7205530c58d967a98817ce12 Mon Sep 17 00:00:00 2001 From: malaterre Date: Tue, 18 Oct 2005 21:19:57 +0000 Subject: [PATCH] STYLE: A Debug statement is not a warning, a warning is not an error.. you get the picture... --- src/gdcmDocument.cxx | 24 ++++++++++++------------ src/gdcmFile.cxx | 12 +++++------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 6de51761..82142ef0 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2005/10/18 19:54:26 $ - Version: $Revision: 1.296 $ + Date: $Date: 2005/10/18 21:19:57 $ + Version: $Revision: 1.297 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -127,7 +127,7 @@ bool Document::DoTheLoadingDocumentJob( ) Group0002Parsed = false; - gdcmWarningMacro( "Starting parsing of file: " << Filename.c_str()); + gdcmDebugMacro( "Starting parsing of file: " << Filename.c_str()); Fp->seekg(0, std::ios::end); long lgt = Fp->tellg(); // total length of the file @@ -1160,7 +1160,7 @@ void Document::ParseDES(DocEntrySet *set, long offset, } first = false; } // end While - gdcmWarningMacro( "Exit from ParseDES, delim-mode " << delim_mode ); + gdcmDebugMacro( "Exit from ParseDES, delim-mode " << delim_mode ); } /** @@ -1496,7 +1496,7 @@ VRKey Document::FindDocEntryVR() VRKey vr; Fp->read(&(vr[0]),(size_t)2); - gdcmWarningMacro( "--> VR: " << vr ) + gdcmDebugMacro( "--> VR: " << vr ) if ( !CheckDocEntryVR(vr) ) { gdcmWarningMacro( "Unknown VR '" << vr << "'" ) @@ -1695,7 +1695,7 @@ bool Document::CheckSwap() char *entCur = deb + 128; if ( memcmp(entCur, "DICM", (size_t)4) == 0 ) { - gdcmWarningMacro( "Looks like DICOM Version3 (preamble + DCM)" ); + gdcmDebugMacro( "Looks like DICOM Version3 (preamble + DCM)" ); // Group 0002 should always be VR, and the first element 0000 // Let's be carefull (so many wrong headers ...) @@ -1727,24 +1727,24 @@ bool Document::CheckSwap() // instead of just checking for UL, OB and UI !? group 0000 { Filetype = ExplicitVR; - gdcmWarningMacro( "Group 0002 : Explicit Value Representation"); + gdcmDebugMacro( "Group 0002 : Explicit Value Representation"); } else { Filetype = ImplicitVR; - gdcmWarningMacro( "Group 0002 :Not an explicit Value Representation;" + gdcmErrorMacro( "Group 0002 :Not an explicit Value Representation;" << "Looks like a bugged Header!"); } if ( net2host ) { SwapCode = 4321; - gdcmWarningMacro( "HostByteOrder != NetworkByteOrder"); + gdcmDebugMacro( "HostByteOrder != NetworkByteOrder"); } else { SwapCode = 1234; - gdcmWarningMacro( "HostByteOrder = NetworkByteOrder"); + gdcmDebugMacro( "HostByteOrder = NetworkByteOrder"); } // Position the file position indicator at first tag @@ -1791,7 +1791,7 @@ bool Document::CheckSwap() memcmp(entCur, "OB", (size_t)2) == 0 ) { Filetype = ExplicitVR; - gdcmWarningMacro( "Group 0002 : Explicit Value Representation"); + gdcmDebugMacro( "Group 0002 : Explicit Value Representation"); return true; } } @@ -1974,7 +1974,7 @@ DocEntry *Document::ReadNextDocEntry() } } } - gdcmWarningMacro( "Found VR: " << vr << " / Real VR: " << realVR ); + gdcmDebugMacro( "Found VR: " << vr << " / Real VR: " << realVR ); DocEntry *newEntry; if ( Global::GetVR()->IsVROfSequence(realVR) ) diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index 95d4867b..8820c7cf 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/18 19:54:26 $ - Version: $Revision: 1.278 $ + Date: $Date: 2005/10/18 21:19:57 $ + Version: $Revision: 1.279 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -581,7 +581,7 @@ float File::GetYSpacing() } else { - gdcmWarningMacro( "Unfound Pixel Spacing (0018,1164)" ); + gdcmWarningMacro( "Unfound Imager Pixel Spacing (0018,1164)" ); } /* const std::string &strImagerPixelSpacing = GetEntryString(0x0018,0x1164); if ( strImagerPixelSpacing != GDCM_UNFOUND ) @@ -2031,17 +2031,15 @@ uint32_t File::ReadTagLength(uint16_t testGroup, uint16_t testElem) if ( !ReadTag(testGroup, testElem) ) { + gdcmErrorMacro( "ReadTag did not succeed..." ); return 0; } //// Then read the associated Item Length long currentPosition = Fp->tellg(); uint32_t itemLength = ReadInt32(); - { - gdcmWarningMacro( "Basic Item Length is: " - << itemLength << std::endl + gdcmDebugMacro( "Basic Item Length is: " << itemLength << " at address: " << std::hex << (unsigned int)currentPosition); - } return itemLength; } -- 2.45.1