00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _itkBSplineDerivativeKernelFunction_h
00018 #define _itkBSplineDerivativeKernelFunction_h
00019
00020 #include "itkKernelFunction.h"
00021 #include "itkBSplineKernelFunction.h"
00022
00023 namespace itk
00024 {
00025
00041 template <unsigned int VSplineOrder = 3>
00042 class ITK_EXPORT BSplineDerivativeKernelFunction : public KernelFunction
00043 {
00044 public:
00046 typedef BSplineDerivativeKernelFunction Self;
00047 typedef KernelFunction Superclass;
00048 typedef SmartPointer<Self> Pointer;
00049
00051 itkNewMacro(Self);
00052
00054 itkTypeMacro(BSplineDerivativeKernelFunction, KernelFunction);
00055
00057 itkStaticConstMacro(SplineOrder, unsigned int, VSplineOrder);
00058
00060 inline double Evaluate( const double & u ) const
00061 {
00062 return ( m_KernelFunction->Evaluate( u + 0.5 ) -
00063 m_KernelFunction->Evaluate( u - 0.5 ) );
00064 }
00065
00066 protected:
00067
00068 typedef BSplineKernelFunction<itkGetStaticConstMacro(SplineOrder) - 1>
00069 KernelType;
00070
00071 BSplineDerivativeKernelFunction()
00072 {
00073 m_KernelFunction = KernelType::New();
00074 };
00075
00076 ~BSplineDerivativeKernelFunction(){};
00077 void PrintSelf(std::ostream& os, Indent indent) const
00078 {
00079 Superclass::PrintSelf( os, indent );
00080 os << indent << "Spline Order: " << SplineOrder << std::endl;
00081 }
00082
00083 private:
00084 BSplineDerivativeKernelFunction(const Self&);
00085 void operator=(const Self&);
00086
00087 typename KernelType::Pointer m_KernelFunction;
00088
00089 };
00090
00091
00092
00093 }
00094
00095 #endif