]> Creatis software - gdcm.git/blob - Testing/TestBug.cxx
New gdcm2 style syntax for Load()
[gdcm.git] / Testing / TestBug.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: TestBug.cxx,v $
5   Language:  C++
6   Date:      $Date: 2005/07/08 13:39:57 $
7   Version:   $Revision: 1.20 $
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 "gdcmFile.h"
23
24 int TestBug(int argc, char *argv[])
25 {  
26   gdcm::File *f;
27   f = new gdcm::File();
28   
29    if (argc > 1)
30       f->SetFileName( argv[1] );
31    else {
32       std::string filename = GDCM_DATA_ROOT;
33       filename += "/test.acr";
34       f->SetFileName( filename.c_str() );
35    }
36    f->Load( );
37    
38    f->GetPubDict()->Print();
39    delete f;
40
41    return 0;
42 }