]> Creatis software - gdcm.git/blobdiff - Testing/TestReadWriteReadCompare.cxx
* FIX : now, the DocEntries are all deleted in the gdcmElementSet.
[gdcm.git] / Testing / TestReadWriteReadCompare.cxx
index 66115b8e2d0feb80c1e38043c3f7319dc29fa95c..1559a6d11028ecfa457b7e688d79994817e7c421 100644 (file)
@@ -1,3 +1,20 @@
+/*=========================================================================
+                                                                                
+  Program:   gdcm
+  Module:    $RCSfile: TestReadWriteReadCompare.cxx,v $
+  Language:  C++
+  Date:      $Date: 2004/11/16 04:28:20 $
+  Version:   $Revision: 1.13 $
+                                                                                
+  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.html 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 "gdcmHeader.h"
 #include "gdcmFile.h"
 
@@ -65,7 +82,7 @@ int CompareInternal(std::string const & filename, std::string const & output)
    std::cout << "3...";
    // For the next step:
    int    dataSizeWritten = reread->GetImageDataSize();
-   void* imageDataWritten = reread->GetImageData();
+   uint8_t* imageDataWritten = reread->GetImageData();
 
    //////////////// Step 4:
 
@@ -74,8 +91,6 @@ int CompareInternal(std::string const & filename, std::string const & output)
       std::cout << std::endl
          << "        Pixel areas lengths differ: "
          << dataSize << " # " << dataSizeWritten << std::endl;
-      delete[] (char*)imageData;
-      delete[] (char*)imageDataWritten;
       delete header;
       delete file;
       delete reread;
@@ -87,8 +102,6 @@ int CompareInternal(std::string const & filename, std::string const & output)
       (void)res;
       std::cout << std::endl
          << "        Pixel differ (as expanded in memory)." << std::endl;
-      delete[] (char*)imageData;
-      delete[] (char*)imageDataWritten;
       delete header;
       delete file;
       delete reread;
@@ -97,8 +110,6 @@ int CompareInternal(std::string const & filename, std::string const & output)
    std::cout << "4...OK." << std::endl ;
 
    //////////////// Clean up:
-   delete[] (char*)imageData;
-   delete[] (char*)imageDataWritten;
    delete header;
    delete file;
    delete reread;