From 0acd38b12ec3fb360dd186196d80c57b6739bf5b Mon Sep 17 00:00:00 2001 From: Cedric <cedric.traizet@c-s.fr> Date: Wed, 9 Jan 2019 16:52:38 +0100 Subject: [PATCH] ENH: added stat computation step --- .../AppHyperspectral/app/otbEndmemberNumberEstimation.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Modules/Applications/AppHyperspectral/app/otbEndmemberNumberEstimation.cxx b/Modules/Applications/AppHyperspectral/app/otbEndmemberNumberEstimation.cxx index 583a57c247..2123ea15af 100644 --- a/Modules/Applications/AppHyperspectral/app/otbEndmemberNumberEstimation.cxx +++ b/Modules/Applications/AppHyperspectral/app/otbEndmemberNumberEstimation.cxx @@ -21,6 +21,8 @@ #include "otbWrapperApplication.h" #include "otbWrapperApplicationFactory.h" +#include "otbStreamingStatisticsVectorImageFilter.h" + namespace otb { namespace Wrapper @@ -40,6 +42,9 @@ public: itkTypeMacro(EndmemberNumberEstimation, otb::Application); + typedef otb::StreamingStatisticsVectorImageFilter<FloatVectorImageType, float> + StreamingStatisticsVectorImageFilterType; + private: void DoInit() override { @@ -83,7 +88,10 @@ private: void DoExecute() override { + auto statisticsFilter = StreamingStatisticsVectorImageFilterType::New(); + statisticsFilter->SetInput(GetParameterImage("in")); + statisticsFilter->Update(); } }; -- GitLab