Public Types | Public Member Functions | Public Attributes | Protected Attributes

TRTK::Fit2D< T > Class Template Reference

Base class for 2D fitting algorithms where fitting is done to a 2D point set. More...

#include <Fit2D.hpp>

Inheritance diagram for TRTK::Fit2D< T >:
Collaboration diagram for TRTK::Fit2D< T >:

List of all members.

Public Types

typedef super::MatrixXT MatrixXT
 Matrix of arbitrary size with value type T.
typedef super::Matrix2T Matrix2T
 2 x 2 matrix with value type T.
typedef super::VectorXT VectorXT
 Column vector of arbitrary size with value type T.
typedef super::Vector2T Vector2T
 2D column vector with value type T.
typedef super::Vector3T Vector3T
 3D column vector with value type T.
enum  Error {
  DATA_POINTS_TOO_SIMILAR, INFINITY_NOT_AVAILABLE, NAN_NOT_AVAILABLE, NOT_ENOUGH_POINTS,
  UNKNOWN_ERROR, WRONG_POINT_SIZE
}
typedef Eigen::Array< T,
Eigen::Dynamic, 1 > 
ArrayXT
 General-purpose array of arbitrary size with value type T.
typedef Eigen::Matrix< T, 4, 1 > Vector4T
 4D column vector with value type T.
typedef Eigen::Matrix< T, 3, 3 > Matrix3T
 3 x 3 matrix with value type T.

Public Member Functions

 Fit2D ()
 Constructs a new initialized instance of this class.
virtual ~Fit2D ()
 Deletes the instance.
void compute ()=0
 Performs the regression analysis.
getDistanceTo (const Coordinate< T > &point) const =0
 Returns the distance/deviation of the given data point to the estimated model.
getRMS () const =0
 Returns the root mean square error of the model fitting.
unsigned getNumberPointsRequired () const =0
 Returns the minimum number of data points required to compute a model.
void setPoints (const std::vector< Coordinate< T > > &)
 Sets the point set.
void setPoints (const std::vector< Vector2T, Eigen::aligned_allocator< Vector2T > > &)
 Sets the point set.
void setPoints (const std::vector< Vector3T > &)
 Sets the point set.

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW
typedef T 
value_type
 Internally used value type (should be a floating point type).

Protected Attributes

MatrixXT m_points

Detailed Description

template<class T>
class TRTK::Fit2D< T >

Base class for 2D fitting algorithms where fitting is done to a 2D point set.

Note:
Some functions might throw an error object. See the appropriate function for more details.
See also:
Fit
Author:
Fabian Killus, Christoph Haenisch
Version:
0.2.0
Date:
2012-03-29

Definition at line 51 of file Fit2D.hpp.


Member Enumeration Documentation

template<class T>
enum TRTK::Fit::Error [inherited]
Enumerator:
DATA_POINTS_TOO_SIMILAR 

The data points are to similar.

INFINITY_NOT_AVAILABLE 

The type T cannot represent infinity (see std::numeric_limits<T>).

NAN_NOT_AVAILABLE 

The type T cannot represent NaN (see std::numeric_limits<T>).

NOT_ENOUGH_POINTS 

More points are required to estimate the transformation.

UNKNOWN_ERROR 

An unknown error occured.

WRONG_POINT_SIZE 

One or more points have a wrong size.

Definition at line 69 of file Fit.hpp.


Constructor & Destructor Documentation

template<class T >
TRTK::Fit2D< T >::Fit2D (  )

Constructs a new initialized instance of this class.

Template Parameters:
Tscalar type of the coordinates

Definition at line 100 of file Fit2D.hpp.

template<class T >
TRTK::Fit2D< T >::~Fit2D (  ) [virtual]

Deletes the instance.

Template Parameters:
Tscalar type of the coordinates

Definition at line 111 of file Fit2D.hpp.


Member Function Documentation

template<class T >
void TRTK::Fit2D< T >::setPoints ( const std::vector< Vector3T > &  points )

Sets the point set.

Template Parameters:
Tscalar type of the coordinates
Parameters:
[in]points3D homogeneous coordinates.

Definition at line 182 of file Fit2D.hpp.

template<class T >
void TRTK::Fit2D< T >::setPoints ( const std::vector< Coordinate< T > > &  points ) [virtual]

Sets the point set.

Template Parameters:
Tscalar type of the coordinates
Parameters:
[in]pointsThe points can either be plain 2D or 3D homogeneous coordinates.
Exceptions:
ErrorObjIf there are any coordinates other than 2D or 3D coordinates, an error object is thrown and its error code is set to WRONG_POINT_SIZE.

Implements TRTK::Fit< T >.

Definition at line 130 of file Fit2D.hpp.

template<class T >
void TRTK::Fit2D< T >::setPoints ( const std::vector< Vector2T, Eigen::aligned_allocator< Vector2T > > &  points )

Sets the point set.

Template Parameters:
Tscalar type of the coordinates
Parameters:
[in]points2D coordinates.

Definition at line 163 of file Fit2D.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines