diff --git a/Examples/BasicFilters/BandMathFilterExample.cxx b/Examples/BasicFilters/BandMathFilterExample.cxx index 47a2920ee614117cc2d158981461c879a50b9573..5c46a127468e482abc1dd53d02f7e5a9cda6d046 100644 --- a/Examples/BasicFilters/BandMathFilterExample.cxx +++ b/Examples/BasicFilters/BandMathFilterExample.cxx @@ -158,6 +158,13 @@ int main( int argc, char* argv[]) // Software Guide : BeginCodeSnippet filter->SetExpression("if((b4-b3)/(b4+b3) > 0.4, 255, 0)"); + + #ifdef OTB_MUPARSER_HAS_CXX_LOGICAL_OPERATORS + filter->SetExpression("((b4-b3)/(b4+b3) > 0.4) ? 255 : 0"); + #else + filter->SetExpression("if((b4-b3)/(b4+b3) > 0.4, 255, 0)"); + #endif + // Software Guide : EndCodeSnippet // Software Guide : BeginLatex