Orfeo Toolbox  3.16
itkSobelOperator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkSobelOperator.h,v $
5  Language: C++
6  Date: $Date: 2010-02-26 05:28:25 $
7  Version: $Revision: 1.11 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 
18 #ifndef __itkSobelOperator_h
19 #define __itkSobelOperator_h
20 
21 #include "itkExceptionObject.h"
23 
24 namespace itk {
25 
85 template<class TPixel, unsigned int VDimension=2,
86  class TAllocator = NeighborhoodAllocator<TPixel> >
88  : public NeighborhoodOperator<TPixel, VDimension, TAllocator>
89 {
90 public:
94 
95  itkTypeMacro(SobelOperator, NeighborhoodOperator);
96 
98  SobelOperator(const Self& other)
99  : NeighborhoodOperator<TPixel, VDimension, TAllocator>(other)
100  {}
101 
107  virtual void CreateDirectional()
108  {
109  this->CreateToRadius(1);
110  }
111 
116  // virtual void CreateToRadius(const unsigned long);
120  Self &operator=(const Self& other)
121  {
122  Superclass::operator=(other);
123  return *this;
124  }
128  virtual void PrintSelf(std::ostream &os, Indent i) const
129  {
130  os << i << "SobelOperator { this=" << this << "}" << std::endl;
131  Superclass::PrintSelf(os, i.GetNextIndent());
132  }
133 
134 protected:
139  typedef typename Superclass::CoefficientVector CoefficientVector;
141 
145  CoefficientVector GenerateCoefficients();
146 
150  void Fill(const CoefficientVector &c);
151 
152 };
153 
154 } // namespace itk
155 
156 // Define instantiation macro for this template.
157 #define ITK_TEMPLATE_SobelOperator(_, EXPORT, x, y) namespace itk { \
158  _(2(class EXPORT SobelOperator< ITK_TEMPLATE_2 x >)) \
159  namespace Templates { typedef SobelOperator< ITK_TEMPLATE_2 x > \
160  SobelOperator##y; } \
161  }
162 
163 #if ITK_TEMPLATE_EXPLICIT
164 # include "Templates/itkSobelOperator+-.h"
165 #endif
166 
167 #if ITK_TEMPLATE_TXX
168 # include "itkSobelOperator.txx"
169 #endif
170 
171 #endif

Generated at Sun Feb 3 2013 00:07:46 for Orfeo Toolbox with doxygen 1.8.1.1