DGtal  1.5.beta
DGtal::functors::DomainRigidTransformation2D< TDomain, TRigidTransformFunctor > Class Template Reference

Aim: implements bounds of transformed domain. More...

#include <DGtal/images/RigidTransformation2D.h>

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

Public Types

typedef std::pair< typename TDomain::Space::Point, typename TDomain::Space::PointBounds
 

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))
 Checking concepts. More...
 
 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 208 of file RigidTransformation2D.h.

Member Typedef Documentation

◆ Bounds

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 216 of file RigidTransformation2D.h.

Constructor & Destructor Documentation

◆ DomainRigidTransformation2D()

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

Constructor.

Parameters
aRigidFunctor- rigid transformation functor.

Definition at line 224 of file RigidTransformation2D.h.

224 : transform ( aRigidFunctor ) {}

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

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

◆ BOOST_STATIC_ASSERT()

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

Checking concepts.

◆ operator()()

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 232 of file RigidTransformation2D.h.

233  {
234  typedef typename TDomain::Point Point;
235  Point points[4];
236  points[0] = transform ( aInput.lowerBound() );
237  points[1] = transform ( aInput.upperBound() );
238  points[2] = transform ( Point ( aInput.upperBound()[0], aInput.lowerBound()[1] ) );
239  points[3] = transform ( Point ( aInput.lowerBound()[0], aInput.upperBound()[1] ) );
240 
241  Point t_min ( INT_MAX, INT_MAX ), t_max ( INT_MIN, INT_MIN );
242  for ( unsigned int i = 0; i < 4 ; i++ )
243  {
244  if ( points[i][0] < t_min[0] )
245  t_min[0] = points[i][0];
246  if ( points[i][1] < t_min[1] )
247  t_min[1] = points[i][1];
248 
249  if ( points[i][0] > t_max[0] )
250  t_max[0] = points[i][0];
251  if ( points[i][1] > t_max[1] )
252  t_max[1] = points[i][1];
253  }
254 
255  Bounds bounds;
256  bounds.first = t_min;
257  bounds.second = t_max;
258  return bounds;
259  }
std::pair< typename TDomain::Space::Point, typename TDomain::Space::Point > Bounds
MyPointD Point
Definition: testClone2.cpp:383

References DGtal::functors::DomainRigidTransformation2D< TDomain, TRigidTransformFunctor >::transform.

Field Documentation

◆ transform

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: