From: jpr Date: Wed, 6 Jul 2005 09:53:43 +0000 (+0000) Subject: Now TestAllReadCompareDicom.cxx TestReadWriteReadCompare.cxx accept a third X-Git-Tag: Version1.2.bp~357 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d7625b1d78115d3d2e8dc1d2dd4169820eaf2639;p=gdcm.git Now TestAllReadCompareDicom.cxx TestReadWriteReadCompare.cxx accept a third param, in order not to have to recompile to gdcm::Debug::DebugOn(). --- diff --git a/Testing/TestAllReadCompareDicom.cxx b/Testing/TestAllReadCompareDicom.cxx index 23563114..1ac5df48 100644 --- a/Testing/TestAllReadCompareDicom.cxx +++ b/Testing/TestAllReadCompareDicom.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestAllReadCompareDicom.cxx,v $ Language: C++ - Date: $Date: 2005/05/02 17:56:44 $ - Version: $Revision: 1.42 $ + Date: $Date: 2005/07/06 09:53:43 $ + Version: $Revision: 1.43 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -20,6 +20,7 @@ #include "gdcmFileHelper.h" #include "gdcmGlobal.h" #include "gdcmTS.h" +#include "gdcmDebug.h" #include @@ -549,7 +550,10 @@ int InternalTest(std::string const &filename, int TestAllReadCompareDicom(int argc, char *argv[]) { - if ( argc == 3 ) + if (argc == 4) + gdcm::Debug::DebugOn(); + + if ( argc >= 3 ) { // The test is specified a specific filename, use it instead of looping // over all images @@ -557,7 +561,7 @@ int TestAllReadCompareDicom(int argc, char *argv[]) const std::string reference = argv[2]; return InternalTest( input, reference ); } - else if ( argc > 3 || argc == 2 ) + else if ( argc > 4 || argc == 2 ) { std::cerr << " Usage: " << argv[0] << " (no arguments needed)." << std::endl; diff --git a/Testing/TestReadWriteReadCompare.cxx b/Testing/TestReadWriteReadCompare.cxx index 48a03f8b..51007bbd 100644 --- a/Testing/TestReadWriteReadCompare.cxx +++ b/Testing/TestReadWriteReadCompare.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestReadWriteReadCompare.cxx,v $ Language: C++ - Date: $Date: 2005/02/09 15:06:48 $ - Version: $Revision: 1.22 $ + Date: $Date: 2005/07/06 09:53:43 $ + Version: $Revision: 1.23 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -17,10 +17,11 @@ =========================================================================*/ #include "gdcmFile.h" #include "gdcmFileHelper.h" +#include "gdcmDebug.h" //Generated file: #include "gdcmDataImages.h" - + int CompareInternal(std::string const & filename, std::string const & output) { std::cout << " Testing: " << filename << std::endl; @@ -123,13 +124,17 @@ int CompareInternal(std::string const & filename, std::string const & output) int TestReadWriteReadCompare(int argc, char *argv[]) { int result = 0; - if (argc == 3) + + if (argc == 4) + gdcm::Debug::DebugOn(); + + if (argc >= 3) { - const std::string input = argv[1]; + const std::string input = argv[1]; const std::string output = argv[2]; result += CompareInternal(input, output); } - else if( argc > 3 || argc == 2 ) + else if( argc > 4 || argc == 2 ) { std::cerr << "Please read the manual" << std::endl; }