UsTK : Ultrasound ToolKit  version 2.0.1 under development (2023-12-07)
usNeedleModelPolynomial Class Reference

#include <visp3/ustk_needle_modeling/usNeedleModelPolynomial.h>

+ Inheritance diagram for usNeedleModelPolynomial:

Public Types

enum class  NeedlePreset : int {
  BiopsyNeedle , BiopsyCannula , AbayazidRRM13 , MisraRSRO10_PlastisolA ,
  RoesthuisAM12 , SteelSoftTissue
}
 

Public Member Functions

 usNeedleModelPolynomial ()
 
 usNeedleModelPolynomial (const usNeedleModelPolynomial &needle)
 
virtual ~usNeedleModelPolynomial ()
 
const usNeedleModelPolynomialoperator= (const usNeedleModelPolynomial &needle)
 
virtual usNeedleModelPolynomialclone () const
 
void loadPreset (const NeedlePreset preset)
 
void setOuterDiameter (double diameter)
 
double getOuterDiameter () const
 
void setInsideDiameter (double diameter)
 
double getInsideDiameter () const
 
void setNeedleYoungModulus (double E)
 
double getNeedleYoungModulus () const
 
double getEI () const
 
void init ()
 
vpColVector getNeedlePoint (double l) const
 
vpColVector getNeedleDirection (double l) const
 
double getDistanceFromPoint (const vpColVector &P, double start=0, double stop=-1, double threshold=1e-5) const
 
double getBendingEnergy () const
 
vpColVector getBaseStaticTorsor () const
 
double getCurvatureFromNeedleShape (double start, double end, vpColVector &center3D, vpColVector &direction3D) const
 
vpPoseVector getBasePose () const
 
vpHomogeneousMatrix getWorldMbase () const
 
vpColVector getBasePosition () const
 
vpColVector getBaseDirection () const
 
vpPoseVector getTipPose () const
 
vpHomogeneousMatrix getWorldMtip () const
 
vpColVector getTipPosition () const
 
vpColVector getTipDirection () const
 
void setBasePose (double tx, double ty, double tz, double thetax, double thetay, double thetaz)
 
void setBasePose (const vpPoseVector &pose)
 
void setBasePose (const vpHomogeneousMatrix &Hpose)
 
void setTipPose (double tx, double ty, double tz, double thetax, double thetay, double thetaz)
 
void setTipPose (const vpPoseVector &pose)
 
void setTipPose (const vpHomogeneousMatrix &Hpose)
 
void moveBase (const vpColVector &control, double time)
 
void moveBase (double tx, double ty, double tz, double thetax, double thetay, double thetaz)
 
void moveBase (const vpPoseVector &pose)
 
void moveBase (const vpColVector &v)
 
void moveBase (const vpHomogeneousMatrix &Hmotion)
 
void moveBaseWorldFrame (const vpColVector &command, double time)
 
void moveBaseWorldFrame (double tx, double ty, double tz, double thetax, double thetay, double thetaz)
 
void moveBaseWorldFrame (const vpPoseVector &pose)
 
void moveBaseWorldFrame (const vpColVector &v)
 
void moveBaseWorldFrame (const vpHomogeneousMatrix &Hmotion)
 
void moveTip (const vpColVector &control, double time)
 
void moveTip (double tx, double ty, double tz, double thetax, double thetay, double thetaz)
 
void moveTip (const vpPoseVector &pose)
 
void moveTip (const vpColVector &v)
 
void moveTip (const vpHomogeneousMatrix &Hmotion)
 
void moveTipWorldFrame (const vpColVector &command, double time)
 
void moveTipWorldFrame (double tx, double ty, double tz, double thetax, double thetay, double thetaz)
 
void moveTipWorldFrame (const vpPoseVector &pose)
 
void moveTipWorldFrame (const vpColVector &v)
 
void moveTipWorldFrame (const vpHomogeneousMatrix &Hmotion)
 
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 &parameters) 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 > &param, unsigned int order=0)
 
void defineFromPoints (const vpMatrix points, const vpColVector &param, 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 > &param, const std::vector< double > &weights, unsigned int order=0)
 
