Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: ImageRandomIteratorWithIndex should not assign data in constructor
The constructors of `ImageRandomConstIteratorWithIndex` and `ImageRandomConstIteratorWithOnlyIndex` that support two arguments (image and region) accidentally still assigned their data members, while they were already initialized by in-class default member initialization. This in-class default member initialization was added as part of pull request InsightSoftwareConsortium#3929 commit 4e46cb6 "STYLE: Default default-constructor of ImageRandom ConstIterator classes", merged on February 24, 2023 and included with tag ITK v5.4rc01. This caused extra `MersenneTwisterRandomVariateGenerator::New()` calls, which changed the seeds of random number generation. These changes can possibly cause regression failures in unit tests of client applications, including elastix. This commit removes all data member assignments from the bodies of these constructors.
- Loading branch information