18 #ifndef itkNonUniformBSpline_h
19 #define itkNonUniformBSpline_h
20 #if !defined( ITK_LEGACY_REMOVE )
47 template<
unsigned int TDimension = 3 >
48 class NonUniformBSpline:
55 typedef NonUniformBSpline Self;
56 typedef Object Superclass;
59 typedef double ScalarType;
61 typedef std::vector< PointType > PointListType;
62 typedef PointListType * PointListPointer;
63 typedef std::vector< double > KnotListType;
64 typedef std::vector< double > CoordinateListType;
66 typedef std::vector< ControlPointType > ControlPointListType;
67 typedef ControlPointListType * ControlPointListPointer;
68 typedef std::vector< double > ChordLengthListType;
74 itkTypeMacro(NonUniformBSpline, Object);
79 void SetPoints(PointListType & newPoints);
84 const PointListType & GetPoints()
const;
90 void SetKnots(KnotListType & newKnots);
95 const KnotListType & GetKnots()
const;
100 void ComputeChordLengths();
108 PointType EvaluateSpline(
double t)
const;
113 void ComputeControlPoints();
118 void SetControlPoints(ControlPointListType & ctrlpts);
123 const ControlPointListType & GetControlPoints()
const;
131 double NonUniformBSplineFunctionRecursive(
unsigned int order,
unsigned int i,
double t)
const;
136 itkSetMacro(SplineOrder,
unsigned int);
137 itkGetConstReferenceMacro(SplineOrder,
unsigned int);
150 virtual ~NonUniformBSpline();
155 virtual void PrintSelf(std::ostream & os, Indent indent)
const ITK_OVERRIDE;
160 PointListType m_Points;
165 KnotListType m_Knots;
170 ControlPointListType m_ControlPoints;
175 ChordLengthListType m_ChordLength;
180 ChordLengthListType m_CumulativeChordLength;
185 unsigned int m_SplineOrder;
190 unsigned int m_SpatialDimension;
194 #ifndef ITK_MANUAL_INSTANTIATION
195 #include "itkNonUniformBSpline.hxx"
198 #endif //#if !defined( ITK_LEGACY_REMOVE )
199 #endif // itkNonUniformBSpline_h
A templated class holding a geometric point in n-Dimensional space.