Commit 0c820ba0 authored by Guillaume Pasero's avatar Guillaume Pasero

ENH: support stat file without output normalization

parent 90e161c2
......@@ -405,6 +405,14 @@ void DoExecute()
statisticsReader->SetFileName(GetParameterString("io.imstat"));
meanMeasurementVector = statisticsReader->GetStatisticVectorByName("mean");
stddevMeasurementVector = statisticsReader->GetStatisticVectorByName("stddev");
// handle stat file without output normalization
if (meanMeasurementVector.Size() == nbFeatures)
{
meanMeasurementVector.SetSize(nbBands,false);
meanMeasurementVector[nbFeatures] = 0.0;
stddevMeasurementVector.SetSize(nbBands,false);
stddevMeasurementVector[nbFeatures] = 1.0;
}
}
else
{
......
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