From 0b5efcd9f03ca9e748643be892d6ae4c8b887e65 Mon Sep 17 00:00:00 2001 From: Kasper Marstal <kaspermarstal@gmail.com> Date: Fri, 18 Dec 2015 18:02:40 +0100 Subject: [PATCH] ENH: Overwrite GetOutput() and manually trigger Update() before returning output TODO: Superclass GetOutput() does not trigger Update() as it should --- Modules/Components/Elastix/include/elxElastixFilter.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Modules/Components/Elastix/include/elxElastixFilter.h b/Modules/Components/Elastix/include/elxElastixFilter.h index b89ab35d..fde7d839 100644 --- a/Modules/Components/Elastix/include/elxElastixFilter.h +++ b/Modules/Components/Elastix/include/elxElastixFilter.h @@ -106,6 +106,13 @@ public: itkGetConstMacro( LogToFile, bool ); itkBooleanMacro( LogToFile ); + // TODO: Superclass GetOutput() does not trigger an Update() by itself as it should + TFixedImage* GetOutput() + { + this->Update(); + return static_cast< TFixedImage* >( itk::ProcessObject::GetPrimaryOutput() ); + } + protected: void GenerateData( void ) ITK_OVERRIDE; -- GitLab