diff --git a/modules/img/base/src/value_util.hh b/modules/img/base/src/value_util.hh index b17e42cff6c9277e74cec1b73498d5fbeb7cd2a9..44247eda7d3779af0721d1a8e18c89a8e9c2135e 100644 --- a/modules/img/base/src/value_util.hh +++ b/modules/img/base/src/value_util.hh @@ -69,7 +69,16 @@ T Random() { return UniformRandom(); } - +typedef boost::variate_generator<boost::mt19937&, boost::uniform_int<> > UniformIntGenerator; + +inline +UniformIntGenerator GetUniformIntGenerator(int min, int max) +{ + boost::uniform_int<> dist(min,max); + return UniformIntGenerator(RandomGenerator, dist); +} + + // value to value conversion // declaration