[Insight-users] Random number generation

Lydia Ng lng at insightful.com
Tue, 6 Apr 2004 09:48:55 -0700


Hi Dan,

There is base class in statistics =
itk::Statistics::RandomVariateGenerator
maybe the new class should derive from that for consistency.

Also, if it is useful, we could possibly change the MI code to just take =
a
pointer to a uniform number generator so user can use whatever they =
like.

- Lydia

> -----Original Message-----
> From: Blezek, Daniel J (Research) [mailto:blezek at crd.ge.com]
> Sent: Tuesday, April 06, 2004 6:20 AM
> To: insight-users at itk.org; vxl-maintainers at lists.sourceforge.net
> Subject: [Insight-users] Random number generation
>=20
> Hi all,
>=20
>   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:
>=20
> http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html
>=20
> 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).
>=20
> Comments?
> -dan
>=20
> --
> Daniel Blezek, Ph.D.
> blezek at crd.ge.com
> Visualization and Computer Vision Lab, Imaging Technologies
> GE Corporate Research & Development
>=20
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users