DGtal  0.9.3beta
Public Types | Public Member Functions | Protected Attributes | Private Member Functions
DGtal::functors::DomainRigidTransformation2D< TDomain, TRigidTransformFunctor > Class Template Reference

#include <DGtal/images/RigidTransformation2D.h>

Inheritance diagram for DGtal::functors::DomainRigidTransformation2D< TDomain, TRigidTransformFunctor >:
[legend]
Collaboration diagram for DGtal::functors::DomainRigidTransformation2D< TDomain, TRigidTransformFunctor >:
[legend]

Public Types

typedef std::pair< typename TDomain::Space::Point, typename TDomain::Space::Point > Bounds
 

Public Member Functions

 DomainRigidTransformation2D (const TRigidTransformFunctor &aRigidFunctor)
 
Bounds operator() (const TDomain &aInput) const
 

Protected Attributes

const TRigidTransformFunctor & transform
 

Private Member Functions

 BOOST_STATIC_ASSERT ((TDomain::dimension==2))
 
 BOOST_CONCEPT_ASSERT ((concepts::CDomain< TDomain >))
 

Detailed Description

template<typename TDomain, typename TRigidTransformFunctor>
class DGtal::functors::DomainRigidTransformation2D< TDomain, TRigidTransformFunctor >

Aim: implements bounds of transformed domain.

Description of template functor like class 'DomainRigidTransformation2D'

Template Parameters
TDomaina 2 dimensional domain.
TRigidTransformFunctora functor which represent two dimensional rigid transformation.
See also
exampleRigidtransformation2d.cpp

Definition at line 196 of file RigidTransformation2D.h.

Member Typedef Documentation

template<typename TDomain, typename TRigidTransformFunctor>
typedef std::pair< typename TDomain::Space::Point, typename TDomain::Space::Point > DGtal::functors::DomainRigidTransformation2D< TDomain, TRigidTransformFunctor >::Bounds

Definition at line 205 of file RigidTransformation2D.h.

Constructor & Destructor Documentation

template<typename TDomain, typename TRigidTransformFunctor>
DGtal::functors::DomainRigidTransformation2D< TDomain, TRigidTransformFunctor >::DomainRigidTransformation2D ( const TRigidTransformFunctor &  aRigidFunctor)
inline

Constructor.

Parameters
aRigidFunctor- rigid transformation functor.

Definition at line 213 of file RigidTransformation2D.h.

213 : transform ( aRigidFunctor ) {}

Member Function Documentation

template<typename TDomain, typename TRigidTransformFunctor>
DGtal::functors::DomainRigidTransformation2D< TDomain, TRigidTransformFunctor >::BOOST_CONCEPT_ASSERT ( (concepts::CDomain< TDomain >)  )
private
template<typename TDomain, typename TRigidTransformFunctor>
DGtal::functors::DomainRigidTransformation2D< TDomain, TRigidTransformFunctor >::BOOST_STATIC_ASSERT ( (TDomain::dimension==2)  )
private

Checking concepts.

template<typename TDomain, typename TRigidTransformFunctor>
Bounds DGtal::functors::DomainRigidTransformation2D< TDomain, TRigidTransformFunctor >::operator() ( const TDomain &  aInput) const
inline

Operator

Returns
bounds of the transformed domain.

Definition at line 221 of file RigidTransformation2D.h.

222  {
223  typedef typename TDomain::Point Point;
224  Point points[4];
225  points[0] = transform ( aInput.lowerBound() );
226  points[1] = transform ( aInput.upperBound() );
227  points[2] = transform ( Point ( aInput.upperBound()[0], aInput.lowerBound()[1] ) );
228  points[3] = transform ( Point ( aInput.lowerBound()[0], aInput.upperBound()[1] ) );
229 
230  Point t_min ( INT_MAX, INT_MAX ), t_max ( INT_MIN, INT_MIN );
231  for ( unsigned int i = 0; i < 4 ; i++ )
232  {
233  if ( points[i][0] < t_min[0] )
234  t_min[0] = points[i][0];
235  if ( points[i][1] < t_min[1] )
236  t_min[1] = points[i][1];
237 
238  if ( points[i][0] > t_max[0] )
239  t_max[0] = points[i][0];
240  if ( points[i][1] > t_max[1] )
241  t_max[1] = points[i][1];
242  }
243 
244  Bounds bounds;
245  bounds.first = t_min;
246  bounds.second = t_max;
247  return bounds;
248  }
std::pair< typename TDomain::Space::Point, typename TDomain::Space::Point > Bounds

Field Documentation

template<typename TDomain, typename TRigidTransformFunctor>
const TRigidTransformFunctor& DGtal::functors::DomainRigidTransformation2D< TDomain, TRigidTransformFunctor >::transform
protected

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