00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef _itkBSplineInterpolationWeightFunction_h
00018
#define _itkBSplineInterpolationWeightFunction_h
00019
00020
#include "itkFunctionBase.h"
00021
#include "itkContinuousIndex.h"
00022
#include "itkBSplineKernelFunction.h"
00023
#include "itkArray.h"
00024
#include "itkArray2D.h"
00025
00026
namespace itk
00027 {
00028
00045
template <
00046
class TCoordRep =
float,
00047
unsigned int VSpaceDimension = 2,
00048
unsigned int VSplineOrder = 3
00049 >
00050 class ITK_EXPORT BSplineInterpolationWeightFunction :
00051
public FunctionBase< ContinuousIndex<TCoordRep,VSpaceDimension>,
00052 Array<double> >
00053 {
00054
public:
00056 typedef BSplineInterpolationWeightFunction
Self;
00057
typedef FunctionBase< ContinuousIndex<TCoordRep,VSpaceDimension>,
00058 Array<double> >
Superclass;
00059 typedef SmartPointer<Self> Pointer;
00060 typedef SmartPointer<const Self> ConstPointer;
00061
00063
itkNewMacro(
Self );
00064
00066
itkTypeMacro(BSplineInterpolationWeightFunction,
FunctionBase);
00067
00069
itkStaticConstMacro(SpaceDimension,
unsigned int, VSpaceDimension);
00070
00072
itkStaticConstMacro(SplineOrder,
unsigned int, VSplineOrder);
00073
00075 typedef Array<double> WeightsType;
00076
00078 typedef Index<VSpaceDimension> IndexType;
00079 typedef Size<VSpaceDimension> SizeType;
00080
00082 typedef ContinuousIndex<TCoordRep,VSpaceDimension> ContinuousIndexType;
00083
00086
virtual WeightsType Evaluate(
const ContinuousIndexType & index )
const;
00087
00096
virtual void Evaluate(
const ContinuousIndexType & index,
00097
WeightsType & weights,
IndexType & startIndex )
const;
00098
00100
itkGetMacro( SupportSize,
SizeType );
00101
00103
itkGetMacro( NumberOfWeights,
unsigned long );
00104
00105
protected:
00106 BSplineInterpolationWeightFunction();
00107 ~BSplineInterpolationWeightFunction() {}
00108
void PrintSelf(std::ostream& os,
Indent indent)
const;
00109
00110
private:
00111 BSplineInterpolationWeightFunction(
const Self&);
00112
void operator=(
const Self&);
00113
00115
unsigned long m_NumberOfWeights;
00116
00118 SizeType m_SupportSize;
00119
00121
typedef Array2D<unsigned long> TableType;
00122
00124 TableType m_OffsetToIndexTable;
00125
00127
typedef BSplineKernelFunction<itkGetStaticConstMacro(SplineOrder)>
00128 KernelType;
00129
00131
typename KernelType::Pointer m_Kernel;
00132
00133 };
00134
00135 }
00136
00137
#ifndef ITK_MANUAL_INSTANTIATION
00138
#include "itkBSplineInterpolationWeightFunction.txx"
00139
#endif
00140
00141
#endif