]> Creatis software - gdcm.git/commitdiff
Make sure gdcm with NOPRIV doesn't break
authorjpr <jpr>
Fri, 27 Jul 2007 21:20:13 +0000 (21:20 +0000)
committerjpr <jpr>
Fri, 27 Jul 2007 21:20:13 +0000 (21:20 +0000)
Testing/TestLoadAllDocumentsNoShadow.cxx [new file with mode: 0755]

diff --git a/Testing/TestLoadAllDocumentsNoShadow.cxx b/Testing/TestLoadAllDocumentsNoShadow.cxx
new file mode 100755 (executable)
index 0000000..abbcf93
--- /dev/null
@@ -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 <iostream>
+
+//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;
+}