34 #ifndef __usNeedleDetectionTools_h_
35 #define __usNeedleDetectionTools_h_
46 #include <visp3/core/vpColVector.h>
47 #include <visp3/core/vpList.h>
48 #include <visp3/core/vpMatrix.h>
51 #include <visp3/ustk_core/usConfig.h>
66 double angle(
double *p1,
double *p2,
double *q1,
double *q2);
104 void arithmeticMean(
const vpMatrix points,
double *mean,
unsigned int npts,
unsigned int d);
106 void computeQuantile(
unsigned char *data,
unsigned int dataSize,
unsigned int nDesired,
unsigned int &q,
107 unsigned int &nThresholded);
108 void computeQuantile(
short *data,
unsigned int dataSize,
unsigned int nDesired,
unsigned int &q,
109 unsigned int &nThresholded);
110 void computeQuantile(
const unsigned int *data,
unsigned int dataSize,
unsigned int nDesired,
unsigned int &q,
111 unsigned int &nThresholded);
113 void computeControlPoints(
const vpMatrix &model, vpMatrix &mss,
double **points,
const unsigned int &nPoints);
118 double dist3(
double *x,
double *y);
120 bool findEntry(
const vpMatrix &model,
double *entry,
unsigned int nPoints,
const vpColVector &origin,
121 const vpColVector &entryPlane,
int VOI[6]);
129 vpColVector
geometricMedian(
const vpMatrix points,
unsigned int npts,
unsigned int d);
131 bool inside(
const vpColVector point,
int *VOI);
136 bool intersectionLinePlane(vpMatrix line,
const vpColVector &plane,
double offset,
double &x,
double &y,
double &z);
141 void linearRegression(vpMatrix &points,
double &x,
double &y,
double &z,
double &u,
double &v,
double &w);
142 void linearRegression(vpMatrix &points,
double &a,
double &b,
double &u,
double &v,
double &w);
144 short quantile(
short *data,
unsigned int num,
unsigned int n);
149 double variance(vpMatrix points,
unsigned int npts,
unsigned int d);