Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkSobelOperator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSobelOperator.h,v $
00005   Language:  C++
00006   Date:      $Date: 2010-02-26 05:28:25 $
00007   Version:   $Revision: 1.11 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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   // virtual void CreateToRadius(const unsigned long);
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 } // namespace itk
00159 
00160 // Define instantiation macro for this template.
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 

Generated at Mon Jul 12 2010 19:55:25 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000