]> Creatis software - gdcm.git/blob - Testing/TestAllVM.cxx
74bab90117f3f5e8d965021bee84e773454c69d2
[gdcm.git] / Testing / TestAllVM.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: TestAllVM.cxx,v $
5   Language:  C++
6   Date:      $Date: 2005/10/21 14:42:12 $
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 #include "gdcmDictEntry.h"
20 #include "gdcmDict.h"
21 #include "gdcmDictSet.h"
22 #include "gdcmFile.h"
23 #include "gdcmFileHelper.h"
24 #include "gdcmUtil.h"
25 #include "gdcmCommon.h"
26 #include "gdcmDocEntry.h" 
27 #include "gdcmDocEntrySet.h"           
28 #include "gdcmDocument.h"          
29 #include "gdcmElementSet.h"        
30 #include "gdcmSeqEntry.h" 
31 #include "gdcmSQItem.h" 
32
33 //Generated file:
34 #include "gdcmDataImages.h"
35
36 int TestAllVM(int, char *[])
37 {
38    int i = 0;
39
40    while( gdcmDataImages[i] != 0 )
41    {
42       std::string filename = gdcmDataImages[i];
43
44       gdcm::File file;
45       //file.SetLoadMode( gdcm::LD_NOSEQ );
46       file.SetFileName( filename );
47       file.Load();
48
49       gdcm::DocEntry *d = file.GetFirstEntry();
50       while(d)
51       {
52          if ( gdcm::DataEntry *de = dynamic_cast<gdcm::DataEntry *>(d) )
53          {
54            if(! de->IsValueCountValid() )
55              std::cerr << "Filename:" << filename << std::endl;
56          }
57          else
58          {
59           // We skip pb of SQ recursive exploration
60          }
61
62          d = file->GetNextEntry();
63       }
64
65       i++;
66    }
67    return 0;
68 }
69