18#ifndef itkBSplineDerivativeKernelFunction_h 
   19#define itkBSplineDerivativeKernelFunction_h 
   42template <
unsigned int VSplineOrder = 3, 
typename TRealValueType = 
double>
 
   73  Evaluate(
const TRealValueType & u)
 const override 
 
   86    os << indent << 
"Spline Order: " << 
SplineOrder << std::endl;
 
 
   93  template <
unsigned int>
 
   98  static inline TRealValueType
 
   99  Evaluate(
const Dispatch<0> &, 
const TRealValueType & itkNotUsed(u))
 
  101    return TRealValueType{ 0.0 };
 
 
  105  static inline TRealValueType
 
  106  Evaluate(
const Dispatch<1> &, 
const TRealValueType & u)
 
  110      return TRealValueType{ 0.5 };
 
  112    if ((u > TRealValueType{ -1.0 }) && (u < TRealValueType{ 0.0 }))
 
  114      return TRealValueType{ 1.0 };
 
  118      return TRealValueType{ 0.0 };
 
  120    else if ((u > TRealValueType{ 0.0 }) && (u < TRealValueType{ 1.0 }))
 
  122      return TRealValueType{ -1.0 };
 
  126      return TRealValueType{ -0.5 };
 
  130      return TRealValueType{ 0.0 };
 
 
  135  static inline TRealValueType
 
  136  Evaluate(
const Dispatch<2> &, 
const TRealValueType & u)
 
  138    if ((u > TRealValueType{ -0.5 }) && (u < TRealValueType{ 0.5 }))
 
  140      return TRealValueType{ -2.0 } * u;
 
  142    if ((u >= TRealValueType{ 0.5 }) && (u < TRealValueType{ 1.5 }))
 
  144      return TRealValueType{ -1.5 } + u;
 
  146    else if ((u > TRealValueType{ -1.5 }) && (u <= TRealValueType{ -0.5 }))
 
  148      return TRealValueType{ 1.5 } + u;
 
  152      return TRealValueType{ 0.0 };
 
 
  157  static inline TRealValueType
 
  158  Evaluate(
const Dispatch<3> &, 
const TRealValueType & u)
 
  160    if ((u >= TRealValueType{ 0.0 }) && (u < TRealValueType{ 1.0 }))
 
  162      return TRealValueType{ -2.0 } * u + TRealValueType{ 1.5 } * u * u;
 
  164    if ((u > TRealValueType{ -1.0 }) && (u < TRealValueType{ 0.0 }))
 
  166      return TRealValueType{ -2.0 } * u - TRealValueType{ 1.5 } * u * u;
 
  168    else if ((u >= TRealValueType{ 1.0 }) && (u < TRealValueType{ 2.0 }))
 
  170      return TRealValueType{ -2.0 } + TRealValueType{ 2.0 } * u - TRealValueType{ 0.5 } * u * u;
 
  172    else if ((u > TRealValueType{ -2.0 }) && (u <= TRealValueType{ -1.0 }))
 
  174      return TRealValueType{ 2.0 } + TRealValueType{ 2.0 } * u + TRealValueType{ 0.5 } * u * u;
 
  178      return TRealValueType{ 0.0 };
 
 
  183  static inline TRealValueType
 
  184  Evaluate(
const DispatchBase &, 
const TRealValueType &)
 
  186    itkGenericExceptionMacro(
"Evaluate not implemented for spline order " << 
SplineOrder);
 
 
 
void PrintSelf(std::ostream &os, Indent indent) const override
 
BSplineDerivativeKernelFunction()=default
 
static TRealValueType Evaluate(const Dispatch< 3 > &, const TRealValueType &u)
 
TRealValueType Evaluate(const TRealValueType &u) const override
 
static TRealValueType Evaluate(const Dispatch< 0 > &, const TRealValueType &u)
 
static TRealValueType Evaluate(const DispatchBase &, const TRealValueType &)
 
~BSplineDerivativeKernelFunction() override=default
 
static TRealValueType FastEvaluate(const TRealValueType u)
 
static constexpr unsigned int SplineOrder
 
static TRealValueType Evaluate(const Dispatch< 1 > &, const TRealValueType &u)
 
KernelFunctionBase< TRealValueType > Superclass
 
static TRealValueType Evaluate(const Dispatch< 2 > &, const TRealValueType &u)
 
BSplineDerivativeKernelFunction Self
 
SmartPointer< Self > Pointer
 
Control indentation during Print() invocation.
 
KernelFunctionBase()=default
 
virtual void PrintSelf(std::ostream &os, Indent indent) const
 
Implements transparent reference counting.
 
bool ExactlyEquals(const TInput1 &x1, const TInput2 &x2)
Return the result of an exact comparison between two scalar values of potentially different types.
 
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....