50 #include <visp/vpImagePoint.h>
55 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
56 # include <visp/vpList.h>
58 #include <visp/vpMatrix.h>
60 #ifndef DOXYGEN_SHOULD_SKIP_THIS
71 typedef struct vpBasisFunction{
113 std::vector<vpImagePoint> controlPoints;
115 std::vector<double> knots;
119 std::vector<vpImagePoint> crossingPoints;
132 inline unsigned int get_p()
const {
return p;}
141 for (
unsigned int i = 0; i < controlPoints.size(); i++)
142 list.push_back(*(&(controlPoints[0])+i));
152 for (
unsigned int i = 0; i < knots.size(); i++)
153 list.push_back(*(&(knots[0])+i));
163 for (
unsigned int i = 0; i < crossingPoints.size(); i++)
164 list.push_back(*(&(crossingPoints[0])+i));
173 inline void set_p(
unsigned int p) {this->p = p;}
182 controlPoints.clear();
183 for(std::list<vpImagePoint>::const_iterator it = list.begin(); it!=list.end(); ++it){
184 controlPoints.push_back(*it);
195 for(std::list<double>::const_iterator it = list.begin(); it!=list.end(); ++it){
196 knots.push_back(*it);
206 crossingPoints.clear();
207 for(std::list<vpImagePoint>::const_iterator it=list.begin(); it!=list.end(); ++it){
208 crossingPoints.push_back(*it);
212 static unsigned int findSpan(
double l_u,
unsigned int l_p, std::vector<double> &l_knots);
213 unsigned int findSpan(
double u);
215 static vpBasisFunction* computeBasisFuns(
double l_u,
unsigned int l_i,
unsigned int l_p, std::vector<double> &l_knots);
216 vpBasisFunction* computeBasisFuns(
double u);
218 static vpBasisFunction** computeDersBasisFuns(
double l_u,
unsigned int l_i,
unsigned int l_p,
unsigned int l_der, std::vector<double> &l_knots);
219 vpBasisFunction** computeDersBasisFuns(
double u,
unsigned int der);
221 static vpImagePoint computeCurvePoint(
double l_u,
unsigned int l_i,
unsigned int l_p, std::vector<double> &l_knots, std::vector<vpImagePoint> &l_controlPoints);
224 static vpImagePoint* computeCurveDers(
double l_u,
unsigned int l_i,
unsigned int l_p,
unsigned int l_der, std::vector<double> &l_knots, std::vector<vpImagePoint> &l_controlPoints);
225 vpImagePoint* computeCurveDers(
double u,
unsigned int der);
227 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
239 for (
unsigned int i = 0; i < controlPoints.size(); i++) list.
addRight(*(&(controlPoints[0])+i));
250 for (
unsigned int i = 0; i < knots.size(); i++) list.
addRight(*(&(knots[0])+i));
261 for (
unsigned int i = 0; i < crossingPoints.size(); i++) list.
addRight(*(&(crossingPoints[0])+i));
271 controlPoints.clear();
273 for (
unsigned int i = 0; i < list.
nbElements(); i++)
275 controlPoints.push_back(list.
value());
289 for (
unsigned int i = 0; i < list.
nbElements(); i++)
291 knots.push_back(list.
value());
303 crossingPoints.clear();
305 for (
unsigned int i = 0; i < list.
nbElements(); i++)
307 crossingPoints.push_back(list.
value());
vp_deprecated void set_controlPoints(vpList< vpImagePoint > &list)
unsigned int nbElements(void)
return the number of element in the list
vp_deprecated vpList< vpImagePoint > get_crossingPoints() const
void get_controlPoints(std::list< vpImagePoint > &list) const
Provide simple list management.
void set_p(unsigned int p)
void next(void)
position the current element on the next one
vp_deprecated void set_knots(vpList< double > &list)
void get_crossingPoints(std::list< vpImagePoint > &list) const
vp_deprecated vpList< vpImagePoint > get_controlPoints() const
void front(void)
Position the current element on the first element of the list.
type & value(void)
return the value of the current element
void addRight(const type &el)
add a new element in the list, at the right of the current one
void set_crossingPoints(const std::list< vpImagePoint > &list)
unsigned int get_p() const
void set_controlPoints(const std::list< vpImagePoint > &list)
Class that provides tools to compute and manipulate a B-Spline curve.
vp_deprecated void set_crossingPoints(vpList< vpImagePoint > &list)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
void get_knots(std::list< double > &list) const
void set_knots(const std::list< double > &list)
vp_deprecated vpList< double > get_knots() const