void defineFromWeightedPoints (const vpMatrix &points, const vpColVector &param, 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 &center3D, 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

double m_outerDiameter
 
double m_insideDiameter
 
double m_needleYoungModulus
 
vpPoseVector m_basePose
 
vpHomogeneousMatrix m_worldMbase
 
vpPoseVector m_tipPose
 
vpHomogeneousMatrix m_worldMtip
 
unsigned int m_order
 
double m_startParameter
 
double m_endParameter
 
vpMatrix m_polynomialCoefficients
 

Friends

VISP_EXPORT std::ostream & operator<< (std::ostream &s, const usNeedleModelPolynomial &needle)
 
VISP_EXPORT std::istream & operator>> (std::istream &s, usNeedleModelPolynomial &needle)
 
VISP_EXPORT std::ostream & operator<<= (std::ostream &s, const usNeedleModelPolynomial &needle)
 
VISP_EXPORT std::istream & operator>>= (std::istream &s, usNeedleModelPolynomial &needle)
 

Detailed Description

Definition at line 43 of file usNeedleModelPolynomial.h.

Member Enumeration Documentation

◆ NeedlePreset

Enumerator
BiopsyNeedle 
BiopsyCannula 
AbayazidRRM13 
MisraRSRO10_PlastisolA 
RoesthuisAM12 
SteelSoftTissue 

Definition at line 46 of file usNeedleModelPolynomial.h.

Constructor & Destructor Documentation

◆ usNeedleModelPolynomial() [1/2]

usNeedleModelPolynomial::usNeedleModelPolynomial ( )

Constructors, destructor.

Definition at line 42 of file usNeedleModelPolynomial.cpp.

References init().

◆ usNeedleModelPolynomial() [2/2]

usNeedleModelPolynomial::usNeedleModelPolynomial ( const usNeedleModelPolynomial needle)

Definition at line 50 of file usNeedleModelPolynomial.cpp.

◆ ~usNeedleModelPolynomial()

usNeedleModelPolynomial::~usNeedleModelPolynomial ( )
virtual

Definition at line 58 of file usNeedleModelPolynomial.cpp.

Member Function Documentation

◆ changeCoefficientsToFitBoundaries()

◆ changeCoefficientsToFitMetricLength()

void usPolynomialCurve3D::changeCoefficientsToFitMetricLength ( )
inherited

Modify the polynomial coefficients such that the metric length of the curve corresponds to the parametric length.

Examples
testUsPolynomialCurve3D.cpp.

Definition at line 1229 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::changeCoefficientsToFitBoundaries(), usPolynomialCurve3D::getLength(), usPolynomialCurve3D::m_endParameter, usPolynomialCurve3D::m_startParameter, and usPolynomialCurve3D::setBoundaries().

◆ clone()

virtual usNeedleModelPolynomial* usNeedleModelPolynomial::clone ( ) const
inlinevirtual

Reimplemented from usNeedleModelBaseTip.

Definition at line 70 of file usNeedleModelPolynomial.h.

◆ curveDistance()

double usPolynomialCurve3D::curveDistance ( const usPolynomialCurve3D n1,
const usPolynomialCurve3D n2 
)
staticinherited

Compute the distance between two curves. (to remove)

Definition at line 1143 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::getOrder(), and usPolynomialCurve3D::getPolynomialCoefficients().

◆ defineFromPoints() [1/2]

void usPolynomialCurve3D::defineFromPoints ( const std::vector< vpColVector > &  points,
const std::vector< double > &  param,
unsigned int  order = 0 
)
inherited

Define the polynomial curve to fit as best as possible a set of control points at given parametric values.

Parameters
pointsThe desired control points.
paramThe desired parametric values.
orderThe order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default))
Examples
testUsBSpline3D.cpp, and testUsPolynomialCurve3D.cpp.

Definition at line 278 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::m_order, usPolynomialCurve3D::setBoundaries(), and usPolynomialCurve3D::setPolynomialCoefficients().

Referenced by usGeometryTools::convertBSplineToPolynomial(), usPolynomialCurve3D::defineFromPointsAuto(), and usNeedleModelingDisplayTools::displayNeedle().

◆ defineFromPoints() [2/2]

void usPolynomialCurve3D::defineFromPoints ( const vpMatrix  points,
const vpColVector &  param,
unsigned int  order = 0 
)
inherited

Define the polynomial curve to fit as best as possible a set of control points at given parametric values.

