21 #ifndef otbRadiometricMomentsImageFunction_hxx
22 #define otbRadiometricMomentsImageFunction_hxx
26 #include "itkVariableLengthVector.h"
35 template <
class TInputImage,
class TCoordRep>
38 m_NeighborhoodRadius = 1;
41 template <
class TInputImage,
class TCoordRep>
44 this->Superclass::PrintSelf(os, indent);
45 os << indent <<
" Neighborhood radius value : " << m_NeighborhoodRadius << std::endl;
48 template <
class TInputImage,
class TCoordRep>
56 moments.Fill(itk::NumericTraits<ScalarRealType>::Zero);
59 if (!this->GetInputImage())
67 if (!this->IsInsideBuffer(index))
73 typename InputImageType::SizeType kernelSize;
74 kernelSize.Fill(m_NeighborhoodRadius);
76 itk::ConstNeighborhoodIterator<InputImageType> it(kernelSize, this->GetInputImage(), this->GetInputImage()->GetBufferedRegion());
79 it.SetLocation(index);
81 itk::VariableLengthVector<ScalarRealType> tmp(m_Functor(it));
83 for (
unsigned int i = 0; i < 4; i++)