OTB  9.0.0
Orfeo Toolbox
otbTouziEdgeDetectorImageFilter.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 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 ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
120 
121 private:
122  TouziEdgeDetectorImageFilter(const Self&) = delete;
123  void operator=(const Self&) = delete;
124 
127 };
128 
129 } // end namespace otb
130 
131 #ifndef OTB_MANUAL_INSTANTIATION
133 #endif
134 
135 #endif
otbTouziEdgeDetectorImageFilter.hxx
otbImage.h
otbImageToModulusAndDirectionImageFilter.h
otb::TouziEdgeDetectorImageFilter::InputImageType
Superclass::InputImageType InputImageType
Definition: otbTouziEdgeDetectorImageFilter.h:79
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::TouziEdgeDetectorImageFilter::OutputImageDirectionType
Superclass::OutputImageDirectionType OutputImageDirectionType
Definition: otbTouziEdgeDetectorImageFilter.h:84
otb::TouziEdgeDetectorImageFilter::OutputPixelType
OutputImageType::PixelType OutputPixelType
Definition: otbTouziEdgeDetectorImageFilter.h:88
otb::TouziEdgeDetectorImageFilter::~TouziEdgeDetectorImageFilter
~TouziEdgeDetectorImageFilter() override
Definition: otbTouziEdgeDetectorImageFilter.h:104
otb::ImageToModulusAndDirectionImageFilter::OutputImageType
Superclass::OutputImageType OutputImageType
Definition: otbImageToModulusAndDirectionImageFilter.h:63
otb::TouziEdgeDetectorImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbTouziEdgeDetectorImageFilter.h:72
otb::TouziEdgeDetectorImageFilter::OutputPixelDirectionType
OutputImageDirectionType::PixelType OutputPixelDirectionType
Definition: otbTouziEdgeDetectorImageFilter.h:89
otb::TouziEdgeDetectorImageFilter::OutputImageType
Superclass::OutputImageType OutputImageType
Definition: otbTouziEdgeDetectorImageFilter.h:83
otb::TouziEdgeDetectorImageFilter::Self
TouziEdgeDetectorImageFilter Self
Definition: otbTouziEdgeDetectorImageFilter.h:70
otb::TouziEdgeDetectorImageFilter::Superclass
ImageToModulusAndDirectionImageFilter< TInputImage, TOutputImage, TOutputImageDirection > Superclass
Definition: otbTouziEdgeDetectorImageFilter.h:71
otb::TouziEdgeDetectorImageFilter::SizeType
InputImageType::SizeType SizeType
Definition: otbTouziEdgeDetectorImageFilter.h:86
otb::TouziEdgeDetectorImageFilter
Application of a filter of detection of contours.
Definition: otbTouziEdgeDetectorImageFilter.h:61
otb::ImageToModulusAndDirectionImageFilter
Base class for modulus and direction image filters.
Definition: otbImageToModulusAndDirectionImageFilter.h:42
otb::ImageToModulusAndDirectionImageFilter::OutputImageDirectionType
TOutputImageDirection OutputImageDirectionType
Definition: otbImageToModulusAndDirectionImageFilter.h:64
otb::TouziEdgeDetectorImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbTouziEdgeDetectorImageFilter.h:73
otb::TouziEdgeDetectorImageFilter::m_Radius
SizeType m_Radius
Definition: otbTouziEdgeDetectorImageFilter.h:126
otb::TouziEdgeDetectorImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbTouziEdgeDetectorImageFilter.h:87
otb::ImageToModulusAndDirectionImageFilter::InputImageType
Superclass::InputImageType InputImageType
Definition: otbImageToModulusAndDirectionImageFilter.h:60