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

#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))
 
 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

◆ 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 236 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 244 of file RigidTransformation3D.h.

244 : 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 252 of file RigidTransformation3D.h.

References max(), and DGtal::functors::DomainRigidTransformation3D< TDomain, TRigidTransformFunctor >::transform.

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

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: