OTB  6.7.0
Orfeo Toolbox
otbPointSetDensityEpanechnikovFunction.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbPointSetDensityEpanechnikovFunction_h
22 #define otbPointSetDensityEpanechnikovFunction_h
23 
24 #include "otbPointSetFunction.h"
25 #include "itkPoint.h"
26 
27 namespace otb
28 {
29 
39 template <class TPointSet, class TOutput>
40 class ITK_EXPORT PointSetDensityEpanechnikovFunction : public PointSetFunction<TPointSet, TOutput>
41 {
42 public:
43 
49 
52 
54  itkNewMacro(Self);
55 
57  typedef TPointSet PointSetType;
58  typedef typename Superclass::InputType InputType;
59  typedef typename PointSetType::Pointer PointSetPointerType;
60 
62  typedef TOutput OutputType;
63 
65  itkSetMacro(Radius, unsigned int);
66  itkGetMacro(Radius, unsigned int);
68 
70  OutputType Evaluate(const InputType& input) const override;
71 
72 protected:
75 
76  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
77 
78 private:
79  PointSetDensityEpanechnikovFunction(const Self &) = delete;
80  void operator =(const Self&) = delete;
81 
82  unsigned int m_Radius;
83 };
84 
85 } // end namespace otb
86 
87 #ifndef OTB_MANUAL_INSTANTIATION
89 #endif
90 
91 #endif
Calculate the density in the neighborhood of a pixel using an Epanechnikov function.
Calculate the density in the neighborhood of a pixel.