UsTK : Ultrasound ToolKit
version 2.0.1 under development (2023-12-07)
|
Functions | |
double | angle (double *p1, double *p2, double *q1, double *q2) |
vpMatrix | approximateCoordinates (vpMatrix X, vpMatrix MSS, unsigned int s) |
void | arithmeticMean (const vpMatrix points, double *mean, unsigned int npts, unsigned int d) |
void | computeQuantile (unsigned char *data, unsigned int dataSize, unsigned int nDesired, unsigned int &q, unsigned int &nThresholded) |
void | computeQuantile (short *data, unsigned int dataSize, unsigned int nDesired, unsigned int &q, unsigned int &nThresholded) |
void | computeQuantile (const unsigned int *data, unsigned int dataSize, unsigned int nDesired, unsigned int &q, unsigned int &nThresholded) |
void | computeControlPoints (const vpMatrix &model, vpMatrix &mss, double **points, const unsigned int &nPoints) |
double | dist3 (double *x, double *y) |
bool | findEntry (const vpMatrix &model, double *entry, unsigned int nPoints, const vpColVector &origin, const vpColVector &entryPlane, int VOI[6]) |
vpColVector | geometricMedian (const vpMatrix points, unsigned int npts, unsigned int d) |
bool | inside (const vpColVector point, int *VOI) |
bool | intersectionLinePlane (vpMatrix line, const vpColVector &plane, double offset, double &x, double &y, double &z) |
void | linearRegression (vpMatrix &points, double &x, double &y, double &z, double &u, double &v, double &w) |
void | linearRegression (vpMatrix &points, double &a, double &b, double &u, double &v, double &w) |
short | quantile (short *data, unsigned int num, unsigned int n) |
double | variance (vpMatrix points, unsigned int npts, unsigned int d) |
Basic tools for needle detection.
This class implements various tools for 3D point cloud processing.
double usNeedleDetectionTools::angle | ( | double * | p1, |
double * | p2, | ||
double * | q1, | ||
double * | q2 | ||
) |
Compute the principal angle between two vectors.
Definition at line 225 of file usNeedleDetectionTools.cpp.
vpMatrix usNeedleDetectionTools::approximateCoordinates | ( | vpMatrix | X, |
vpMatrix | MSS, | ||
unsigned int | s | ||
) |
Approximate curvilinear coordinates.
X | The points for which to compute the coordinates. |
MSS | The control points of the curve. |
s | The order of the polynomial curve. |
Computes the approximate curvilinear coordinates of the points X for the model MSS.
Given , and , the approximate coordinate of for is defined as , where is the principal direction vector of the needle.
The result is a Vandermonde matrix built from the coordinates of all points in :
Definition at line 357 of file usNeedleDetectionTools.cpp.
Referenced by computeControlPoints().
void usNeedleDetectionTools::arithmeticMean | ( | const vpMatrix | points, |
double * | mean, | ||
unsigned int | npts, | ||
unsigned int | d | ||
) |
Compute the mean (center of mass) of a set of d-dimensional points.
points | The input points. |
mean | Pointer to hold the result. |
npts | Number of points. |
d | Dimension. |
Definition at line 36 of file usNeedleDetectionTools.cpp.
Referenced by geometricMedian(), and variance().
void usNeedleDetectionTools::computeControlPoints | ( | const vpMatrix & | model, |
vpMatrix & | mss, | ||
double ** | points, | ||
const unsigned int & | nPoints | ||
) |
Definition at line 333 of file usNeedleDetectionTools.cpp.
References approximateCoordinates().
void usNeedleDetectionTools::computeQuantile | ( | const unsigned int * | data, |
unsigned int | dataSize, | ||
unsigned int | nDesired, | ||
unsigned int & | q, | ||
unsigned int & | nThresholded | ||
) |
Definition at line 142 of file usNeedleDetectionTools.cpp.
void usNeedleDetectionTools::computeQuantile | ( | short * | data, |
unsigned int | dataSize, | ||
unsigned int | nDesired, | ||
unsigned int & | q, | ||
unsigned int & | nThresholded | ||
) |
Definition at line 125 of file usNeedleDetectionTools.cpp.
void usNeedleDetectionTools::computeQuantile | ( | unsigned char * | data, |
unsigned int | dataSize, | ||
unsigned int | nDesired, | ||
unsigned int & | q, | ||
unsigned int & | nThresholded | ||
) |
Definition at line 108 of file usNeedleDetectionTools.cpp.
double usNeedleDetectionTools::dist3 | ( | double * | x, |
double * | y | ||
) |
Compute the euclidean distance between two 3D points.
Definition at line 217 of file usNeedleDetectionTools.cpp.
bool usNeedleDetectionTools::findEntry | ( | const vpMatrix & | model, |
double * | entry, | ||
unsigned int | nPoints, | ||
const vpColVector & | origin, | ||
const vpColVector & | entryPlane, | ||
int | VOI[6] | ||
) |
Definition at line 163 of file usNeedleDetectionTools.cpp.
References inside(), and intersectionLinePlane().
vpColVector usNeedleDetectionTools::geometricMedian | ( | const vpMatrix | points, |
unsigned int | npts, | ||
unsigned int | d | ||
) |
Compute the geometric median of a set of d-dimensional points.
points | The input points. |
npts | Number of points. |
d | Dimension. |
Definition at line 48 of file usNeedleDetectionTools.cpp.
References arithmeticMean().
bool usNeedleDetectionTools::inside | ( | const vpColVector | point, |
int * | VOI | ||
) |
Definition at line 210 of file usNeedleDetectionTools.cpp.
Referenced by findEntry().
bool usNeedleDetectionTools::intersectionLinePlane | ( | vpMatrix | line, |
const vpColVector & | plane, | ||
double | offset, | ||
double & | x, | ||
double & | y, | ||
double & | z | ||
) |
Get the intersection between a plane and a straight line.
Definition at line 391 of file usNeedleDetectionTools.cpp.
Referenced by findEntry().
void usNeedleDetectionTools::linearRegression | ( | vpMatrix & | points, |
double & | a, | ||
double & | b, | ||
double & | u, | ||
double & | v, | ||
double & | w | ||
) |
Definition at line 286 of file usNeedleDetectionTools.cpp.
void usNeedleDetectionTools::linearRegression | ( | vpMatrix & | points, |
double & | x, | ||
double & | y, | ||
double & | z, | ||
double & | u, | ||
double & | v, | ||
double & | w | ||
) |
Performs linear regression on a set of 3D points.
Definition at line 238 of file usNeedleDetectionTools.cpp.
short usNeedleDetectionTools::quantile | ( | short * | data, |
unsigned int | num, | ||
unsigned int | n | ||
) |
Definition at line 91 of file usNeedleDetectionTools.cpp.
double usNeedleDetectionTools::variance | ( | vpMatrix | points, |
unsigned int | npts, | ||
unsigned int | d | ||
) |
Compute the variance of a set of d-dimensional points.
Definition at line 78 of file usNeedleDetectionTools.cpp.
References arithmeticMean().