OTB  9.0.0
Orfeo Toolbox
otbMorphologicalOpeningProfileFilter.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 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:
97  MorphologicalOpeningProfileFilter(const Self&) = delete;
98  void operator=(const Self&) = delete;
99 };
100 } // End namespace otb
101 #endif
otb::MorphologicalOpeningProfileFilter::StructuringElementType
TStructuringElement StructuringElementType
Definition: otbMorphologicalOpeningProfileFilter.h:68
otb::MorphologicalOpeningProfileFilter::ParameterType
Superclass::ParameterType ParameterType
Definition: otbMorphologicalOpeningProfileFilter.h:71
otb::MorphologicalOpeningProfileFilter::MorphologicalOpeningProfileFilter
MorphologicalOpeningProfileFilter()
Definition: otbMorphologicalOpeningProfileFilter.h:85
otb::ImageListSource
Base class for all the filters producing an otbImageList.
Definition: otbImageListSource.h:40
otb::MorphologicalOpeningProfileFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbMorphologicalOpeningProfileFilter.h:61
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otbImageToProfileFilter.h
otb::MorphologicalOpeningProfileFilter
This filter compute the morphological opening profile.
Definition: otbMorphologicalOpeningProfileFilter.h:52
otb::ImageToProfileFilter
Base class to produce a profile of the response of a given filter for a range of parameter.
Definition: otbImageToProfileFilter.h:47
otb::MorphologicalOpeningProfileFilter::Self
MorphologicalOpeningProfileFilter Self
Definition: otbMorphologicalOpeningProfileFilter.h:58
otb::MorphologicalOpeningProfileFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbMorphologicalOpeningProfileFilter.h:62
otb::MorphologicalOpeningProfileFilter::SetProfileParameter
void SetProfileParameter(ParameterType param) override
Definition: otbMorphologicalOpeningProfileFilter.h:75
otb::MorphologicalOpeningProfileFilter::PrintSelf
void PrintSelf(std::ostream &os, itk::Indent indent) const override
Definition: otbMorphologicalOpeningProfileFilter.h:91
otb::Wrapper::ParameterType
ParameterType
Definition: otbWrapperTypes.h:37
otb::MorphologicalOpeningProfileFilter::Superclass
ImageToProfileFilter< TInputImage, TOutputImage, itk::OpeningByReconstructionImageFilter< TInputImage, TOutputImage, TStructuringElement >, unsigned int > Superclass
Definition: otbMorphologicalOpeningProfileFilter.h:60