[Insight-users] Random number generation

Blezek, Daniel J (Research) blezek at crd.ge.com
Tue, 6 Apr 2004 13:47:17 -0400


Lydia,

  Excellent idea!  If Ian's proposed changes make it into vnl, a new
subclass could be created using the vnl implementation.

  To change the MI behavior, the RandomIterator class need to be changed,
and I don't believe the MI class exposes the RandomIterator.  I'll give it a
thought.

-dan

-----Original Message-----
From: Lydia Ng [mailto:lng at insightful.com]
Sent: Tuesday, April 06, 2004 12:49 PM
To: Blezek, Daniel J (Research); insight-users at itk.org;
vxl-maintainers at lists.sourceforge.net
Subject: RE: [Insight-users] Random number generation


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
> 
> 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
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users