]> Creatis software - gdcm.git/blobdiff - src/gdcmParse.cxx
* src/gdcmHeaderEntry.[h|cxx] : gdcmElValue -> gdcmHeaderEntry
[gdcm.git] / src / gdcmParse.cxx
index 9902db4ea7ff23742d9d8625a469f2e128c6cbe3..7936e69aa310760a51000016c1b3fe597f6d5c01 100644 (file)
@@ -1,5 +1,5 @@
 // gdcmParse.cxx
-
+//-----------------------------------------------------------------------------
 //This is needed when compiling in debug mode
 #ifdef _MSC_VER
 // 'type' : forcing value to bool 'true' or 'false' (performance warning)
@@ -17,7 +17,7 @@
 
 #define str2num(str, typeNum) *((typeNum *)(str))
 
-/////////////////////////////////////////////////////////////////
+//-----------------------------------------------------------------------------
 /**
  * \ingroup gdcmFile
  * \brief   Parse pixel data from disk and *prints* the result
@@ -28,7 +28,8 @@
  *
  */
 bool gdcmFile::ParsePixelData(void) {
-
+// DO NOT remove the printf s.
+// The ONLY purpose of this method is to PRINT the content
    FILE *fp;
 
    if ( !(fp=Header->OpenFile()))
@@ -46,11 +47,11 @@ bool gdcmFile::ParsePixelData(void) {
         Header->IsDeflatedExplicitVRLittleEndianTransferSyntax() ) { 
         
         printf ("gdcmFile::ParsePixelData : non JPEG/RLE File\n");
-        return 0;       
+        return false;       
    }        
 
    int nb;
-   std::string str_nb=Header->GetPubElValByNumber(0x0028,0x0100);
+   std::string str_nb=Header->GetPubEntryByNumber(0x0028,0x0100);
    if (str_nb == GDCM_UNFOUND ) {
       nb = 16;
    } else {
@@ -241,5 +242,7 @@ bool gdcmFile::ParsePixelData(void) {
                ftellRes,ItemTagGr,ItemTagEl );
       } 
    }
-   return 1;            
+   return true;            
 }
+
+//-----------------------------------------------------------------------------