OTB  6.7.0
Orfeo Toolbox
otbGeodesicMorphologyIterativeDecompositionImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 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 otbGeodesicMorphologyIterativeDecompositionImageFilter_h
22 #define otbGeodesicMorphologyIterativeDecompositionImageFilter_h
23 
26 
27 namespace otb
28 {
68 template <class TImage, class TStructuringElement>
70  : public ImageToImageListFilter<TImage, TImage>
71 {
72 public:
78 
80  itkNewMacro(Self);
81 
84 
86  itkStaticConstMacro(InputImageDimension, unsigned int, TImage::ImageDimension);
87 
89  typedef typename Superclass::OutputImageType OutputImageType;
90  typedef typename Superclass::OutputImageListType OutputImageListType;
91  typedef typename OutputImageListType::Pointer OutputImageListPointerType;
92  typedef typename Superclass::OutputImagePointerType OutputImagePointerType;
93 
95  typedef typename Superclass::InputImageType InputImageType;
96  typedef typename Superclass::InputImageRegionType InputImageRegionType;
97  typedef typename InputImageType::Pointer InputImagePointerType;
98  typedef typename InputImageType::ConstPointer InputImageConstPointerType;
100  typedef typename InputImageType::ValueType ValueType;
101  typedef typename InputImageType::PixelType PixelType;
103 
104  typedef TStructuringElement StructuringElementType;
105 
109  typedef typename DecompositionFilterType::Pointer
111 
113  itkSetMacro(Step, unsigned int);
114  itkGetMacro(Step, unsigned int);
115  itkSetMacro(InitialValue, unsigned int);
116  itkGetMacro(InitialValue, unsigned int);
117  itkSetMacro(NumberOfIterations, unsigned int);
118  itkGetMacro(NumberOfIterations, unsigned int);
120 
125  OutputImageListType* GetOutput(void) override;
126 
131  OutputImageListType * GetConvexOutput(void);
132 
137  OutputImageListType * GetConcaveOutput(void);
138 
139 protected:
142 
145 
147  void GenerateOutputInformation() override;
148 
150  void GenerateInputRequestedRegion() override;
151 
153  void GenerateData() override;
154 
156  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
157 
158 private:
160  unsigned int m_Step;
161 
163  unsigned int m_InitialValue;
164 
166  unsigned int m_NumberOfIterations;
167 
170 
171 };
172 } // End namespace otb
173 
174 #ifndef OTB_MANUAL_INSTANTIATION
176 #endif
177 
178 #endif
itk::Size< Monteverdi_DIMENSION > SizeType
Definition: mvdTypes.h:137
GeodesicMorphologyDecompositionImageFilter< InputImageType, InputImageType, StructuringElementType > DecompositionFilterType
This class implements a geodesic morphology based image analysis algorithm.
Base class for all the filters taking an image input to produce an image list.
VectorImageType::SpacingType SpacingType
Definition: mvdTypes.h:181