ParzenWindowHistogramImageToImageMetric: replace m_JointPDFWindow with m_JointPDFWindowSize#1450
Merged
N-Dekker merged 3 commits intoJun 5, 2026
Conversation
Replaced the protected mutable data member m_JointPDFWindow with the private non-mutable data member m_JointPDFWindowSize, in ParzenWindowHistogramImageToImageMetric. Added GetJointPDFWindowSize(). It appears unnecessary for the ParzenWindowHistogram metric to store the Index of the JointPDFWindow. Only its Size matters. It also appear unnecessary to declare the data member mutable, as was already observed by Marius Staring, commit 2fc2c49, 14-11-2013, "ENH: HUGE merge of the performance branch", by adding the comment, "no need for mutable anymore?".
Simplified use of `ParzenWindowHistogramImageToImageMetric::m_JointPDFWindowSize`.
Used aggregate initialization for local JointPDFIndexType variables in ParzenWindowHistogramImageToImageMetric member functions.
N-Dekker
commented
Jun 5, 2026
| IncrementalMarginalPDFPointer m_MovingIncrementalMarginalPDFRight{ nullptr }; | ||
| IncrementalMarginalPDFPointer m_FixedIncrementalMarginalPDFLeft{ nullptr }; | ||
| IncrementalMarginalPDFPointer m_MovingIncrementalMarginalPDFLeft{ nullptr }; | ||
| mutable JointPDFRegionType m_JointPDFWindow{}; // no need for mutable anymore? |
Member
Author
There was a problem hiding this comment.
@mstaring FYI, I think this pull request is just a logical follow-up to your commit 2fc2c49 from 2013 ("ENH: HUGE merge of the performance branch"). Your 2013 commit made the Index component of m_JointPDFWindow unused, so from then, it was only its Size that mattered. (And indeed, no need for mutable anymore.)
I also noticed that its Size is always equal to { m_MovingKernelBSplineOrder + 1, m_FixedKernelBSplineOrder + 1 }, so it is still a bit redundant, having a data member whose value is based on two other data members 🤷
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.
No description provided.