]> Creatis software - gdcm.git/commitdiff
* ENH = set a debug macro
authorregrain <regrain>
Fri, 6 Feb 2004 09:24:04 +0000 (09:24 +0000)
committerregrain <regrain>
Fri, 6 Feb 2004 09:24:04 +0000 (09:24 +0000)
     * FIX : last fix for the version 0.4

src/gdcmCommon.h
src/gdcmParser.cxx
src/gdcmUtil.h

index 5647a48..ea48792 100644 (file)
@@ -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
index d3daff1..7484842 100644 (file)
@@ -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)");
    }   
index 3dca634..dcc1068 100644 (file)
@@ -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* ="");