Parameters
pointsThe desired control points.
paramThe desired parametric values.
orderThe 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 usPolynomialCurve3D::m_order, usPolynomialCurve3D::setBoundaries(), and usPolynomialCurve3D::setPolynomialCoefficients().

◆ defineFromPointsAuto() [1/4]

void usPolynomialCurve3D::defineFromPointsAuto ( const std::vector< vpColVector > &  points,
const vpColVector &  direction,
unsigned int  order = 0 
)
inherited

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.

Parameters
pointsThe desired control points.
directionThe direction used to compute the parametric values associated to each point.
orderThe 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 usPolynomialCurve3D::defineFromPoints(), usPolynomialCurve3D::getParametricLength(), usPolynomialCurve3D::m_order, and usPolynomialCurve3D::m_startParameter.

◆ defineFromPointsAuto() [2/4]

void usPolynomialCurve3D::defineFromPointsAuto ( const std::vector< vpColVector > &  points,
unsigned int  order = 0 
)
inherited

Define the polynomial curve to fit as best as possible a set of control points. Parametric values for the different points are automatically computed.

Parameters
pointsThe desired control points.
orderThe order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default))
Examples
testUsGeometryDisplayTools.cpp, and testUsPolynomialCurve3D.cpp.

Definition at line 395 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::m_order.

Referenced by usPolynomialCurve3D::defineFromPointsAuto(), and usPolynomialCurve3D::setControlPoints().

◆ defineFromPointsAuto() [3/4]

void usPolynomialCurve3D::defineFromPointsAuto ( const vpMatrix &  points,
const vpColVector &  direction,
unsigned int  order = 0 
)
inherited

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.

Parameters
pointsThe desired control points.
directionThe direction used to compute the parametric values associated to each point.
orderThe 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 usPolynomialCurve3D::defineFromPoints(), usPolynomialCurve3D::getParametricLength(), usPolynomialCurve3D::m_order, and usPolynomialCurve3D::m_startParameter.

◆ defineFromPointsAuto() [4/4]

void usPolynomialCurve3D::defineFromPointsAuto ( const vpMatrix &  points,
unsigned int  order = 0 
)
inherited

Define the polynomial curve to fit as best as possible a set of control points. Parametric values for the different points are automatically computed.

Parameters
pointsThe desired control points.
orderThe 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 usPolynomialCurve3D::defineFromPointsAuto(), and usPolynomialCurve3D::m_order.

◆ defineFromWeightedPoints() [1/2]

void usPolynomialCurve3D::defineFromWeightedPoints ( const std::vector< vpColVector > &  points,
const std::vector< double > &  param,
const std::vector< double > &  weights,
unsigned int  order = 0 
)
inherited

Define the polynomial curve to fit as best as possible a set of weighted control points at given parametric values.

Parameters
pointsThe desired control points.
paramThe desired parametric values.
weightsSet of weights describing the importance of fitting each point with the curve.
orderThe order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default))
Examples
testUsPolynomialCurve3D.cpp.

Definition at line 553 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::m_order, usPolynomialCurve3D::setBoundaries(), and usPolynomialCurve3D::setPolynomialCoefficients().

Referenced by usPolynomialCurve3D::defineFromWeightedPointsAuto().

◆ defineFromWeightedPoints() [2/2]

void usPolynomialCurve3D::defineFromWeightedPoints ( const vpMatrix &  points,
const vpColVector &  param,
const vpColVector &  weights,
unsigned int  order = 0 
)
inherited

Define the polynomial curve to fit as best as possible a set of weighted control points at given parametric values.

Parameters
pointsThe desired control points.
paramThe desired parametric values.
weightsSet of weights describing the importance of fitting each point with the curve.
orderThe 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 usPolynomialCurve3D::m_order, usPolynomialCurve3D::setBoundaries(), and usPolynomialCurve3D::setPolynomialCoefficients().

◆ defineFromWeightedPointsAuto() [1/4]

void usPolynomialCurve3D::defineFromWeightedPointsAuto ( const std::vector< vpColVector > &  points,
const std::vector< double > &  weights,
const vpColVector &  direction,
unsigned int  order = 0 
)
inherited

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.

Parameters
pointsThe desired control points.
weightsSet of weights describing the importance of fitting each point with the curve.
directionThe direction used to compute the parametric values associated to each point.
orderThe 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 usPolynomialCurve3D::defineFromWeightedPoints(), usPolynomialCurve3D::getParametricLength(), usPolynomialCurve3D::m_order, and usPolynomialCurve3D::m_startParameter.

