DGtal  0.9.4.1
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::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))
 
 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

◆ 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 204 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 212 of file RigidTransformation2D.h.

212 : 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 220 of file RigidTransformation2D.h.

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

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: