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{
102template <typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
103class ITK_TEMPLATE_EXPORT SobelOperator : public NeighborhoodOperator<TPixel, VDimension, TAllocator>
104{
105public:
109
111 using typename Superclass::SizeType;
112
113 itkOverrideGetNameOfClassMacro(SobelOperator);
114
119 void
121 {
122 this->CreateToRadius(1);
123 }
124
129 // virtual void CreateToRadius(const unsigned long);
130
133 void
134 UseLegacyCoefficients(const bool useLegacyCoefficients)
135 {
136 m_UseLegacyCoefficients = useLegacyCoefficients;
137 }
138
140 bool
142 {
144 }
145
146protected:
147 itkConceptMacro(SignedOutputPixelType, (Concept::Signed<typename NumericTraits<TPixel>::ValueType>));
148
150 using typename Superclass::CoefficientVector;
151
153 CoefficientVector
155
157 void
158 Fill(const CoefficientVector & coeff) override;
159
160private:
161#ifdef ITK_FUTURE_LEGACY_REMOVE
163#else
164 bool m_UseLegacyCoefficients{ true };
165#endif
166};
167} // namespace itk
168
169#ifndef ITK_MANUAL_INSTANTIATION
170# include "itkSobelOperator.hxx"
171#endif
172
173#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
void UseLegacyCoefficients(const bool useLegacyCoefficients)
CoefficientVector GenerateCoefficients() override
bool IsUsingLegacyCoefficients() const
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....