X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FTestCopyDicom.cxx;h=e7ced62bee59791c01d68ae2d0694bae9a3798e2;hb=1b3e605e7e808f23d2ccd5caca893c73c161584b;hp=84b1b5e64725496076278e721dae70853f8628c7;hpb=a462ce9f1af0894cd930ab04f2e65cd80dfa7084;p=gdcm.git diff --git a/Example/TestCopyDicom.cxx b/Example/TestCopyDicom.cxx index 84b1b5e6..e7ced62b 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/18 07:55:16 $ + Version: $Revision: 1.17 $ 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,9 @@ 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) + gdcm::DocEntry* d=original->GetHeader()->GetFirstEntry(); + while(d) { - d = tag->second; - d->Print(); std::cout << std::endl; if ( gdcm::BinEntry* b = dynamic_cast(d) ) { copy->GetHeader()->ReplaceOrCreate( @@ -132,11 +127,9 @@ int main(int argc, char* argv[]) // << d->GetGroup() << " " << d->GetElement() // << std::endl; } - } - - - + d=original->GetHeader()->GetNextEntry(); + } //copy->GetImageData(); //copy->SetImageData(imageData, dataSize);