18#ifndef itkBSplineInterpolationWeightFunctionBase_h
19#define itkBSplineInterpolationWeightFunctionBase_h
21#include "itkFunctionBase.h"
22#include "itkContinuousIndex.h"
23#include "itkIndexRange.h"
27#include "itkBSplineDerivativeKernelFunction.h"
48template <
typename TCoordinate =
float,
unsigned int VSpaceDimension = 2,
unsigned int VSplineOrder = 3>
50 :
public FunctionBase<ContinuousIndex<TCoordinate, VSpaceDimension>,
51 FixedArray<double, Math::UnsignedPower(VSplineOrder + 1, VSpaceDimension)>>
58 using Superclass = FunctionBase<ContinuousIndex<TCoordinate, VSpaceDimension>,
59 FixedArray<
double, Math::UnsignedPower(VSplineOrder + 1, VSpaceDimension)>>;
73 static constexpr unsigned long NumberOfWeights = Math::UnsignedPower(VSplineOrder + 1, VSpaceDimension);
131 PrintSelf(std::ostream & os, Indent indent)
const override;
135 using TableType = FixedArray<IndexType, NumberOfWeights>;
147#ifndef ITK_MANUAL_INSTANTIATION
148# include "itkBSplineInterpolationWeightFunctionBase.hxx"
~BSplineInterpolationWeightFunctionBase() override=default
itkStaticConstMacro(SpaceDimension, unsigned int, VSpaceDimension)
SmartPointer< const Self > ConstPointer
ITK_DISALLOW_COPY_AND_MOVE(BSplineInterpolationWeightFunctionBase)
typename DerivativeKernelType::Pointer DerivativeKernelPointer
Index< VSpaceDimension > IndexType
ContinuousIndex< TScalarType, VSpaceDimension > ContinuousIndexType
itkStaticConstMacro(SplineOrder, unsigned int, VSplineOrder)
BSplineDerivativeKernelFunction< VSplineOrder > DerivativeKernelType
typename SecondOrderDerivativeKernelType::Pointer SecondOrderDerivativeKernelPointer
typename KernelType::WeightArrayType WeightArrayType
FunctionBase< ContinuousIndex< TScalarType, VSpaceDimension >, FixedArray< double, Math::UnsignedPower(VSplineOrder+1, VSpaceDimension)> > Superclass
FixedArray< IndexType, NumberOfWeights > TableType
static constexpr unsigned long NumberOfWeights
static constexpr SizeType SupportSize
static IndexType ComputeStartIndex(const ContinuousIndexType &index)
itkOverrideGetNameOfClassMacro(BSplineInterpolationWeightFunctionBase)
typename KernelType::Pointer KernelPointer
Size< VSpaceDimension > SizeType
BSplineInterpolationWeightFunctionBase()=default
void PrintSelf(std::ostream &os, Indent indent) const override
WeightsType Evaluate(const ContinuousIndexType &cindex, const IndexType &startIndex) const
SmartPointer< Self > Pointer
BSplineInterpolationWeightFunctionBase Self
WeightsType Evaluate(const ContinuousIndexType &index) const override
const TableType m_OffsetToIndexTable
Matrix< double, Self::SpaceDimension, VSplineOrder+1 > OneDWeightsType
BSplineKernelFunction2< VSplineOrder > KernelType
BSplineSecondOrderDerivativeKernelFunction2< VSplineOrder > SecondOrderDerivativeKernelType
FixedArray< double, NumberOfWeights > WeightsType
virtual void Compute1DWeights(const ContinuousIndexType &index, const IndexType &startIndex, OneDWeightsType &weights1D) const =0
B-spline kernel used for density estimation and nonparameteric regression.
FixedArray< double, VSplineOrder+1 > WeightArrayType
SmartPointer< Self > Pointer
Derivative of a B-spline kernel used for density estimation and nonparametric regression.
SmartPointer< Self > Pointer