X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestCopyDicom.cxx;h=af7f4d45e46005e8358e9970056c1b83d949cc5c;hb=323dba69fa639a71f1559c8aee8209afc8731bb4;hp=38cc73e0198857516abfc82df2d0bf99c8002073;hpb=ba78e6c6d47d6db1528e8e88e5ebde7296a26692;p=gdcm.git diff --git a/Testing/TestCopyDicom.cxx b/Testing/TestCopyDicom.cxx index 38cc73e0..af7f4d45 100644 --- a/Testing/TestCopyDicom.cxx +++ b/Testing/TestCopyDicom.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestCopyDicom.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 20:16:56 $ - Version: $Revision: 1.25 $ + Date: $Date: 2005/01/14 11:28:29 $ + Version: $Revision: 1.29 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -85,14 +85,13 @@ int CopyDicom(std::string const & filename, //////////////// Step 2: std::cout << "2..."; - originalH->Initialize(); + originalH->InitTraversal(); gdcm::DocEntry* d=originalH->GetNextEntry(); - while(d) { if ( gdcm::BinEntry* b = dynamic_cast(d) ) { - copyH->ReplaceOrCreateByNumber( + copyH->ReplaceOrCreate( b->GetBinArea(), b->GetLength(), b->GetGroup(), @@ -101,7 +100,7 @@ int CopyDicom(std::string const & filename, } else if ( gdcm::ValEntry* v = dynamic_cast(d) ) { - copyH->ReplaceOrCreateByNumber( + copyH->ReplaceOrCreate( v->GetValue(), v->GetGroup(), v->GetElement(), @@ -110,10 +109,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(); @@ -135,7 +130,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;