ITK
4.2.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Compatibility
Deprecated
include
itkNonUniformBSpline.h
Go to the documentation of this file.
1
/*=========================================================================
2
*
3
* Copyright Insight Software Consortium
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0.txt
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*=========================================================================*/
18
#ifndef __itkNonUniformBSpline_h
19
#define __itkNonUniformBSpline_h
20
21
22
#include <vector>
23
24
#include "
itkPoint.h
"
25
#include "
itkObject.h
"
26
#include "
itkObjectFactory.h
"
27
#include "
itkArray.h
"
28
29
namespace
itk
30
{
45
template
<
unsigned
int
TDimension = 3 >
46
class
NonUniformBSpline
:
47
public
Object
48
{
49
public
:
53
typedef
NonUniformBSpline
Self
;
54
typedef
Object
Superclass
;
55
typedef
SmartPointer< Self >
Pointer
;
56
typedef
SmartPointer< const Self >
ConstPointer
;
57
typedef
double
ScalarType
;
58
typedef
itk::Point< ScalarType, TDimension >
PointType
;
59
typedef
std::vector< PointType >
PointListType
;
60
typedef
PointListType
*
PointListPointer
;
61
typedef
std::vector< double >
KnotListType
;
62
typedef
std::vector< double >
CoordinateListType
;
63
typedef
itk::Point< double, TDimension >
ControlPointType
;
64
typedef
std::vector< ControlPointType >
ControlPointListType
;
65
typedef
ControlPointListType
*
ControlPointListPointer
;
66
typedef
std::vector< double >
ChordLengthListType
;
67
69
itkNewMacro(
Self
);
70
72
itkTypeMacro(
NonUniformBSpline
,
Object
);
73
77
void
SetPoints
(
PointListType
& newPoints);
78
82
const
PointListType
&
GetPoints
()
const
;
83
88
void
SetKnots
(
KnotListType
& newKnots);
89
93
const
KnotListType
&
GetKnots
()
const
;
94
98
void
ComputeChordLengths
();
99
104
PointType
EvaluateSpline
(
const
Array< double >
& p)
const
;
105
106
PointType
EvaluateSpline
(
double
t)
const
;
107
111
void
ComputeControlPoints
();
112
116
void
SetControlPoints
(
ControlPointListType
& ctrlpts);
117
121
const
ControlPointListType
&
GetControlPoints
()
const
;
122
129
double
NonUniformBSplineFunctionRecursive
(
unsigned
int
order,
unsigned
int
i,
double
t)
const
;
130
134
itkSetMacro(SplineOrder,
unsigned
int
);
135
itkGetConstReferenceMacro(SplineOrder,
unsigned
int
);
136
protected
:
138
142
NonUniformBSpline
();
143
147
virtual
~NonUniformBSpline
();
148
152
virtual
void
PrintSelf
(std::ostream & os,
Indent
indent)
const
;
153
157
PointListType
m_Points
;
158
162
KnotListType
m_Knots
;
163
167
ControlPointListType
m_ControlPoints
;
168
172
ChordLengthListType
m_ChordLength
;
173
177
ChordLengthListType
m_CumulativeChordLength
;
178
182
unsigned
int
m_SplineOrder
;
183
187
unsigned
int
m_SpatialDimension
;
188
};
189
}
// end namespace itk
190
191
#ifndef ITK_MANUAL_INSTANTIATION
192
#include "itkNonUniformBSpline.hxx"
193
#endif
194
195
#endif // __itkNonUniformBSpline_h
196
Generated on Tue Jul 10 2012 23:38:24 for ITK by
1.8.1