KWStyle - itkGaussianKernelFunction.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkGaussianKernelFunction.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:36 $
7   Version:   $Revision: 1.4 $
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 DEF #ifndef _itkGaussianKernelFunction_h
18 DEF #define _itkGaussianKernelFunction_h
19
20 #include "itkKernelFunction.h"
21 #include "vnl/vnl_math.h"
22 #include <math.h>
23
24 namespace itk
25 {
26
27 /** \class GaussianKernelFunction
28  * \brief Gaussian kernel used for density estimation and nonparameteric
29  *  regression.
30  *
31  * This class encapsulates a Gaussian smoothing kernel for
32  * density estimation or nonparameteric regression.
33  * See documentation for KernelFunction for more details.
34  *
35  * \sa KernelFunction
36  *
37  * \ingroup Functions
38  */
39 class ITKCommon_EXPORT GaussianKernelFunction : public KernelFunction
40 {
41 public:
42   /** Standard class typedefs. */
43   typedef GaussianKernelFunction Self;
44 TDA   typedef KernelFunction Superclass;
45 TDA   typedef SmartPointer<Self>  Pointer;
46
47   /** Method for creation through the object factory. */
48   itkNewMacro(Self); 
49
50   /** Run-time type information (and related methods). */
51   itkTypeMacro(GaussianKernelFunction, KernelFunction); 
52
53   /** Evaluate the function. */
54   inline double Evaluate (const double& u) const
55     { return ( exp( -0.5 * vnl_math_sqr( u ) ) * m_Factor ); }
56
57 protected:
58   GaussianKernelFunction();
59   ~GaussianKernelFunction();
60   void PrintSelf(std::ostream& os, Indent indent) const
61     { Superclass::PrintSelf( os, indent ); }  
62
63 private:
64   GaussianKernelFunction(const Self&); //purposely not implemented
65   void operator=(const Self&); //purposely not implemented
66
67   static const double m_Factor;
68
69 };
70
71 // namespace itk
72
73 #endif
74

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:10PM
© Kitware Inc.