Skip to content
Snippets Groups Projects
Commit c33861a6 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

TEST: finalize the ReflectanceToSurfaceReflectance new test

parent f5fda829
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,8 @@ int otbReflectanceToSurfaceReflectanceImageFilterNew(int argc, char * argv[]) ...@@ -36,7 +36,8 @@ int otbReflectanceToSurfaceReflectanceImageFilterNew(int argc, char * argv[])
ReflectanceToSurfaceReflectanceImageFilterType; ReflectanceToSurfaceReflectanceImageFilterType;
// Instantiating object // Instantiating object
ReflectanceToSurfaceReflectanceImageFilterType::Pointer filter = ReflectanceToSurfaceReflectanceImageFilterType::New(); ReflectanceToSurfaceReflectanceImageFilterType::Pointer filter
= ReflectanceToSurfaceReflectanceImageFilterType::New();
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
...@@ -88,7 +89,8 @@ int otbReflectanceToSurfaceReflectanceImageFilterTest(int argc, char * argv[]) ...@@ -88,7 +89,8 @@ int otbReflectanceToSurfaceReflectanceImageFilterTest(int argc, char * argv[])
atmo->SetUpwardTransmittances(upTrans); atmo->SetUpwardTransmittances(upTrans);
// Instantiating object // Instantiating object
ReflectanceToSurfaceReflectanceImageFilterType::Pointer filter = ReflectanceToSurfaceReflectanceImageFilterType::New(); ReflectanceToSurfaceReflectanceImageFilterType::Pointer filter
= ReflectanceToSurfaceReflectanceImageFilterType::New();
filter->SetAtmosphericRadiativeTerms(atmo); filter->SetAtmosphericRadiativeTerms(atmo);
filter->SetInput(reader->GetOutput()); filter->SetInput(reader->GetOutput());
writer->SetInput(filter->GetOutput()); writer->SetInput(filter->GetOutput());
...@@ -98,6 +100,7 @@ int otbReflectanceToSurfaceReflectanceImageFilterTest(int argc, char * argv[]) ...@@ -98,6 +100,7 @@ int otbReflectanceToSurfaceReflectanceImageFilterTest(int argc, char * argv[])
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
//Check the correct generation of the atmospheric parameters
int otbReflectanceToSurfaceReflectanceImageFilterTest2(int argc, char * argv[]) int otbReflectanceToSurfaceReflectanceImageFilterTest2(int argc, char * argv[])
{ {
const char * inputFileName = argv[1]; const char * inputFileName = argv[1];
...@@ -121,14 +124,14 @@ int otbReflectanceToSurfaceReflectanceImageFilterTest2(int argc, char * argv[]) ...@@ -121,14 +124,14 @@ int otbReflectanceToSurfaceReflectanceImageFilterTest2(int argc, char * argv[])
reader->UpdateOutputInformation(); reader->UpdateOutputInformation();
// Instantiating object // Instantiating object
ReflectanceToSurfaceReflectanceImageFilterType::Pointer filter = ReflectanceToSurfaceReflectanceImageFilterType::New(); ReflectanceToSurfaceReflectanceImageFilterType::Pointer filter
= ReflectanceToSurfaceReflectanceImageFilterType::New();
filter->SetInput(reader->GetOutput()); filter->SetInput(reader->GetOutput());
// filter->UpdateAtmosphericRadiativeTerms(); filter->GenerateParameters();
otb::AtmosphericRadiativeTerms::Pointer terms = filter->GetAtmosphericRadiativeTerms();
std::ofstream fout (outputFileName); std::ofstream fout (outputFileName);
fout << filter->GetAtmosphericRadiativeTerms(); fout << terms;
fout << "\n";
fout << filter;
fout.close(); fout.close();
return EXIT_SUCCESS; return EXIT_SUCCESS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment