DGtal  0.9.3beta
Public Types | Public Member Functions | Protected Attributes | Private Member Functions
DGtal::functors::ForwardRigidTransformation2D< TSpace > Class Template Reference

#include <DGtal/images/RigidTransformation2D.h>

Inheritance diagram for DGtal::functors::ForwardRigidTransformation2D< TSpace >:
[legend]
Collaboration diagram for DGtal::functors::ForwardRigidTransformation2D< TSpace >:
[legend]

Public Types

typedef TSpace::Point Point
 
typedef TSpace::RealPoint RealPoint
 
typedef TSpace::RealVector RealVector
 

Public Member Functions

 ForwardRigidTransformation2D (const RealPoint &aOrigin, const double &angle, const RealVector &aTranslate)
 
Point operator() (const Point &aInput) const
 

Protected Attributes

RealPoint origin
 
double t_sin
 
double t_cos
 
RealVector translation
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >))
 
 BOOST_STATIC_ASSERT ((TSpace::dimension==2))
 

Detailed Description

template<typename TSpace>
class DGtal::functors::ForwardRigidTransformation2D< TSpace >

Aim: implements forward rigid transformation of point in the 2D integer space. Warring: This version uses closest neighbor interpolation.

Description of template functor like class 'ForwardRigidTransformation2D'

Template Parameters
TSpacea 2 dimensional space.
See also
exampleRigidtransformation2d.cpp

Definition at line 68 of file RigidTransformation2D.h.

Member Typedef Documentation

template<typename TSpace>
typedef TSpace::Point DGtal::functors::ForwardRigidTransformation2D< TSpace >::Point

Definition at line 76 of file RigidTransformation2D.h.

template<typename TSpace>
typedef TSpace::RealPoint DGtal::functors::ForwardRigidTransformation2D< TSpace >::RealPoint

Definition at line 77 of file RigidTransformation2D.h.

template<typename TSpace>
typedef TSpace::RealVector DGtal::functors::ForwardRigidTransformation2D< TSpace >::RealVector

Definition at line 78 of file RigidTransformation2D.h.

Constructor & Destructor Documentation

template<typename TSpace>
DGtal::functors::ForwardRigidTransformation2D< TSpace >::ForwardRigidTransformation2D ( const RealPoint aOrigin,
const double &  angle,
const RealVector aTranslate 
)
inline

Constructor.

Parameters
aOriginthe center of rotation.
anglethe angle given in radians.
aTranslatethe 2D dimensional vector which represents translation.

Definition at line 88 of file RigidTransformation2D.h.

Member Function Documentation

template<typename TSpace>
DGtal::functors::ForwardRigidTransformation2D< TSpace >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >)  )
private

Checking concepts.

template<typename TSpace>
DGtal::functors::ForwardRigidTransformation2D< TSpace >::BOOST_STATIC_ASSERT ( (TSpace::dimension==2)  )
private
template<typename TSpace>
Point DGtal::functors::ForwardRigidTransformation2D< TSpace >::operator() ( const Point aInput) const
inline

Operator

Returns
the transformed point.

Definition at line 101 of file RigidTransformation2D.h.

102  {
103  Point p;
104  p[0] = std::floor ( ( ( t_cos * ( aInput[0] - origin[0] ) -
105  t_sin * ( aInput[1] - origin[1] ) ) + translation[0] ) + origin[0] + 0.5 );
106 
107  p[1] = std::floor ( ( ( t_sin * ( aInput[0] - origin[0] ) +
108  t_cos * ( aInput[1] - origin[1] ) ) + translation[1] ) + origin[1] + 0.5 );
109  return p;
110  }

Field Documentation

template<typename TSpace>
RealPoint DGtal::functors::ForwardRigidTransformation2D< TSpace >::origin
protected
template<typename TSpace>
double DGtal::functors::ForwardRigidTransformation2D< TSpace >::t_cos
protected
template<typename TSpace>
double DGtal::functors::ForwardRigidTransformation2D< TSpace >::t_sin
protected
template<typename TSpace>
RealVector DGtal::functors::ForwardRigidTransformation2D< TSpace >::translation
protected

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