Public Member Functions | Protected Member Functions | Protected Attributes
osl_fit_circle Class Reference

#include <osl_fit_circle.h>

List of all members.

Public Member Functions

 osl_fit_circle (const vcl_list< vgl_point_2d< double > > &points)
 Construct from list of 2d points of double.
 osl_fit_circle (const osl_edgel_chain &chain)
 Construct from edgel chain (use only raw edge coordinates).
const vgl_point_2d< double > & center () const
 get center of circle as vgl_point_2d.
double radius () const
 Get radius of circle as double.
bool error () const
 If error() returns true, there was an error during calculation.
double max_diff () const
 Returns the maximum difference between the points and the calculated circle.
double avg_diff () const
 Return the average difference between the points and the calculated circle.

Protected Member Functions

void calculate (const vcl_list< vgl_point_2d< double > > &points)

Protected Attributes

bool error_
double max_diff_
double avg_diff_
double radius_
vgl_point_2d< double > center_

Detailed Description

Definition at line 25 of file osl_fit_circle.h.


Constructor & Destructor Documentation

osl_fit_circle::osl_fit_circle ( const vcl_list< vgl_point_2d< double > > &  points)

Construct from list of 2d points of double.

Definition at line 14 of file osl_fit_circle.cxx.

osl_fit_circle::osl_fit_circle ( const osl_edgel_chain chain)

Construct from edgel chain (use only raw edge coordinates).

Definition at line 19 of file osl_fit_circle.cxx.


Member Function Documentation

double osl_fit_circle::avg_diff ( ) const [inline]

Return the average difference between the points and the calculated circle.

(average of length of tangents from points to circle)

Definition at line 52 of file osl_fit_circle.h.

void osl_fit_circle::calculate ( const vcl_list< vgl_point_2d< double > > &  points) [protected]

Definition at line 34 of file osl_fit_circle.cxx.

const vgl_point_2d<double>& osl_fit_circle::center ( ) const [inline]

get center of circle as vgl_point_2d.

Definition at line 37 of file osl_fit_circle.h.

bool osl_fit_circle::error ( ) const [inline]

If error() returns true, there was an error during calculation.

Normally because of wrong or insufficient input data.

Definition at line 44 of file osl_fit_circle.h.

double osl_fit_circle::max_diff ( ) const [inline]

Returns the maximum difference between the points and the calculated circle.

(length of longest tangent from point to circle)

Definition at line 48 of file osl_fit_circle.h.

double osl_fit_circle::radius ( ) const [inline]

Get radius of circle as double.

Definition at line 40 of file osl_fit_circle.h.


Member Data Documentation

double osl_fit_circle::avg_diff_ [protected]

Definition at line 58 of file osl_fit_circle.h.

vgl_point_2d<double> osl_fit_circle::center_ [protected]

Definition at line 60 of file osl_fit_circle.h.

bool osl_fit_circle::error_ [protected]

Definition at line 57 of file osl_fit_circle.h.

double osl_fit_circle::max_diff_ [protected]

Definition at line 58 of file osl_fit_circle.h.

double osl_fit_circle::radius_ [protected]

Definition at line 59 of file osl_fit_circle.h.


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