Commit a83bd5b3 authored by Julien Osman's avatar Julien Osman
Browse files

ENH: Check that parameters.min < parameters.max in otbHaralickTextureExtraction.cxx

parent 7a1d3e8c
......@@ -205,7 +205,14 @@ private:
void DoUpdateParameters() override
{
// Nothing to do here : all parameters are independent
if (HasValue("parameters.min") && HasValue("parameters.max"))
{
if (GetParameterFloat("parameters.min") > GetParameterFloat("parameters.max"))
{
otbAppLogFATAL(<< "Lower threshold (-parameters.min) cannot be greater than upper threshold (-parameters.max).");
return;
}
}
}
void DoExecute() override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment