DGtal 1.3.0
Searching...
No Matches
DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor > Class Template Reference

Aim: implements backward rigid transformation of point in 3D integer space around any arbitrary axis. This implementation uses the Rodrigues' rotation formula. Warring: This version uses closest neighbor interpolation. More...

#include <DGtal/images/RigidTransformation3D.h>

## Public Types

typedef TSpace::RealPoint RealPoint

typedef TSpace::RealVector RealVector

## Public Member Functions

BackwardRigidTransformation3D (const RealPoint &aOrigin, const RealVector &aAxis, const double &angle, const RealVector &aTranslate)

TOutputValue operator() (const TInputValue &aInput) const

## Private Member Functions

BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >))
Checking concepts. More...

BOOST_STATIC_ASSERT ((TSpace::dimension==3))

BOOST_STATIC_ASSERT ((TOutputValue::dimension==3))

BOOST_STATIC_ASSERT ((TInputValue::dimension==3))

RealVector axis

RealPoint origin

double t_sin

double t_cos

RealVector trans

TFunctor functor

## Detailed Description

template<typename TSpace, typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point, typename TFunctor = VectorRounding < TInputValue, TOutputValue >>
class DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor >

Aim: implements backward rigid transformation of point in 3D integer space around any arbitrary axis. This implementation uses the Rodrigues' rotation formula. Warring: This version uses closest neighbor interpolation.

Description of template functor like class 'BackwardRigidTransformation3D'

Template Parameters
 TSpace a 3 dimensional space. TInputValue type of the input point e.g., TSpace::RealPoint TOutputValue type of the output point e.g., TSpace::Point TFunctor a functor operating on the output e.g., a rounding function.
exampleRigidtransformation3d.cpp

Definition at line 164 of file RigidTransformation3D.h.

## ◆ RealPoint

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point, typename TFunctor = VectorRounding < TInputValue, TOutputValue >>
 typedef TSpace::RealPoint DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor >::RealPoint

Definition at line 174 of file RigidTransformation3D.h.

## ◆ RealVector

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point, typename TFunctor = VectorRounding < TInputValue, TOutputValue >>
 typedef TSpace::RealVector DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor >::RealVector

Definition at line 175 of file RigidTransformation3D.h.

## ◆ BackwardRigidTransformation3D()

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point, typename TFunctor = VectorRounding < TInputValue, TOutputValue >>
 DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor >::BackwardRigidTransformation3D ( const RealPoint & aOrigin, const RealVector & aAxis, const double & angle, const RealVector & aTranslate )
inline

Constructor.

Parameters
 aOrigin the center of rotation. aAxis the axis of rotation. angle the angle given in radians. aTranslate the 3D dimensional vector which represents translation.

Definition at line 186 of file RigidTransformation3D.h.

188 : axis(aAxis.getNormalized()), origin(aOrigin), trans(aTranslate)
189 {
190 if ( std::isnan( axis.norm() ) )
191 throw std::runtime_error ( "Axis of rotation can not be set as a vector of length 0!" );
192
193 t_sin = std::sin ( angle );
194 t_cos = std::cos ( angle );
195 }

## ◆ BOOST_CONCEPT_ASSERT()

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point, typename TFunctor = VectorRounding < TInputValue, TOutputValue >>
 DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >) )
private

Checking concepts.

## ◆ BOOST_STATIC_ASSERT() [1/3]

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point, typename TFunctor = VectorRounding < TInputValue, TOutputValue >>
 DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor >::BOOST_STATIC_ASSERT ( (TInputValue::dimension==3) )
private

## ◆ BOOST_STATIC_ASSERT() [2/3]

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point, typename TFunctor = VectorRounding < TInputValue, TOutputValue >>
 DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor >::BOOST_STATIC_ASSERT ( (TOutputValue::dimension==3) )
private

## ◆ BOOST_STATIC_ASSERT() [3/3]

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point, typename TFunctor = VectorRounding < TInputValue, TOutputValue >>
 DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor >::BOOST_STATIC_ASSERT ( (TSpace::dimension==3) )
private

## ◆ operator()()

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point, typename TFunctor = VectorRounding < TInputValue, TOutputValue >>
 TOutputValue DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor >::operator() ( const TInputValue & aInput ) const
inline

Operator

Returns
the transformed point.

Definition at line 203 of file RigidTransformation3D.h.

204 {
205 RealPoint p;
206
207 p[0] = ( ( ( ( t_cos + ( axis[0] * axis[0] ) * ( 1. - t_cos ) ) * ( aInput[0] - trans[0] - origin[0] ) )
208 + ( ( axis[2] * t_sin + axis[0] * axis[1] * ( 1. - t_cos ) ) * ( aInput[1] - trans[1] - origin[1] ) )
209 + ( ( -axis[1] * t_sin + axis[0] * axis[2] * ( 1. - t_cos ) ) * ( aInput[2] - trans[2] - origin[2] ) ) ) ) + origin[0];
210
211 p[1] = ( ( ( ( axis[0] * axis[1] * ( 1. - t_cos ) - axis[2] * t_sin ) * ( aInput[0] - trans[0] - origin[0] ) )
212 + ( ( t_cos + ( axis[1] * axis[1] ) * ( 1. - t_cos ) ) * ( aInput[1] - trans[1] - origin[1] ) )
213 + ( ( axis[0] * t_sin + axis[1] * axis[2] * ( 1. - t_cos ) ) * ( aInput[2] - trans[2] - origin[2] ) ) ) ) + origin[1];
214
215 p[2] = ( ( ( ( axis[1] * t_sin + axis[0] * axis[2] * ( 1. - t_cos ) ) * ( aInput[0] - trans[0] - origin[0] ) )
216 + ( ( -axis[0] * t_sin + axis[1] * axis[2] * ( 1. - t_cos ) ) * ( aInput[1] - trans[1] - origin[1] ) )
217 + ( ( t_cos + ( axis[2] * axis[2] ) * ( 1. - t_cos ) ) * ( aInput[2] - trans[2] - origin[2] ) ) ) ) + origin[2];
218 return functor ( p );
219 }
Z2i::RealPoint RealPoint

## ◆ axis

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point, typename TFunctor = VectorRounding < TInputValue, TOutputValue >>
 RealVector DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor >::axis
private

## ◆ functor

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point, typename TFunctor = VectorRounding < TInputValue, TOutputValue >>
 TFunctor DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor >::functor
private

Definition at line 228 of file RigidTransformation3D.h.

## ◆ origin

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point, typename TFunctor = VectorRounding < TInputValue, TOutputValue >>
 RealPoint DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor >::origin
private

Definition at line 224 of file RigidTransformation3D.h.

## ◆ t_cos

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point, typename TFunctor = VectorRounding < TInputValue, TOutputValue >>
 double DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor >::t_cos
private

## ◆ t_sin

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point, typename TFunctor = VectorRounding < TInputValue, TOutputValue >>
 double DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor >::t_sin
private

## ◆ trans

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point, typename TFunctor = VectorRounding < TInputValue, TOutputValue >>
 RealVector DGtal::functors::BackwardRigidTransformation3D< TSpace, TInputValue, TOutputValue, TFunctor >::trans
private

Definition at line 227 of file RigidTransformation3D.h.

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