ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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 * https://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
23namespace itk
24{
94template <typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
95class ITK_TEMPLATE_EXPORT SobelOperator : public NeighborhoodOperator<TPixel, VDimension, TAllocator>
96{
97public:
101
102 itkOverrideGetNameOfClassMacro(SobelOperator);
103
104 static_assert(
105 VDimension == 2 || VDimension == 3,
106 "The ND version of the Sobel operator has not been implemented. Currently only 2D and 3D versions are available.");
107
112 void
114 {
115 this->CreateToRadius(1);
116 }
117
122 // virtual void CreateToRadius(const unsigned long);
123
124protected:
125 itkConceptMacro(SignedOutputPixelType, (Concept::Signed<typename NumericTraits<TPixel>::ValueType>));
126
128 using typename Superclass::CoefficientVector;
129
131 CoefficientVector
133
135 void
136 Fill(const CoefficientVector & coeff) override;
137};
138} // namespace itk
139
140#ifndef ITK_MANUAL_INSTANTIATION
141# include "itkSobelOperator.hxx"
142#endif
143
144#endif
Virtual class that defines a common interface to all neighborhood operator subtypes.
virtual void CreateToRadius(const SizeType &)
A NeighborhoodOperator for performing a directional Sobel edge-detection operation at a pixel locatio...
void CreateDirectional() override
CoefficientVector GenerateCoefficients() override
typename std::vector< PixelRealType > CoefficientVector
NeighborhoodOperator< TPixel, VDimension, TAllocator > Superclass
void Fill(const CoefficientVector &coeff) override
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....