18 #ifndef __otbLikelihoodPathListFilter_txx
19 #define __otbLikelihoodPathListFilter_txx
31 template <
class TPath,
class TImage>
36 this->SetNumberOfRequiredInputs(2);
37 this->SetNumberOfInputs(2);
39 template <
class TPath,
class TImage>
46 template <
class TPath,
class TImage>
52 if (this->GetNumberOfInputs() < 1)
59 template <
class TPath,
class TImage>
74 ImageIteratorType imageIt(inputImagePtr, path);
75 double cumulatedValues = 0.0;
76 double nbPoints = 0.0;
77 for (imageIt.GoToBegin(); !imageIt.IsAtEnd(); ++imageIt, ++nbPoints)
79 cumulatedValues +=
static_cast<double>(imageIt.Get());
82 itk::EncapsulateMetaData<double>(dict, m_Key, cumulatedValues / nbPoints);
89 template <
class TPath,
class TImage>
94 Superclass::PrintSelf(os, indent);