X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FFlatHashTablePrint.cxx;h=6aa17d220f9ba1554651225d4a266318383c97ee;hb=17daf7e7caceddf44e73864ee8d366613a1f0c82;hp=e7e806cc618281edf36ce9fd9561cfb53d56480d;hpb=5fc5d5558df907b8fb7e9c61a574b038fd3f7ebf;p=gdcm.git diff --git a/Example/FlatHashTablePrint.cxx b/Example/FlatHashTablePrint.cxx index e7e806cc..6aa17d22 100644 --- a/Example/FlatHashTablePrint.cxx +++ b/Example/FlatHashTablePrint.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: FlatHashTablePrint.cxx,v $ Language: C++ - Date: $Date: 2005/01/14 17:31:34 $ - Version: $Revision: 1.7 $ + Date: $Date: 2005/07/08 12:02:02 $ + Version: $Revision: 1.10 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -15,14 +15,14 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ -#include "gdcmHeader.h" +#include "gdcmFile.h" #include "gdcmDocEntry.h" // Iterate on all the Dicom entries encountered in the gdcmFile (given // as line argument) and print them. This is an illustration of the // usage of \ref gdcmDocument::BuildFlatHashTable(). -int main(int , char* []) +int main(int, char*[]) { /* if (argc < 2) { @@ -30,9 +30,11 @@ int main(int , char* []) argv[0] << " input_dicom " << std::endl; return 1; } - - gdcm::Header* header = new gdcm::Header( argv[1] ); - gdcm::TagDocEntryHT* Ht = header->BuildFlatHashTable(); + gdcm::File *header = new gdcm::File(); + header->SetFileName(argv[1] ); + header->Load(); + + gdcm::TagDocEntryHT *Ht = header->BuildFlatHashTable(); for (gdcm::TagDocEntryHT::iterator tag = Ht->begin(); tag != Ht->end(); ++tag) {