◆ defineFromWeightedPointsAuto() [2/4]

void usPolynomialCurve3D::defineFromWeightedPointsAuto ( const std::vector< vpColVector > &  points,
const std::vector< double > &  weights,
unsigned int  order = 0 
)
inherited

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.

Parameters
pointsThe desired control points.
weightsSet of weights describing the importance of fitting each point with the curve.
orderThe order of the resulting polynomial curve (keep the current order of the curve if given value is <1 (default))
Examples
testUsPolynomialCurve3D.cpp.

Definition at line 678 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::defineFromWeightedPoints(), usPolynomialCurve3D::getParametricLength(), usPolynomialCurve3D::m_order, and usPolynomialCurve3D::m_startParameter.

◆ defineFromWeightedPointsAuto() [3/4]

void usPolynomialCurve3D::defineFromWeightedPointsAuto ( const vpMatrix &  points,
const vpColVector &  weights,
const vpColVector &  direction,
unsigned int  order = 0 
)
inherited

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.

Parameters
pointsThe desired control points.
weightsSet of weights describing the importance of fitting each point with the curve.
directionThe direction used to compute the parametric values associated to each point.
orderThe 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 usPolynomialCurve3D::defineFromWeightedPoints(), usPolynomialCurve3D::getParametricLength(), usPolynomialCurve3D::m_order, and usPolynomialCurve3D::m_startParameter.

◆ defineFromWeightedPointsAuto() [4/4]

void usPolynomialCurve3D::defineFromWeightedPointsAuto ( const vpMatrix &  points,
const vpColVector &  weights,
unsigned int  order = 0 
)
inherited

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.

Parameters
pointsThe desired control points.
weightsSet of weights describing the importance of fitting each point with the curve.
orderThe 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 usPolynomialCurve3D::defineFromWeightedPoints(), usPolynomialCurve3D::getParametricLength(), usPolynomialCurve3D::m_order, and usPolynomialCurve3D::m_startParameter.

◆ getBaseDirection()

vpColVector usNeedleModelBaseTip::getBaseDirection ( ) const
inherited

Definition at line 66 of file usNeedleModelBaseTip.cpp.

References usNeedleModelBaseTip::m_worldMbase.

◆ getBasePose()

◆ getBasePosition()

vpColVector usNeedleModelBaseTip::getBasePosition ( ) const
inherited

◆ getBaseStaticTorsor()

vpColVector usNeedleModelPolynomial::getBaseStaticTorsor ( ) const

◆ getBendingEnergy()

double usNeedleModelPolynomial::getBendingEnergy ( ) const

◆ getControlPoints()

vpMatrix usPolynomialCurve3D::getControlPoints ( ) const
inherited

◆ getCurvature()

double usPolynomialCurve3D::getCurvature ( double  param) const
inherited

Get the curvature of the curve at a specific point.

Parameters
paramParametric value where the curvature should be computed.
Examples
testUsPolynomialCurve3D.cpp.

Definition at line 945 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::getDerivative().

◆ getCurvatureFromNeedleShape()

double usNeedleModelPolynomial::getCurvatureFromNeedleShape ( double  start,
double  end,
vpColVector &  center3D,
vpColVector &  direction3D 
) const

◆ getCurvatureFromShape()

double usPolynomialCurve3D::getCurvatureFromShape ( double  start,
double  end,
vpColVector &  center3D,
vpColVector &  direction3D 
) const
inherited

Get the approximate curvature of a portion of the curve

Parameters
startStarting parametric value of the portion of the curve.
endEnding parametric value of the portion of the curve.
center3DCenter of the circle fitting the portion of the curve.
direction3DNormal of the circle fitting the portion of the curve.

Definition at line 956 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::getParametricLength(), and usPolynomialCurve3D::getPoints().

Referenced by usGeometryDisplayTools::displayCurvatureFromShape().

◆ getDerivative()

vpColVector usPolynomialCurve3D::getDerivative ( double  parameter,
unsigned int  order 
) const
inherited

◆ getDistanceFromPoint()

double usNeedleModelPolynomial::getDistanceFromPoint ( const vpColVector &  P,
double  start = 0,
double  stop = -1,
double  threshold = 1e-5 
) const

