OTB  9.0.0
Orfeo Toolbox
otbOpeningClosingMorphologicalFilter.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 otbOpeningClosingMorphologicalFilter_h
22 #define otbOpeningClosingMorphologicalFilter_h
23 
24 #include "itkImageToImageFilter.h"
25 
26 namespace otb
27 {
46 template <class TInputImage, class TOutputImage, class TKernel>
47 class ITK_EXPORT OpeningClosingMorphologicalFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
48 {
49 public:
50 
53  typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
54  typedef itk::SmartPointer<Self> Pointer;
55  typedef itk::SmartPointer<const Self> ConstPointer;
56 
58  itkNewMacro(Self);
59 
61  itkTypeMacro(OpeningClosingMorphologicalFilter, ImageToImageFilter);
62 
64  typedef TInputImage InputImageType;
65  typedef TOutputImage OutputImageType;
66  typedef TKernel KernelType;
67 
69  typedef typename InputImageType::Pointer InputImagePointer;
70  typedef typename OutputImageType::RegionType OutputImageRegionType;
71  typedef typename TInputImage::PixelType PixelType;
72 
74  itkSetMacro(Kernel, KernelType);
75  itkGetConstReferenceMacro(Kernel, KernelType);
77 
78 protected:
81 
84  {
85  }
86 
87  /* void GenerateInputRequestedRegion(); */
88  /* void EnlargeOutputRequestedRegion(itk::DataObject *itkNotUsed(output)); */
89 
91  void GenerateData() override;
92 
94  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
95 
96 private:
97  OpeningClosingMorphologicalFilter(const Self&) = delete;
98  void operator=(const Self&) = delete;
101 };
102 } // End namespace otb
103 
104 #ifndef OTB_MANUAL_INSTANTIATION
106 #endif
107 #endif
otb::OpeningClosingMorphologicalFilter::~OpeningClosingMorphologicalFilter
~OpeningClosingMorphologicalFilter() override
Definition: otbOpeningClosingMorphologicalFilter.h:83
otb::OpeningClosingMorphologicalFilter::m_Kernel
KernelType m_Kernel
Definition: otbOpeningClosingMorphologicalFilter.h:100
otb::OpeningClosingMorphologicalFilter::Superclass
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
Definition: otbOpeningClosingMorphologicalFilter.h:53
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::OpeningClosingMorphologicalFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbOpeningClosingMorphologicalFilter.h:54
otb::OpeningClosingMorphologicalFilter::KernelType
TKernel KernelType
Definition: otbOpeningClosingMorphologicalFilter.h:66
otb::OpeningClosingMorphologicalFilter::InputImagePointer
InputImageType::Pointer InputImagePointer
Definition: otbOpeningClosingMorphologicalFilter.h:69
otb::OpeningClosingMorphologicalFilter::PixelType
TInputImage::PixelType PixelType
Definition: otbOpeningClosingMorphologicalFilter.h:71
otb::OpeningClosingMorphologicalFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbOpeningClosingMorphologicalFilter.h:70
otb::OpeningClosingMorphologicalFilter::Self
OpeningClosingMorphologicalFilter Self
Definition: otbOpeningClosingMorphologicalFilter.h:52
otb::OpeningClosingMorphologicalFilter
This filter implements an opening grayscale morphological operation followed by a closing grayscale m...
Definition: otbOpeningClosingMorphologicalFilter.h:47
otbOpeningClosingMorphologicalFilter.hxx
otb::OpeningClosingMorphologicalFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbOpeningClosingMorphologicalFilter.h:65
otb::OpeningClosingMorphologicalFilter::InputImageType
TInputImage InputImageType
Definition: otbOpeningClosingMorphologicalFilter.h:61
otb::OpeningClosingMorphologicalFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbOpeningClosingMorphologicalFilter.h:55