X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FTestCopyDicom.cxx;h=bc1313cf552297f83edb101e3800fc312da2ace9;hb=fefb49a4c17b2c2134cf23edf1ecf230c5e309d1;hp=84b1b5e64725496076278e721dae70853f8628c7;hpb=a462ce9f1af0894cd930ab04f2e65cd80dfa7084;p=gdcm.git diff --git a/Example/TestCopyDicom.cxx b/Example/TestCopyDicom.cxx index 84b1b5e6..bc1313cf 100644 --- a/Example/TestCopyDicom.cxx +++ b/Example/TestCopyDicom.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestCopyDicom.cxx,v $ Language: C++ - Date: $Date: 2005/01/08 15:03:57 $ - Version: $Revision: 1.15 $ + Date: $Date: 2005/01/14 11:28:28 $ + Version: $Revision: 1.16 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -87,8 +87,6 @@ int main(int argc, char* argv[]) gdcm::File *copy = new gdcm::File( output ); - const gdcm::TagDocEntryHT & Ht = original->GetHeader()->GetTagHT(); - size_t dataSize = original->GetImageDataSize(); uint8_t* imageData = original->GetImageData(); (void)imageData; @@ -101,12 +99,10 @@ 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 - gdcm::DocEntry* d; - - for (gdcm::TagDocEntryHT::const_iterator tag = Ht.begin(); tag != Ht.end(); ++tag) + original->GetHeader()->InitTraversal(); + gdcm::DocEntry* d=original->GetHeader()->GetNextEntry(); + while(d) { - d = tag->second; - d->Print(); std::cout << std::endl; if ( gdcm::BinEntry* b = dynamic_cast(d) ) { copy->GetHeader()->ReplaceOrCreate( @@ -132,11 +128,9 @@ int main(int argc, char* argv[]) // << d->GetGroup() << " " << d->GetElement() // << std::endl; } - } - - - + d=original->GetHeader()->GetNextEntry(); + } //copy->GetImageData(); //copy->SetImageData(imageData, dataSize);