]> Creatis software - gdcm.git/commitdiff
STYLE: A Debug statement is not a warning, a warning is not an error.. you get the...
authormalaterre <malaterre>
Tue, 18 Oct 2005 21:19:57 +0000 (21:19 +0000)
committermalaterre <malaterre>
Tue, 18 Oct 2005 21:19:57 +0000 (21:19 +0000)
src/gdcmDocument.cxx
src/gdcmFile.cxx

index 6de517611e6ae675c4ae9f2712b9e7bee9ed69ba..82142ef0b87f4be3d5d9ba9e0018de87f055dd1e 100644 (file)
@@ -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) )
index 95d4867b0a324af0f097824b0e5e2e896df49349..8820c7cf440201b4920f252b13c49a882dbe02e2 100644 (file)
@@ -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;
 }