OTB  9.0.0
Orfeo Toolbox
otbLabelizeConfidenceConnectedImageFilter.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 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;
55  typedef typename TInputImage::IndexType IndexType;
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 
121 
122 }; // end class LabelizeconnectedThresholdImageFilter
123 
124 } // end namespace otb
125 
126 #ifndef OTB_MANUAL_INSTANTIATION
128 #endif
129 
130 #endif
otb::LabelizeConfidenceConnectedImageFilter::InputPixelType
TInputImage::PixelType InputPixelType
Definition: otbLabelizeConfidenceConnectedImageFilter.h:53
otb::LabelizeConfidenceConnectedImageFilter::~LabelizeConfidenceConnectedImageFilter
~LabelizeConfidenceConnectedImageFilter() override
Definition: otbLabelizeConfidenceConnectedImageFilter.h:107
otb::LabelizeConfidenceConnectedImageFilter::GetNumberOfIterations
unsigned int & GetNumberOfIterations() const
Definition: otbLabelizeConfidenceConnectedImageFilter.h:76
otb::LabelizeConfidenceConnectedImageFilter::IndexType
TInputImage::IndexType IndexType
Definition: otbLabelizeConfidenceConnectedImageFilter.h:55
otb::LabelizeConfidenceConnectedImageFilter
Labels pixels with similar statistics using connectivity.
Definition: otbLabelizeConfidenceConnectedImageFilter.h:39
otb::LabelizeConfidenceConnectedImageFilter::SetMultiplier
void SetMultiplier(const double multiplier)
Definition: otbLabelizeConfidenceConnectedImageFilter.h:70
otb::LabelizeConfidenceConnectedImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbLabelizeConfidenceConnectedImageFilter.h:46
otb::LabelizeConfidenceConnectedImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbLabelizeConfidenceConnectedImageFilter.h:51
otb::LabelizeConfidenceConnectedImageFilter::Self
LabelizeConfidenceConnectedImageFilter Self
Definition: otbLabelizeConfidenceConnectedImageFilter.h:44
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::LabelizeConfidenceConnectedImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbLabelizeConfidenceConnectedImageFilter.h:47
otbLabelizeImageFilterBase.h
otb::LabelizeConfidenceConnectedImageFilter::SetNumberOfIterations
void SetNumberOfIterations(const unsigned int iteration)
Definition: otbLabelizeConfidenceConnectedImageFilter.h:82
otb::LabelizeConfidenceConnectedImageFilter::InputImageType
TInputImage InputImageType
Definition: otbLabelizeConfidenceConnectedImageFilter.h:50
otb::LabelizeConfidenceConnectedImageFilter::SetInitialNeighborhoodRadius
void SetInitialNeighborhoodRadius(const unsigned int initial)
Definition: otbLabelizeConfidenceConnectedImageFilter.h:100
otb::LabelizeConfidenceConnectedImageFilter::GetInitialNeighborhoodRadius
const unsigned int & GetInitialNeighborhoodRadius()
Definition: otbLabelizeConfidenceConnectedImageFilter.h:94
otb::LabelizeConfidenceConnectedImageFilter::Superclass
otb::LabelizeImageFilterBase< TInputImage, TOutputImage, itk::ConfidenceConnectedImageFilter< TInputImage, TOutputImage > > Superclass
Definition: otbLabelizeConfidenceConnectedImageFilter.h:45
otb::LabelizeImageFilterBase
Base class for filter labelizing image region based on segmentation.
Definition: otbLabelizeImageFilterBase.h:39
otb::LabelizeConfidenceConnectedImageFilter::OutputPixelType
TOutputImage::PixelType OutputPixelType
Definition: otbLabelizeConfidenceConnectedImageFilter.h:54
otbLabelizeConfidenceConnectedImageFilter.hxx
otb::LabelizeConfidenceConnectedImageFilter::GetMultiplier
double & GetMultiplier() const
Definition: otbLabelizeConfidenceConnectedImageFilter.h:64
otb::LabelizeConfidenceConnectedImageFilter::m_ReplaceValue
OutputPixelType m_ReplaceValue
Definition: otbLabelizeConfidenceConnectedImageFilter.h:120