18#ifndef __itkBSplineInterpolationWeightFunctionBase_h
19#define __itkBSplineInterpolationWeightFunctionBase_h
21#include "itkFunctionBase.h"
22#include "itkContinuousIndex.h"
24#include "itkArray2D.h"
27#include "itkBSplineDerivativeKernelFunction.h"
34template<
unsigned int SplineOrder,
unsigned int Dimension >
35class GetConstNumberOfWeightsHack
39 typedef GetConstNumberOfWeightsHack< SplineOrder, Dimension - 1 > OneDimensionLess;
40 itkStaticConstMacro( Value,
unsigned long, ( SplineOrder + 1 ) * OneDimensionLess::Value );
44template<
unsigned int SplineOrder >
45class GetConstNumberOfWeightsHack< SplineOrder, 0 >
49 itkStaticConstMacro( Value,
unsigned long, 1 );
68template<
class TCoordRep =
float,
69unsigned int VSpaceDimension = 2,
70unsigned int VSplineOrder = 3 >
72 public FunctionBase< ContinuousIndex< TCoordRep, VSpaceDimension >, Array< double > >
79 ContinuousIndex< TCoordRep, VSpaceDimension >,
94 typedef GetConstNumberOfWeightsHack<
95 itkGetStaticConstMacro( SplineOrder ),
96 itkGetStaticConstMacro( SpaceDimension ) > GetConstNumberOfWeightsHackType;
127 itkGetConstReferenceMacro( SupportSize,
SizeType );
130 itkGetConstMacro( NumberOfWeights,
unsigned long );
154 itkGetStaticConstMacro( SpaceDimension ),
164 void PrintSelf( std::ostream & os, Indent indent )
const override;
194#ifndef ITK_MANUAL_INSTANTIATION
195#include "itkBSplineInterpolationWeightFunctionBase.hxx"
Returns the weights over the support region used for B-spline interpolation/reconstruction.
SecondOrderDerivativeKernelType::Pointer SecondOrderDerivativeKernelPointer
SmartPointer< Self > Pointer
virtual void Evaluate(const ContinuousIndexType &cindex, const IndexType &startIndex, WeightsType &weights) const
void InitializeOffsetToIndexTable(void)
TableType m_OffsetToIndexTable
itkStaticConstMacro(SplineOrder, unsigned int, VSplineOrder)
WeightsType Evaluate(const ContinuousIndexType &index) const override
ContinuousIndex< TCoordRep, VSpaceDimension > ContinuousIndexType
void operator=(const Self &)
BSplineSecondOrderDerivativeKernelFunction2< Self::SplineOrder > SecondOrderDerivativeKernelType
virtual void Compute1DWeights(const ContinuousIndexType &index, const IndexType &startIndex, OneDWeightsType &weights1D) const =0
Array< double > WeightsType
itkStaticConstMacro(SpaceDimension, unsigned int, VSpaceDimension)
void PrintSelf(std::ostream &os, Indent indent) const override
BSplineInterpolationWeightFunctionBase()
Size< VSpaceDimension > SizeType
KernelType::Pointer KernelPointer
~BSplineInterpolationWeightFunctionBase() override
BSplineKernelFunction2< Self::SplineOrder > KernelType
SmartPointer< const Self > ConstPointer
Index< VSpaceDimension > IndexType
DerivativeKernelType::Pointer DerivativeKernelPointer
BSplineInterpolationWeightFunctionBase(const Self &)
DerivativeKernelType::Pointer m_DerivativeKernel
itkStaticConstMacro(NumberOfWeights, unsigned long, GetConstNumberOfWeightsHackType::Value)
unsigned long m_NumberOfWeights
Array2D< unsigned long > TableType
KernelType::Pointer m_Kernel
BSplineInterpolationWeightFunctionBase Self
KernelType::WeightArrayType WeightArrayType
Matrix< double, itkGetStaticConstMacro(SpaceDimension), itkGetStaticConstMacro(SplineOrder)+1 > OneDWeightsType
SecondOrderDerivativeKernelType::Pointer m_SecondOrderDerivativeKernel
void ComputeStartIndex(const ContinuousIndexType &index, IndexType &startIndex) const
BSplineDerivativeKernelFunction< Self::SplineOrder > DerivativeKernelType
void InitializeSupport(void)
FunctionBase< ContinuousIndex< TCoordRep, VSpaceDimension >, Array< double > > Superclass
B-spline kernel used for density estimation and nonparameteric regression.
FixedArray< double, itkGetStaticConstMacro(SplineOrder)+1 > WeightArrayType
SmartPointer< Self > Pointer
Derivative of a B-spline kernel used for density estimation and nonparametric regression.
SmartPointer< Self > Pointer