]> Creatis software - gdcm.git/blob - Testing/TestBug.cxx
ENH: Add license to tests since they belong to gdcm
[gdcm.git] / Testing / TestBug.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: TestBug.cxx,v $
5   Language:  C++
6   Date:      $Date: 2004/11/16 04:28:20 $
7   Version:   $Revision: 1.15 $
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 // The following crashes on Win32
19 // We have to be carefull when the code both use cout + printf VC++ gets
20 // confused, thus make sure we use only one kind of iostream
21
22 #include "gdcm.h"
23
24 int TestBug(int argc, char* argv[])
25 {  
26   gdcm::Header* e1;
27
28    if (argc > 1)
29       e1 = new gdcm::Header( argv[1] );
30    else {
31       std::string filename = GDCM_DATA_ROOT;
32       filename += "/test.acr";
33       e1 = new gdcm::Header( filename.c_str() );
34    }
35    //e1->PrintPubDict();
36    //e1->GetPubDict()->GetEntriesByKey();
37    e1->GetPubDict()->PrintByKey();
38    delete e1;
39
40    return 0;
41 }