UsTK : Ultrasound ToolKit
version 2.0.1 under development (2024-11-21)
|
#include <visp3/ustk_core/usBSpline3D.h>
Public Member Functions | |
usBSpline3D () | |
usBSpline3D (const usBSpline3D &spline) | |
virtual | ~usBSpline3D () |
const usBSpline3D & | operator= (const usBSpline3D &spline) |
virtual usBSpline3D * | clone () 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 usPolynomialCurve3D & | accessSegment (int i) const |
const usPolynomialCurve3D & | accessLastSegment () const |
usPolynomialCurve3D & | accessSegment (int i) |
usPolynomialCurve3D & | accessLastSegment () |
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 ¶m) const |
double | getCurvatureFromShape (double start, double end, vpColVector ¢er3D, vpColVector &direction3D) const |
Protected Attributes | |
std::vector< usPolynomialCurve3D > | m_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) |
Definition at line 43 of file usBSpline3D.h.
usBSpline3D::usBSpline3D | ( | ) |
usBSpline3D::usBSpline3D | ( | const usBSpline3D & | spline | ) |
Definition at line 47 of file usBSpline3D.cpp.
|
virtual |
Definition at line 49 of file usBSpline3D.cpp.
usPolynomialCurve3D & usBSpline3D::accessLastSegment | ( | ) |
Definition at line 402 of file usBSpline3D.cpp.
References m_spline.
const usPolynomialCurve3D & usBSpline3D::accessLastSegment | ( | ) | const |
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().
usPolynomialCurve3D & usBSpline3D::accessSegment | ( | int | i | ) |
Definition at line 400 of file usBSpline3D.cpp.
References m_spline.
const usPolynomialCurve3D & usBSpline3D::accessSegment | ( | int | i | ) | const |
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().
void usBSpline3D::addSegment | ( | const usPolynomialCurve3D & | seg | ) |
Spline definition.
Definition at line 79 of file usBSpline3D.cpp.
References usPolynomialCurve3D::getParametricLength(), and m_spline.
Referenced by usNeedleInsertionModelRayleighRitzSpline::cutPathToPoint(), getSubSpline(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen(), and usNeedleInsertionModelRayleighRitzSpline::updatePath().
void usBSpline3D::clear | ( | ) |
|
virtual |
Reimplemented in usNeedleModelSpline.
Definition at line 57 of file usBSpline3D.cpp.
References usBSpline3D().
void usBSpline3D::defineFromPoints | ( | const std::vector< vpColVector > & | points, |
const std::vector< double > & | lengths, | ||
int | order = 3 |
||
) |
Definition at line 100 of file usBSpline3D.cpp.
References m_spline, usPolynomialCurve3D::setParametricLength(), and usPolynomialCurve3D::setPolynomialCoefficients().
Referenced by usGeometryTools::convertPolynomialToBSpline(), and usNeedleModelingDisplayTools::displayNeedle().
double usBSpline3D::getCurvatureFromShape | ( | double | start, |
double | end, | ||
vpColVector & | center3D, | ||
vpColVector & | direction3D | ||
) | const |
Curvature.
Definition at line 557 of file usBSpline3D.cpp.
References getParametricLength(), and m_spline.
Referenced by usGeometryDisplayTools::displayCurvatureFromShape().
double usBSpline3D::getDistanceFromPoint | ( | const vpColVector & | point, |
double | start = 0 , |
||
double | stop = -1 , |
||
double | threshold = 1e-5 |
||
) | const |
Definition at line 496 of file usBSpline3D.cpp.
References getParametricLength(), and getPoint().
double usBSpline3D::getLength | ( | int | nbSubSeg = 50 | ) | const |
int usBSpline3D::getNbSegments | ( | ) | const |
Parameters setters and getters.
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().
bool usBSpline3D::getParametersFromLength | ( | double | l, |
int & | index, | ||
double & | param | ||
) | const |
Definition at line 533 of file usBSpline3D.cpp.
References m_spline.
Referenced by usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), and usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen().
double usBSpline3D::getParametricLength | ( | ) | const |
Definition at line 61 of file usBSpline3D.cpp.
References m_spline.
Referenced by usGeometryTools::convertBSplineToPolynomial(), getCurvatureFromShape(), getDistanceFromPoint(), and usNeedleInsertionModelRayleighRitzSpline::updateState().
vpColVector usBSpline3D::getPoint | ( | double | param | ) | const |
Measure curve information.
Position
Definition at line 459 of file usBSpline3D.cpp.
References m_spline.
Referenced by usGeometryTools::convertBSplineToPolynomial(), usNeedleModelingDisplayTools::displayInteraction(), getDistanceFromPoint(), usNeedleInsertionModelRayleighRitzSpline::getNeedleInsertionPoint(), usNeedleModelSpline::getNeedlePoint(), usTissueModelSpline::getPose(), and usNeedleInsertionModelRayleighRitzSpline::getTissueInsertionPoint().
usBSpline3D usBSpline3D::getSubSpline | ( | double | a, |
double | b | ||
) | const |
Definition at line 404 of file usBSpline3D.cpp.
References addSegment(), usPolynomialCurve3D::changeCoefficientsToFitBoundaries(), usPolynomialCurve3D::getParametricLength(), and m_spline.
vpColVector usBSpline3D::getTangent | ( | double | param | ) | const |
Definition at line 479 of file usBSpline3D.cpp.
References m_spline.
Referenced by usNeedleModelSpline::getNeedleDirection().
void usBSpline3D::insertSegment | ( | int | i, |
const usPolynomialCurve3D & | seg | ||
) |
Definition at line 85 of file usBSpline3D.cpp.
References m_spline.
Referenced by usNeedleInsertionModelVirtualSprings::addInsertionPointOnSegmentHard().
bool usBSpline3D::move | ( | const vpHomogeneousMatrix & | H | ) |
Move.
Definition at line 446 of file usBSpline3D.cpp.
References m_spline.
Referenced by usTissueModelSpline::move(), move(), usTissueModelSpline::moveInWorldFrame(), and usTissueModelSpline::setPose().
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().
const usBSpline3D & usBSpline3D::operator= | ( | const usBSpline3D & | spline | ) |
Definition at line 51 of file usBSpline3D.cpp.
References m_spline.
Referenced by usNeedleModelSpline::operator=().
void usBSpline3D::removeLastSegment | ( | ) |
Definition at line 92 of file usBSpline3D.cpp.
References m_spline.
Referenced by usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), and usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen().
void usBSpline3D::removeSegment | ( | int | i | ) |
void usBSpline3D::removeSegments | ( | int | i, |
int | j | ||
) |
Definition at line 96 of file usBSpline3D.cpp.
References m_spline.
Referenced by usNeedleInsertionModelRayleighRitzSpline::fitLength(), and usNeedleInsertionModelVirtualSprings::removeInsertionPointsHard().
void usBSpline3D::setSegment | ( | int | i, |
const usPolynomialCurve3D & | poly | ||
) |
Definition at line 90 of file usBSpline3D.cpp.
References m_spline.
Referenced by usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersDense(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigen(), usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersFullSparseEigenFixedLength(), and usNeedleInsertionModelRayleighRitzSpline::solveSegmentsParametersSparseEigen().
|
friend |
|
friend |
Binary.
Definition at line 723 of file usBSpline3D.cpp.
|
friend |
Definition at line 705 of file usBSpline3D.cpp.
|
friend |
Definition at line 736 of file usBSpline3D.cpp.
|
protected |
Polynomials container.
Definition at line 48 of file usBSpline3D.h.
Referenced by accessLastSegment(), accessSegment(), addSegment(), clear(), defineFromPoints(), usNeedleModelSpline::getBaseStaticTorsor(), usNeedleModelSpline::getBendingEnergy(), usNeedleModelSpline::getCurvatureFromNeedleShape(), getCurvatureFromShape(), getLength(), getNbSegments(), getParametersFromLength(), getParametricLength(), getPoint(), getSubSpline(), getTangent(), usNeedleModelSpline::init(), insertSegment(), move(), operator=(), removeLastSegment(), removeSegment(), removeSegments(), setSegment(), usNeedleModelSpline::showNeedleDirections(), usNeedleModelSpline::showNeedlePoints(), usNeedleModelSpline::showNeedleSegmentCoef(), and usNeedleModelSpline::showNeedleSegmentLength().