]> Creatis software - gdcm.git/blobdiff - src/gdcmParsePixels.cxx
FIX: GDCM was not compiling with -W -Wall
[gdcm.git] / src / gdcmParsePixels.cxx
index 241bd81856d7ea7a9f6f790b9a92529300d5dd3f..8918bd924efc18172de4a70ff2edbe5b0d5fc905 100644 (file)
@@ -1,5 +1,21 @@
-// gdcmParse.cxx
-//-----------------------------------------------------------------------------
+/*=========================================================================
+                                                                                
+  Program:   gdcm
+  Module:    $RCSfile: gdcmParsePixels.cxx,v $
+  Language:  C++
+  Date:      $Date: 2004/06/22 13:47:33 $
+  Version:   $Revision: 1.7 $
+                                                                                
+  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.
+                                                                                
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notices for more information.
+                                                                                
+=========================================================================*/
+
 #include "gdcmCommon.h"
 #include "gdcmFile.h"
 
@@ -46,7 +62,7 @@ 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(); 
          
@@ -79,7 +95,7 @@ bool gdcmFile::ParsePixelData(void) {
             (unsigned)ftellRes,ln,ln);
       if (ln != 0) {
          // What is it used for ??
-         char * BasicOffsetTableItemValue= (char *)malloc(ln+1);
+         char * BasicOffsetTableItemValue= new char[ln+1];
          fread(BasicOffsetTableItemValue,ln,1,fp); 
          guint32 a;
          for (int i=0;i<ln;i+=4){
@@ -152,7 +168,7 @@ bool gdcmFile::ParsePixelData(void) {
             (unsigned)ftellRes,ln,ln);
       if (ln != 0) {
          // What is it used for ??
-         char * BasicOffsetTableItemValue= (char *)malloc(ln+1);
+         char * BasicOffsetTableItemValue= new char[ln+1];
          fread(BasicOffsetTableItemValue,ln,1,fp); 
          guint32 a;
          for (int i=0;i<ln;i+=4){