◆ getEI()

double usNeedleModelPolynomial::getEI ( ) const

◆ getEndParameter()

double usPolynomialCurve3D::getEndParameter ( ) const
inherited

◆ getEndPoint()

◆ getEndTangent()

◆ getInsideDiameter()

double usNeedleModelPolynomial::getInsideDiameter ( ) const

Definition at line 133 of file usNeedleModelPolynomial.cpp.

References m_insideDiameter.

◆ getLength()

◆ getMeanAxisDeviation()

double usPolynomialCurve3D::getMeanAxisDeviation ( int  nbCountSeg = 50) const
inherited

Get the mean deviation of the polynomial with respect to the straight axis between the two extremities.

Parameters
nbCountSegnumber of segments used to approximate the deviation.
Examples
testUsPolynomialCurve3D.cpp.

Definition at line 1072 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::getParametricLength(), usPolynomialCurve3D::getPoints(), and usPolynomialCurve3D::m_startParameter.

◆ getNeedleDirection()

vpColVector usNeedleModelPolynomial::getNeedleDirection ( double  l) const

◆ getNeedlePoint()

vpColVector usNeedleModelPolynomial::getNeedlePoint ( double  l) const

Measure model information.

Needle position

Definition at line 156 of file usNeedleModelPolynomial.cpp.

References usPolynomialCurve3D::getPoint(), and usPolynomialCurve3D::m_endParameter.

Referenced by getDistanceFromPoint().

◆ getNeedleYoungModulus()

double usNeedleModelPolynomial::getNeedleYoungModulus ( ) const

Definition at line 141 of file usNeedleModelPolynomial.cpp.

References m_needleYoungModulus.

◆ getNewOrderPolynomialCurve()

usPolynomialCurve3D usPolynomialCurve3D::getNewOrderPolynomialCurve ( unsigned int  order) const
inherited

Get new curve with new polynomial order.

Examples
testUsPolynomialCurve3D.cpp.

Definition at line 1176 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::setOrder().

◆ getOrder()

◆ getOuterDiameter()

double usNeedleModelPolynomial::getOuterDiameter ( ) const

Definition at line 125 of file usNeedleModelPolynomial.cpp.

References m_outerDiameter.

Referenced by usNeedleModelingDisplayTools::displayNeedle().

◆ getParametricLength()

double usPolynomialCurve3D::getParametricLength ( ) const
inherited

Get the length of the curve in the parametric variable space.

Examples
testUsPolynomialCurve3D.cpp.

Definition at line 160 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::m_endParameter, and usPolynomialCurve3D::m_startParameter.

