OTB  10.0.0
Orfeo Toolbox
otbTouziEdgeDetectorImageFilter.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 otbTouziEdgeDetectorImageFilter_h
22 #define otbTouziEdgeDetectorImageFilter_h
23 
25 #include "otbImage.h"
26 #include "itkNumericTraits.h"
27 
28 namespace otb
29 {
30 
60 template <class TInputImage, class TOutputImage, class TOutputImageDirection = TOutputImage>
61 class ITK_EXPORT TouziEdgeDetectorImageFilter : public ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection>
62 {
63 public:
65  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
66  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
68 
72  typedef itk::SmartPointer<Self> Pointer;
73  typedef itk::SmartPointer<const Self> ConstPointer;
74 
76  itkNewMacro(Self);
77 
80 
85 
86  typedef typename InputImageType::SizeType SizeType;
87  typedef typename OutputImageType::RegionType OutputImageRegionType;
88  typedef typename OutputImageType::PixelType OutputPixelType;
89  typedef typename OutputImageDirectionType::PixelType OutputPixelDirectionType;
90 
92  itkSetMacro(Radius, SizeType);
93  itkGetConstReferenceMacro(Radius, SizeType);
95 
100  void GenerateInputRequestedRegion() override;
101 
102 protected:
105  {
106  }
107  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
108 
109  void BeforeThreadedGenerateData() override;
110 
119  void DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread) override;
120 
121 private:
123  void operator=(const Self&) = delete;
124 
127 };
128 
129 } // end namespace otb
130 
131 #ifndef OTB_MANUAL_INSTANTIATION
133 #endif
134 
135 #endif
Base class for modulus and direction image filters.
Application of a filter of detection of contours.
itk::SmartPointer< const Self > ConstPointer
void operator=(const Self &)=delete
ImageToModulusAndDirectionImageFilter< TInputImage, TOutputImage, TOutputImageDirection > Superclass
TouziEdgeDetectorImageFilter(const Self &)=delete
OutputImageDirectionType::PixelType OutputPixelDirectionType
Superclass::OutputImageDirectionType OutputImageDirectionType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.