MNE-CPP  0.1.9
A Framework for Electrophysiology
Public Member Functions | Static Public Member Functions | List of all members
UTILSLIB::Sphere Class Reference

Describes a 3D sphere object. More...

#include <sphere.h>

Public Member Functions

 Sphere (const Eigen::Vector3f &center, 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)
 

Detailed Description

Describes a 3D sphere object.

Sphere descritpion

Definition at line 72 of file sphere.h.

Constructor & Destructor Documentation

◆ Sphere()

Sphere::Sphere ( const Eigen::Vector3f &  center,
float  radius 
)

Constructs the Sphere

Parameters
[in]centerThe sphere's center.
[in]radiusThe sphere's radius.

Definition at line 64 of file sphere.cpp.

Member Function Documentation

◆ center()

Eigen::Vector3f& UTILSLIB::Sphere::center ( )
inline

The radius of the sphere.

Returns
the fitted sphere.

Definition at line 112 of file sphere.h.

◆ fit_sphere()

Sphere Sphere::fit_sphere ( const Eigen::MatrixX3f &  points)
static

Fits a sphere to a point cloud. Algorithm by Alan Jennings, University of Dayton

Parameters
[in]pointsn x 3 matrix of cartesian data to fit the sphere to.
Returns
the fitted sphere.

Definition at line 72 of file sphere.cpp.

◆ fit_sphere_simplex()

Sphere Sphere::fit_sphere_simplex ( const Eigen::MatrixX3f &  points,
double  simplex_size = 2e-2 
)
static

Fits a sphere to a point cloud.

Parameters
[in]pointsn x 3 matrix of cartesian data to fit the sphere to.
[in]simplex_sizeThe simplex size.
Returns
the fitted sphere.

Definition at line 112 of file sphere.cpp.

◆ fit_sphere_to_points()

static bool UTILSLIB::Sphere::fit_sphere_to_points ( const Eigen::MatrixXf &  rr,
float  simplex_size,
Eigen::VectorXf &  r0,
float &  R 
)
static

Fits a sphere to a point cloud.

Parameters
[in]rrn x 3 matrix of cartesian data to fit the sphere to.
[in]simplex_sizeThe simplex size.
[out]r0center (1 x 3 matrix) of the sphere.
[out]RRadius.
Returns
true if successful.

◆ radius()

float& UTILSLIB::Sphere::radius ( )
inline

The radius of the sphere.

Returns
the fitted sphere.

Definition at line 120 of file sphere.h.


The documentation for this class was generated from the following files: