UsTK : Ultrasound ToolKit  version 2.0.1 under development (2024-11-21)
usBSpline3D Class Reference

#include <visp3/ustk_core/usBSpline3D.h>

+ Inheritance diagram for usBSpline3D:

Public Member Functions

 usBSpline3D ()
 
 usBSpline3D (const usBSpline3D &spline)
 
virtual ~usBSpline3D ()
 
const usBSpline3Doperator= (const usBSpline3D &spline)
 
virtual usBSpline3Dclone () const
 
int getNbSegments () const
 
double getParametricLength () const
 
double getLength (int nbSubSeg=50) const
 
void addSegment (const usPolynomialCurve3D &seg)
 
void insertSegment (int i, const usPolynomialCurve3D &seg)
 
void setSegment (int i, const usPolynomialCurve3D &poly)
 
void removeLastSegment ()
 
void removeSegment (int i)
 
void removeSegments (int i, int j)
 
void clear ()
 
void defineFromPoints (const std::vector< vpColVector > &points, const std::vector< double > &lengths, int order=3)
 
const usPolynomialCurve3DaccessSegment (int i) const
 
const usPolynomialCurve3DaccessLastSegment () const
 
usPolynomialCurve3DaccessSegment (int i)
 
usPolynomialCurve3DaccessLastSegment ()
 
usBSpline3D getSubSpline (double a, double b) const
 
bool move (const vpHomogeneousMatrix &H)
 
bool move (double x, double y, double z, double tx, double ty, double tz)
 
vpColVector getPoint (double param) const
 
vpColVector getTangent (double param) const
 
double getDistanceFromPoint (const vpColVector &point, double start=0, double stop=-1, double threshold=1e-5) const
 
bool getParametersFromLength (double l, int &index, double &param) const
 
double getCurvatureFromShape (double start, double end, vpColVector &center3D, vpColVector &direction3D) const
 

Protected Attributes

std::vector< usPolynomialCurve3Dm_spline
 

Friends

VISP_EXPORT std::ostream & operator<< (std::ostream &s, const usBSpline3D &spline)
 
VISP_EXPORT std::istream & operator>> (std::istream &s, usBSpline3D &spline)
 
VISP_EXPORT std::ostream & operator<<= (std::ostream &s, const usBSpline3D &spline)
 
VISP_EXPORT std::istream & operator>>= (std::istream &s, usBSpline3D &spline)
 

Detailed Description

Examples
testUsBSpline3D.cpp, and testUsGeometryDisplayTools.cpp.

Definition at line 43 of file usBSpline3D.h.

Constructor & Destructor Documentation

◆ usBSpline3D() [1/2]

usBSpline3D::usBSpline3D ( )

Constructors, destructor.

Definition at line 45 of file usBSpline3D.cpp.

Referenced by clone().

◆ usBSpline3D() [2/2]

usBSpline3D::usBSpline3D ( const usBSpline3D spline)

Definition at line 47 of file usBSpline3D.cpp.

◆ ~usBSpline3D()

usBSpline3D::~usBSpline3D ( )
virtual

Definition at line 49 of file usBSpline3D.cpp.

Member Function Documentation

◆ accessLastSegment() [1/2]

usPolynomialCurve3D & usBSpline3D::accessLastSegment ( )

Definition at line 402 of file usBSpline3D.cpp.

References m_spline.

◆ accessLastSegment() [2/2]

const usPolynomialCurve3D & usBSpline3D::accessLastSegment ( ) const
Examples
testUsBSpline3D.cpp.

Definition at line 398 of file usBSpline3D.cpp.

References m_spline.

