Skip to content

Commit

Permalink
STYLE: Do not use instance when calling static member GetNextSeed()
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Dekker committed Oct 26, 2023
1 parent 9a59a85 commit 106076f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Common/ImageSamplers/itkImageRandomSampler.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ ImageRandomSampler<TInputImage>::GenerateData()
m_OptionalUserData.emplace(
randomNumberList, samples, elastix::Deref(inputImage), this->GetCroppedInputImageRegion());

auto & randomVariateGenerator = elastix::Deref(Statistics::MersenneTwisterRandomVariateGenerator::GetInstance());
randomVariateGenerator.SetSeed(randomVariateGenerator.GetNextSeed());
using Statistics::MersenneTwisterRandomVariateGenerator;
elastix::Deref(MersenneTwisterRandomVariateGenerator::GetInstance())
.SetSeed(MersenneTwisterRandomVariateGenerator::GetNextSeed());

MultiThreaderBase & multiThreader = elastix::Deref(this->ProcessObject::GetMultiThreader());
multiThreader.SetSingleMethod(&Self::ThreaderCallback, &*m_OptionalUserData);
Expand Down

0 comments on commit 106076f

Please sign in to comment.