Support multiple metrics and regularizations, add tests and backward compatibility ("legacy hack")#1453
Open
N-Dekker wants to merge 10 commits into
Open
Support multiple metrics and regularizations, add tests and backward compatibility ("legacy hack")#1453N-Dekker wants to merge 10 commits into
N-Dekker wants to merge 10 commits into
Conversation
N-Dekker
commented
Jun 19, 2026
Member
- Cherry-picked pull-request ENH: Add support for multiple metrics and regularization #1437 from @Leirbag-gabrieL (followed by clang-format)
- Originally based on pull request ENH: Add support for multiple metrics and regularization #482 by @alvarez-pa
- Addresssing issue Multiple metrics and regularization #481 by @alvarez-pa
- Included backward compatibility ("legacy hack" support), following comment ENH: Add support for multiple metrics and regularization #1437 (comment) by @stefanklein
- Added unit tests
Removed two unnecessarily typedef's from the public interface of CombinationImageToImageMetric.
Following "Use the prefix form (`++i`) of the increment and decrement operators unless...", https://google.github.io/styleguide/cppguide.html#Preincrement_and_Predecrement Also removed unnecessary `this->` from those cases.
Avoided repeatedly calling GetNumberOfInterpolators().
Avoided repeatedly calling GetNumberOfFixedImagePyramids() and GetNumberOfMovingImagePyramids().
Avoided repeatedly calling GetNumberOfFixedImages() and GetNumberOfMovingImages().
Based on issue #481 "Multiple metrics and regularization", Pablo Alvarez (alvarez-pa), Jun 15, 2021.
Allowed users to add "dummy" images when having more metrics than images (which was a "hack" before it was officially supported to have more metrics than images).
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.