Referenced by usNeedleInsertionModelVirtualSprings::addInsertionPoint(), usNeedleInsertionModelVirtualSprings::addInsertionPointAtTip(), usNeedleInsertionModelVirtualSprings::addInsertionPointAtTipHard(), usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegment(), usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegmentHard(), usNeedleInsertionModelVirtualSprings::addRemoveSprings(), usNeedleInsertionModelRayleighRitzSpline::cutPathToPoint(), usGeometryDisplayTools::displayExtremities(), usNeedleModelingDisplayTools::displayNeedle(), usGeometryTools::DoesSegmentCrossPlane(), usGeometryTools::DoesSegmentCrossPlaneDirect(), usNeedleInsertionModelRayleighRitzSpline::fitLength(), usNeedleInsertionModelVirtualSprings::fusionSprings(), usGeometryTools::projectPointOnCurve(), usNeedleInsertionModelVirtualSprings::removeInsertionPoints(), usNeedleInsertionModelVirtualSprings::setSurfaceAtTip(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersOpenCV(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersSparseEigen(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersViSP(), usNeedleInsertionModelRayleighRitzSpline::updatePath(), usNeedleInsertionModelVirtualSprings::updateSpringsStiffness(), usNeedleInsertionModelRayleighRitzSpline::updateState(), and usNeedleInsertionModelRayleighRitzSpline::updateTipPose().

◆ accessSegment() [1/2]

usPolynomialCurve3D & usBSpline3D::accessSegment ( int  i)

Definition at line 400 of file usBSpline3D.cpp.

References m_spline.

◆ accessSegment() [2/2]

const usPolynomialCurve3D & usBSpline3D::accessSegment ( int  i) const
Examples
testUsBSpline3D.cpp, testUsNeedleInsertionModelRayleighRitzSpline.cpp, and testUsNeedleInsertionModelVirtualSprings.cpp.

Definition at line 396 of file usBSpline3D.cpp.

References m_spline.

Referenced by usNeedleInsertionModelVirtualSprings::addInsertionPoint(), usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegment(), usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegmentHard(), usNeedleInsertionModelVirtualSprings::addRemoveSprings(), usNeedleInsertionModelVirtualSprings::checkInactiveMeasureSprings(), usTissueTranslationEstimatorUKF::computeMeasureFromSigmaPoint(), usNeedleInsertionModelVirtualSprings::computeSegmentsLengths(), usNeedleModelingDisplayTools::displayBaseStaticTorsor(), usGeometryDisplayTools::displayExtremities(), usNeedleModelingDisplayTools::displayInteraction(), usGeometryDisplayTools::displayLine(), usNeedleModelingDisplayTools::displayNeedle(), usNeedleModelingDisplayTools::displayTissueLayers(), usGeometryTools::DoesSegmentCrossPlane(), usGeometryTools::DoesSegmentCrossPlaneDirect(), usNeedleInsertionModelRayleighRitzSpline::fitLength(), usNeedleInsertionModelVirtualSprings::fusionSprings(), usNeedleInsertionModelRayleighRitzSpline::getCorrespondingPathPoint(), usNeedleInsertionModelVirtualSprings::getInsertionDepth(), usNeedleInsertionModelRayleighRitzSpline::getMaxTissueStretch(), usNeedleInsertionModelVirtualSprings::getMaxTissueStretch(), usNeedleInsertionModelRayleighRitzSpline::getMeanTissueStretch(), usNeedleInsertionModelVirtualSprings::getMeanTissueStretch(), usNeedleInsertionModelVirtualSprings::getNeedleFreeLength(), usNeedleInsertionModelRayleighRitzSpline::getNeedleFreeLength(), usNeedleInsertionModelVirtualSprings::getNeedleInsertionPoint(), usGeometryTools::getPlaneCurveCrossingPoint(), usNeedleInsertionModelRayleighRitzSpline::getTissueDeformationEnergy(), usNeedleInsertionModelVirtualSprings::getTissueDeformationEnergy(), usGeometryTools::projectPointOnCurve(), usNeedleInsertionModelVirtualSprings::removeInsertionPoints(), usNeedleInsertionModelVirtualSprings::removeInsertionPointsHard(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersOpenCV(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersSparseEigen(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersViSP(), usNeedleInsertionModelVirtualSprings::updateInsertionDirections(), usNeedleInsertionModelRayleighRitzSpline::updatePath(), usNeedleInsertionModelVirtualSprings::updateSpringsStiffness(), usNeedleInsertionModelVirtualSprings::updateState(), and usNeedleInsertionModelRayleighRitzSpline::updateTipPose().

◆ addSegment()

◆ clear()

void usBSpline3D::clear ( )
Examples
testUsBSpline3D.cpp.

Definition at line 98 of file usBSpline3D.cpp.

References m_spline.

◆ clone()

usBSpline3D * usBSpline3D::clone ( ) const
virtual

Reimplemented in usNeedleModelSpline.

Examples
testUsBSpline3D.cpp.

Definition at line 57 of file usBSpline3D.cpp.

References usBSpline3D().

◆ defineFromPoints()

void usBSpline3D::defineFromPoints ( const std::vector< vpColVector > &  points,
const std::vector< double > &  lengths,
int  order = 3 
)

◆ getCurvatureFromShape()

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

Curvature.

Examples
testUsBSpline3D.cpp.

Definition at line 557 of file usBSpline3D.cpp.

References getParametricLength(), and m_spline.

Referenced by usGeometryDisplayTools::displayCurvatureFromShape().

◆ getDistanceFromPoint()

double usBSpline3D::getDistanceFromPoint ( const vpColVector &  point,
double  start = 0,
double  stop = -1,
double  threshold = 1e-5 
) const
Examples
testUsBSpline3D.cpp.

Definition at line 496 of file usBSpline3D.cpp.

References getParametricLength(), and getPoint().

◆ getLength()

double usBSpline3D::getLength ( int  nbSubSeg = 50) const
Examples
testUsBSpline3D.cpp.

Definition at line 70 of file usBSpline3D.cpp.

References m_spline.

◆ getNbSegments()

int usBSpline3D::getNbSegments ( ) const

Parameters setters and getters.

Examples
testUsBSpline3D.cpp, and testUsNeedleJacobians.cpp.

Definition at line 59 of file usBSpline3D.cpp.

References m_spline.

Referenced by usNeedleInsertionModelVirtualSprings::addInsertionPoint(), usNeedleInsertionModelVirtualSprings::addInsertionPointAtTip(), usNeedleInsertionModelVirtualSprings::addInsertionPointAtTipHard(), usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegment(), usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegmentHard(), usNeedleInsertionModelVirtualSprings::addRemoveSprings(), usNeedleInsertionModelVirtualSprings::checkInactiveMeasureSprings(), usNeedleInsertionModelVirtualSprings::computeSegmentsLengths(), usNeedleInsertionModelRayleighRitzSpline::cutPathToPoint(), usGeometryDisplayTools::displayExtremities(), usNeedleModelingDisplayTools::displayInteraction(), usGeometryDisplayTools::displayLine(), usNeedleModelingDisplayTools::displayNeedle(), usNeedleModelingDisplayTools::displayTissueLayers(), usNeedleInsertionModelRayleighRitzSpline::fitLength(), usNeedleInsertionModelRayleighRitzSpline::getCorrespondingPathPoint(), usNeedleInsertionModelVirtualSprings::getInsertionDepth(), usNeedleInsertionModelRayleighRitzSpline::getMaxTissueStretch(), usNeedleInsertionModelRayleighRitzSpline::getMeanTissueStretch(), usNeedleInsertionModelRayleighRitzSpline::getNeedleFreeLength(), usGeometryTools::getPlaneCurveCrossingPoint(), usTissueModelSpline::getPose(), usNeedleInsertionModelRayleighRitzSpline::getSurfaceTissueStretch(), usNeedleInsertionModelRayleighRitzSpline::getTissueDeformationEnergy(), usNeedleInsertionModelRayleighRitzSpline::getTissueInsertionPoint(), usGeometryTools::projectPointOnCurve(), usNeedleInsertionModelVirtualSprings::removeInsertionPoints(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersOpenCV(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersSparseEigen(), usNeedleInsertionModelVirtualSprings::solveSegmentsParametersViSP(), usNeedleInsertionModelRayleighRitzSpline::updatePath(), usNeedleInsertionModelVirtualSprings::updateSpringsStiffness(), and usNeedleInsertionModelRayleighRitzSpline::updateState().

◆ getParametersFromLength()

◆ getParametricLength()

double usBSpline3D::getParametricLength ( ) const

◆ getPoint()

◆ getSubSpline()

usBSpline3D usBSpline3D::getSubSpline ( double  a,
double  b 
) const

◆ getTangent()

vpColVector usBSpline3D::getTangent ( double  param) const
Examples
testUsBSpline3D.cpp.

Definition at line 479 of file usBSpline3D.cpp.

References m_spline.

Referenced by usNeedleModelSpline::getNeedleDirection().

◆ insertSegment()

void usBSpline3D::insertSegment ( int  i,
const usPolynomialCurve3D seg 
)

◆ move() [1/2]

bool usBSpline3D::move ( const vpHomogeneousMatrix &  H)

◆ move() [2/2]

bool usBSpline3D::move ( double  x,
double  y,
double  z,
double  tx,
double  ty,
double  tz 
)

Definition at line 454 of file usBSpline3D.cpp.

References move().

◆ operator=()

const usBSpline3D & usBSpline3D::operator= ( const usBSpline3D spline)

Definition at line 51 of file usBSpline3D.cpp.

References m_spline.

Referenced by usNeedleModelSpline::operator=().

◆ removeLastSegment()

◆ removeSegment()

void usBSpline3D::removeSegment ( int  i)
Examples
testUsBSpline3D.cpp.

Definition at line 94 of file usBSpline3D.cpp.

References m_spline.

◆ removeSegments()

void usBSpline3D::removeSegments ( int  i,
int  j 
)

◆ setSegment()

Friends And Related Function Documentation

◆ operator<<

VISP_EXPORT std::ostream& operator<< ( std::ostream &  s,
const usBSpline3D spline 
)
friend

Data saving.

Text

Definition at line 692 of file usBSpline3D.cpp.

◆ operator<<=

VISP_EXPORT std::ostream& operator<<= ( std::ostream &  s,
const usBSpline3D spline 
)
friend

Binary.

Definition at line 723 of file usBSpline3D.cpp.

◆ operator>>

VISP_EXPORT std::istream& operator>> ( std::istream &  s,
usBSpline3D spline 
)
friend

Definition at line 705 of file usBSpline3D.cpp.

◆ operator>>=

VISP_EXPORT std::istream& operator>>= ( std::istream &  s,
usBSpline3D spline 
)
friend

Definition at line 736 of file usBSpline3D.cpp.

Member Data Documentation

◆ m_spline