Skip to content
Snippets Groups Projects
Commit fe8bca99 authored by Julien Michel's avatar Julien Michel
Browse files

Correction ordre des paramètres des tests

parent 05ec403c
Branches
Tags
No related merge requests found
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
// Software Guide : BeginCommandLineArgs // Software Guide : BeginCommandLineArgs
// INPUTS: {Romania_Extract.tif} // INPUTS: {Romania_Extract.tif}
// OUTPUTS: {AtmosphericCorrectionSequencement.tif} // OUTPUTS: {AtmosphericCorrectionSequencement.tif}
// ${OTB_SOURCE_DIR}/Examples/Data/atmosphericCorrectionSequencement_alpha_beta.txt ${OTB_SOURCE_DIR}/Examples/Data/atmosphericCorrectionSequencement_solar_illumination.txt atmosphericCorrectionSequencement_wavelenght_spectral_bands_spot4_1.txt 27.3 4 12 27.3 152.7 2.5 -77.0 1013. 2.48134 0.34400 1 0.199854 2 0.020 // ${OTB_SOURCE_DIR}/Examples/Data/atmosphericCorrectionSequencement_alpha_beta.txt ${OTB_SOURCE_DIR}/Examples/Data/atmosphericCorrectionSequencement_solar_illumination.txt atmosphericCorrectionSequencement_wavelenght_spectral_bands_spot4_1.txt 27.3 4 12 152.7 2.5 -77.0 1013. 2.48134 0.34400 1 0.199854 2 0.020
// Software Guide : EndCommandLineArgs // Software Guide : EndCommandLineArgs
// Software Guide : BeginLatex // Software Guide : BeginLatex
...@@ -86,11 +86,11 @@ ...@@ -86,11 +86,11 @@
int main( int argc, char *argv[] ) int main( int argc, char *argv[] )
{ {
if( argc != 20 ) if( argc != 19 )
{ {
std::cerr << "Missing Parameters " << std::endl; std::cerr << "Missing Parameters " << std::endl;
std::cerr << "Usage: " << argv[0]<< std::endl; std::cerr << "Usage: " << argv[0]<< std::endl;
std::cerr << " inputImage outputImage atmosphericCorrectionSequencement_alpha_beta.txt atmosphericCorrectionSequencement_solar_illumination.txt atmosphericCorrectionSequencement_wavelenght_spectral_bands_spot4_1.txt elevation azimuth day month AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms (9 parameters) SurfaceAdjencyEffect6SCorrectionSchemeFilter (2 parameters )"<< std::endl; std::cerr << " inputImage outputImage atmosphericCorrectionSequencement_alpha_beta.txt atmosphericCorrectionSequencement_solar_illumination.txt atmosphericCorrectionSequencement_wavelenght_spectral_bands_spot4_1.txt azimuth day month AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms (9 parameters) SurfaceAdjencyEffect6SCorrectionSchemeFilter (2 parameters )"<< std::endl;
std::cerr << std::endl; std::cerr << std::endl;
return 1; return 1;
} }
...@@ -259,9 +259,9 @@ int main( int argc, char *argv[] ) ...@@ -259,9 +259,9 @@ int main( int argc, char *argv[] )
// Software Guide : BeginCodeSnippet // Software Guide : BeginCodeSnippet
filterLuminanceToReflectance->SetZenithalSolarAngle( filterLuminanceToReflectance->SetZenithalSolarAngle(
static_cast<double>(atof(argv[7]))); static_cast<double>(atof(argv[6])));
filterLuminanceToReflectance->SetDay(atoi(argv[8])); filterLuminanceToReflectance->SetDay(atoi(argv[7]));
filterLuminanceToReflectance->SetMonth(atoi(argv[9])); filterLuminanceToReflectance->SetMonth(atoi(argv[8]));
filterLuminanceToReflectance->SetSolarIllumination(solarIllumination); filterLuminanceToReflectance->SetSolarIllumination(solarIllumination);
// Software Guide : EndCodeSnippet // Software Guide : EndCodeSnippet
...@@ -369,37 +369,37 @@ int main( int argc, char *argv[] ) ...@@ -369,37 +369,37 @@ int main( int argc, char *argv[] )
// Set parameters // Set parameters
// Software Guide : BeginCodeSnippet // Software Guide : BeginCodeSnippet
dataAtmosphericCorrectionParameters->SetSolarZenithalAngle( dataAtmosphericCorrectionParameters->SetSolarZenithalAngle(
static_cast<double>(atof(argv[10]))); static_cast<double>(atof(argv[6])));
dataAtmosphericCorrectionParameters->SetSolarAzimutalAngle( dataAtmosphericCorrectionParameters->SetSolarAzimutalAngle(
static_cast<double>(atof(argv[11]))); static_cast<double>(atof(argv[9])));
dataAtmosphericCorrectionParameters->SetViewingZenithalAngle( dataAtmosphericCorrectionParameters->SetViewingZenithalAngle(
static_cast<double>(atof(argv[12]))); static_cast<double>(atof(argv[10])));
dataAtmosphericCorrectionParameters->SetViewingAzimutalAngle( dataAtmosphericCorrectionParameters->SetViewingAzimutalAngle(
static_cast<double>(atof(argv[13]))); static_cast<double>(atof(argv[11])));
dataAtmosphericCorrectionParameters->SetMonth(atoi(argv[9])); dataAtmosphericCorrectionParameters->SetMonth(atoi(argv[8]));
dataAtmosphericCorrectionParameters->SetDay(atoi(argv[8])); dataAtmosphericCorrectionParameters->SetDay(atoi(argv[7]));
dataAtmosphericCorrectionParameters->SetAtmosphericPressure( dataAtmosphericCorrectionParameters->SetAtmosphericPressure(
static_cast<double>(atof(argv[14]))); static_cast<double>(atof(argv[12])));
dataAtmosphericCorrectionParameters->SetWaterVaporAmount( dataAtmosphericCorrectionParameters->SetWaterVaporAmount(
static_cast<double>(atof(argv[15]))); static_cast<double>(atof(argv[13])));
dataAtmosphericCorrectionParameters->SetOzoneAmount( dataAtmosphericCorrectionParameters->SetOzoneAmount(
static_cast<double>(atof(argv[16]))); static_cast<double>(atof(argv[14])));
AerosolModelType aerosolModel = AerosolModelType aerosolModel =
static_cast<AerosolModelType>(::atoi(argv[17])); static_cast<AerosolModelType>(::atoi(argv[15]));
dataAtmosphericCorrectionParameters->SetAerosolModel(aerosolModel); dataAtmosphericCorrectionParameters->SetAerosolModel(aerosolModel);
dataAtmosphericCorrectionParameters->SetAerosolOptical( dataAtmosphericCorrectionParameters->SetAerosolOptical(
static_cast<double>(atof(argv[18]))); static_cast<double>(atof(argv[16])));
// Software Guide : EndCodeSnippet // Software Guide : EndCodeSnippet
// Software Guide : BeginLatex // Software Guide : BeginLatex
...@@ -544,8 +544,8 @@ int main( int argc, char *argv[] ) ...@@ -544,8 +544,8 @@ int main( int argc, char *argv[] )
// Software Guide : EndLatex // Software Guide : EndLatex
filterSurfaceAdjencyEffect6SCorrectionSchemeFilter->SetAtmosphericRadiativeTerms(filterAtmosphericCorrectionParametersTo6SRadiativeTerms->GetOutput()); filterSurfaceAdjencyEffect6SCorrectionSchemeFilter->SetAtmosphericRadiativeTerms(filterAtmosphericCorrectionParametersTo6SRadiativeTerms->GetOutput());
filterSurfaceAdjencyEffect6SCorrectionSchemeFilter->SetZenithalViewingAngle(dataAtmosphericCorrectionParameters->GetViewingZenithalAngle()); filterSurfaceAdjencyEffect6SCorrectionSchemeFilter->SetZenithalViewingAngle(dataAtmosphericCorrectionParameters->GetViewingZenithalAngle());
filterSurfaceAdjencyEffect6SCorrectionSchemeFilter->SetWindowRadius(atoi(argv[19])); filterSurfaceAdjencyEffect6SCorrectionSchemeFilter->SetWindowRadius(atoi(argv[17]));
filterSurfaceAdjencyEffect6SCorrectionSchemeFilter->SetPixelSpacingInKilometers(static_cast<double>(atof(argv[20]))); filterSurfaceAdjencyEffect6SCorrectionSchemeFilter->SetPixelSpacingInKilometers(static_cast<double>(atof(argv[18])));
//------------------------------- //-------------------------------
......
...@@ -58,6 +58,7 @@ ADD_TEST(NDVIRAndNIRVegetationIndexImageFilterTest ${EXE_TESTS} ...@@ -58,6 +58,7 @@ ADD_TEST(NDVIRAndNIRVegetationIndexImageFilterTest ${EXE_TESTS}
${TEMP}/NDVIRAndNIRVegetationIndex.tif ${TEMP}/NDVIRAndNIRVegetationIndex.tif
${TEMP}/NDVIRAndNIRVegetationIndex2.tif ${TEMP}/NDVIRAndNIRVegetationIndex2.tif
${TEMP}/NDVIRAndNIRVegetationIndex3.tif ${TEMP}/NDVIRAndNIRVegetationIndex3.tif
${TEMP}/NDVIRAndNIRVegetationIndex4.tif
) )
ADD_TEST(AtmosphericCorrectionSequencementTest ${EXE_TESTS} ADD_TEST(AtmosphericCorrectionSequencementTest ${EXE_TESTS}
...@@ -66,19 +67,19 @@ ADD_TEST(AtmosphericCorrectionSequencementTest ${EXE_TESTS} ...@@ -66,19 +67,19 @@ ADD_TEST(AtmosphericCorrectionSequencementTest ${EXE_TESTS}
${TEMP}/raTvRomaniaAtmosphericCorrectionSequencement.tif ${TEMP}/raTvRomaniaAtmosphericCorrectionSequencement.tif
AtmosphericCorrectionSequencementTest AtmosphericCorrectionSequencementTest
${INPUTDATA}/Romania_Extract.tif ${INPUTDATA}/Romania_Extract.tif
${TEMP}/raTvRomaniaAtmosphericCorrectionSequencement.tif
${INPUTDATA}/atmosphericCorrectionSequencement_alpha_beta.txt ${INPUTDATA}/atmosphericCorrectionSequencement_alpha_beta.txt
${INPUTDATA}/atmosphericCorrectionSequencement_solar_illumination.txt ${INPUTDATA}/atmosphericCorrectionSequencement_solar_illumination.txt
${INPUTDATA}/atmosphericCorrectionSequencement_wavelenght_spectral_bands_spot4_1.txt ${INPUTDATA}/atmosphericCorrectionSequencement_wavelenght_spectral_bands_spot4_1.txt
${TEMP}/raTvRomaniaAtmosphericCorrectionSequencement.tif
# ImageToLuminance parameters # ImageToLuminance parameters
# LuminanceToReflectance parameters # LuminanceToReflectance parameters
27.3 #elevation et azimuth solaire 27.3 #solar azimuthal elevation
4 #day 4 #day
12 #mounth 12 #mounth
# AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms parameters # AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms parameters
27.3 27.3
152.7 152.7
2.5
-77.0 -77.0
1013. 1013.
2.48134 2.48134
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment