From bf211285b643175b1b34e2304cd3382ea61db892 Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@orfeo-toolbox.org> Date: Tue, 18 Dec 2018 13:01:51 +0000 Subject: [PATCH] COMP: Fix compilation error on pansharpening application (can not convert to ImageToImageFilter instance) --- .../AppFusion/app/otbPansharpening.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Modules/Applications/AppFusion/app/otbPansharpening.cxx b/Modules/Applications/AppFusion/app/otbPansharpening.cxx index fda0827b4f..8e6cf20f0c 100644 --- a/Modules/Applications/AppFusion/app/otbPansharpening.cxx +++ b/Modules/Applications/AppFusion/app/otbPansharpening.cxx @@ -53,8 +53,6 @@ public: typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; - typedef itk::ImageToImageFilter<FloatVectorImageType, FloatVectorImageType> FusionFilterType; - typedef otb::SimpleRcsPanSharpeningFusionImageFilter<FloatImageType, FloatVectorImageType, FloatVectorImageType> SimpleRCSFilterType; typedef otb::LmvmPanSharpeningFusionImageFilter @@ -176,7 +174,9 @@ private: filter->UpdateOutputInformation(); otbAppLogINFO( << "Simple RCS algorithm" ); - m_FusionFilter = filter; + m_Ref.push_back(filter.GetPointer()); + SetParameterOutputImage("out", filter->GetOutput()); + break; } case 1: @@ -203,8 +203,9 @@ private: filter->UpdateOutputInformation(); otbAppLogINFO( << "Lmvm algorithm" ); + m_Ref.push_back(filter.GetPointer()); + SetParameterOutputImage("out", filter->GetOutput()); - m_FusionFilter = filter; break; } case 2: @@ -224,7 +225,9 @@ private: filter->UpdateOutputInformation(); otbAppLogINFO( << "Bayesian fusion algorithm" ); - m_FusionFilter = filter; + + m_Ref.push_back(filter.GetPointer()); + SetParameterOutputImage("out", filter->GetOutput()); break; } @@ -236,12 +239,9 @@ private: } return; } - - SetParameterOutputImage("out", m_FusionFilter->GetOutput()); } std::vector<itk::ProcessObject::Pointer> m_Ref; - FusionFilterType::Pointer m_FusionFilter; }; } } -- GitLab