/*========================================================================= Program: gdcm Module: $RCSfile: TestAllVM.cxx,v $ Language: C++ Date: $Date: 2005/10/21 14:51:36 $ Version: $Revision: 1.2 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "gdcmFile.h" #include "gdcmDataEntry.h" //Generated file: #include "gdcmDataImages.h" int TestAllVM(int, char *[]) { int i = 0; while( gdcmDataImages[i] != 0 ) { std::string filename = GDCM_DATA_ROOT; filename += "/"; filename += gdcmDataImages[i]; gdcm::File file; file.SetLoadMode( gdcm::LD_ALL ); file.SetFileName( filename ); if( !file.Load() ) //would be really bad... return 1; gdcm::DocEntry *d = file.GetFirstEntry(); while(d) { if ( gdcm::DataEntry *de = dynamic_cast(d) ) { if(! de->IsValueCountValid() ) std::cerr << "Filename:" << filename << std::endl; } else { // We skip pb of SQ recursive exploration } d = file.GetNextEntry(); } i++; } return 0; }