]> Creatis software - gdcm.git/blob - Example/FlatHashTablePrint.cxx
Fix mistypings
[gdcm.git] / Example / FlatHashTablePrint.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: FlatHashTablePrint.cxx,v $
5   Language:  C++
6   Date:      $Date: 2007/06/21 15:01:00 $
7   Version:   $Revision: 1.11 $
8                                                                                 
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.
12                                                                                 
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.
16                                                                                 
17 =========================================================================*/
18 #include "gdcmFile.h"
19 #include "gdcmDocEntry.h"
20
21 // Iterate on all the Dicom entries encountered in the gdcmFile (given
22 // as line argument) and print them. This is an illustration of the
23 // usage of \ref gdcmDocument::BuildFlatHashTable().
24
25 int main(int, char*[])
26 {
27 /*   if (argc < 2)
28    {
29       std::cerr << "Usage :" << std::endl << 
30       argv[0] << " input_dicom " << std::endl;
31       return 1;
32    }
33    GDCM_NAME_SPACE::File *header = new GDCM_NAME_SPACE::File();
34    header->SetFileName(argv[1] );
35    header->Load();
36  
37    GDCM_NAME_SPACE::TagDocEntryHT *Ht = header->BuildFlatHashTable();
38    
39    for (GDCM_NAME_SPACE::TagDocEntryHT::iterator tag = Ht->begin(); tag != Ht->end(); ++tag)
40    {
41       tag->second->Print(); 
42       std::cout << std::endl;
43    }*/
44    std::cout<<"Usefull example ???\n";
45
46    return 0;
47 }