OTB  10.0.0
Orfeo Toolbox
otbPointSetToDensityImageFilter.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 otbPointSetToDensityImageFilter_h
22 #define otbPointSetToDensityImageFilter_h
23 
24 #include "itkProcessObject.h"
25 #include "itkPointSet.h"
26 #include "itkPointSetToImageFilter.h"
28 #include "itkPoint.h"
29 
30 namespace otb
31 {
32 
39 template <class TInputPointSet, class TOutputImage, class TDensityFunction = PointSetDensityFunction<TInputPointSet, typename TOutputImage::PixelType>>
40 class ITK_EXPORT PointSetToDensityImageFilter : public itk::PointSetToImageFilter<TInputPointSet, TOutputImage>
41 {
42 
43 public:
46  typedef itk::PointSetToImageFilter<TInputPointSet, TOutputImage> Superclass;
47  typedef itk::SmartPointer<Self> Pointer;
48  typedef itk::SmartPointer<const Self> ConstPointer;
49 
51  itkNewMacro(Self);
52 
54  itkTypeMacro(PointSetToDensityImageFilter, itk::PointSetToImageFilter);
55 
57  typedef TInputPointSet PointSetType;
58 
59  typedef TOutputImage OutputImageType;
60  typedef typename OutputImageType::PixelType PixelType;
61  typedef typename OutputImageType::IndexType IndexType;
62  typedef typename OutputImageType::RegionType OutputImageRegionType;
63 
65  typedef TDensityFunction PointSetDensityFunctionType;
66  typedef typename PointSetDensityFunctionType::InputType InputType;
67  typedef typename PointSetDensityFunctionType::Pointer PointSetDensityFunctionPointerType;
68 
70  itkGetMacro(Radius, unsigned int);
71  itkSetMacro(Radius, unsigned int);
73 
74 protected:
79 
84  {
85  }
86 
90  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
91 
95  void GenerateData() override;
96 
100  void DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread) override;
101 
105  void GenerateOutputInformation() override;
106 
107 private:
109  void operator=(const Self&) = delete;
110 
111  unsigned int m_Radius;
112 };
113 }
114 #ifndef OTB_MANUAL_INSTANTIATION
116 #endif
117 
118 #endif
Draw the density of a point set on an image.
void operator=(const Self &)=delete
PointSetDensityFunctionType::InputType InputType
PointSetDensityFunctionType::Pointer PointSetDensityFunctionPointerType
itk::SmartPointer< const Self > ConstPointer
itk::PointSetToImageFilter< TInputPointSet, TOutputImage > Superclass
PointSetToDensityImageFilter(const Self &)=delete
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.