X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FTestChangeHeader.cxx;h=6baada033ddfd82cf96e61edd57c2c0f4df5f892;hb=d00078b5e19310b379c8339fa8fe38362e8ca392;hp=565bd046bc9a1786c2cb390edbcb20654444dff9;hpb=b76072d99ce945573936f0d8b21a6da62aaf7a87;p=gdcm.git diff --git a/Example/TestChangeHeader.cxx b/Example/TestChangeHeader.cxx index 565bd046..6baada03 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/06 14:31:37 $ - Version: $Revision: 1.5 $ + Date: $Date: 2005/01/20 16:16:58 $ + Version: $Revision: 1.7 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -16,7 +16,7 @@ =========================================================================*/ #include "gdcmHeader.h" -#include "gdcmFile.h" +#include "gdcmFileHelper.h" // This examples read two images (could be the same). Try to modify // Acquisition Matrix and then write the image again @@ -32,19 +32,19 @@ int main(int argc, char* argv[]) } gdcm::Header *h1 = new gdcm::Header( argv[1] ); - gdcm::File *f1 = new gdcm::File( h1 ); - gdcm::File *f2 = new gdcm::File( argv[2] ); + gdcm::FileHelper *f1 = new gdcm::FileHelper( h1 ); + gdcm::FileHelper *f2 = new gdcm::FileHelper( argv[2] ); // 0018 1310 US ACQ Acquisition Matrix gdcm::DictEntry *dictEntry = - f2->GetHeader()->GetPubDict()->GetDictEntryByNumber( 0x0018, 1310 ); + f2->GetHeader()->GetPubDict()->GetDictEntry( 0x0018, 1310 ); std::cerr << std::hex << dictEntry->GetGroup() << "," << dictEntry->GetElement() << std::endl; - std::string matrix = f2->GetHeader()->GetEntryByNumber(0x0018, 0x1310); + std::string matrix = f2->GetHeader()->GetEntry(0x0018, 0x1310); if(matrix != "gdcm::Unfound") { std::cerr << "Aquisition Matrix:" << matrix << std::endl; - f1->GetHeader()->ReplaceOrCreateByNumber( matrix, 0x0018, 0x1310); + f1->GetHeader()->ReplaceOrCreate( matrix, 0x0018, 0x1310); } f1->GetImageData();