3-D sphere value type with algebraic and Nelder–Mead best-fit factories. More...
#include <sphere.h>
Public Member Functions | |
| Sphere (const Eigen::Vector3f ¢er, float radius) | |
| Eigen::Vector3f & | center () |
| float & | radius () |
Static Public Member Functions | |
| static Sphere | fit_sphere (const Eigen::MatrixX3f &points) |
| static Sphere | fit_sphere_simplex (const Eigen::MatrixX3f &points, double simplex_size=2e-2) |
| static bool | fit_sphere_to_points (const Eigen::MatrixXf &rr, float simplex_size, Eigen::VectorXf &r0, float &R) |
| static bool | fit_sphere_to_points (float **rr, int np, float simplex_size, float *r0, float *R) |
3-D sphere value type with algebraic and Nelder–Mead best-fit factories.
Best-fit sphere primitive carrying centre and radius, with static factories for the closed-form algebraic fit (Jennings) and the Nelder–Mead geometric-residual refinement. Used to build spherical head models, fit HPI coils and digitiser scalps.
| Sphere::Sphere | ( | const Eigen::Vector3f & | center, |
| float | radius ) |
Constructs the Sphere
Definition at line 55 of file sphere.cpp.
|
inline |
|
static |
Fits a sphere to a point cloud. Algorithm by Alan Jennings, University of Dayton
| [in] | points | n x 3 matrix of cartesian data to fit the sphere to. |
Definition at line 63 of file sphere.cpp.
|
static |
Fits a sphere to a point cloud.
| [in] | points | n x 3 matrix of cartesian data to fit the sphere to. |
| [in] | simplex_size | The simplex size. |
Definition at line 103 of file sphere.cpp.
|
static |
Fits a sphere to a point cloud.
| [in] | rr | n x 3 matrix of cartesian data to fit the sphere to. |
| [in] | simplex_size | The simplex size. |
| [out] | r0 | center (1 x 3 matrix) of the sphere. |
| [out] | R | Radius. |
|
static |
Definition at line 116 of file sphere.cpp.
|
inline |