21 #ifndef otbPointSetDensityGaussianFunction_hxx
22 #define otbPointSetDensityGaussianFunction_hxx
32 template <
class TPo
intSet,
class TOutput>
37 double radiussq = m_Radius * m_Radius;
39 if (this->GetPointSet()->GetNumberOfPoints() != 0)
41 typedef typename TPointSet::PointsContainer::ConstIterator iteratorType;
42 iteratorType it = this->GetPointSet()->GetPoints()->Begin();
44 while (it != this->GetPointSet()->GetPoints()->End())
46 float distX = input[0] - it.Value()[0];
47 float distY = input[1] - it.Value()[1];
48 float distsq = distX * distX + distY * distY;
50 accu += std::exp(-distsq / radiussq / 2);
54 accu /= std::sqrt(2 *
CONST_PI * radiussq);
63 template <
class TPo
intSet,
class TOutput>
66 this->Superclass::PrintSelf(os, indent);