18#ifndef itkBSplineInterpolationWeightFunctionBase_h
19#define itkBSplineInterpolationWeightFunctionBase_h
21#include "itkFunctionBase.h"
22#include "itkContinuousIndex.h"
24#include "itkArray2D.h"
28#include "itkBSplineDerivativeKernelFunction.h"
49template <
class TCoordRep =
float,
unsigned int VSpaceDimension = 2,
unsigned int VSplineOrder = 3>
51 :
public FunctionBase<ContinuousIndex<TCoordRep, VSpaceDimension>,
52 FixedArray<double, Math::UnsignedPower(VSplineOrder + 1, VSpaceDimension)>>
59 using Superclass = FunctionBase<ContinuousIndex<TCoordRep, VSpaceDimension>,
60 FixedArray<
double, Math::UnsignedPower(VSplineOrder + 1, VSpaceDimension)>>;
74 static constexpr unsigned long NumberOfWeights = Math::UnsignedPower(VSplineOrder + 1, VSpaceDimension);
105 static constexpr SizeType SupportSize{ SizeType::Filled(VSplineOrder + 1) };
134 PrintSelf(std::ostream & os, Indent indent)
const override;
137 vnl_matrix<unsigned long> m_OffsetToIndexTable{};
150#ifndef ITK_MANUAL_INSTANTIATION
151# include "itkBSplineInterpolationWeightFunctionBase.hxx"
Returns the weights over the support region used for B-spline interpolation/reconstruction.
Index< VSpaceDimension > IndexType
void InitializeOffsetToIndexTable()
virtual void Evaluate(const ContinuousIndexType &cindex, const IndexType &startIndex, WeightsType &weights) const
itkStaticConstMacro(SplineOrder, unsigned int, VSplineOrder)
~BSplineInterpolationWeightFunctionBase() override=default
WeightsType Evaluate(const ContinuousIndexType &index) const override
ITK_DISALLOW_COPY_AND_MOVE(BSplineInterpolationWeightFunctionBase)
virtual void Compute1DWeights(const ContinuousIndexType &index, const IndexType &startIndex, OneDWeightsType &weights1D) const =0
itkStaticConstMacro(SpaceDimension, unsigned int, VSpaceDimension)
void PrintSelf(std::ostream &os, Indent indent) const override
BSplineInterpolationWeightFunctionBase()
BSplineDerivativeKernelFunction< VSplineOrder > DerivativeKernelType
typename SecondOrderDerivativeKernelType::Pointer SecondOrderDerivativeKernelPointer
typename KernelType::Pointer KernelPointer
FixedArray< double, NumberOfWeights > WeightsType
Size< VSpaceDimension > SizeType
SmartPointer< const Self > ConstPointer
Matrix< double, Self::SpaceDimension, VSplineOrder+1 > OneDWeightsType
typename KernelType::WeightArrayType WeightArrayType
ContinuousIndex< TCoordRep, VSpaceDimension > ContinuousIndexType
FunctionBase< ContinuousIndex< TCoordRep, VSpaceDimension >, FixedArray< double, Math::UnsignedPower(VSplineOrder+1, VSpaceDimension)> > Superclass
void ComputeStartIndex(const ContinuousIndexType &index, IndexType &startIndex) const
typename DerivativeKernelType::Pointer DerivativeKernelPointer
B-spline kernel used for density estimation and nonparameteric regression.
FixedArray< double, VSplineOrder+1 > WeightArrayType
Derivative of a B-spline kernel used for density estimation and nonparametric regression.