-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: Fix ConjugateGradientFRPR overrides PowellOptimizer, FRPROptimizer
There was a breaking change in the API of `itk::PowellOptimizer` and `itk::FRPROptimizer`, with ITK commit InsightSoftwareConsortium/ITK@a7b0a73 "ENH: Eliminates variable construct/destruct", Stephen R. Aylward, April 23, 2008: It added overloads of the virtual member functions, `itk::PowellOptimizer::LineBracket`, `itk::PowellOptimizer::BracketedLineOptimize`, and `itk::FRPROptimizer::LineOptimize`, which have an extra parameter, `ParametersType & tempCoord`. The old virtual member functions were then rewritten in terms of the corresponding new overloads. As a consequence, it does not make sense anymore for `elastix::ConjugateGradientFRPR` to override the old virtual member functions of ITK. With this commit, it overrides the new overloads instead, with the extra `ParametersType & tempCoord` parameter. This fix aims to restore the behavior of ConjugateGradientFRPR as it was intended. (ConjugateGradientFRPR was introduces with commit 1c64e2a, Stefan Klein, 20 April 2006.) The bug was found when trying to fix `-Woverloaded-virtual` warnings from GCC at https://my.cdash.org/index.php?project=elastix like: > itkFRPROptimizer.h:126:3: warning: 'virtual void itk::FRPROptimizer::LineOptimize(itk::FRPROptimizer::ParametersType*, itk::FRPROptimizer::ParametersType&, double*, itk::FRPROptimizer::ParametersType&)' was hidden
- Loading branch information
Showing
2 changed files
with
41 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters