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: 2007/02/01 14:39:33 $
00007   Version:   $Revision: 1.9 $
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 
00084 template<class TPixel, unsigned int VDimension=2,
00085   class TAllocator = NeighborhoodAllocator<TPixel> >
00086 class ITK_EXPORT SobelOperator
00087   : public NeighborhoodOperator<TPixel, VDimension, TAllocator>
00088 {
00089 public:
00090 
00092   typedef SobelOperator Self;
00093   typedef NeighborhoodOperator<TPixel, VDimension, TAllocator>  Superclass;
00094 
00095   itkTypeMacro(SobelOperator, NeighborhoodOperator);
00096   
00097   SobelOperator() {}
00098   SobelOperator(const Self& other)
00099     : NeighborhoodOperator<TPixel, VDimension, TAllocator>(other) 
00100   {  }
00101 
00107   virtual void CreateDirectional()
00108   {
00109     this->CreateToRadius(1);
00110   }
00111 
00116   // virtual void CreateToRadius(const unsigned long);
00117 
00121   Self &operator=(const Self& other)
00122   {
00123     Superclass::operator=(other);
00124     return *this;
00125   }
00126 
00130   virtual void PrintSelf(std::ostream &os, Indent i) const  
00131   { 
00132     os << i << "SobelOperator { this=" << this  << "}" << std::endl;
00133     Superclass::PrintSelf(os, i.GetNextIndent());
00134   }
00136 
00137 protected:
00142   typedef typename Superclass::CoefficientVector CoefficientVector;
00143   typedef typename Superclass::PixelType PixelType;
00144 
00148   CoefficientVector GenerateCoefficients();
00149 
00153   void Fill(const CoefficientVector &c);
00154 
00155 };
00156 
00157 } // namespace itk
00158 
00159 // Define instantiation macro for this template.
00160 #define ITK_TEMPLATE_SobelOperator(_, EXPORT, x, y) namespace itk { \
00161   _(2(class EXPORT SobelOperator< ITK_TEMPLATE_2 x >)) \
00162   namespace Templates { typedef SobelOperator< ITK_TEMPLATE_2 x > \
00163                                                   SobelOperator##y; } \
00164   }
00165 
00166 #if ITK_TEMPLATE_EXPLICIT
00167 # include "Templates/itkSobelOperator+-.h"
00168 #endif
00169 
00170 #if ITK_TEMPLATE_TXX
00171 # include "itkSobelOperator.txx"
00172 #endif
00173 
00174 #endif
00175 
00176 
00177 

Generated at Thu Nov 6 00:15:04 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000