From: regrain Date: Fri, 6 Feb 2004 09:24:04 +0000 (+0000) Subject: * ENH = set a debug macro X-Git-Tag: Version0.4~7 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=4e6834393e47fa42e6419f8151812fbb02e0e711;p=gdcm.git * ENH = set a debug macro * FIX : last fix for the version 0.4 --- diff --git a/src/gdcmCommon.h b/src/gdcmCommon.h index 5647a486..ea48792d 100644 --- a/src/gdcmCommon.h +++ b/src/gdcmCommon.h @@ -3,6 +3,10 @@ #ifndef GDCMCOMMON_H #define GDCMCOMMON_H +//----------------------------------------------------------------------------- +#define GDCM_DEBUG -1 + +//----------------------------------------------------------------------------- //This is needed when compiling in debug mode #ifdef _MSC_VER // 'identifier' : class 'type' needs to have dll-interface to be used by diff --git a/src/gdcmParser.cxx b/src/gdcmParser.cxx index d3daff1e..74848428 100644 --- a/src/gdcmParser.cxx +++ b/src/gdcmParser.cxx @@ -1420,7 +1420,7 @@ void gdcmParser::AddHeaderEntry(gdcmHeaderEntry *newHeaderEntry) { guint16 length16; if( (element == NumPixel) && (group == GrPixel) ) { - dbg.SetDebug(-1); + dbg.SetDebug(GDCM_DEBUG); dbg.Verbose(2, "gdcmParser::FindLength: ", "we reached (GrPixel,NumPixel)"); } diff --git a/src/gdcmUtil.h b/src/gdcmUtil.h index 3dca634d..dcc1068c 100644 --- a/src/gdcmUtil.h +++ b/src/gdcmUtil.h @@ -3,6 +3,7 @@ #ifndef GDCMUTIL_H #define GDCMUTIL_H +#include "gdcmCommon.h" #include "gdcmVR.h" #include "gdcmTS.h" #include "gdcmDictSet.h" @@ -24,7 +25,8 @@ */ class gdcmDebug { public: - gdcmDebug(int = 0); + gdcmDebug(int level = GDCM_DEBUG); + void SetDebug (int i) {DebugLevel = i;} void Verbose(int, const char*, const char* ="");