Skip to content
Snippets Groups Projects
Commit 8037f0d4 authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

Modif sur les tests de la Radio.

parent 7159e4a8
No related branches found
No related tags found
No related merge requests found
......@@ -97,19 +97,19 @@ SurfaceAdjencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
WeightingMatrixType radiusMatrix(2*m_WindowRadius+1,2*m_WindowRadius+1);
radiusMatrix.Fill(0.);
double center = static_cast<double>(m_WindowRadius+1);
for(int i = 0; i<m_WindowRadius; ++i)
double center = static_cast<double>(m_WindowRadius);
for(unsigned int i = 0; i<m_WindowRadius+1; ++i)
{
for(int j = 0; j<m_WindowRadius; ++j)
for(unsigned int j = 0; j<m_WindowRadius+1; ++j)
{
double id = static_cast<double>(i);
double jd = static_cast<double>(j);
double currentRadius = m_PixelSpacingInKilometers*vcl_sqrt(vcl_pow(id-center,2)+vcl_pow(jd-center,2));
radiusMatrix(i,j)=currentRadius;
radiusMatrix(m_WindowRadius-i,j)=currentRadius;
radiusMatrix(m_WindowRadius-i,m_WindowRadius-j)=currentRadius;
radiusMatrix(i,m_WindowRadius-j)=currentRadius;
radiusMatrix(2*m_WindowRadius-i,j)=currentRadius;
radiusMatrix(2*m_WindowRadius-i,2*m_WindowRadius-j)=currentRadius;
radiusMatrix(i,2*m_WindowRadius-j)=currentRadius;
}
}
......@@ -121,9 +121,9 @@ SurfaceAdjencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
currentWeightingMatrix.Fill(0.);
for(int i = 0; i<2*m_WindowRadius+1; ++i)
for(unsigned int i = 0; i<2*m_WindowRadius+1; ++i)
{
for(int j = 0; j<2*m_WindowRadius+1; ++j)
for(unsigned int j = 0; j<2*m_WindowRadius+1; ++j)
{
double notUsed1,notUsed2;
double factor = 1;
......
......@@ -74,7 +74,6 @@ int otbSurfaceAdjencyEffect6SCorrectionSchemeFilter(int argc, char * argv[])
for(unsigned int i=0; i<nbChannel; i++)
{
wavelenghFiles.push_back( argv[i+6] );
std::cout<<argv[i+6]<<std::endl;
}
ValueType val = 0.0025;
......@@ -122,18 +121,6 @@ int otbSurfaceAdjencyEffect6SCorrectionSchemeFilter(int argc, char * argv[])
param->SetAerosolOptical(static_cast<double>(aerosolOptical));
std::cout<<"SetSolarZenithalAngle: "<<param->GetSolarZenithalAngle()<<std::endl;
std::cout<<"SetSolarAzimutalAngle: "<<param->GetSolarAzimutalAngle()<<std::endl;
std::cout<<"SetViewingZenithalAngle: "<<param->GetViewingZenithalAngle()<<std::endl;
std::cout<<"SetViewingAzimutalAngle: "<<param->GetViewingAzimutalAngle()<<std::endl;
std::cout<<"SetMonth: "<<param->GetMonth()<<std::endl;
std::cout<<"SetDay: "<<param->GetDay()<<std::endl;
std::cout<<"SetAtmosphericPressure: "<<param->GetAtmosphericPressure()<<std::endl;
std::cout<<"SetWaterVaporAmount: "<<param->GetWaterVaporAmount()<<std::endl;
std::cout<<"SetOzoneAmount: "<< param->GetOzoneAmount()<<std::endl;
std::cout<<"SetAerosolModel: "<<param->GetAerosolModel()<<std::endl;
std::cout<<"SetAerosolOptical: "<<param->GetAerosolOptical()<<std::endl;
ValuesVectorType vect;
for(unsigned int j=0; j<nbChannel; j++)
{
......@@ -150,15 +137,13 @@ int otbSurfaceAdjencyEffect6SCorrectionSchemeFilter(int argc, char * argv[])
fin.open(wavelenghFiles[j]);
fin >> minSpectralValue;//wlinf;
fin >> maxSpectralValue;//wlsup;
std::cout<<minSpectralValue<<" "<<maxSpectralValue<<std::endl;
//fin.open(wavelenghFiles[i]);
while (!fin.eof() && fin.good())
{
fin >> value;
vect.push_back(value);
}
// Remove the last vector element which is added by fin, and not contains in the original file.
//vect.pop_back();
fin.close();
functionValues->SetFilterFunctionValues(vect);
functionValues->SetMinSpectralValue(minSpectralValue);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment