From 02adff08898910715fdff4c8a80363fc5b64bf37 Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@cnes.fr> Date: Fri, 8 Dec 2017 14:45:37 +0100 Subject: [PATCH] BUG: Fixing bug #1498 --- .../src/otbWrapperApplication.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx index 776b09fa45..ba74e3ed2f 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx @@ -388,6 +388,22 @@ int Application::Execute() } this->DoExecute(); + + // Ensure that all output image parameter have called UpdateOutputInformation() + for (auto it = paramList.begin(); it != paramList.end(); ++it) + { + OutputImageParameter * outImgParamPtr = dynamic_cast<OutputImageParameter *>(GetParameterByKey(*it)); + // If this is an OutputImageParameter + if(outImgParamPtr != ITK_NULLPTR) + { + // If the parameter is enabled + if(IsParameterEnabled(*it)) + { + // Call UpdateOutputInformation() + outImgParamPtr->GetValue()->UpdateOutputInformation(); + } + } + } return 0; } -- GitLab