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

#include <DGtal/images/RigidTransformation3D.h>

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

Public Types

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

Public Member Functions

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

Protected Attributes

const TRigidTransformFunctor & transform
 

Private Member Functions

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

Detailed Description

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

Aim: implements bounds of transformed domain.

Description of template functor like class 'DomainRigidTransformation3D'

Template Parameters
TDomaina 3 dimensional domain.
TRigidTransformFunctora functor which represent three dimensional rigid transformation.
See also
exampleRigidtransformation3d.cpp

Definition at line 228 of file RigidTransformation3D.h.

Member Typedef Documentation

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

Definition at line 237 of file RigidTransformation3D.h.

Constructor & Destructor Documentation

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

Constructor.

Parameters
aRigidFunctor- functor to rigid transformation.

Definition at line 245 of file RigidTransformation3D.h.

245 : transform ( aRigidFunctor ) {}

Member Function Documentation

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

Checking concepts.

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

Operator

Returns
bounds of the transformed domain.

Definition at line 253 of file RigidTransformation3D.h.

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

254  {
255  typedef typename TDomain::Point Point;
256 
257  Point points[8];
258  points[0] = transform ( aInput.lowerBound() );
259  points[1] = transform ( aInput.upperBound() );
260  points[2] = transform ( Point ( aInput.upperBound()[0], aInput.lowerBound()[1], aInput.lowerBound()[2] ) );
261  points[3] = transform ( Point ( aInput.lowerBound()[0], aInput.upperBound()[1], aInput.upperBound()[2] ) );
262  points[4] = transform ( Point ( aInput.upperBound()[0], aInput.lowerBound()[1], aInput.upperBound()[2] ) );
263  points[5] = transform ( Point ( aInput.lowerBound()[0], aInput.upperBound()[1], aInput.lowerBound()[2] ) );
264  points[6] = transform ( Point ( aInput.lowerBound()[0], aInput.lowerBound()[1], aInput.upperBound()[2] ) );
265  points[7] = transform ( Point ( aInput.upperBound()[0], aInput.upperBound()[1], aInput.lowerBound()[2] ) );
266 
267  typename Point::Component cmax = std::numeric_limits<typename Point::Component>::max();
268  typename Point::Component cmin = std::numeric_limits<typename Point::Component>::min();
269  Point t_min ( cmax, cmax, cmax ), t_max ( cmin, cmin, cmin );
270  for ( int i = 0; i < 8; i++ )
271  {
272  if ( points[i][0] < t_min[0] )
273  t_min[0] = points[i][0];
274  if ( points[i][1] < t_min[1] )
275  t_min[1] = points[i][1];
276  if ( points[i][2] < t_min[2] )
277  t_min[2] = points[i][2];
278 
279  if ( points[i][0] > t_max[0] )
280  t_max[0] = points[i][0];
281  if ( points[i][1] > t_max[1] )
282  t_max[1] = points[i][1];
283  if ( points[i][2] > t_max[2] )
284  t_max[2] = points[i][2];
285  }
286  Bounds bounds;
287  bounds.first = t_min;
288  bounds.second = t_max;
289  return bounds;
290  }
std::pair< typename TDomain::Space::Point, typename TDomain::Space::Point > Bounds

Field Documentation

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

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