]> Creatis software - gdcm.git/blobdiff - src/gdcmParsePixels.cxx
* CLEANUP_ROUND (8) for gdcmPixelConvert (end of RLE nigthmare)
[gdcm.git] / src / gdcmParsePixels.cxx
index 268492e75c77ec86616f974e63b541322aa3c183..080904d665367bdc59a7fad2da44c8531ce20f97 100644 (file)
@@ -3,12 +3,12 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmParsePixels.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/06/20 18:08:48 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2004/09/27 08:39:07 $
+  Version:   $Revision: 1.11 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
-  http://www.creatis.insa-lyon.fr/Public/Gdcm/License.htm for details.
+  http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
                                                                                 
      This software is distributed WITHOUT ANY WARRANTY; without even
      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
@@ -34,7 +34,7 @@
 bool gdcmFile::ParsePixelData(void) {
 // DO NOT remove the printf s.
 // The ONLY purpose of this method is to PRINT the content
-   FILE *fp;
+   FILEfp;
 
    if ( !(fp=Header->OpenFile()))
       return false;
@@ -62,13 +62,13 @@ bool gdcmFile::ParsePixelData(void) {
       nb = atoi(str_nb.c_str() );
       if (nb == 12) nb =16;
    }
-   //int nBytes= nb/8; //FIXME
+   //int nBytes= nb/8;   //FIXME
       
    //int taille = Header->GetXSize() * Header->GetYSize() * Header->GetSamplesPerPixel(); 
          
    printf ("Checking the Dicom-encapsulated Jpeg/RLE Pixels\n");
       
-   guint16 ItemTagGr,ItemTagEl; 
+   uint16_t ItemTagGr,ItemTagEl; 
    int ln;
    long ftellRes;
    //char * destination = NULL;
@@ -97,9 +97,9 @@ bool gdcmFile::ParsePixelData(void) {
          // What is it used for ??
          char * BasicOffsetTableItemValue= new char[ln+1];
          fread(BasicOffsetTableItemValue,ln,1,fp); 
-         guint32 a;
+         uint32_t a;
          for (int i=0;i<ln;i+=4){
-            a=str2num(&BasicOffsetTableItemValue[i],guint32);
+            a=str2num(&BasicOffsetTableItemValue[i],uint32_t);
             printf("      x(%08x)  %d\n",a,a);
          }              
       }
@@ -146,8 +146,8 @@ bool gdcmFile::ParsePixelData(void) {
 
       // RLE Image
       long RleSegmentLength[15],fragmentLength;
-      guint32 nbRleSegments;
-      guint32 RleSegmentOffsetTable[15];
+      uint32_t nbRleSegments;
+      uint32_t RleSegmentOffsetTable[15];
       ftellRes=ftell(fp);
       // Basic Offset Table with Item Value
          // Item Tag
@@ -170,9 +170,9 @@ bool gdcmFile::ParsePixelData(void) {
          // What is it used for ??
          char * BasicOffsetTableItemValue= new char[ln+1];
          fread(BasicOffsetTableItemValue,ln,1,fp); 
-         guint32 a;
+         uint32_t a;
          for (int i=0;i<ln;i+=4){
-            a=str2num(&BasicOffsetTableItemValue[i],guint32);
+            a=str2num(&BasicOffsetTableItemValue[i],uint32_t);
             printf("      x(%08x)  %d\n",a,a);
          }              
       }