Referenced by usNeedleInsertionModelVirtualSprings::addInsertionPoint(), usNeedleInsertionModelVirtualSprings::addInsertionPointAtTip(), usNeedleInsertionModelVirtualSprings::addInsertionPointAtTipHard(), usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegment(), usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegmentHard(), usNeedleInsertionModelVirtualSprings::addRemoveSprings(), usBSpline3D::addSegment(), usGeometryTools::convertPolynomialToBSpline(), usPolynomialCurve3D::defineFromPointsAuto(), usPolynomialCurve3D::defineFromWeightedPointsAuto(), usNeedleModelingDisplayTools::displayNeedle(), usNeedleModelingDisplayTools::displayTissueLayers(), usNeedleInsertionModelVirtualSprings::fusionSprings(), usPolynomialCurve3D::getControlPoints(), usNeedleInsertionModelRayleighRitzSpline::getCorrespondingPathPoint(), getCurvatureFromNeedleShape(), usPolynomialCurve3D::getCurvatureFromShape(), usNeedleInsertionModelVirtualSprings::getInsertionDepth(), usPolynomialCurve3D::getLength(), usNeedleInsertionModelRayleighRitzSpline::getMaxTissueStretch(), usNeedleInsertionModelVirtualSprings::getMaxTissueStretch(), usPolynomialCurve3D::getMeanAxisDeviation(), usNeedleInsertionModelRayleighRitzSpline::getMeanTissueStretch(), usNeedleInsertionModelVirtualSprings::getMeanTissueStretch(), usNeedleInsertionModelVirtualSprings::getNeedleFreeLength(), usNeedleInsertionModelRayleighRitzSpline::getNeedleFreeLength(), usGeometryTools::getPlaneCurveCrossingPoint(), usPolynomialCurve3D::getRenderingPoints(), usBSpline3D::getSubSpline(), usNeedleInsertionModelRayleighRitzSpline::getTissueDeformationEnergy(), usNeedleInsertionModelVirtualSprings::removeInsertionPoints(), usNeedleInsertionModelVirtualSprings::removeInsertionPointsHard(), usPolynomialCurve3D::setLength(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersOpenCV(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersSparseEigen(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersViSP(), usNeedleInsertionModelRayleighRitzSpline::updatePath(), usNeedleInsertionModelVirtualSprings::updateSpringsStiffness(), and usNeedleInsertionModelVirtualSprings::updateState().

◆ getPoint()

◆ getPoints()

vpMatrix usPolynomialCurve3D::getPoints ( const vpColVector &  parameters) const
inherited

◆ getPolynomialCoefficients()

◆ getRenderingPoints()

vpMatrix usPolynomialCurve3D::getRenderingPoints ( ) const
inherited

◆ getStartParameter()

double usPolynomialCurve3D::getStartParameter ( ) const
inherited

◆ getStartPoint()

◆ getStartTangent()

◆ getSubPolynomialCurve()

◆ getTangent()

vpColVector usPolynomialCurve3D::getTangent ( double  parameter) const
inherited

◆ getTipDirection()

◆ getTipPose()

◆ getTipPosition()

◆ getWorldMbase()

◆ getWorldMtip()

◆ init()

void usNeedleModelPolynomial::init ( )

◆ loadPreset()

void usNeedleModelPolynomial::loadPreset ( const NeedlePreset  preset)

◆ move() [1/2]

void usPolynomialCurve3D::move ( const vpHomogeneousMatrix &  H)
inherited

◆ move() [2/2]

void usPolynomialCurve3D::move ( double  x,
double  y,
double  z,
double  tx,
double  ty,
double  tz 
)
inherited

Apply an homogeneous transformation to the polynomial curve.

Definition at line 1246 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::move().

◆ moveBase() [1/5]

void usNeedleModelBaseTip::moveBase ( const vpColVector &  control,
double  time 
)
inherited

◆ moveBase() [2/5]

void usNeedleModelBaseTip::moveBase ( const vpColVector &  v)
inherited

Definition at line 169 of file usNeedleModelBaseTip.cpp.

References usNeedleModelBaseTip::moveBase().

◆ moveBase() [3/5]

void usNeedleModelBaseTip::moveBase ( const vpHomogeneousMatrix &  Hmotion)
inherited

◆ moveBase() [4/5]

void usNeedleModelBaseTip::moveBase ( const vpPoseVector &  pose)
inherited

Definition at line 162 of file usNeedleModelBaseTip.cpp.

References usNeedleModelBaseTip::moveBase().

◆ moveBase() [5/5]

void usNeedleModelBaseTip::moveBase ( double  tx,
double  ty,
double  tz,
double  thetax,
double  thetay,
double  thetaz 
)
inherited

Definition at line 155 of file usNeedleModelBaseTip.cpp.

References usNeedleModelBaseTip::moveBase().

◆ moveBaseWorldFrame() [1/5]

void usNeedleModelBaseTip::moveBaseWorldFrame ( const vpColVector &  command,
double  time 
)
inherited

Definition at line 187 of file usNeedleModelBaseTip.cpp.

Referenced by usNeedleModelBaseTip::moveBaseWorldFrame().

◆ moveBaseWorldFrame() [2/5]

void usNeedleModelBaseTip::moveBaseWorldFrame ( const vpColVector &  v)
inherited

◆ moveBaseWorldFrame() [3/5]

void usNeedleModelBaseTip::moveBaseWorldFrame ( const vpHomogeneousMatrix &  Hmotion)
inherited

◆ moveBaseWorldFrame() [4/5]

void usNeedleModelBaseTip::moveBaseWorldFrame ( const vpPoseVector &  pose)
inherited

◆ moveBaseWorldFrame() [5/5]

void usNeedleModelBaseTip::moveBaseWorldFrame ( double  tx,
double  ty,
double  tz,
double  thetax,
double  thetay,
double  thetaz 
)
inherited

◆ moveTip() [1/5]

void usNeedleModelBaseTip::moveTip ( const vpColVector &  control,
double  time 
)
inherited

◆ moveTip() [2/5]

void usNeedleModelBaseTip::moveTip ( const vpColVector &  v)
inherited

Definition at line 276 of file usNeedleModelBaseTip.cpp.

References usNeedleModelBaseTip::moveTip().

◆ moveTip() [3/5]

void usNeedleModelBaseTip::moveTip ( const vpHomogeneousMatrix &  Hmotion)
inherited

◆ moveTip() [4/5]

void usNeedleModelBaseTip::moveTip ( const vpPoseVector &  pose)
inherited

Definition at line 269 of file usNeedleModelBaseTip.cpp.

References usNeedleModelBaseTip::moveTip().

◆ moveTip() [5/5]

void usNeedleModelBaseTip::moveTip ( double  tx,
double  ty,
double  tz,
double  thetax,
double  thetay,
double  thetaz 
)
inherited

Definition at line 262 of file usNeedleModelBaseTip.cpp.

References usNeedleModelBaseTip::moveTip().

◆ moveTipWorldFrame() [1/5]

void usNeedleModelBaseTip::moveTipWorldFrame ( const vpColVector &  command,
double  time 
)
inherited

Definition at line 294 of file usNeedleModelBaseTip.cpp.

Referenced by usNeedleModelBaseTip::moveTipWorldFrame().

◆ moveTipWorldFrame() [2/5]

void usNeedleModelBaseTip::moveTipWorldFrame ( const vpColVector &  v)
inherited

◆ moveTipWorldFrame() [3/5]

void usNeedleModelBaseTip::moveTipWorldFrame ( const vpHomogeneousMatrix &  Hmotion)
inherited

◆ moveTipWorldFrame() [4/5]

void usNeedleModelBaseTip::moveTipWorldFrame ( const vpPoseVector &  pose)
inherited

◆ moveTipWorldFrame() [5/5]

void usNeedleModelBaseTip::moveTipWorldFrame ( double  tx,
double  ty,
double  tz,
double  thetax,
double  thetay,
double  thetaz 
)
inherited

◆ operator=()

const usNeedleModelPolynomial & usNeedleModelPolynomial::operator= ( const usNeedleModelPolynomial needle)

◆ reverse()

void usPolynomialCurve3D::reverse ( )
inherited

Invert the direction of displacement along the curve with respect to the parametric variable.

Examples
testUsPolynomialCurve3D.cpp.

Definition at line 1227 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::changeCoefficientsToFitBoundaries(), usPolynomialCurve3D::m_endParameter, and usPolynomialCurve3D::m_startParameter.

Referenced by usPolynomialCurve3D::setBoundaries().

◆ scale()

void usPolynomialCurve3D::scale ( double  s)
inherited

Scale the polynomial curve.

Examples
testUsPolynomialCurve3D.cpp.

Definition at line 1251 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::m_polynomialCoefficients.

◆ setBasePose() [1/3]

void usNeedleModelBaseTip::setBasePose ( const vpHomogeneousMatrix &  Hpose)
inherited

◆ setBasePose() [2/3]

void usNeedleModelBaseTip::setBasePose ( const vpPoseVector &  pose)
inherited

◆ setBasePose() [3/3]

void usNeedleModelBaseTip::setBasePose ( double  tx,
double  ty,
double  tz,
double  thetax,
double  thetay,
double  thetaz 
)
inherited

◆ setBoundaries()

void usPolynomialCurve3D::setBoundaries ( double  startParameter,
double  endParamter 
)
inherited

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.

Examples
testUsPolynomialCurve3D.cpp.

Definition at line 146 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::m_endParameter, usPolynomialCurve3D::m_startParameter, and usPolynomialCurve3D::reverse().

Referenced by usPolynomialCurve3D::changeCoefficientsToFitMetricLength(), usPolynomialCurve3D::defineFromPoints(), usPolynomialCurve3D::defineFromWeightedPoints(), usPolynomialCurve3D::getSubPolynomialCurve(), init(), and usNeedleModelSpline::init().

◆ setControlPoints() [1/2]

void usPolynomialCurve3D::setControlPoints ( const vpMatrix &  controlPoints)
inherited

Set the control points. The input matrix has to be of size 2xn, where n is the order of the polynomial curve.

Parameters
controlPointsReference to the desired control points.
Examples
testUsPolynomialCurve3D.cpp.

Definition at line 1096 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::defineFromPointsAuto().

Referenced by usPolynomialCurve3D::setControlPoints().

◆ setControlPoints() [2/2]

void usPolynomialCurve3D::setControlPoints ( double **  controlPoints)
inherited

Set the control points.

Definition at line 1110 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::m_order, and usPolynomialCurve3D::setControlPoints().

◆ setEndParameter()

void usPolynomialCurve3D::setEndParameter ( double  endParameter)
inherited

Set the ending value of the parametric variable of the polynomial curve.

Examples
testUsPolynomialCurve3D.cpp.

Definition at line 142 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::m_endParameter.

◆ setInsideDiameter()

void usNeedleModelPolynomial::setInsideDiameter ( double  diameter)

Definition at line 127 of file usNeedleModelPolynomial.cpp.

References m_insideDiameter.

Referenced by loadPreset().

◆ setLength()

void usPolynomialCurve3D::setLength ( double  length,
double  precision = 1e-4 
)
inherited

◆ setNeedleYoungModulus()

void usNeedleModelPolynomial::setNeedleYoungModulus ( double  E)

Definition at line 135 of file usNeedleModelPolynomial.cpp.

References m_needleYoungModulus.

Referenced by loadPreset().

◆ setOrder()

◆ setOuterDiameter()

void usNeedleModelPolynomial::setOuterDiameter ( double  diameter)

Parameters setters and getters.

Needle parameters

Definition at line 119 of file usNeedleModelPolynomial.cpp.

References m_outerDiameter.

Referenced by loadPreset().

◆ setParametricLength()

◆ setPolynomialCoefficients()

◆ setStartParameter()

void usPolynomialCurve3D::setStartParameter ( double  startParameter)
inherited

Set the starting value of the parametric variable of the polynomial curve.

Examples
testUsPolynomialCurve3D.cpp.

Definition at line 138 of file usPolynomialCurve3D.cpp.

References usPolynomialCurve3D::m_startParameter.

◆ setTipPose() [1/3]

void usNeedleModelBaseTip::setTipPose ( const vpHomogeneousMatrix &  Hpose)
inherited

◆ setTipPose() [2/3]

void usNeedleModelBaseTip::setTipPose ( const vpPoseVector &  pose)
inherited

◆ setTipPose() [3/3]

Friends And Related Function Documentation

◆ operator<<

VISP_EXPORT std::ostream& operator<< ( std::ostream &  s,
const usNeedleModelPolynomial needle 
)
friend

Data saving.

Text

Definition at line 365 of file usNeedleModelPolynomial.cpp.

◆ operator<<=

VISP_EXPORT std::ostream& operator<<= ( std::ostream &  s,
const usNeedleModelPolynomial needle 
)
friend

Binary.

Definition at line 395 of file usNeedleModelPolynomial.cpp.

◆ operator>>

VISP_EXPORT std::istream& operator>> ( std::istream &  s,
usNeedleModelPolynomial needle 
)
friend

Definition at line 378 of file usNeedleModelPolynomial.cpp.

◆ operator>>=

VISP_EXPORT std::istream& operator>>= ( std::istream &  s,
usNeedleModelPolynomial needle 
)
friend

Definition at line 408 of file usNeedleModelPolynomial.cpp.

Member Data Documentation

◆ m_basePose

vpPoseVector usNeedleModelBaseTip::m_basePose
protectedinherited

◆ m_endParameter

◆ m_insideDiameter

double usNeedleModelPolynomial::m_insideDiameter
protected

Definition at line 59 of file usNeedleModelPolynomial.h.

Referenced by getEI(), getInsideDiameter(), operator=(), and setInsideDiameter().

◆ m_needleYoungModulus

double usNeedleModelPolynomial::m_needleYoungModulus
protected

◆ m_order

◆ m_outerDiameter

double usNeedleModelPolynomial::m_outerDiameter
protected

Needle parameters.

Definition at line 58 of file usNeedleModelPolynomial.h.

Referenced by getEI(), getOuterDiameter(), operator=(), and setOuterDiameter().

◆ m_polynomialCoefficients

◆ m_startParameter

◆ m_tipPose

vpPoseVector usNeedleModelBaseTip::m_tipPose
protectedinherited

◆ m_worldMbase

◆ m_worldMtip