Commit 767f72f5 authored by remi cresson's avatar remi cresson
Browse files

ADD: optional output images

parent 89b0211b
......@@ -258,6 +258,21 @@ private:
SetDefaultOutputPixelType("factorslabel", ImagePixelType_uint8);
MandatoryOff ("factorslabel");
// Output NDVI (year cumul)
AddParameter(ParameterType_OutputImage, "ndvicumul", "Output image for ndvi year cumul");
SetDefaultOutputPixelType("ndvicumul", ImagePixelType_float);
MandatoryOff ("ndvicumul");
// Output rainf (year cumul)
AddParameter(ParameterType_OutputImage, "rainfcumul", "Output image for rainfall year cumul");
SetDefaultOutputPixelType("rainfcumul", ImagePixelType_float);
MandatoryOff ("rainfcumul");
// Output pearson coef
AddParameter(ParameterType_OutputImage, "pearsoncoef", "Output image for pearson coef");
SetDefaultOutputPixelType("pearsoncoef", ImagePixelType_float);
MandatoryOff ("pearsoncoef");
AddRAMParameter();
}
......@@ -363,6 +378,12 @@ private:
m_NDVITimeSeriesRegressionFilter = SlopeAndPValueFilterType::New();
m_NDVITimeSeriesRegressionFilter->SetInput(reducedNDVI);
// Write reduced ndvi
if (HasValue("ndvicumul"))
{
SetParameterOutputImage("ndvicumul", reducedNDVI);
}
// Output NDVI trend image
if (HasValue("ndvitrend"))
{
......@@ -459,6 +480,13 @@ private:
m_ResampleFilter->SetOutputSize(m_NDVIConcatener->GetOutput()->GetLargestPossibleRegion().GetSize());
m_ResampleFilter->SetInterpolator(linInterpolator);
// Write reduced rainfall
if (HasValue("rainfcumul"))
{
SetParameterOutputImage("rainfcumul", m_ResampleFilter->GetOutput());
}
// Compute residues
m_ResiduesFilter = ResiduesFilterType::New();
m_ResiduesFilter->SetInput1(reducedNDVI);
......@@ -493,6 +521,11 @@ private:
m_CorrelationFilter->SetInput1(reducedNDVI);
m_CorrelationFilter->SetInput2(m_RFCumulReduceFilter->GetOutput());
if (HasValue("pearsoncoef"))
{
SetParameterOutputImage("pearsoncoef", m_CorrelationFilter->GetOutput());
}
// Factors labeling
m_FactorsLabelFilter = FactorsLabelingFilterType::New();
m_FactorsLabelFilter->SetInput1(m_NDVITimeSeriesRegressionFilter->GetOutput());
......
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