Commit 03bc4a2c authored by Cresson Remi's avatar Cresson Remi

ENH: output gains and offsets to parameters

parent 797ac227
......@@ -428,6 +428,8 @@ private:
{
otbAppLogINFO("Using linear correction model (y=ax+b)");
}
std::vector<std::string> outputgains, outputoffsets;
for (unsigned int band = 0 ; band < refImage->GetNumberOfComponentsPerPixel() ; band++)
{
float meanY = m_StatsFilter->GetMeans().at(band)[0][0];
......@@ -460,9 +462,15 @@ private:
gain[band] = b1;
offset[band] = b0;
outputgains.push_back(std::to_string(b1));
outputoffsets.push_back(std::to_string(b0));
}
exp << "}";
SetParameterStringList("outoffsets", outputoffsets);
SetParameterStringList("outgains", outputgains);
otbAppLogINFO("BandMathX expression: " << exp.str());
if (this->HasValue("out"))
......
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