OTB  7.2.0
Orfeo Toolbox
otbLabelizeConfidenceConnectedImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2020 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 otbLabelizeConfidenceConnectedImageFilter_h
22 #define otbLabelizeConfidenceConnectedImageFilter_h
23 
24 #include "itkConfidenceConnectedImageFilter.h"
26 
27 namespace otb
28 {
29 
38 template <class TInputImage, class TOutputImage>
40  : public otb::LabelizeImageFilterBase<TInputImage, TOutputImage, itk::ConfidenceConnectedImageFilter<TInputImage, TOutputImage>>
41 {
42 public:
46  typedef itk::SmartPointer<Self> Pointer;
47  typedef itk::SmartPointer<const Self> ConstPointer;
48 
50  typedef TInputImage InputImageType;
51  typedef TOutputImage OutputImageType;
52 
53  typedef typename TInputImage::PixelType InputPixelType;
54  typedef typename TOutputImage::PixelType OutputPixelType;
56 
58  itkNewMacro(Self);
59 
62 
64  double& GetMultiplier() const
65  {
66  return this->m_RegionGrowingFilter->GetMultiplier();
67  }
68 
70  void SetMultiplier(const double multiplier)
71  {
72  this->m_RegionGrowingFilter->SetMultiplier(multiplier);
73  }
74 
76  unsigned int& GetNumberOfIterations() const
77  {
78  return this->m_RegionGrowingFilter->GetNumberOfIterations();
79  }
80 
82  void SetNumberOfIterations(const unsigned int iteration)
83  {
84  this->m_RegionGrowingFilter->SetNumberOfIterations(iteration);
85  }
86 
88  itkGetMacro(ReplaceValue, OutputPixelType);
89 
91  itkSetMacro(ReplaceValue, OutputPixelType);
92 
94  const unsigned int& GetInitialNeighborhoodRadius()
95  {
96  return this->m_RegionGrowingFilter->GetInitialNeighborhoodRadius();
97  }
98 
100  void SetInitialNeighborhoodRadius(const unsigned int initial)
101  {
102  this->m_RegionGrowingFilter->SetInitialNeighborhoodRadius(initial);
103  }
104 
105 protected:
108  {
109  }
110  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
111 
113  void RegionGrowing(const IndexType indexSeed) override;
114 
115 private:
116  LabelizeConfidenceConnectedImageFilter(const Self&) = delete;
117  void operator=(const Self&) = delete;
118 
120  OutputPixelType m_ReplaceValue;
121 
122 }; // end class LabelizeconnectedThresholdImageFilter
123 
124 } // end namespace otb
125 
126 #ifndef OTB_MANUAL_INSTANTIATION
128 #endif
129 
130 #endif
otb::LabelizeImageFilterBase< TInputImage, TOutputImage, itk::ConfidenceConnectedImageFilter< TInputImage, TOutputImage > > Superclass
itk::Index< Monteverdi_DIMENSION > IndexType
Definition: mvdTypes.h:133
Labels pixels with similar statistics using connectivity.
Base class for filter labelizing image region based on segmentation.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.