Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkSobelOperator_h
00019 #define __itkSobelOperator_h
00020
00021 #include "itkExceptionObject.h"
00022 #include "itkNeighborhoodOperator.h"
00023
00024 namespace itk {
00025
00085 template<class TPixel, unsigned int VDimension=2,
00086 class TAllocator = NeighborhoodAllocator<TPixel> >
00087 class ITK_EXPORT SobelOperator
00088 : public NeighborhoodOperator<TPixel, VDimension, TAllocator>
00089 {
00090 public:
00091
00093 typedef SobelOperator Self;
00094 typedef NeighborhoodOperator<TPixel, VDimension, TAllocator> Superclass;
00095
00096 itkTypeMacro(SobelOperator, NeighborhoodOperator);
00097
00098 SobelOperator() {}
00099 SobelOperator(const Self& other)
00100 : NeighborhoodOperator<TPixel, VDimension, TAllocator>(other)
00101 {}
00102
00108 virtual void CreateDirectional()
00109 {
00110 this->CreateToRadius(1);
00111 }
00112
00117
00118
00122 Self &operator=(const Self& other)
00123 {
00124 Superclass::operator=(other);
00125 return *this;
00126 }
00127
00131 virtual void PrintSelf(std::ostream &os, Indent i) const
00132 {
00133 os << i << "SobelOperator { this=" << this << "}" << std::endl;
00134 Superclass::PrintSelf(os, i.GetNextIndent());
00135 }
00137
00138 protected:
00143 typedef typename Superclass::CoefficientVector CoefficientVector;
00144 typedef typename Superclass::PixelType PixelType;
00145
00149 CoefficientVector GenerateCoefficients();
00150
00154 void Fill(const CoefficientVector &c);
00155
00156 };
00157
00158 }
00159
00160
00161 #define ITK_TEMPLATE_SobelOperator(_, EXPORT, x, y) namespace itk { \
00162 _(2(class EXPORT SobelOperator< ITK_TEMPLATE_2 x >)) \
00163 namespace Templates { typedef SobelOperator< ITK_TEMPLATE_2 x > \
00164 SobelOperator##y; } \
00165 }
00166
00167 #if ITK_TEMPLATE_EXPLICIT
00168 # include "Templates/itkSobelOperator+-.h"
00169 #endif
00170
00171 #if ITK_TEMPLATE_TXX
00172 # include "itkSobelOperator.txx"
00173 #endif
00174
00175 #endif
00176