UsTK : Ultrasound ToolKit
version 2.0.1 under development (2024-11-21)
|
#include <visp3/ustk_core/usPolynomialCurve3D.h>
Public Member Functions | |
usPolynomialCurve3D () | |
usPolynomialCurve3D (const usPolynomialCurve3D &curve) | |
const usPolynomialCurve3D & | operator= (const usPolynomialCurve3D &curve) |
virtual | ~usPolynomialCurve3D () |
usPolynomialCurve3D (unsigned int order) | |
void | setOrder (unsigned int order) |
unsigned int | getOrder () const |
void | setStartParameter (double startParameter) |
double | getStartParameter () const |
void | setEndParameter (double endParameter) |
double | getEndParameter () const |
void | setBoundaries (double startParameter, double endParamter) |
void | setParametricLength (double length) |
double | getParametricLength () const |
void | setLength (double length, double precision=1e-4) |
double | getLength (int nbCountSeg=50) const |
void | setPolynomialCoefficients (const vpMatrix &polynomialCoefficients) |
vpMatrix | getPolynomialCoefficients () const |
vpColVector | getPoint (double parameter) const |
vpMatrix | getPoints (const vpColVector ¶meters) const |
vpColVector | getStartPoint () const |
vpColVector | getEndPoint () const |
vpColVector | getTangent (double parameter) const |
vpColVector | getStartTangent () const |
vpColVector | getEndTangent () const |
vpColVector | getDerivative (double parameter, unsigned int order) const |
void | defineFromPoints (const std::vector< vpColVector > &points, const std::vector< double > ¶m, unsigned int order=0) |
void | defineFromPoints (const vpMatrix points, const vpColVector ¶m, unsigned int order=0) |
void | defineFromPointsAuto (const std::vector< vpColVector > &points, unsigned int order=0) |
void | defineFromPointsAuto (const vpMatrix &points, unsigned int order=0) |
void | defineFromPointsAuto (const std::vector< vpColVector > &points, const vpColVector &direction, unsigned int order=0) |
void | defineFromPointsAuto (const vpMatrix &points, const vpColVector &direction, unsigned int order=0) |
void | defineFromWeightedPoints (const std::vector< vpColVector > &points, const std::vector< double > ¶m, const std::vector< double > &weights, unsigned int order=0) |
void | defineFromWeightedPoints (const vpMatrix &points, const vpColVector ¶m, const vpColVector &weights, unsigned int order=0) |
void | defineFromWeightedPointsAuto (const std::vector< vpColVector > &points, const std::vector< double > &weights, unsigned int order=0) |
void | defineFromWeightedPointsAuto (const vpMatrix &points, const vpColVector &weights, unsigned int order=0) |
void | defineFromWeightedPointsAuto (const std::vector< vpColVector > &points, const std::vector< double > &weights, const vpColVector &direction, unsigned int order=0) |
void | defineFromWeightedPointsAuto (const vpMatrix &points, const vpColVector &weights, const vpColVector &direction, unsigned int order=0) |
double | getCurvature (double param) const |
double | getCurvatureFromShape (double start, double end, vpColVector ¢er3D, vpColVector &direction3D) const |
double | getMeanAxisDeviation (int nbCountSeg=50) const |
void | setControlPoints (const vpMatrix &controlPoints) |
void | setControlPoints (double **controlPoints) |
vpMatrix | getControlPoints () const |
vpMatrix | getRenderingPoints () const |
usPolynomialCurve3D | getSubPolynomialCurve (double startParameter, double endParameter) const |
usPolynomialCurve3D | getNewOrderPolynomialCurve (unsigned int order) const |
void | changeCoefficientsToFitBoundaries (double startParameter, double endParameter) |
void | reverse () |
void | changeCoefficientsToFitMetricLength () |
void | move (const vpHomogeneousMatrix &H) |
void | move (double x, double y, double z, double tx, double ty, double tz) |
void | scale (double s) |
Static Public Member Functions | |
static double | curveDistance (const usPolynomialCurve3D &n1, const usPolynomialCurve3D &n2) |
Protected Attributes | |
unsigned int | m_order |
double | m_startParameter |
double | m_endParameter |
vpMatrix | m_polynomialCoefficients |
Friends | |
VISP_EXPORT std::ostream & | operator<< (std::ostream &s, const usPolynomialCurve3D &seg) |
VISP_EXPORT std::istream & | operator>> (std::istream &s, usPolynomialCurve3D &seg) |
VISP_EXPORT std::ostream & | operator<<= (std::ostream &s, const usPolynomialCurve3D &seg) |
VISP_EXPORT std::istream & | operator>>= (std::istream &s, usPolynomialCurve3D &seg) |
2D curve model
This class represents a 2D polynomial curve.
Definition at line 50 of file usPolynomialCurve3D.h.
usPolynomialCurve3D::usPolynomialCurve3D | ( | ) |
Default constructor. Requires a call to setOrder().
Definition at line 39 of file usPolynomialCurve3D.cpp.
usPolynomialCurve3D::usPolynomialCurve3D | ( | const usPolynomialCurve3D & | curve | ) |
Copy constructor.
Definition at line 44 of file usPolynomialCurve3D.cpp.
|
virtual |
Destructor.
Definition at line 60 of file usPolynomialCurve3D.cpp.
usPolynomialCurve3D::usPolynomialCurve3D | ( | unsigned int | order | ) |
Constructor.
order | The order of the polynomial curve. |
Definition at line 62 of file usPolynomialCurve3D.cpp.
void usPolynomialCurve3D::changeCoefficientsToFitBoundaries | ( | double | startParameter, |
double | endParameter | ||
) |
Modify the polynomial coefficients such that the parametric variable now goes from two different boundaries, without changing the shape of the curve in space.
Definition at line 1185 of file usPolynomialCurve3D.cpp.
References m_endParameter, m_order, m_polynomialCoefficients, and m_startParameter.
Referenced by usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegmentHard(), changeCoefficientsToFitMetricLength(), usNeedleInsertionModelRayleighRitzSpline::fitLength(), usBSpline3D::getSubSpline(), reverse(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), and usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen().
void usPolynomialCurve3D::changeCoefficientsToFitMetricLength | ( | ) |
Modify the polynomial coefficients such that the metric length of the curve corresponds to the parametric length.
Definition at line 1229 of file usPolynomialCurve3D.cpp.
References changeCoefficientsToFitBoundaries(), getLength(), m_endParameter, m_startParameter, and setBoundaries().
|
static |
Compute the distance between two curves. (to remove)
Definition at line 1143 of file usPolynomialCurve3D.cpp.
References getOrder(), and getPolynomialCoefficients().
void usPolynomialCurve3D::defineFromPoints | ( | const std::vector< vpColVector > & | points, |
const std::vector< double > & | param, | ||
unsigned int | order = 0 |
||
) |
Define the polynomial curve to fit as best as possible a set of control points at given parametric values.
points | The desired control points. |
param | The desired parametric values. |
order | The order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default)) |
Definition at line 278 of file usPolynomialCurve3D.cpp.
References m_order, setBoundaries(), and setPolynomialCoefficients().
Referenced by usGeometryTools::convertBSplineToPolynomial(), defineFromPointsAuto(), and usNeedleModelingDisplayTools::displayNeedle().
void usPolynomialCurve3D::defineFromPoints | ( | const vpMatrix | points, |
const vpColVector & | param, | ||
unsigned int | order = 0 |
||
) |
Define the polynomial curve to fit as best as possible a set of control points at given parametric values.
points | The desired control points. |
param | The desired parametric values. |
order | The order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default)) |
Definition at line 337 of file usPolynomialCurve3D.cpp.
References m_order, setBoundaries(), and setPolynomialCoefficients().
void usPolynomialCurve3D::defineFromPointsAuto | ( | const std::vector< vpColVector > & | points, |
const vpColVector & | direction, | ||
unsigned int | order = 0 |
||
) |
Define the polynomial curve to fit as best as possible a set of weighted control points at given parametric values. Parametric values for the different points are automatically computed according to their position along a given straight direction.
points | The desired control points. |
direction | The direction used to compute the parametric values associated to each point. |
order | The order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default)) |
Definition at line 452 of file usPolynomialCurve3D.cpp.
References defineFromPoints(), getParametricLength(), m_order, and m_startParameter.
void usPolynomialCurve3D::defineFromPointsAuto | ( | const std::vector< vpColVector > & | points, |
unsigned int | order = 0 |
||
) |
Define the polynomial curve to fit as best as possible a set of control points. Parametric values for the different points are automatically computed.
points | The desired control points. |
order | The order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default)) |
Definition at line 395 of file usPolynomialCurve3D.cpp.
References m_order.
Referenced by defineFromPointsAuto(), and setControlPoints().
void usPolynomialCurve3D::defineFromPointsAuto | ( | const vpMatrix & | points, |
const vpColVector & | direction, | ||
unsigned int | order = 0 |
||
) |
Define the polynomial curve to fit as best as possible a set of control points at given parametric values. Parametric values for the different points are automatically computed according to their position along a given straight direction.
points | The desired control points. |
direction | The direction used to compute the parametric values associated to each point. |
order | The order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default)) |
Definition at line 502 of file usPolynomialCurve3D.cpp.
References defineFromPoints(), getParametricLength(), m_order, and m_startParameter.
void usPolynomialCurve3D::defineFromPointsAuto | ( | const vpMatrix & | points, |
unsigned int | order = 0 |
||
) |
Define the polynomial curve to fit as best as possible a set of control points. Parametric values for the different points are automatically computed.
points | The desired control points. |
order | The order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default)) |
Definition at line 424 of file usPolynomialCurve3D.cpp.
References defineFromPointsAuto(), and m_order.
void usPolynomialCurve3D::defineFromWeightedPoints | ( | const std::vector< vpColVector > & | points, |
const std::vector< double > & | param, | ||
const std::vector< double > & | weights, | ||
unsigned int | order = 0 |
||
) |
Define the polynomial curve to fit as best as possible a set of weighted control points at given parametric values.
points | The desired control points. |
param | The desired parametric values. |
weights | Set of weights describing the importance of fitting each point with the curve. |
order | The order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default)) |
Definition at line 553 of file usPolynomialCurve3D.cpp.
References m_order, setBoundaries(), and setPolynomialCoefficients().
Referenced by defineFromWeightedPointsAuto().
void usPolynomialCurve3D::defineFromWeightedPoints | ( | const vpMatrix & | points, |
const vpColVector & | param, | ||
const vpColVector & | weights, | ||
unsigned int | order = 0 |
||
) |
Define the polynomial curve to fit as best as possible a set of weighted control points at given parametric values.
points | The desired control points. |
param | The desired parametric values. |
weights | Set of weights describing the importance of fitting each point with the curve. |
order | The order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default)) |
Definition at line 617 of file usPolynomialCurve3D.cpp.
References m_order, setBoundaries(), and setPolynomialCoefficients().
void usPolynomialCurve3D::defineFromWeightedPointsAuto | ( | const std::vector< vpColVector > & | points, |
const std::vector< double > & | weights, | ||
const vpColVector & | direction, | ||
unsigned int | order = 0 |
||
) |
Define the polynomial curve to fit as best as possible a set of control points at given parametric values. Parametric values for the different points are automatically computed according to their position along a given straight direction.
points | The desired control points. |
weights | Set of weights describing the importance of fitting each point with the curve. |
direction | The direction used to compute the parametric values associated to each point. |
order | The order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default)) |
Definition at line 826 of file usPolynomialCurve3D.cpp.
References defineFromWeightedPoints(), getParametricLength(), m_order, and m_startParameter.
void usPolynomialCurve3D::defineFromWeightedPointsAuto | ( | const std::vector< vpColVector > & | points, |
const std::vector< double > & | weights, | ||
unsigned int | order = 0 |
||
) |
Define the polynomial curve to fit as best as possible a set of control points at given parametric values. Parametric values for the different points are automatically computed.
points | The desired control points. |
weights | Set of weights describing the importance of fitting each point with the curve. |
order | The order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default)) |
Definition at line 678 of file usPolynomialCurve3D.cpp.
References defineFromWeightedPoints(), getParametricLength(), m_order, and m_startParameter.
void usPolynomialCurve3D::defineFromWeightedPointsAuto | ( | const vpMatrix & | points, |
const vpColVector & | weights, | ||
const vpColVector & | direction, | ||
unsigned int | order = 0 |
||
) |
Define the polynomial curve to fit as best as possible a set of control points at given parametric values. Parametric values for the different points are automatically computed according to their position along a given straight direction.
points | The desired control points. |
weights | Set of weights describing the importance of fitting each point with the curve. |
direction | The direction used to compute the parametric values associated to each point. |
order | The order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default)) |
Definition at line 886 of file usPolynomialCurve3D.cpp.
References defineFromWeightedPoints(), getParametricLength(), m_order, and m_startParameter.
void usPolynomialCurve3D::defineFromWeightedPointsAuto | ( | const vpMatrix & | points, |
const vpColVector & | weights, | ||
unsigned int | order = 0 |
||
) |
Define the polynomial curve to fit as best as possible a set of control points at given parametric values. Parametric values for the different points are automatically computed.
points | The desired control points. |
weights | Set of weights describing the importance of fitting each point with the curve. |
order | The order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default)) |
Definition at line 751 of file usPolynomialCurve3D.cpp.
References defineFromWeightedPoints(), getParametricLength(), m_order, and m_startParameter.
vpMatrix usPolynomialCurve3D::getControlPoints | ( | ) | const |
Get the control points. (to remove)
Definition at line 1117 of file usPolynomialCurve3D.cpp.
References getParametricLength(), getPoints(), getStartPoint(), m_order, and m_startParameter.
double usPolynomialCurve3D::getCurvature | ( | double | param | ) | const |
Get the curvature of the curve at a specific point.
param | Parametric value where the curvature should be computed. |
Definition at line 945 of file usPolynomialCurve3D.cpp.
References getDerivative().
double usPolynomialCurve3D::getCurvatureFromShape | ( | double | start, |
double | end, | ||
vpColVector & | center3D, | ||
vpColVector & | direction3D | ||
) | const |
Get the approximate curvature of a portion of the curve
start | Starting parametric value of the portion of the curve. |
end | Ending parametric value of the portion of the curve. |
center3D | Center of the circle fitting the portion of the curve. |
direction3D | Normal of the circle fitting the portion of the curve. |
Definition at line 956 of file usPolynomialCurve3D.cpp.
References getParametricLength(), and getPoints().
Referenced by usGeometryDisplayTools::displayCurvatureFromShape().
vpColVector usPolynomialCurve3D::getDerivative | ( | double | parameter, |
unsigned int | order | ||
) | const |
Get the derivative of the polynmial curve at a given parametric value.
Definition at line 257 of file usPolynomialCurve3D.cpp.
References m_order, and m_polynomialCoefficients.
Referenced by usNeedleModelPolynomial::getBaseStaticTorsor(), usNeedleModelSpline::getBaseStaticTorsor(), usNeedleModelSpline::getBendingEnergy(), and getCurvature().
double usPolynomialCurve3D::getEndParameter | ( | ) | const |
Get the ending value of the parametric variable of the polynomial curve.
Definition at line 144 of file usPolynomialCurve3D.cpp.
References m_endParameter.
Referenced by usGeometryDisplayTools::display(), usNeedleModelSpline::getBendingEnergy(), usGeometryTools::getPlaneCurveCrossingPoint(), and usGeometryTools::projectPointOnCurve().
vpColVector usPolynomialCurve3D::getEndPoint | ( | ) | const |
Get the ending extremity of the polynomial curve.
Definition at line 239 of file usPolynomialCurve3D.cpp.
References getPoint(), and m_endParameter.
Referenced by usNeedleInsertionModelVirtualSprings::addInsertionPoint(), usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegmentHard(), usNeedleInsertionModelRayleighRitzSpline::cutPathToPoint(), usGeometryDisplayTools::displayExtremities(), usNeedleModelingDisplayTools::displayNeedle(), usGeometryTools::DoesSegmentCrossPlane(), usGeometryTools::DoesSegmentCrossPlaneDirect(), usNeedleInsertionModelVirtualSprings::getMaxTissueStretch(), usNeedleInsertionModelVirtualSprings::getMeanTissueStretch(), usNeedleInsertionModelRayleighRitzSpline::getNeedleFreeLength(), usNeedleInsertionModelVirtualSprings::getNeedleInsertionPoint(), usNeedleInsertionModelVirtualSprings::getTissueDeformationEnergy(), usGeometryTools::projectPointOnCurve(), usNeedleInsertionModelVirtualSprings::setSurfaceAtTip(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersOpenCV(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersSparseEigen(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersViSP(), usNeedleInsertionModelRayleighRitzSpline::updatePath(), usNeedleInsertionModelRayleighRitzSpline::updateState(), and usNeedleInsertionModelRayleighRitzSpline::updateTipPose().
vpColVector usPolynomialCurve3D::getEndTangent | ( | ) | const |
Get the tangent vector at the starting extremity of the polynomial curve.
Definition at line 255 of file usPolynomialCurve3D.cpp.
References getTangent(), and m_endParameter.
Referenced by usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegmentHard(), usNeedleModelingDisplayTools::displayNeedle(), usNeedleInsertionModelVirtualSprings::setSurfaceAtTip(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersOpenCV(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersSparseEigen(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersViSP(), usNeedleInsertionModelVirtualSprings::updateInsertionDirections(), usNeedleInsertionModelRayleighRitzSpline::updatePath(), usNeedleInsertionModelRayleighRitzSpline::updateState(), and usNeedleInsertionModelRayleighRitzSpline::updateTipPose().
double usPolynomialCurve3D::getLength | ( | int | nbCountSeg = 50 | ) | const |
Get the curve length in metric space.
Definition at line 186 of file usPolynomialCurve3D.cpp.
References getParametricLength(), getPoints(), and m_startParameter.
Referenced by changeCoefficientsToFitMetricLength(), usNeedleInsertionModelVirtualSprings::computeSegmentsLengths(), usNeedleInsertionModelRayleighRitzSpline::fitLength(), setLength(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), and usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen().
double usPolynomialCurve3D::getMeanAxisDeviation | ( | int | nbCountSeg = 50 | ) | const |
Get the mean deviation of the polynomial with respect to the straight axis between the two extremities.
nbCountSeg | number of segments used to approximate the deviation. |
Definition at line 1072 of file usPolynomialCurve3D.cpp.
References getParametricLength(), getPoints(), and m_startParameter.
usPolynomialCurve3D usPolynomialCurve3D::getNewOrderPolynomialCurve | ( | unsigned int | order | ) | const |
Get new curve with new polynomial order.
Definition at line 1176 of file usPolynomialCurve3D.cpp.
References setOrder().
unsigned int usPolynomialCurve3D::getOrder | ( | ) | const |
Get the order of the polynomial curve.
Definition at line 136 of file usPolynomialCurve3D.cpp.
References m_order.
Referenced by curveDistance(), usNeedleModelingDisplayTools::displayNeedle(), usNeedleModelSpline::getBendingEnergy(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), and usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen().
double usPolynomialCurve3D::getParametricLength | ( | ) | const |
Get the length of the curve in the parametric variable space.
Definition at line 160 of file usPolynomialCurve3D.cpp.
References m_endParameter, and m_startParameter.
Referenced by usNeedleInsertionModelVirtualSprings::addInsertionPoint(), usNeedleInsertionModelVirtualSprings::addInsertionPointAtTip(), usNeedleInsertionModelVirtualSprings::addInsertionPointAtTipHard(), usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegment(), usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegmentHard(), usNeedleInsertionModelVirtualSprings::addRemoveSprings(), usBSpline3D::addSegment(), usGeometryTools::convertPolynomialToBSpline(), defineFromPointsAuto(), defineFromWeightedPointsAuto(), usNeedleModelingDisplayTools::displayNeedle(), usNeedleModelingDisplayTools::displayTissueLayers(), usNeedleInsertionModelVirtualSprings::fusionSprings(), getControlPoints(), usNeedleInsertionModelRayleighRitzSpline::getCorrespondingPathPoint(), usNeedleModelPolynomial::getCurvatureFromNeedleShape(), getCurvatureFromShape(), usNeedleInsertionModelVirtualSprings::getInsertionDepth(), getLength(), usNeedleInsertionModelRayleighRitzSpline::getMaxTissueStretch(), usNeedleInsertionModelVirtualSprings::getMaxTissueStretch(), getMeanAxisDeviation(), usNeedleInsertionModelRayleighRitzSpline::getMeanTissueStretch(), usNeedleInsertionModelVirtualSprings::getMeanTissueStretch(), usNeedleInsertionModelVirtualSprings::getNeedleFreeLength(), usNeedleInsertionModelRayleighRitzSpline::getNeedleFreeLength(), usGeometryTools::getPlaneCurveCrossingPoint(), getRenderingPoints(), usBSpline3D::getSubSpline(), usNeedleInsertionModelRayleighRitzSpline::getTissueDeformationEnergy(), usNeedleInsertionModelVirtualSprings::removeInsertionPoints(), usNeedleInsertionModelVirtualSprings::removeInsertionPointsHard(), setLength(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersOpenCV(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersSparseEigen(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersViSP(), usNeedleInsertionModelRayleighRitzSpline::updatePath(), usNeedleInsertionModelVirtualSprings::updateSpringsStiffness(), and usNeedleInsertionModelVirtualSprings::updateState().
vpColVector usPolynomialCurve3D::getPoint | ( | double | parameter | ) | const |
Get the polynomial curve point at a given parametric value.
Definition at line 217 of file usPolynomialCurve3D.cpp.
References m_order, and m_polynomialCoefficients.
Referenced by usNeedleInsertionModelVirtualSprings::addInsertionPoint(), usTissueTranslationEstimatorUKF::computeMeasureFromSigmaPoint(), usGeometryTools::convertPolynomialToBSpline(), usNeedleModelingDisplayTools::displayInteraction(), usNeedleModelingDisplayTools::displayNeedle(), getEndPoint(), usNeedleInsertionModelRayleighRitzSpline::getMaxTissueStretch(), usNeedleInsertionModelRayleighRitzSpline::getMeanTissueStretch(), usNeedleModelPolynomial::getNeedlePoint(), usGeometryTools::getNormalPlane(), usGeometryTools::getPlaneCurveCrossingPoint(), usTissueModelPolynomial::getPose(), getStartPoint(), usNeedleInsertionModelRayleighRitzSpline::getTissueDeformationEnergy(), and usGeometryTools::projectPointOnCurve().
vpMatrix usPolynomialCurve3D::getPoints | ( | const vpColVector & | parameters | ) | const |
Get the polynomial curve points at given parametric values.
Definition at line 226 of file usPolynomialCurve3D.cpp.
References m_order, and m_polynomialCoefficients.
Referenced by usGeometryDisplayTools::display(), getControlPoints(), getCurvatureFromShape(), getLength(), getMeanAxisDeviation(), and getRenderingPoints().
vpMatrix usPolynomialCurve3D::getPolynomialCoefficients | ( | ) | const |
Get the polynomial coefficients.
Definition at line 215 of file usPolynomialCurve3D.cpp.
References m_polynomialCoefficients.
Referenced by curveDistance(), usNeedleModelSpline::getBendingEnergy(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), and usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen().
vpMatrix usPolynomialCurve3D::getRenderingPoints | ( | ) | const |
Get the rendering points. (to remove)
Definition at line 1131 of file usPolynomialCurve3D.cpp.
References getParametricLength(), getPoints(), m_order, and m_startParameter.
double usPolynomialCurve3D::getStartParameter | ( | ) | const |
Get the starting value of the parametric variable of the polynomial curve.
Definition at line 140 of file usPolynomialCurve3D.cpp.
References m_startParameter.
Referenced by usGeometryDisplayTools::display(), usNeedleModelSpline::getBendingEnergy(), usGeometryTools::getPlaneCurveCrossingPoint(), and usGeometryTools::projectPointOnCurve().
vpColVector usPolynomialCurve3D::getStartPoint | ( | ) | const |
Get the starting extremity of the polynomial curve.
Definition at line 237 of file usPolynomialCurve3D.cpp.
References getPoint(), and m_startParameter.
Referenced by usNeedleInsertionModelVirtualSprings::addInsertionPoint(), usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegmentHard(), usNeedleModelingDisplayTools::displayBaseStaticTorsor(), usGeometryDisplayTools::displayExtremities(), usNeedleModelingDisplayTools::displayNeedle(), usGeometryTools::DoesSegmentCrossPlane(), usGeometryTools::DoesSegmentCrossPlaneDirect(), getControlPoints(), usNeedleInsertionModelRayleighRitzSpline::getNeedleFreeLength(), usGeometryTools::getPlaneCurveCrossingPoint(), and usGeometryTools::projectPointOnCurve().
vpColVector usPolynomialCurve3D::getStartTangent | ( | ) | const |
Get the tangent vector at the starting extremity of the polynomial curve.
Definition at line 253 of file usPolynomialCurve3D.cpp.
References getTangent(), and m_startParameter.
Referenced by usNeedleModelingDisplayTools::displayNeedle(), usNeedleModelPolynomial::getBaseStaticTorsor(), usNeedleModelSpline::getBaseStaticTorsor(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersOpenCV(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersSparseEigen(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersViSP(), and usNeedleInsertionModelRayleighRitzSpline::updateTipPose().
usPolynomialCurve3D usPolynomialCurve3D::getSubPolynomialCurve | ( | double | startParameter, |
double | endParameter | ||
) | const |
Get new curve starting at different parametric coefficients .
Definition at line 1167 of file usPolynomialCurve3D.cpp.
References setBoundaries().
Referenced by usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegmentHard(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), and usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen().
vpColVector usPolynomialCurve3D::getTangent | ( | double | parameter | ) | const |
Get the tangent vector at a given parametric value.
Definition at line 241 of file usPolynomialCurve3D.cpp.
References m_order, and m_polynomialCoefficients.
Referenced by usNeedleModelingDisplayTools::displayNeedle(), getEndTangent(), usNeedleModelPolynomial::getNeedleDirection(), usGeometryTools::getNormalPlane(), and getStartTangent().
void usPolynomialCurve3D::move | ( | const vpHomogeneousMatrix & | H | ) |
Apply an homogeneous transformation to the polynomial curve.
Definition at line 1236 of file usPolynomialCurve3D.cpp.
References m_polynomialCoefficients, and setPolynomialCoefficients().
Referenced by usTissueModelPolynomial::move(), move(), usTissueModelPolynomial::moveInWorldFrame(), and usTissueModelPolynomial::setPose().
void usPolynomialCurve3D::move | ( | double | x, |
double | y, | ||
double | z, | ||
double | tx, | ||
double | ty, | ||
double | tz | ||
) |
Apply an homogeneous transformation to the polynomial curve.
Definition at line 1246 of file usPolynomialCurve3D.cpp.
References move().
const usPolynomialCurve3D & usPolynomialCurve3D::operator= | ( | const usPolynomialCurve3D & | curve | ) |
Assignment operator.
Definition at line 50 of file usPolynomialCurve3D.cpp.
References m_endParameter, m_order, m_polynomialCoefficients, and m_startParameter.
void usPolynomialCurve3D::reverse | ( | ) |
Invert the direction of displacement along the curve with respect to the parametric variable.
Definition at line 1227 of file usPolynomialCurve3D.cpp.
References changeCoefficientsToFitBoundaries(), m_endParameter, and m_startParameter.
Referenced by setBoundaries().
void usPolynomialCurve3D::scale | ( | double | s | ) |
Scale the polynomial curve.
Definition at line 1251 of file usPolynomialCurve3D.cpp.
References m_polynomialCoefficients.
void usPolynomialCurve3D::setBoundaries | ( | double | startParameter, |
double | endParamter | ||
) |
Set the starting and ending values of the parametric variable of the polynomial curve. If the starting value is higher than the ending value, these values are inverted as well as the direction of displacement along the curve.
Definition at line 146 of file usPolynomialCurve3D.cpp.
References m_endParameter, m_startParameter, and reverse().
Referenced by changeCoefficientsToFitMetricLength(), defineFromPoints(), defineFromWeightedPoints(), getSubPolynomialCurve(), usNeedleModelPolynomial::init(), and usNeedleModelSpline::init().
void usPolynomialCurve3D::setControlPoints | ( | const vpMatrix & | controlPoints | ) |
Set the control points. The input matrix has to be of size 2xn, where n is the order of the polynomial curve.
controlPoints | Reference to the desired control points. |
Definition at line 1096 of file usPolynomialCurve3D.cpp.
References defineFromPointsAuto().
Referenced by setControlPoints().
void usPolynomialCurve3D::setControlPoints | ( | double ** | controlPoints | ) |
Set the control points.
Definition at line 1110 of file usPolynomialCurve3D.cpp.
References m_order, and setControlPoints().
void usPolynomialCurve3D::setEndParameter | ( | double | endParameter | ) |
Set the ending value of the parametric variable of the polynomial curve.
Definition at line 142 of file usPolynomialCurve3D.cpp.
References m_endParameter.
void usPolynomialCurve3D::setLength | ( | double | length, |
double | precision = 1e-4 |
||
) |
Set the curve length in metric space.
Definition at line 162 of file usPolynomialCurve3D.cpp.
References getLength(), getParametricLength(), and m_endParameter.
void usPolynomialCurve3D::setOrder | ( | unsigned int | order | ) |
Change the order of the polynomial curve.
Definition at line 67 of file usPolynomialCurve3D.cpp.
References m_endParameter, m_order, m_polynomialCoefficients, and m_startParameter.
Referenced by getNewOrderPolynomialCurve().
void usPolynomialCurve3D::setParametricLength | ( | double | length | ) |
Set the length of the curve in the parametric variable space.
Definition at line 158 of file usPolynomialCurve3D.cpp.
References m_endParameter, and m_startParameter.
Referenced by usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegmentHard(), usNeedleInsertionModelVirtualSprings::addRemoveSprings(), usNeedleInsertionModelVirtualSprings::computeSegmentsLengths(), usNeedleInsertionModelRayleighRitzSpline::cutPathToPoint(), usBSpline3D::defineFromPoints(), usNeedleInsertionModelRayleighRitzSpline::fitLength(), usNeedleModelPolynomial::loadPreset(), usNeedleInsertionModelVirtualSprings::removeInsertionPointsHard(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen(), and usNeedleInsertionModelRayleighRitzSpline::updatePath().
void usPolynomialCurve3D::setPolynomialCoefficients | ( | const vpMatrix & | polynomialCoefficients | ) |
Set the curve polynomial coefficients.
Definition at line 202 of file usPolynomialCurve3D.cpp.
References m_order, and m_polynomialCoefficients.
Referenced by usNeedleInsertionModelRayleighRitzSpline::cutPathToPoint(), usBSpline3D::defineFromPoints(), defineFromPoints(), defineFromWeightedPoints(), usNeedleModelPolynomial::init(), usNeedleModelSpline::init(), move(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersOpenCV(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersSparseEigen(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersViSP(), and usNeedleInsertionModelRayleighRitzSpline::updatePath().
void usPolynomialCurve3D::setStartParameter | ( | double | startParameter | ) |
Set the starting value of the parametric variable of the polynomial curve.
Definition at line 138 of file usPolynomialCurve3D.cpp.
References m_startParameter.
|
friend |
|
friend |
Binary.
Definition at line 1288 of file usPolynomialCurve3D.cpp.
|
friend |
Definition at line 1268 of file usPolynomialCurve3D.cpp.
|
friend |
Definition at line 1301 of file usPolynomialCurve3D.cpp.
|
protected |
Definition at line 433 of file usPolynomialCurve3D.h.
Referenced by changeCoefficientsToFitBoundaries(), changeCoefficientsToFitMetricLength(), usNeedleModelPolynomial::getBendingEnergy(), usNeedleModelPolynomial::getCurvatureFromNeedleShape(), usNeedleModelPolynomial::getDistanceFromPoint(), getEndParameter(), getEndPoint(), getEndTangent(), usNeedleModelPolynomial::getNeedleDirection(), usNeedleModelPolynomial::getNeedlePoint(), getParametricLength(), operator=(), reverse(), setBoundaries(), setEndParameter(), setLength(), setOrder(), and setParametricLength().
|
protected |
Definition at line 431 of file usPolynomialCurve3D.h.
Referenced by changeCoefficientsToFitBoundaries(), defineFromPoints(), defineFromPointsAuto(), defineFromWeightedPoints(), defineFromWeightedPointsAuto(), usNeedleModelPolynomial::getBendingEnergy(), getControlPoints(), getDerivative(), getOrder(), getPoint(), getPoints(), getRenderingPoints(), getTangent(), operator=(), setControlPoints(), setOrder(), and setPolynomialCoefficients().
|
protected |
Definition at line 434 of file usPolynomialCurve3D.h.
Referenced by changeCoefficientsToFitBoundaries(), usNeedleModelPolynomial::getBendingEnergy(), getDerivative(), getPoint(), getPoints(), getPolynomialCoefficients(), getTangent(), move(), operator=(), scale(), setOrder(), and setPolynomialCoefficients().
|
protected |
Definition at line 432 of file usPolynomialCurve3D.h.
Referenced by changeCoefficientsToFitBoundaries(), changeCoefficientsToFitMetricLength(), defineFromPointsAuto(), defineFromWeightedPointsAuto(), usNeedleModelPolynomial::getBendingEnergy(), getControlPoints(), usNeedleModelPolynomial::getCurvatureFromNeedleShape(), getLength(), getMeanAxisDeviation(), getParametricLength(), getRenderingPoints(), getStartParameter(), getStartPoint(), getStartTangent(), operator=(), reverse(), setBoundaries(), setOrder(), setParametricLength(), and setStartParameter().