diff --git a/gems/kvlRegisterImages.hxx b/gems/kvlRegisterImages.hxx index 95b5271..4917e06 100644 --- a/gems/kvlRegisterImages.hxx +++ b/gems/kvlRegisterImages.hxx @@ -170,15 +170,15 @@ void RegisterImages optimizer->SetScalesEstimator(scalesEstimator); } + //Could be skipped if we don't need to test + constexpr int randomNumberGeneratorSeed = 121213; + registration->MetricSamplingReinitializeSeed(randomNumberGeneratorSeed); + //Set sampling strategy typename RegistrationType::MetricSamplingStrategyType samplingStrategy = RegistrationType::RANDOM; registration->SetMetricSamplingStrategy(samplingStrategy); registration->SetMetricSamplingPercentage(m_SamplingPercentage); - //Could be skipped if we don't need to test - constexpr int randomNumberGeneratorSeed = 121213; - registration->MetricSamplingReinitializeSeed(randomNumberGeneratorSeed); - //Add the observer CommandIterationUpdate::Pointer observer = CommandIterationUpdate::New();