[Insight-users] Random number generation

Blezek, Daniel J (Research) blezek at crd.ge.com
Tue, 6 Apr 2004 09:19:33 -0400


Hi all,

  I've been using the MI registration algorithm (in ITK) on Windows and
Linux.  Unfortunately, even seeding the random number generator, I get
different answers in the registration on the two platforms.  Jim Miller and
I tracked this down to vnl_sample, which uses drand48() if available, a
built-in RNG otherwise.  I would propose that we replace vnl_sample with a
consistent implementation so that cross platform code produces the same
results.  Perhaps a class called itkRandomNumberGenerator?  I'm not partial
to any implementation, but I did find this link:

http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html

The code is BSD licensed, so it shouldn't be any problem to incorporate into
ITK/vxl; the original implementation is completely free of any licensing
restrictions (and we could use that).

Comments?
-dan

--
Daniel Blezek, Ph.D.
blezek at crd.ge.com
Visualization and Computer Vision Lab, Imaging Technologies
GE Corporate Research & Development