]> Creatis software - gdcm.git/blobdiff - Example/TestCopyDicom.cxx
* src/gdcmDocument.cxx : now, when using the ReplaceOrCreateByNumber to
[gdcm.git] / Example / TestCopyDicom.cxx
index cc42d86c58ed9c68fa7a3aabd36549e79c9d4187..24400816bab017ec246e08936efd8cd927a762b4 100644 (file)
@@ -1,3 +1,20 @@
+/*=========================================================================
+                                                                                
+  Program:   gdcm
+  Module:    $RCSfile: TestCopyDicom.cxx,v $
+  Language:  C++
+  Date:      $Date: 2004/11/17 10:20:06 $
+  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"
 #include "gdcmDocument.h"
@@ -70,7 +87,7 @@ int main(int argc, char* argv[])
    
       gdcm::File *copy = new gdcm::File( output );
 
-      gdcm::TagDocEntryHT & Ht = original->GetHeader()->GetEntry();
+      const gdcm::TagDocEntryHT & Ht = original->GetHeader()->GetTagHT();
 
       size_t dataSize = original->GetImageDataSize();
       uint8_t* imageData = original->GetImageData();
@@ -84,7 +101,7 @@ int main(int argc, char* argv[])
 
       gdcm::DocEntry* d;
 
-      for (gdcm::TagDocEntryHT::iterator tag = Ht.begin(); tag != Ht.end(); ++tag)
+      for (gdcm::TagDocEntryHT::const_iterator tag = Ht.begin(); tag != Ht.end(); ++tag)
       {
          d = tag->second;
          d->Print(); std::cout << std::endl;
@@ -120,7 +137,7 @@ int main(int argc, char* argv[])
 
 
       //copy->GetImageData();
-      copy->SetImageData(imageData, dataSize);
+      //copy->SetImageData(imageData, dataSize);
 
       std::cout << "--- Copy ----------------------" << std::endl;
       std::cout <<std::endl << "DO NOT care about Offset"  <<std::endl<<std::endl;;