X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FTestChangeHeader.cxx;h=1d74abe2453b4070b471985b0712eb15a57f54b5;hb=998aa4a03f2f7e299226e84fbc7c0c02143f863e;hp=a35f143234437696fc9b6e5f7a576b43e8bfe0b5;hpb=0a9f25290006bdee6be492179f8b0dae7ba1c598;p=gdcm.git diff --git a/Example/TestChangeHeader.cxx b/Example/TestChangeHeader.cxx index a35f1432..1d74abe2 100644 --- a/Example/TestChangeHeader.cxx +++ b/Example/TestChangeHeader.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestChangeHeader.cxx,v $ Language: C++ - Date: $Date: 2005/01/24 14:14:08 $ - Version: $Revision: 1.9 $ + Date: $Date: 2005/02/02 14:26:30 $ + Version: $Revision: 1.14 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,12 +21,12 @@ // This examples read two images (could be the same). Try to modify // Acquisition Matrix and then write the image again -int main(int argc, char* argv[]) +int main(int argc, char *argv[]) { if (argc < 3) { std::cerr << "usage :" << std::endl << - argv[0] << " nomFichierPourEntete nomFichierPourDonnées" << + argv[0] << " fileNameForHeader fileNameForData" << std::endl; return 1; } @@ -40,11 +40,11 @@ int main(int argc, char* argv[]) f2->GetFile()->GetPubDict()->GetEntry( 0x0018, 1310 ); std::cerr << std::hex << dictEntry->GetGroup() << "," << dictEntry->GetElement() << std::endl; - std::string matrix = f2->GetFile()->GetEntry(0x0018, 0x1310); + std::string matrix = f2->GetFile()->GetEntryValue(0x0018, 0x1310); if(matrix != "gdcm::Unfound") { std::cerr << "Aquisition Matrix:" << matrix << std::endl; - f1->GetFile()->ReplaceOrCreate( matrix, 0x0018, 0x1310); + f1->GetFile()->InsertValEntry( matrix, 0x0018, 0x1310); } f1->GetImageData(); @@ -55,5 +55,3 @@ int main(int argc, char* argv[]) return 0; } - -