ITK  5.2.0
Insight Toolkit
itkSobelOperator.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkSobelOperator_h
19 #define itkSobelOperator_h
20 
22 
23 namespace itk
24 {
97 template <typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
98 class ITK_TEMPLATE_EXPORT SobelOperator : public NeighborhoodOperator<TPixel, VDimension, TAllocator>
99 {
100 public:
101 
105 
106  itkTypeMacro(SobelOperator, NeighborhoodOperator);
107 
113  void
114  CreateDirectional() override
115  {
116  this->CreateToRadius(1);
117  }
118 
123  // virtual void CreateToRadius(const unsigned long);
124 
125 
129  void
130  PrintSelf(std::ostream & os, Indent i) const override
131  {
132  os << i << "SobelOperator { this=" << this << "}" << std::endl;
133  Superclass::PrintSelf(os, i.GetNextIndent());
134  }
136 
137 protected:
142  using CoefficientVector = typename Superclass::CoefficientVector;
144 
149  GenerateCoefficients() override;
150 
154  void
155  Fill(const CoefficientVector & coeff) override;
156 };
157 } // namespace itk
158 
159 #ifndef ITK_MANUAL_INSTANTIATION
160 # include "itkSobelOperator.hxx"
161 #endif
162 
163 #endif
itk::Indent::GetNextIndent
Indent GetNextIndent() const
itk::SobelOperator
A NeighborhoodOperator for performing a directional Sobel edge-detection operation at a pixel locatio...
Definition: itkSobelOperator.h:98
itk::SobelOperator::CreateDirectional
void CreateDirectional() override
Definition: itkSobelOperator.h:114
itk::NeighborhoodOperator
Virtual class that defines a common interface to all neighborhood operator subtypes.
Definition: itkNeighborhoodOperator.h:72
itkNeighborhoodOperator.h
itk::Neighborhood
A light-weight container object for storing an N-dimensional neighborhood of values.
Definition: itkNeighborhood.h:54
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::Neighborhood< MovedGradientPixelType, VDimension, NeighborhoodAllocator< MovedGradientPixelType > >::PixelType
MovedGradientPixelType PixelType
Definition: itkNeighborhood.h:70
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::SobelOperator::PrintSelf
void PrintSelf(std::ostream &os, Indent i) const override
Definition: itkSobelOperator.h:130
itk::NeighborhoodOperator< MovedGradientPixelType, VDimension, NeighborhoodAllocator< MovedGradientPixelType > >::CoefficientVector
std::vector< PixelRealType > CoefficientVector
Definition: itkNeighborhoodOperator.h:148