]> Creatis software - gdcm.git/blobdiff - Testing/TestCopyDicom.cxx
ENH: Adding a new method on TS: IsTransferSyntax. Where you pass in a string and...
[gdcm.git] / Testing / TestCopyDicom.cxx
index f9682db6c9f5e616a8d9f036227a9afb6c63ca61..45588b36b31aaa7fa1f763624efad9c10e21d170 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestCopyDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/02 15:14:16 $
-  Version:   $Revision: 1.24 $
+  Date:      $Date: 2005/01/08 15:03:58 $
+  Version:   $Revision: 1.28 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -17,7 +17,6 @@
 =========================================================================*/
 #include "gdcmHeader.h"
 #include "gdcmFile.h"
-#include "gdcmDocument.h"
 #include "gdcmValEntry.h"
 #include "gdcmBinEntry.h"
 
@@ -93,7 +92,7 @@ int CopyDicom(std::string const & filename,
       {
          if ( gdcm::BinEntry* b = dynamic_cast<gdcm::BinEntry*>(d) )
          {
-            copyH->ReplaceOrCreateByNumber
+            copyH->ReplaceOrCreate( 
                                  b->GetBinArea(),
                                  b->GetLength(),
                                  b->GetGroup(), 
@@ -102,7 +101,7 @@ int CopyDicom(std::string const & filename,
          }
          else if ( gdcm::ValEntry* v = dynamic_cast<gdcm::ValEntry*>(d) )
          {   
-             copyH->ReplaceOrCreateByNumber
+             copyH->ReplaceOrCreate( 
                                  v->GetValue(),
                                  v->GetGroup(), 
                                  v->GetElement(),
@@ -111,10 +110,6 @@ int CopyDicom(std::string const & filename,
          else
          {
           // We skip pb of SQ recursive exploration
-          //std::cout << "Skipped Sequence " 
-          //          << "------------- " << d->GetVR() << " "<< std::hex
-          //          << d->GetGroup() << " " << d->GetElement()
-          //  << std::endl;    
          }
 
          d=originalH->GetNextEntry();
@@ -136,7 +131,7 @@ int CopyDicom(std::string const & filename,
       if( !copy->WriteDcmExplVR(output) )
       {
          std::cout << " Failed" << std::endl
-                   << "        " << output << " not written" << std::endl;
+                   << "       " << output << " not written" << std::endl;
 
          delete original;
          delete copy;