X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FFlatHashTablePrint.cxx;h=09b427277c85ca61809285331393f004609bc061;hb=7a111e0401fb1a09aa0d2dd4ab8d5bc6e4890f82;hp=96703649f7bf905c9f8debbd4bd0bf145fa84124;hpb=9756355d79626cad8a58b9d7b7b1412b287517ac;p=gdcm.git diff --git a/Example/FlatHashTablePrint.cxx b/Example/FlatHashTablePrint.cxx index 96703649..09b42727 100644 --- a/Example/FlatHashTablePrint.cxx +++ b/Example/FlatHashTablePrint.cxx @@ -1,26 +1,47 @@ -#include "gdcmHeader.h" +/*========================================================================= + + Program: gdcm + Module: $RCSfile: FlatHashTablePrint.cxx,v $ + Language: C++ + 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 + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#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) +/* if (argc < 2) { std::cerr << "Usage :" << std::endl << argv[0] << " input_dicom " << std::endl; return 1; } - - gdcmHeader* header = new gdcmHeader( argv[1] ); - 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 (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; - } + }*/ + std::cout<<"Usefull example ???\n"; return 0; }