OTB  9.0.0
Orfeo Toolbox
otbPointSetToDensityImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 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 ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
101 
105  void GenerateOutputInformation() override;
106 
107 private:
108  PointSetToDensityImageFilter(const Self&) = delete;
109  void operator=(const Self&) = delete;
110 
111  unsigned int m_Radius;
112 };
113 }
114 #ifndef OTB_MANUAL_INSTANTIATION
116 #endif
117 
118 #endif
otb::PointSetToDensityImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbPointSetToDensityImageFilter.h:48
otb::PointSetToDensityImageFilter::PixelType
OutputImageType::PixelType PixelType
Definition: otbPointSetToDensityImageFilter.h:60
otb::PointSetToDensityImageFilter
Draw the density of a point set on an image.
Definition: otbPointSetToDensityImageFilter.h:40
otb::PointSetToDensityImageFilter::PointSetDensityFunctionType
TDensityFunction PointSetDensityFunctionType
Definition: otbPointSetToDensityImageFilter.h:65
otb::PointSetToDensityImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbPointSetToDensityImageFilter.h:47
otbPointSetDensityFunction.h
otb::PointSetToDensityImageFilter::m_Radius
unsigned int m_Radius
Definition: otbPointSetToDensityImageFilter.h:111
otb::PointSetToDensityImageFilter::~PointSetToDensityImageFilter
~PointSetToDensityImageFilter() override
Definition: otbPointSetToDensityImageFilter.h:83
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::PointSetToDensityImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbPointSetToDensityImageFilter.h:59
otb::PointSetToDensityImageFilter::InputType
PointSetDensityFunctionType::InputType InputType
Definition: otbPointSetToDensityImageFilter.h:66
otb::PointSetToDensityImageFilter::Superclass
itk::PointSetToImageFilter< TInputPointSet, TOutputImage > Superclass
Definition: otbPointSetToDensityImageFilter.h:46
otbPointSetToDensityImageFilter.hxx
otb::PointSetToDensityImageFilter::PointSetType
TInputPointSet PointSetType
Definition: otbPointSetToDensityImageFilter.h:54
otb::PointSetToDensityImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbPointSetToDensityImageFilter.h:62
otb::PointSetToDensityImageFilter::Self
PointSetToDensityImageFilter Self
Definition: otbPointSetToDensityImageFilter.h:45
otb::PointSetToDensityImageFilter::PointSetDensityFunctionPointerType
PointSetDensityFunctionType::Pointer PointSetDensityFunctionPointerType
Definition: otbPointSetToDensityImageFilter.h:67
otb::PointSetToDensityImageFilter::IndexType
OutputImageType::IndexType IndexType
Definition: otbPointSetToDensityImageFilter.h:61