]> Creatis software - gdcm.git/blobdiff - Example/TestCopyDicom.cxx
* gdcmDicomDirElement.[h|cxx] : change the AddEntry method. Now, it gets a
[gdcm.git] / Example / TestCopyDicom.cxx
index bc1313cf552297f83edb101e3800fc312da2ace9..93b7a227d757fd15ae0682b3758e380503f9b5f7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestCopyDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/14 11:28:28 $
-  Version:   $Revision: 1.16 $
+  Date:      $Date: 2005/01/20 16:31:42 $
+  Version:   $Revision: 1.19 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -16,7 +16,7 @@
                                                                                 
 =========================================================================*/
 #include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 #include "gdcmDocument.h"
 #include "gdcmValEntry.h"
 #include "gdcmBinEntry.h"
@@ -80,12 +80,12 @@ int main(int argc, char* argv[])
             return 1;
          }
       }
-      gdcm::File *original = new gdcm::File( filename );
+      gdcm::FileHelper *original = new gdcm::FileHelper( filename );
    
       std::cout << "--- Original ----------------------" << std::endl;
       //original->GetHeader()->Print();
    
-      gdcm::File *copy = new gdcm::File( output );
+      gdcm::FileHelper *copy = new gdcm::FileHelper( output );
 
       size_t dataSize = original->GetImageDataSize();
       uint8_t* imageData = original->GetImageData();
@@ -99,8 +99,7 @@ int main(int argc, char* argv[])
       // (the user does NOT have to know the way we implemented the Header !)
       // Waiting for a 'clean' solution, I keep the method ...JPRx
 
-      original->GetHeader()->InitTraversal();
-      gdcm::DocEntry* d=original->GetHeader()->GetNextEntry();
+      gdcm::DocEntry* d=original->GetHeader()->GetFirstEntry();
       while(d)
       {
          if ( gdcm::BinEntry* b = dynamic_cast<gdcm::BinEntry*>(d) )