diff --git a/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h b/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h index 0107133b428a7b3bdb8148bcd667fefbaa96f30a..e77a228b0a21042e8e4a83d46e21e04ee8c613a3 100644 --- a/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h +++ b/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h @@ -177,9 +177,9 @@ public: /** Update the functor list */ virtual void BeforeThreadedGenerateData(void) - {std::cout<<"BeforeThreadedGenerateData LumToRef"<<std::endl; - this->GetFunctorVector().clear(); - std::cout<<"1. / coefTemp"<<this->GetInput()->GetNumberOfComponentsPerPixel()<<std::endl; + { + this->GetFunctorVector().clear(); + for(unsigned int i = 0;i<this->GetInput()->GetNumberOfComponentsPerPixel();++i) { FunctorType functor; diff --git a/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h b/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h index 5951080df33794d656d95ec6f49357974bae9ac7..55acd70896661c5d757cc5fb67941ba09a314ece 100644 --- a/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h +++ b/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h @@ -172,6 +172,7 @@ namespace otb functor.SetCoefficient(coef); functor.SetResidu(res); functor.SetSphericalAlbedo(static_cast<double>(m_AtmosphericRadiativeTerms->GetSphericalAlbedo(i))); + this->GetFunctorVector().push_back(functor); } } diff --git a/Testing/Code/Radiometry/CMakeLists.txt b/Testing/Code/Radiometry/CMakeLists.txt index 787019153eb47ca5e22fdce72098a3b3d9359587..8c498afa414d44ebfb0ee0558c35daad931dda9f 100755 --- a/Testing/Code/Radiometry/CMakeLists.txt +++ b/Testing/Code/Radiometry/CMakeLists.txt @@ -262,13 +262,12 @@ ADD_TEST(raTvImageToReflectanceImageFilter ${RADIOMETRY_TESTS} ) ADD_TEST(raTvRomaniaImageToReflectance ${RADIOMETRY_TESTS} - --compare-image ${EPSILON} #${BASELINE}/raTvS4_20020518.img.hdr - ${BASELINE}/raTvRomania_S4_20020518_Reflectance.tif - ${TEMP}/raTvRomaniaReflectanceImage.tif + --compare-image ${EPSILON} + ${BASELINE}/raTvRomania_Reflectance.tif + ${TEMP}/raTvRomaniaReflectanceImage.tif otbImageToReflectanceImageFilter - ${IMAGEDATA}/ROMANIA/S4_20020518.tif + ${INPUTDATA}/Romania_Extract.tif ${TEMP}/raTvRomaniaReflectanceImage.tif -# 27.3 # = 90-62.70 : elevation et azimuth solaire 1.981247824 #channel 1 alpha = 0.881338*2.24800 4.332207085 #channel 2 alpha = 0.858713*5.04500 @@ -395,25 +394,17 @@ ADD_TEST(raTvReflectanceToSurfaceReflectanceImageFilter ${RADIOMETRY_TESTS} ADD_TEST(raTvRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter ${RADIOMETRY_TESTS} --compare-image ${EPSILON} - ${IMAGEDATA}/ROMANIA/raTvS4_20020518_Corrected.img.hdr + ${BASELINE}/raTvRomania_Correction.tif ${TEMP}/raTvRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter.tif otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter - #${IMAGEDATA}/ROMANIA/raTvS4_20020518_Reflectance.img.hdr # - ${BASELINE}/raTvRomania_S4_20020518_Reflectance.tif + ${BASELINE}/raTvRomania_Reflectance.tif ${TEMP}/raTvRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter.tif - ${INPUTDATA}/testRomania.txt # atmo param; - ${INPUTDATA}/RADIO_WAVELENGHT_SPECTRAL_BAND_SPOT4_1_B3.txt # wavelenghts, channel 3 - ${INPUTDATA}/RADIO_WAVELENGHT_SPECTRAL_BAND_SPOT4_1_B2.txt # wavelenghts, channel 2 - ${INPUTDATA}/RADIO_WAVELENGHT_SPECTRAL_BAND_SPOT4_1_B1.txt # wavelenghts, channel 1 + ${INPUTDATA}/romania_parameter.txt # atmo param; + ${INPUTDATA}/RADIO_WAVELENGHT_SPECTRAL_BAND_SPOT4_1_B3.txt # wavelenghts, channel 3 + ${INPUTDATA}/RADIO_WAVELENGHT_SPECTRAL_BAND_SPOT4_1_B2.txt # wavelenghts, channel 2 + ${INPUTDATA}/RADIO_WAVELENGHT_SPECTRAL_BAND_SPOT4_1_B1.txt # wavelenghts, channel 1 ${INPUTDATA}/RADIO_WAVELENGHT_SPECTRAL_BAND_SPOT4_1_MIR.txt # wavelenghts, channel 4 - - # SAME VALUE FOR EACH CHANNEL - # 0.02571013197 0.02571013197 0.02571013197 0.02571013197 # intrinsic atmospheric reflectance - # 0.06615033001 0.06615033001 0.06615033001 0.06615033001 # spherical albedo of the atmosphere - # 0.9276281595 0.9276281595 0.9276281595 0.9276281595 # total transmission - # 0.9506403804 0.9506403804 0.9506403804 0.9506403804 # downward transmittance - # 0.9373859167 0.9373859167 0.9373859167 0.9373859167 # upward transmittance - ) + ) # ------- otb::SurfaceAdjencyEffect6SCorrectionSchemeFilter ------------------------------ ADD_TEST(raTuSurfaceAdjencyEffect6SCorrectionSchemeFilterNew ${RADIOMETRY_TESTS} @@ -448,25 +439,6 @@ ADD_TEST(raTvAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms ${RADI ${TEMP}/raTvCorrectionTo6SRadiative.txt ) - -# ${IMAGEDATA}/Romania/S4_2002518.tif # input image -# ${TEMP}/raTvAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.tif # output image -# ${INPUTDATA}/RADIO_WAVELENGHT_SPECTRAL_BAND_SPOT4_1_B1.txt # wavelet length file for channel 1 -# ${INPUTDATA}/RADIO_WAVELENGHT_SPECTRAL_BAND_SPOT4_1_B2.txt # wavelet length file for channel 2 -# ${INPUTDATA}/RADIO_WAVELENGHT_SPECTRAL_BAND_SPOT4_1_B3.txt # wavelet length file for channel 3 -# ${INPUTDATA}/RADIO_WAVELENGHT_SPECTRAL_BAND_SPOT4_1_MIR.txt # wavelet length file for channel 4 -# 27.3 # = 90-62.7, solar zenithal angle -# 152.7 # solar azimutal angle -# 2 # = 90-88, viewing zenithal angle -# -77.0 # viewing azimutal angle -# 12 # acquisition month -# 17 # acquisition day -# 1013.00 # atmospheric pressure -# 2.48134 # water vapor amount -# 0.344000 # ozone amount -# 1 # aerosol model type (0 = NO_AEROSOL=0, 1 = CONTINENTAL, 2 = MARITIME, 3 =)NO_AEROSOL=0,CONTINENTAL=1,MARITIME=2,URBAN=3,DESERTIC=5 -# 1.99854 # aerosol opical thichness -