OTB  9.0.0
Orfeo Toolbox
otbThresholdImageToPointSetFilter.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 otbThresholdImageToPointSetFilter_h
22 #define otbThresholdImageToPointSetFilter_h
23 
25 #include "itkPointSet.h"
26 #include "itkConceptChecking.h"
27 
28 namespace otb
29 {
30 
38 template <class TInputImage, class TOutputPointSet = itk::PointSet<typename TInputImage::PixelType, 2>>
39 class ITK_EXPORT ThresholdImageToPointSetFilter : public ImageToPointSetFilter<TInputImage, TOutputPointSet>
40 {
41 public:
42  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
43 
44  typedef TInputImage InputImageType;
45 
49  typedef itk::SmartPointer<Self> Pointer;
50  typedef itk::SmartPointer<const Self> ConstPointer;
51 
52  itkNewMacro(Self);
53 
55 
60  typedef typename Superclass::InputImageType::SizeType SizeType;
61  typedef typename Superclass::InputImageType::IndexType IndexType;
62 
64  typedef typename Superclass::OutputPointSetType::PixelType OutputPointSetPixelType;
67 
68 #ifdef ITK_USE_CONCEPT_CHECKING
69 
70  itkConceptMacro(PixelConvertibleToPointSetDataType, (itk::Concept::Convertible<InputPixelType, typename PointDataContainerType::Element>));
71 #endif
72 
73 
74  itkSetMacro(LowerThreshold, InputPixelType);
75  itkGetConstReferenceMacro(LowerThreshold, InputPixelType);
76  itkSetMacro(UpperThreshold, InputPixelType);
77  itkGetConstReferenceMacro(UpperThreshold, InputPixelType);
78 
79 protected:
82  {
83  }
84 
85  void ThreadedGenerateData(const InputImageRegionType& inputRegionForThread, itk::ThreadIdType threadId) override;
86 
87  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
88 
89 private:
90  ThresholdImageToPointSetFilter(const Self&) = delete;
91  void operator=(const Self&) = delete;
92 
95 };
96 } // end namespace otb
97 
98 #ifndef OTB_MANUAL_INSTANTIATION
100 #endif
101 
102 #endif
otb::ThresholdImageToPointSetFilter::IndexType
Superclass::InputImageType::IndexType IndexType
Definition: otbThresholdImageToPointSetFilter.h:61
otb::ImageToPointSetFilter::OutputPointSetType
Superclass::OutputPointSetType OutputPointSetType
Definition: otbImageToPointSetFilter.h:65
otb::ImageToPointSetFilter
Base class to output PointSet data with image data as input.
Definition: otbImageToPointSetFilter.h:44
otb::ImageToPointSetFilter::PointDataContainerType
Superclass::PointDataContainerType PointDataContainerType
Definition: otbImageToPointSetFilter.h:68
otb::ImageToPointSetFilter::InputImagePointer
InputImageType::Pointer InputImagePointer
Definition: otbImageToPointSetFilter.h:58
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ImageToPointSetFilter::OutputPointSetPointer
Superclass::OutputPointSetPointer OutputPointSetPointer
Definition: otbImageToPointSetFilter.h:66
otb::ThresholdImageToPointSetFilter::Self
ThresholdImageToPointSetFilter Self
Definition: otbThresholdImageToPointSetFilter.h:46
otb::ThresholdImageToPointSetFilter::InputImageRegionType
Superclass::InputImageRegionType InputImageRegionType
Definition: otbThresholdImageToPointSetFilter.h:58
otb::ThresholdImageToPointSetFilter::InputImageConstPointer
Superclass::InputImageConstPointer InputImageConstPointer
Definition: otbThresholdImageToPointSetFilter.h:59
otb::ThresholdImageToPointSetFilter::SizeType
Superclass::InputImageType::SizeType SizeType
Definition: otbThresholdImageToPointSetFilter.h:60
otb::ThresholdImageToPointSetFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbThresholdImageToPointSetFilter.h:50
otbThresholdImageToPointSetFilter.hxx
otb::ThresholdImageToPointSetFilter::m_UpperThreshold
InputPixelType m_UpperThreshold
Definition: otbThresholdImageToPointSetFilter.h:94
otb::ThresholdImageToPointSetFilter
Produce a PointSet according to filtering conditions.
Definition: otbThresholdImageToPointSetFilter.h:39
otb::ThresholdImageToPointSetFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbThresholdImageToPointSetFilter.h:49
otbImageToPointSetFilter.h
otb::ImageToPointSetFilter::InputImageConstPointer
InputImageType::ConstPointer InputImageConstPointer
Definition: otbImageToPointSetFilter.h:59
otb::ThresholdImageToPointSetFilter::InputImageType
TInputImage InputImageType
Definition: otbThresholdImageToPointSetFilter.h:44
otb::ThresholdImageToPointSetFilter::InputPixelType
Superclass::InputImagePixelType InputPixelType
Definition: otbThresholdImageToPointSetFilter.h:54
otb::ThresholdImageToPointSetFilter::InputImagePointer
Superclass::InputImagePointer InputImagePointer
Definition: otbThresholdImageToPointSetFilter.h:57
otb::ThresholdImageToPointSetFilter::Superclass
ImageToPointSetFilter< InputImageType, TOutputPointSet > Superclass
Definition: otbThresholdImageToPointSetFilter.h:47
otb::ThresholdImageToPointSetFilter::PointsContainerType
Superclass::PointsContainerType PointsContainerType
Definition: otbThresholdImageToPointSetFilter.h:65
otb::ImageToPointSetFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: otbImageToPointSetFilter.h:60
otb::ImageToPointSetFilter::InputImagePixelType
InputImageType::PixelType InputImagePixelType
Definition: otbImageToPointSetFilter.h:61
otb::ThresholdImageToPointSetFilter::OutputPointSetType
Superclass::OutputPointSetType OutputPointSetType
Definition: otbThresholdImageToPointSetFilter.h:48
otb::ThresholdImageToPointSetFilter::m_LowerThreshold
InputPixelType m_LowerThreshold
Definition: otbThresholdImageToPointSetFilter.h:93
otb::ThresholdImageToPointSetFilter::OutputPointSetPointer
Superclass::OutputPointSetPointer OutputPointSetPointer
Definition: otbThresholdImageToPointSetFilter.h:63
otb::ImageToPointSetFilter::PointsContainerType
Superclass::PointsContainerType PointsContainerType
Definition: otbImageToPointSetFilter.h:67
otb::ThresholdImageToPointSetFilter::~ThresholdImageToPointSetFilter
~ThresholdImageToPointSetFilter() override
Definition: otbThresholdImageToPointSetFilter.h:81
otb::ThresholdImageToPointSetFilter::PointDataContainerType
Superclass::PointDataContainerType PointDataContainerType
Definition: otbThresholdImageToPointSetFilter.h:66
otb::ThresholdImageToPointSetFilter::OutputPointSetPixelType
Superclass::OutputPointSetType::PixelType OutputPointSetPixelType
Definition: otbThresholdImageToPointSetFilter.h:64