From 4e6834393e47fa42e6419f8151812fbb02e0e711 Mon Sep 17 00:00:00 2001 From: regrain Date: Fri, 6 Feb 2004 09:24:04 +0000 Subject: [PATCH] * ENH = set a debug macro * FIX : last fix for the version 0.4 --- src/gdcmCommon.h | 4 ++++ src/gdcmParser.cxx | 2 +- src/gdcmUtil.h | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) 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* =""); -- 2.48.1