La migration est terminée. Bien qu'elle a été beaucoup plus longue que prévue, elle s'est bien déroulée. N'hésitez pas à signaler tout problème à forge.support@irstea.fr.

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

ENH: output gains and offsets to parameters

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