]> Creatis software - gdcm.git/blob - Testing/TestLoadAllDocumentsNoShadow.cxx
cosmetics
[gdcm.git] / Testing / TestLoadAllDocumentsNoShadow.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: TestLoadAllDocumentsNoShadow.cxx,v $
5   Language:  C++
6   Date:      $Date: 2007/07/27 21:20:13 $
7   Version:   $Revision: 1.1 $
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
19 // TODO : check what's *actually* usefull
20
21 #include "gdcmDictEntry.h"
22 #include "gdcmDict.h"
23 #include "gdcmDictSet.h"
24 #include "gdcmFile.h"
25 #include "gdcmFileHelper.h"
26 #include "gdcmUtil.h"
27 #include "gdcmCommon.h"
28 #include "gdcmDocEntry.h" 
29 #include "gdcmDocEntrySet.h"           
30 #include "gdcmDocument.h"          
31 #include "gdcmElementSet.h"        
32 #include "gdcmSeqEntry.h" 
33 #include "gdcmSQItem.h" 
34
35 #include <iostream>
36
37 //Generated file:
38 #include "gdcmDataImages.h"
39
40 int TestLoadAllDocumentsNoShadow(int, char *[])
41 {
42    int i = 0;
43
44    while( gdcmDataImages[i] != 0 )
45    {
46       std::string filename = GDCM_DATA_ROOT;
47       filename += "/";
48       filename += gdcmDataImages[i];
49
50       GDCM_NAME_SPACE::File *file = gdcm::File::New();;
51       file->SetLoadMode( GDCM_NAME_SPACE::LD_NOSHADOW );
52       file->SetFileName( filename );
53       std::cout << "File Name [" << filename << "]" << std::endl;
54       if( !file->Load() )
55         return 1;
56       //file.Print( std::cout ); //just for debug
57       i++;
58    }
59    return 0;
60 }