diff --git a/Code/Common/otbMacro.h b/Code/Common/otbMacro.h index cd45f33f7501197194a68e2fb12f0a76d8cf8a88..83a56b1b9559d3f0699662bafd59cfd382cba948 100644 --- a/Code/Common/otbMacro.h +++ b/Code/Common/otbMacro.h @@ -108,6 +108,16 @@ namespace otb } \ } +#define otbGenericWarningMacro(x) \ + { \ + if (itk::Object::GetGlobalWarningDisplay()) \ + { \ + std::ostringstream itkmsg; \ + itkmsg << "WARNING: In " __FILE__ ", line " << __LINE__ << ": " x <<"\n";\ + itk::OutputWindowDisplayWarningText(itkmsg.str().c_str()); \ + } \ + } + /** This macro is used to control condition. It use ONLY by the OTB developers * */