MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkItkNonUniformBSpline.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#ifndef mitkItkNonUniformBSpline_h
14#define mitkItkNonUniformBSpline_h
15
16/*===================================================================
17
18This file is based heavily on a corresponding ITK filter.
19
20===================================================================*/
21
22/*********************************
23 This file was taken from ITK, CVS version 1.8 to circumvent a bug in ITK release 3.18
24 *********************************/
25
26#if defined(_MSC_VER)
27#pragma warning ( disable : 4786 )
28#endif
29
30#include <vector>
31
32#include "itkPoint.h"
33#include "itkObject.h"
34#include "itkObjectFactory.h"
35#include "itkArray.h"
36
37namespace itk {
38
52template < unsigned int TDimension = 3 >
54 : public Object
55{
56public:
62 typedef SmartPointer < Self > Pointer;
63 typedef SmartPointer < const Self > ConstPointer;
64 typedef double ScalarType;
65 typedef itk::Point< ScalarType, TDimension > PointType;
66 typedef std::vector < PointType > PointListType;
68 typedef std::vector < double > KnotListType;
69 typedef std::vector<double> CoordinateListType;
70 typedef itk::Point<double, TDimension > ControlPointType;
71 typedef std::vector< ControlPointType > ControlPointListType;
73 typedef std::vector<double> ChordLengthListType;
74
78
81
85 void SetPoints( PointListType & newPoints );
86
90 const PointListType & GetPoints() const;
91
96 void SetKnots( KnotListType & newKnots);
97
101 const KnotListType & GetKnots() const;
102
107
112 PointType EvaluateSpline(const Array<double> & p) const;
113 PointType EvaluateSpline( double t ) const;
114
119
124
129
136 double NonUniformBSplineFunctionRecursive(unsigned int order, unsigned int i, double t) const;
137
141 itkSetMacro( SplineOrder, unsigned int );
142 itkGetConstReferenceMacro( SplineOrder, unsigned int );
143
144
145protected:
146
151
156
160 void PrintSelf( std::ostream& os, Indent indent ) const override;
161
166
171
176
181
186
190 unsigned int m_SplineOrder;
191
195 unsigned int m_SpatialDimension;
196
197};
198
199} // end namespace itk
200
201#ifndef ITK_MANUAL_INSTANTIATION
202#include "mitkItkNonUniformBSpline.txx"
203#endif
204
205
206#endif
BSpline with nonuniform knot spacing.
ControlPointListType * ControlPointListPointer
const KnotListType & GetKnots() const
const PointListType & GetPoints() const
void SetControlPoints(ControlPointListType &ctrlpts)
ControlPointListType m_ControlPoints
std::vector< double > KnotListType
std::vector< double > ChordLengthListType
PointType EvaluateSpline(double t) const
itkSetMacro(SplineOrder, unsigned int)
itk::Point< double, TDimension > ControlPointType
ChordLengthListType m_CumulativeChordLength
std::vector< double > CoordinateListType
void PrintSelf(std::ostream &os, Indent indent) const override
PointType EvaluateSpline(const Array< double > &p) const
void SetPoints(PointListType &newPoints)
std::vector< PointType > PointListType
double NonUniformBSplineFunctionRecursive(unsigned int order, unsigned int i, double t) const
const ControlPointListType & GetControlPoints() const
~NonUniformBSpline() override
itk::Point< ScalarType, TDimension > PointType
std::vector< ControlPointType > ControlPointListType
void SetKnots(KnotListType &newKnots)
itkTypeMacro(NonUniformBSpline, Object)
SmartPointer< const Self > ConstPointer
itkGetConstReferenceMacro(SplineOrder, unsigned int)