From 4b57200c5599e40f2843ea1db9d2e803f1b4f4a6 Mon Sep 17 00:00:00 2001 From: Jordi Inglada <jordi.inglada@cesbio.cnes.fr> Date: Wed, 12 Sep 2018 11:36:19 +0200 Subject: [PATCH] ENH: mv filter update to a better place --- .../AppClassification/app/otbZonalStatistics.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Modules/Applications/AppClassification/app/otbZonalStatistics.cxx b/Modules/Applications/AppClassification/app/otbZonalStatistics.cxx index 85ba0f82cd..eb44ece1b9 100644 --- a/Modules/Applications/AppClassification/app/otbZonalStatistics.cxx +++ b/Modules/Applications/AppClassification/app/otbZonalStatistics.cxx @@ -188,6 +188,9 @@ public: m_VectorDataSrc = shp; } RasterizeInputVectorData(); + // Computing stats + m_StatsFilter->SetInputLabelImage(m_RasterizeFilter->GetOutput()); + m_StatsFilter->Update(); } void ReprojectVectorDataIntoInputImage() @@ -214,10 +217,6 @@ public: m_RasterizeFilter->SetDefaultBurnValue(0); m_RasterizeFilter->SetGlobalWarningDisplay(false); m_RasterizeFilter->SetBackgroundValue(m_IntNoData); - - // Computing stats - m_StatsFilter->SetInputLabelImage(m_RasterizeFilter->GetOutput()); - m_StatsFilter->Update(); } void RemoveNoDataEntry() -- GitLab