29#if defined(RigidTransformation2D_RECURSES)
30#error Recursive header files inclusion detected in RigidTransformation2D.h
33#define RigidTransformation2D_RECURSES
35#if !defined RigidTransformation2D_h
37#define RigidTransformation2D_h
45#include "DGtal/base/Common.h"
46#include "DGtal/kernel/BasicPointFunctors.h"
47#include <DGtal/helpers/StdDefs.h>
48#include <DGtal/kernel/domains/CDomain.h>
49#include <DGtal/kernel/CSpace.h>
70template <
typename TSpace,
typename TInputValue =
typename TSpace::RealPoint,
typename TOutputValue =
typename TSpace::Point,
71 typename TFunctor = VectorRounding < TInputValue, TOutputValue > >
96 t_sin = std::sin ( angle );
97 t_cos = std::cos ( angle );
140template <
typename TSpace,
typename TInputValue =
typename TSpace::RealPoint,
typename TOutputValue =
typename TSpace::Point,
141 typename TFunctor = VectorRounding < TInputValue, TOutputValue > >
166 t_sin = std::sin ( angle );
167 t_cos = std::cos ( angle );
207template <
typename TDomain,
typename TRig
idTransformFunctor >
216 typedef std::pair < typename TDomain::Space::Point, typename TDomain::Space::Point >
Bounds;
234 typedef typename TDomain::Point
Point;
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] ) );
241 Point t_min ( INT_MAX, INT_MAX ), t_max ( INT_MIN, INT_MIN );
242 for (
unsigned int i = 0; i < 4 ; i++ )
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];
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];
256 bounds.first = t_min;
257 bounds.second = t_max;
271#undef RigidTransformation2D_RECURSES
Aim: implements bounds of transformed domain.
Bounds operator()(const TDomain &aInput) const
std::pair< typename TDomain::Space::Point, typename TDomain::Space::Point > Bounds
BOOST_STATIC_ASSERT((TDomain::dimension==2))
Checking concepts.
const TRigidTransformFunctor & transform
BOOST_CONCEPT_ASSERT((concepts::CDomain< TDomain >))
DomainRigidTransformation2D(const TRigidTransformFunctor &aRigidFunctor)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: This concept represents a digital domain, i.e. a non mutable subset of points of the given digit...
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.