MantisBT - ITK
View Issue Details
0010442ITKpublic2010-03-19 05:172010-11-18 21:09
Julien 
kentwilliams 
normalminoralways
closedfixed 
ITK-3-16 
ITK-4-A1 
2010-11-15
completed
0010442: itkRandomNonRepeatingIteratorWithIndex has non-reproductible behavior
Using ReinitializeSeed to control the seed of the random number generator, i can't have a reproducible behavior.

What I expect is that iterating on two images of the same size with the same initial seed means walking through the same set of pixels in the same order.

A program to reproduce the bug is attached.

And here is a fix :

in itkImageRandomNonRepeatingConstIteratorWithIndex.h, replace the implementation of RandomPermutation::ReinitializeSeed(int seed) from "m_Generator->Initialize ( seed );" to "m_Generator->SetSeed( seed );"

No tags attached.
cxx itkImageRandomNonRepeatingIteratorWithIndexRepeatibilityTest.cxx (2,330) 2010-03-19 05:17
https://public.kitware.com/Bug/file/2984/itkImageRandomNonRepeatingIteratorWithIndexRepeatibilityTest.cxx
Issue History
2010-03-19 05:17JulienNew Issue
2010-03-19 05:17JulienFile Added: itkImageRandomNonRepeatingIteratorWithIndexRepeatibilityTest.cxx
2010-11-07 08:59Hans JohnsonStatusnew => assigned
2010-11-07 08:59Hans JohnsonAssigned To => kentwilliams
2010-11-15 17:01kentwilliamsNote Added: 0023274
2010-11-15 17:02kentwilliamsResolution Date => 2010-11-15
2010-11-15 17:02kentwilliamsSprint Status => completed
2010-11-15 17:02kentwilliamsNote Added: 0023275
2010-11-15 17:02kentwilliamsStatusassigned => resolved
2010-11-15 17:02kentwilliamsFixed in Version => ITK-4-A1
2010-11-15 17:02kentwilliamsResolutionopen => fixed
2010-11-18 21:09Luis IbanezStatusresolved => closed
2010-11-18 21:09Luis IbanezNote Added: 0023401

Notes
(0023274)
kentwilliams   
2010-11-15 17:01   
Fix and test pushed as gerrit topic http://review.source.kitware.com/#change,362 [^]
(0023275)
kentwilliams   
2010-11-15 17:02   
waiting for topic approval to push to ITK4 master.
(0023401)
Luis Ibanez   
2010-11-18 21:09   
We have decided to skip the "resolved" status and move directly to "closed".