Skip to content
Snippets Groups Projects
Commit 8fb15a8c authored by Marina Bertolino's avatar Marina Bertolino
Browse files

REFAC: enhance histogram

parent df4e2441
No related branches found
No related tags found
No related merge requests found
......@@ -333,14 +333,15 @@ private:
// And extract the lower and upper quantile
typename FloatVectorImageType::PixelType inputMin(nbComp), inputMax(nbComp);
auto histOutput = histogramsGenerator->GetOutput();
assert(histOutput);
for(unsigned int i = 0; i < nbComp; ++i)
{
inputMin[i] =
histogramsGenerator->GetOutput()->GetNthElement(i)->Quantile(0,
0.01 * GetParameterFloat("hcp.low"));
inputMax[i] =
histogramsGenerator->GetOutput()->GetNthElement(i)->Quantile(0,
1.0 - 0.01 * GetParameterFloat("hcp.high"));
auto && elm = histOutput->GetNthElement(i);
assert(elm);
inputMin[i] = elm->Quantile(0, 0.01 * GetParameterFloat("hcp.low"));
inputMax[i] = elm->Quantile(0, 1.0 - 0.01 * GetParameterFloat("hcp.high"));
}
otbAppLogDEBUG( << std::setprecision(5) << "Min/Max computation done : min=" << inputMin
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment