]> Creatis software - clitk.git/blobdiff - common/clitkDD.h
Add one slice for the S1RL support
[clitk.git] / common / clitkDD.h
index c5b52951b4851c48260fdcea17425df7549c8fbc..c21bb815acbc080e97f3adfd9b844c934209292e 100644 (file)
 #define clitkDD_h
 
 #include <iostream>
-
+#ifdef WIN32
+# include <windows.h>
+#endif
 // David's debug
 
-#define DD(a) std::cout << #a " = [ " << a << " ]" << std::endl;std::cout.flush();
+#ifdef WIN32
+# define DD(a) { \
+    std::ostringstream ossDD; \
+    ossDD << #a " = [ " << a << " ]" << std::endl; \
+    OutputDebugString(ossDD.str().c_str()); \
+    std::cout << ossDD.str() << std::endl; \
+  }
+#else
+# define DD(a) std::cout << #a " = [ " << a << " ]" << std::endl;std::cout.flush();
+#endif
 #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)