From ff7b62d284bd4f5eadce3aff4b217ae722b369a7 Mon Sep 17 00:00:00 2001 From: schaerer Date: Tue, 5 Oct 2010 14:16:36 +0000 Subject: [PATCH] create clitkDD.h to avoid the heavy dependency on clitkCommon.h only for DD --- common/clitkCommon.h | 11 +---------- common/clitkDD.h | 15 +++++++++++++++ itk/clitkResampleImageWithOptionsFilter.txx | 2 +- 3 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 common/clitkDD.h diff --git a/common/clitkCommon.h b/common/clitkCommon.h index 52264cd..e3145b1 100644 --- a/common/clitkCommon.h +++ b/common/clitkCommon.h @@ -20,8 +20,8 @@ #define CLITKCOMMON_H // clitk include -//#include "clitkConfiguration.h" #include "clitkPortability.h" +#include "clitkDD.h" #include "clitkExceptionObject.h" // itk include (include std) @@ -39,15 +39,6 @@ namespace clitk { typedef unsigned short ushort; typedef unsigned int uint; - //-------------------------------------------------------------------- - // display -#define DD(a) std::cout << #a " = [ " << a << " ]" << std::endl;std::cout.flush(); -#define DDV(a,n) { std::cout << #a " = [ "; for(unsigned int _i_=0; _i_ -void _print_container(T const& a) - { for(typename T::const_iterator i=a.begin();i!=a.end();++i) { std::cout << *i << " "; };} -#define DDS(a) { std::cout << #a " = [ "; _print_container(a) ; std::cout << " ]" << std::endl;std::cout.flush():} - //-------------------------------------------------------------------- // when everything goes wrong #define WHEREAMI "[ " << __FILE__ << " ] line " << __LINE__ diff --git a/common/clitkDD.h b/common/clitkDD.h new file mode 100644 index 0000000..d5fa101 --- /dev/null +++ b/common/clitkDD.h @@ -0,0 +1,15 @@ +#ifndef clitkDD_h +#define clitkDD_h + +#include + +// David's debug + +#define DD(a) std::cout << #a " = [ " << a << " ]" << std::endl;std::cout.flush(); +#define DDV(a,n) { std::cout << #a " = [ "; for(unsigned int _i_=0; _i_ + void _print_container(T const& a) + { for(typename T::const_iterator i=a.begin();i!=a.end();++i) { std::cout << *i << " "; };} +#define DDS(a) { std::cout << #a " = [ "; _print_container(a) ; std::cout << " ]" << std::endl;std::cout.flush():} + +#endif diff --git a/itk/clitkResampleImageWithOptionsFilter.txx b/itk/clitkResampleImageWithOptionsFilter.txx index 8e709d8..7c05dc5 100644 --- a/itk/clitkResampleImageWithOptionsFilter.txx +++ b/itk/clitkResampleImageWithOptionsFilter.txx @@ -17,7 +17,7 @@ ======================================================================-====*/ // clitk -#include "clitkCommon.h" +#include "clitkDD.h" // itk include #include "itkImage.h" -- 2.47.1