OTB  10.0.0
Orfeo Toolbox
otbKeyPointDensityImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 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 otbKeyPointDensityImageFilter_h
22 #define otbKeyPointDensityImageFilter_h
23 
24 #include "itkImageToImageFilter.h"
26 #include "itkNumericTraits.h"
27 
28 namespace otb
29 {
30 
48 template <class TInputImage, class TOutputImage, class TDetector>
49 class ITK_EXPORT KeyPointDensityImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
50 {
51 
52 public:
55  typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
56  typedef itk::SmartPointer<Self> Pointer;
57  typedef itk::SmartPointer<const Self> ConstPointer;
58 
60  itkNewMacro(Self);
61 
63  itkTypeMacro(KeyPointDensityImageFilter, itk::ImageToImageFilter);
64 
66  typedef TInputImage InputImageType;
67  typedef typename InputImageType::Pointer InputImagePointerType;
68 
70  typedef TOutputImage OutputImageType;
71  typedef typename OutputImageType::Pointer OutputImagePointerType;
72 
74  typedef TDetector DetectorType;
75  typedef typename DetectorType::OutputPointSetType PointSetType;
76  typedef typename DetectorType::Pointer DetectorPointerType;
77 
81 
84  itkSetMacro(NeighborhoodRadius, unsigned int);
85  itkGetConstReferenceMacro(NeighborhoodRadius, unsigned int);
87 
89  virtual void SetDetector(DetectorType* detector);
92 
93 protected:
98 
103 
107  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
108 
112  // virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId );
113  void GenerateData() override;
115 
116 private:
118  void operator=(const Self&) = delete;
119 
122  unsigned int m_NeighborhoodRadius;
123 };
124 }
125 #ifndef OTB_MANUAL_INSTANTIATION
127 #endif
128 
129 #endif
This class computes the density of the characteristic points detected in the image.
PointSetToDensityImagePointerType m_PointSetToDensityImageFilter
void operator=(const Self &)=delete
void PrintSelf(std::ostream &os, itk::Indent indent) const override
DetectorType::OutputPointSetType PointSetType
itk::SmartPointer< const Self > ConstPointer
virtual DetectorType * GetDetector()
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
virtual void SetDetector(DetectorType *detector)
KeyPointDensityImageFilter(const Self &)=delete
PointSetToDensityImageType::Pointer PointSetToDensityImagePointerType
otb::PointSetToDensityImageFilter< PointSetType, OutputImageType > PointSetToDensityImageType
Draw the density of a point set on an image.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.