X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FTestChangeHeader.cxx;h=bbc4d6fae8a5a54857d1457e30275cebe8e5b752;hb=8c5f96ecbfa04d347b11ed4e35716f11eb0b22b7;hp=b8de5e276a62fe60d1ec0f780ac0ab049e0c5bf4;hpb=ce8913daafe02955368fd2f07e777e86824467cc;p=gdcm.git diff --git a/Example/TestChangeHeader.cxx b/Example/TestChangeHeader.cxx index b8de5e27..bbc4d6fa 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/25 15:44:22 $ - Version: $Revision: 1.12 $ + Date: $Date: 2005/07/08 12:02:02 $ + Version: $Revision: 1.15 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,19 +21,26 @@ // 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; } - gdcm::File *h1 = new gdcm::File( argv[1] ); + gdcm::File *h1 = new gdcm::File( ); + h1->SetFileName ( argv[1] ); + h1->Load( ); gdcm::FileHelper *f1 = new gdcm::FileHelper( h1 ); - gdcm::FileHelper *f2 = new gdcm::FileHelper( argv[2] ); + + gdcm::File *h2 = new gdcm::File( ); + h2->SetFileName ( argv[2] ); + h2->Load( ); + gdcm::FileHelper *f2 = new gdcm::FileHelper( h2 ); + // 0018 1310 US ACQ Acquisition Matrix gdcm::DictEntry *dictEntry = @@ -52,8 +59,11 @@ int main(int argc, char* argv[]) h1->Print(); f1->WriteDcmExplVR("output-matrix.dcm"); + + delete f1; + delete f2; + delete h1; + delete h2; return 0; } - -