ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkSobelOperator.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 {
94 template< typename TPixel, unsigned int VDimension = 2,
95  typename TAllocator = NeighborhoodAllocator< TPixel > >
96 class ITK_TEMPLATE_EXPORT SobelOperator:
97  public NeighborhoodOperator< TPixel, VDimension, TAllocator >
98 {
99 public:
100 
104 
105  itkTypeMacro(SobelOperator, NeighborhoodOperator);
106 
108  SobelOperator(const Self & other):
109  NeighborhoodOperator< TPixel, VDimension, TAllocator >(other)
110  {}
111 
117  virtual void CreateDirectional() ITK_OVERRIDE
118  {
119  this->CreateToRadius(1);
120  }
121 
126  // virtual void CreateToRadius(const unsigned long);
127 
131  Self & operator=(const Self & other)
132  {
133  Superclass::operator=(other);
134  return *this;
135  }
137 
141  virtual void PrintSelf(std::ostream & os, Indent i) const ITK_OVERRIDE
142  {
143  os << i << "SobelOperator { this=" << this << "}" << std::endl;
144  Superclass::PrintSelf( os, i.GetNextIndent() );
145  }
147 
148 protected:
153  typedef typename Superclass::CoefficientVector CoefficientVector;
155 
159  CoefficientVector GenerateCoefficients() ITK_OVERRIDE;
160 
164  void Fill(const CoefficientVector & c) ITK_OVERRIDE;
165 };
166 } // namespace itk
167 
168 #ifndef ITK_MANUAL_INSTANTIATION
169 #include "itkSobelOperator.hxx"
170 #endif
171 
172 #endif
Superclass::PixelType PixelType
A light-weight container object for storing an N-dimensional neighborhood of values.
SobelOperator(const Self &other)
Virtual class that defines a common interface to all neighborhood operator subtypes.
A NeighborhoodOperator for performing a directional Sobel edge-detection operation at a pixel locatio...
NeighborhoodOperator< TPixel, VDimension, TAllocator > Superclass
Superclass::CoefficientVector CoefficientVector
Self & operator=(const Self &other)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual void PrintSelf(std::ostream &os, Indent i) const override
virtual void CreateDirectional() override