diff --git a/app/otbHarmonizer.cxx b/app/otbHarmonizer.cxx index 79d9c4e749c68c62612db6456ed027012fd088ff..0878f330c818174568678b880627775e1d895260 100644 --- a/app/otbHarmonizer.cxx +++ b/app/otbHarmonizer.cxx @@ -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"))