| 1 |
|
/*========================================================================= |
| 2 |
|
|
| 3 |
|
Program: Insight Segmentation & Registration Toolkit |
| 4 |
|
Module: $RCSfile: itkKernelFunction.h.html,v $ |
| 5 |
|
Language: C++ |
| 6 |
|
Date: $Date: 2006/01/17 19:15:40 $ |
| 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 _itkKernelFunction_h |
| 18 |
DEF |
#define _itkKernelFunction_h |
| 19 |
|
|
| 20 |
|
#include "vnl/vnl_math.h" |
| 21 |
|
#include "itkFunctionBase.h" |
| 22 |
|
|
| 23 |
|
namespace itk |
| 24 |
|
{ |
| 25 |
|
|
| 26 |
|
/** \class KernelFunction |
| 27 |
|
* \brief Kernel used for density estimation and nonparameteric regression. |
| 28 |
|
* |
| 29 |
|
* This class encapsulates the smoothing kernel used for statistical density |
| 30 |
|
* estimation and nonparameteric regression. The basic idea of the kernel |
| 31 |
|
* approach is to weight observations by a smooth function (the kernel) |
| 32 |
|
* to created a smoothed approximation. |
| 33 |
|
* |
| 34 |
|
* Reference: |
| 35 |
|
* Silverman, B. W. (1986) Density Estimation. London: Chapman and Hall. |
| 36 |
|
* |
| 37 |
|
* \ingroup Functions |
| 38 |
|
*/ |
| 39 |
|
class ITKCommon_EXPORT KernelFunction : public FunctionBase<double,double> |
| 40 |
|
{ |
| 41 |
|
public: |
| 42 |
|
/** Standard class typedefs. */ |
| 43 |
|
typedef KernelFunction Self; |
| 44 |
TDA |
typedef FunctionBase<double,double> Superclass; |
| 45 |
TDA |
typedef SmartPointer<Self> Pointer; |
| 46 |
TDA |
typedef SmartPointer<const Self> ConstPointer; |
| 47 |
|
|
| 48 |
|
/** Run-time type information (and related methods). */ |
| 49 |
|
itkTypeMacro(KernelFunction, FunctionBase); |
| 50 |
|
|
| 51 |
|
/** Evaluate the function. Subclasses must implement this. */ |
| 52 |
|
virtual double Evaluate (const double& u) const = 0; |
| 53 |
|
|
| 54 |
|
protected: |
| 55 |
|
KernelFunction(); |
| 56 |
|
~KernelFunction(); |
| 57 |
|
void PrintSelf(std::ostream& os, Indent indent) const |
| 58 |
|
{ Superclass::PrintSelf( os, indent ); } |
| 59 |
|
|
| 60 |
|
}; |
| 61 |
|
|
| 62 |
|
|
| 63 |
|
} // namespace itk |
| 64 |
|
|
| 65 |
|
#endif |
| 66 |
|
|
| 67 |
EOF |
|