]> Creatis software - gdcm.git/commitdiff
* ENH : remove cout
authorregrain <regrain>
Thu, 5 Feb 2004 16:32:16 +0000 (16:32 +0000)
committerregrain <regrain>
Thu, 5 Feb 2004 16:32:16 +0000 (16:32 +0000)
     -- BeNours

src/gdcmFile.cxx
src/gdcmHeader.cxx
src/gdcmParser.cxx

index 3193f55406b763bafb89817c03037a80b2853dce..2442edf0125d90c276e1b00dc657661ebab304d0 100644 (file)
@@ -651,8 +651,8 @@ bool gdcmFile::WriteBase (std::string fileName, FileType type) {
    FILE * fp1;
    
    if (PixelRead==-1 && type != DICOMDIR) {
-      std::cout << "U never Read the pixels; U cannot write the file" 
-                << std::endl;
+/*      std::cout << "U never Read the pixels; U cannot write the file" 
+                << std::endl;*/
       return false;               
    }
 
index a35ceb8bd802012fc631e091ab0cd0324366d772..88c9b23a2744fa4613fc1e5c294546da07aed715 100644 (file)
@@ -458,10 +458,10 @@ size_t gdcmHeader::GetPixelOffset(void) {
    if (PixelElement) {
       return PixelElement->GetOffset();
    } else {
-      return 0;
-      std::cout << "Big trouble : Pixel Element ("
+/*      std::cout << "Big trouble : Pixel Element ("
                 << std::hex << GrPixel<<","<< NumPixel<< ") NOT found"
-                << std::endl;  
+                << std::endl;  */
+      return 0;
    }     
 }
 // TODO : unify those two (previous one and next one)
@@ -487,9 +487,9 @@ size_t gdcmHeader::GetPixelAreaLength(void) {
    if (PixelElement) {
       return PixelElement->GetLength();
    } else {
-      std::cout << "Big trouble : Pixel Element ("
+/*      std::cout << "Big trouble : Pixel Element ("
                 << std::hex << GrPixel<<","<< NumPixel<< ") NOT found"
-                << std::endl;
+                << std::endl;*/
       return 0;
    }
 }
index 651f248adbaabca7e4f91733e22ad1df4197bed1..d3daff1e47cfb79f3bf45bfdbc4e3cd52eef7c2c 100644 (file)
@@ -1775,8 +1775,10 @@ void gdcmParser::FixHeaderEntryFoundLength(gdcmHeaderEntry *Entry, guint32 Found
    guint16 el =Entry->GetElement(); 
      
    if (FoundLength%2) {
-      std::cout << "Warning : Tag with uneven length " << FoundLength 
-         <<  " in x(" << std::hex << gr << "," << el <<")" << std::dec << std::endl;
+      std::ostringstream s;
+      s << "Warning : Tag with uneven length " << FoundLength 
+         <<  " in x(" << std::hex << gr << "," << el <<")" << std::dec;
+      dbg.Verbose(0,s.str().c_str());
    }
       
    // Sorry for the patch!