X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FFlatHashTablePrint.cxx;h=09b427277c85ca61809285331393f004609bc061;hb=2e0fae6ec87d9ecb1b76b32d8242a4fba9afefd3;hp=8fc200755e6d66231efce91c3791498aad63acd1;hpb=5a0d183707a94e875a595036f64d0bd506faf618;p=gdcm.git diff --git a/Example/FlatHashTablePrint.cxx b/Example/FlatHashTablePrint.cxx index 8fc20075..09b42727 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 11:28:28 $ - Version: $Revision: 1.6 $ + Date: $Date: 2007/06/21 15:01:00 $ + Version: $Revision: 1.11 $ 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 argc, char* argv[]) +int main(int, char*[]) { /* if (argc < 2) { @@ -30,11 +30,13 @@ int main(int argc, char* argv[]) argv[0] << " input_dicom " << std::endl; return 1; } - - gdcm::Header* header = new gdcm::Header( argv[1] ); - gdcm::TagDocEntryHT* Ht = header->BuildFlatHashTable(); + GDCM_NAME_SPACE::File *header = new GDCM_NAME_SPACE::File(); + header->SetFileName(argv[1] ); + header->Load(); + + GDCM_NAME_SPACE::TagDocEntryHT *Ht = header->BuildFlatHashTable(); - for (gdcm::TagDocEntryHT::iterator tag = Ht->begin(); tag != Ht->end(); ++tag) + for (GDCM_NAME_SPACE::TagDocEntryHT::iterator tag = Ht->begin(); tag != Ht->end(); ++tag) { tag->second->Print(); std::cout << std::endl;