]> Creatis software - clitk.git/blobdiff - common/clitkCommon.h
use of another vtkSmartPointer
[clitk.git] / common / clitkCommon.h
index 3f6e72db4d7099d92ed3d1d42e6c19e7aea9868e..476c0f1878bbe42ce70141f657e58f5a5804ec6f 100644 (file)
@@ -29,6 +29,8 @@
 #include <itkImageRegionConstIterator.h>
 #include <itkImageRegionIterator.h>
 
+#include <fstream>
+
 //--------------------------------------------------------------------
 namespace clitk {
 
@@ -38,12 +40,12 @@ namespace clitk {
 
   //--------------------------------------------------------------------
   // display 
-#define DD(a) std::cout << #a " = [ " << a << " ]" << std::endl;
-#define DDV(a,n) { std::cout << #a " = [ "; for(unsigned int _i_=0; _i_<n; _i_++) { std::cout << a[_i_] << " "; }; std::cout << " ]" << std::endl;}
+#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_<n; _i_++) { std::cout << a[_i_] << " "; }; std::cout << " ]" << std::endl;std::cout.flush();}
 template<class T>
 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;}
+#define DDS(a) { std::cout << #a " = [ "; _print_container(a) ; std::cout << " ]" << std::endl;std::cout.flush():}
 
   //--------------------------------------------------------------------
   // when everything goes wrong