Commit b284fdff authored by Manuel Grizonnet's avatar Manuel Grizonnet

ENH: avoid multiple calls to GetSpectralSensitivity method

parent 88fd10f8
......@@ -812,8 +812,11 @@ private:
}
else if (IMIName != IMIOptDfltName)
{
if (lImageMetadataInterface->GetSpectralSensitivity()->Size() > 0)
m_paramAcqui->SetWavelengthSpectralBand(lImageMetadataInterface->GetSpectralSensitivity());
//Avoid to call GetSpectralSensitivity() multiple times
OpticalImageMetadataInterface::WavelengthSpectralBandVectorType spectralSensitivity = lImageMetadataInterface->GetSpectralSensitivity();
if (spectralSensitivity->Size() > 0)
m_paramAcqui->SetWavelengthSpectralBand(spectralSensitivity);
}
// Check that m_paramAcqui contains a real spectral profile.
if (m_paramAcqui->GetWavelengthSpectralBand()->Size() == 0)
......
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