1 /*=========================================================================
4 Module: $RCSfile: FlatHashTablePrint.cxx,v $
6 Date: $Date: 2004/11/16 04:26:17 $
7 Version: $Revision: 1.4 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
18 #include "gdcmHeader.h"
20 // Iterate on all the Dicom entries encountered in the gdcmFile (given
21 // as line argument) and print them. This is an illustration of the
22 // usage of \ref gdcmDocument::BuildFlatHashTable().
24 int main(int argc, char* argv[])
28 std::cerr << "Usage :" << std::endl <<
29 argv[0] << " input_dicom " << std::endl;
33 gdcm::Header* header = new gdcm::Header( argv[1] );
34 gdcm::TagDocEntryHT* Ht = header->BuildFlatHashTable();
36 for (gdcm::TagDocEntryHT::iterator tag = Ht->begin(); tag != Ht->end(); ++tag)
39 std::cout << std::endl;