X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestBug.cxx;h=976756089daa31447b4fd92db363d384846edb73;hb=cb593916f564c344b33051ff890ba4a06b77375a;hp=4f918c73443817df78a3bf81a337338a7a6bdc57;hpb=c094e185dd6404df031524ccae8e1b51e3b84871;p=gdcm.git diff --git a/Testing/TestBug.cxx b/Testing/TestBug.cxx index 4f918c73..97675608 100644 --- a/Testing/TestBug.cxx +++ b/Testing/TestBug.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestBug.cxx,v $ Language: C++ - Date: $Date: 2005/01/21 11:40:54 $ - Version: $Revision: 1.18 $ + Date: $Date: 2005/10/25 14:52:30 $ + Version: $Revision: 1.21 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,21 +21,22 @@ #include "gdcmFile.h" -int TestBug(int argc, char* argv[]) +int TestBug(int argc, char *argv[]) { - gdcm::File* e1; - + gdcm::File *f; + f = gdcm::File::New(); + if (argc > 1) - e1 = new gdcm::File( argv[1] ); + f->SetFileName( argv[1] ); else { std::string filename = GDCM_DATA_ROOT; filename += "/test.acr"; - e1 = new gdcm::File( filename.c_str() ); + f->SetFileName( filename.c_str() ); } - //e1->PrintPubDict(); - //e1->GetPubDict()->GetEntriesByKey(); - e1->GetPubDict()->Print(); - delete e1; + f->Load( ); + + f->GetPubDict()->Print(); + f->Delete(); return 0; }