Commit c58738e2 authored by Cédric Traizet's avatar Cédric Traizet

DEBUG: added more traces to ReflectanceToSurfaceReflectanceImageFilter

parent 3778390f
Pipeline #6301 failed with stages
in 14 minutes and 36 seconds
......@@ -97,15 +97,14 @@ void ReflectanceToSurfaceReflectanceImageFilter<TInputImage, TOutputImage>::Upda
}
const auto & metadata = this->GetInput()->GetImageMetadata();
std::cout << "Debug: UpdateAtmosphericRadiativeTerms " << metadata << std::endl;
//std::cout << "Debug: UpdateAtmosphericRadiativeTerms " << metadata << std::endl;
if (m_AtmoCorrectionParameters->GetAeronetFileName() != "")
{
m_AtmoCorrectionParameters->UpdateAeronetData(metadata[MDTime::AcquisitionDate].GetYear(),
metadata[MDTime::AcquisitionDate].GetHour(),
metadata[MDTime::AcquisitionDate].GetMinute());
}
std::cout << metadata[MDTime::AcquisitionDate].GetYear() << " " << metadata[MDTime::AcquisitionDate].GetMonth() << " " << metadata[MDTime::AcquisitionDate].GetDay() << " "
<< metadata[MDTime::AcquisitionDate].GetHour() << " " << metadata[MDTime::AcquisitionDate].GetMinute() << std::endl;
// Acquisition parameters
if (!m_IsSetAcquiCorrectionParameters) // Get info from image metadata
{
......@@ -137,7 +136,7 @@ std::cout << metadata[MDTime::AcquisitionDate].GetYear() << " " << metadata[MDTi
filterFunction->SetMaxSpectralValue(axis.Origin + axis.Spacing * axis.Size);
filterFunction->SetUserStep(axis.Spacing);
spectralSensitivity->PushBack(filterFunction);
std::cout << band[MDStr::BandName] << " " << filterFunction << std::endl;
//std::cout << filterFunction << std::endl;
}
m_AcquiCorrectionParameters->SetWavelengthSpectralBand(spectralSensitivity);
......@@ -145,7 +144,8 @@ std::cout << metadata[MDTime::AcquisitionDate].GetYear() << " " << metadata[MDTi
else
{
otbMsgDevMacro(<< "use dummy filter");
auto spectralDummy = AcquiCorrectionParametersType::InternalWavelengthSpectralBandVectorType::New();
WavelengthSpectralBandVectorType spectralDummy;
spectralDummy->Clear();
for (unsigned int i = 0; i < this->GetInput()->GetNumberOfComponentsPerPixel(); ++i)
{
spectralDummy->PushBack(FilterFunctionValuesType::New());
......@@ -167,7 +167,7 @@ void ReflectanceToSurfaceReflectanceImageFilter<TInputImage, TOutputImage>::Upda
{
itkExceptionMacro(<< "Input must be set before updating the functors");
}
std::cout << "Update functor " << this->GetInput()->GetImageMetadata() << std::endl;
this->GetFunctorVector().clear();
for (unsigned int i = 0; i < this->GetInput()->GetNumberOfComponentsPerPixel(); ++i)
......
......@@ -114,6 +114,7 @@ int otbReflectanceToSurfaceReflectanceImageFilterTest2(int itkNotUsed(argc), cha
paramAtmo->SetAerosolOptical(static_cast<double>(atof(argv[7])));
ReaderType::Pointer reader = ReaderType::New();
WriterType::Pointer writer = WriterType::New();
reader->SetFileName(inputFileName);
......@@ -128,7 +129,7 @@ int otbReflectanceToSurfaceReflectanceImageFilterTest2(int itkNotUsed(argc), cha
writer->SetInput(filter->GetOutput());
writer->Update();
std::cout << "PRINT FILTER" << filter << std::endl;
/*filter->GenerateParameters();
otb::AtmosphericRadiativeTerms::Pointer terms = filter->GetAtmosphericRadiativeTerms();
......
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