22 #ifndef otbRandomPointSetSource_hxx
23 #define otbRandomPointSetSource_hxx
30 template <
class TOutputPo
intSet>
34 m_Generator = GeneratorType::New();
35 m_Generator->Initialize();
43 template <
class TOutputPo
intSet>
47 outputPointSet->Initialize();
50 outPoints->Reserve(m_NumberOfPoints);
52 typename PointsContainerType::Iterator outputPoint = outPoints->Begin();
53 while (outputPoint != outPoints->End())
56 for (
unsigned int i = 0; i < OutputPointSetType::PointDimension; ++i)
58 double v = m_Generator->GetVariateWithClosedRange(1.0);
59 point[i] = (1.0 - v) * m_MinPoint[i] + v * m_MaxPoint[i];
61 outputPoint.Value() = point;