Commit cb1f7d8a authored by remi cresson's avatar remi cresson
Browse files

ENH: the application resample rainfall time series using bicubic interpolation (spatial)

parent 81dc96d3
......@@ -146,6 +146,8 @@ private:
{
p[i] = i*2;
}
// p = {65,63,67,64,68,62,70,66,68,67,69,71};
// Y = [68,66,68,65,69,66,68,65,71,67,68,70]
std::cout << f(p) << std::endl;
}
......@@ -476,7 +478,7 @@ private:
m_ResampleFilter = ResampleImageFilterType::New();
m_ResampleFilter->SetInput(m_RFCumulReduceFilter->GetOutput());
m_ResampleFilter->SetOutputOrigin(m_NDVIConcatener->GetOutput()->GetOrigin());
m_ResampleFilter->SetOutputSpacing(m_NDVIConcatener->GetOutput()->GetSpacing());
m_ResampleFilter->SetOutputSpacing(m_NDVIConcatener->GetOutput()->GetSignedSpacing());
m_ResampleFilter->SetOutputSize(m_NDVIConcatener->GetOutput()->GetLargestPossibleRegion().GetSize());
m_ResampleFilter->SetInterpolator(linInterpolator);
......@@ -490,7 +492,7 @@ private:
// Compute residues
m_ResiduesFilter = ResiduesFilterType::New();
m_ResiduesFilter->SetInput1(reducedNDVI);
m_ResiduesFilter->SetInput2(m_RFCumulReduceFilter->GetOutput());
m_ResiduesFilter->SetInput2(m_ResampleFilter->GetOutput());
// Output residues
if (HasValue("residues"))
......@@ -519,7 +521,7 @@ private:
// Correlation between NDVI and Rainfall
m_CorrelationFilter = PearsonCorrelationFilterType::New();
m_CorrelationFilter->SetInput1(reducedNDVI);
m_CorrelationFilter->SetInput2(m_RFCumulReduceFilter->GetOutput());
m_CorrelationFilter->SetInput2(m_ResampleFilter->GetOutput());
if (HasValue("pearsoncoef"))
{
......
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