From 27e8696556eff77e15a7a8fc2976ed31f882e0f1 Mon Sep 17 00:00:00 2001 From: malaterre Date: Fri, 21 Oct 2005 14:51:36 +0000 Subject: [PATCH] BUG: TestAllPrint actually is doing something now. Update to compile TestAllVM --- Testing/CMakeLists.txt | 1 + Testing/TestAllPrint.cxx | 11 +++++++---- Testing/TestAllVM.cxx | 28 ++++++++++------------------ 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index 25eafebc..a845c747 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -42,6 +42,7 @@ IF (GDCM_DATA_ROOT) TestBuildUpDicomDir.cxx # writes a file named "NewDICOMDIR" TestMakeDicomDir.cxx # writes a file named "NewDICOMDIR" TestSerieHelper.cxx # uses gdcmData as a default root directory + TestAllVM.cxx ) # add test that require VTK: IF(GDCM_VTK) diff --git a/Testing/TestAllPrint.cxx b/Testing/TestAllPrint.cxx index e1d59cb2..9635bad8 100644 --- a/Testing/TestAllPrint.cxx +++ b/Testing/TestAllPrint.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestAllPrint.cxx,v $ Language: C++ - Date: $Date: 2005/10/18 08:35:46 $ - Version: $Revision: 1.5 $ + Date: $Date: 2005/10/21 14:51:36 $ + Version: $Revision: 1.6 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -43,12 +43,15 @@ int TestAllPrint(int, char *[]) while( gdcmDataImages[i] != 0 ) { - std::string filename = gdcmDataImages[i]; + std::string filename = GDCM_DATA_ROOT; + filename += "/"; + filename += gdcmDataImages[i]; gdcm::File file; file.SetLoadMode( gdcm::LD_NOSEQ ); file.SetFileName( filename ); - file.Load(); + if( !file.Load() ) + return 1; //file.Print( std::cout ); //just for debug i++; } diff --git a/Testing/TestAllVM.cxx b/Testing/TestAllVM.cxx index 74bab901..be2e7973 100644 --- a/Testing/TestAllVM.cxx +++ b/Testing/TestAllVM.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestAllVM.cxx,v $ Language: C++ - Date: $Date: 2005/10/21 14:42:12 $ - Version: $Revision: 1.1 $ + 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 @@ -16,19 +16,8 @@ =========================================================================*/ -#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 "gdcmDataEntry.h" //Generated file: #include "gdcmDataImages.h" @@ -39,12 +28,15 @@ int TestAllVM(int, char *[]) while( gdcmDataImages[i] != 0 ) { - std::string filename = gdcmDataImages[i]; + std::string filename = GDCM_DATA_ROOT; + filename += "/"; + filename += gdcmDataImages[i]; gdcm::File file; - //file.SetLoadMode( gdcm::LD_NOSEQ ); + file.SetLoadMode( gdcm::LD_ALL ); file.SetFileName( filename ); - file.Load(); + if( !file.Load() ) //would be really bad... + return 1; gdcm::DocEntry *d = file.GetFirstEntry(); while(d) @@ -59,7 +51,7 @@ int TestAllVM(int, char *[]) // We skip pb of SQ recursive exploration } - d = file->GetNextEntry(); + d = file.GetNextEntry(); } i++; -- 2.45.1