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

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

#include <DGtal/images/RigidTransformation3D.h>

Public Types

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

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

Member Typedef Documentation

◆ Bounds

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 251 of file RigidTransformation3D.h.

Constructor & Destructor Documentation

◆ DomainRigidTransformation3D()

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 259 of file RigidTransformation3D.h.

259 : transform ( aRigidFunctor ) {}

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

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

◆ BOOST_STATIC_ASSERT()

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

Checking concepts.

◆ operator()()

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 267 of file RigidTransformation3D.h.

268  {
269  typedef typename TDomain::Point Point;
270 
271  Point points[8];
272  points[0] = transform ( aInput.lowerBound() );
273  points[1] = transform ( aInput.upperBound() );
274  points[2] = transform ( Point ( aInput.upperBound()[0], aInput.lowerBound()[1], aInput.lowerBound()[2] ) );
275  points[3] = transform ( Point ( aInput.lowerBound()[0], aInput.upperBound()[1], aInput.upperBound()[2] ) );
276  points[4] = transform ( Point ( aInput.upperBound()[0], aInput.lowerBound()[1], aInput.upperBound()[2] ) );
277  points[5] = transform ( Point ( aInput.lowerBound()[0], aInput.upperBound()[1], aInput.lowerBound()[2] ) );
278  points[6] = transform ( Point ( aInput.lowerBound()[0], aInput.lowerBound()[1], aInput.upperBound()[2] ) );
279  points[7] = transform ( Point ( aInput.upperBound()[0], aInput.upperBound()[1], aInput.lowerBound()[2] ) );
280 
281  Point t_min ( INT_MAX, INT_MAX, INT_MAX ), t_max ( INT_MIN, INT_MIN, INT_MIN );
282  for ( int i = 0; i < 8; i++ )
283  {
284  if ( points[i][0] < t_min[0] )
285  t_min[0] = points[i][0];
286  if ( points[i][1] < t_min[1] )
287  t_min[1] = points[i][1];
288  if ( points[i][2] < t_min[2] )
289  t_min[2] = points[i][2];
290 
291  if ( points[i][0] > t_max[0] )
292  t_max[0] = points[i][0];
293  if ( points[i][1] > t_max[1] )
294  t_max[1] = points[i][1];
295  if ( points[i][2] > t_max[2] )
296  t_max[2] = points[i][2];
297  }
298  Bounds bounds;
299  bounds.first = t_min;
300  bounds.second = t_max;
301  return bounds;
302  }
std::pair< typename TDomain::Space::Point, typename TDomain::Space::Point > Bounds
MyPointD Point
Definition: testClone2.cpp:383

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

Field Documentation

◆ transform

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: