OTB  10.0.0
Orfeo Toolbox
otbMorphologicalOpeningProfileFilter.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 otbMorphologicalOpeningProfileFilter_h
22 #define otbMorphologicalOpeningProfileFilter_h
23 
25 #include "itkOpeningByReconstructionImageFilter.h"
26 
27 namespace otb
28 {
51 template <class TInputImage, class TOutputImage, class TStructuringElement>
53  : public ImageToProfileFilter<TInputImage, TOutputImage, itk::OpeningByReconstructionImageFilter<TInputImage, TOutputImage, TStructuringElement>,
54  unsigned int>
55 {
56 public:
61  typedef itk::SmartPointer<Self> Pointer;
62  typedef itk::SmartPointer<const Self> ConstPointer;
63 
65  itkNewMacro(Self);
66 
69 
70  typedef TStructuringElement StructuringElementType;
72 
73 protected:
75  void SetProfileParameter(ParameterType param) override
76  {
78  se.SetRadius(param);
79  se.CreateStructuringElement();
80  this->GetFilter()->SetKernel(se);
81  }
83 
86 
88  ~MorphologicalOpeningProfileFilter() override = default;
89 
91  void PrintSelf(std::ostream& os, itk::Indent indent) const override
92  {
93  Superclass::PrintSelf(os, indent);
94  }
95 
96 private:
98  void operator=(const Self&) = delete;
99 };
100 } // End namespace otb
101 #endif
Base class for all the filters producing an otbImageList.
Base class to produce a profile of the response of a given filter for a range of parameter.
This filter compute the morphological opening profile.
void PrintSelf(std::ostream &os, itk::Indent indent) const override
~MorphologicalOpeningProfileFilter() override=default
void operator=(const Self &)=delete
MorphologicalOpeningProfileFilter(const Self &)=delete
ImageToProfileFilter< TInputImage, TOutputImage, itk::OpeningByReconstructionImageFilter< TInputImage, TOutputImage, TStructuringElement >, unsigned int > Superclass
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.