From: jpr Date: Fri, 27 Jul 2007 21:20:13 +0000 (+0000) Subject: Make sure gdcm with NOPRIV doesn't break X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=aeaa4583123c268146a8ca3d21f3eaf9e10bf794;p=gdcm.git Make sure gdcm with NOPRIV doesn't break --- diff --git a/Testing/TestLoadAllDocumentsNoShadow.cxx b/Testing/TestLoadAllDocumentsNoShadow.cxx new file mode 100755 index 00000000..abbcf935 --- /dev/null +++ b/Testing/TestLoadAllDocumentsNoShadow.cxx @@ -0,0 +1,60 @@ +/*========================================================================= + + Program: gdcm + Module: $RCSfile: TestLoadAllDocumentsNoShadow.cxx,v $ + Language: C++ + Date: $Date: 2007/07/27 21:20:13 $ + Version: $Revision: 1.1 $ + + 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. + +=========================================================================*/ + +// TODO : check what's *actually* usefull + +#include "gdcmDictEntry.h" +#include "gdcmDict.h" +#include "gdcmDictSet.h" +#include "gdcmFile.h" +#include "gdcmFileHelper.h" +#include "gdcmUtil.h" +#include "gdcmCommon.h" +#include "gdcmDocEntry.h" +#include "gdcmDocEntrySet.h" +#include "gdcmDocument.h" +#include "gdcmElementSet.h" +#include "gdcmSeqEntry.h" +#include "gdcmSQItem.h" + +#include + +//Generated file: +#include "gdcmDataImages.h" + +int TestLoadAllDocumentsNoShadow(int, char *[]) +{ + int i = 0; + + while( gdcmDataImages[i] != 0 ) + { + std::string filename = GDCM_DATA_ROOT; + filename += "/"; + filename += gdcmDataImages[i]; + + GDCM_NAME_SPACE::File *file = gdcm::File::New();; + file->SetLoadMode( GDCM_NAME_SPACE::LD_NOSHADOW ); + file->SetFileName( filename ); + std::cout << "File Name [" << filename << "]" << std::endl; + if( !file->Load() ) + return 1; + //file.Print( std::cout ); //just for debug + i++; + } + return 0; +}