DGtal  1.5.beta
DGtal::RBC< TSpace, TInputValue, TOutputValue > Struct Template Reference

RBC : Bijective Rotation through Circles. More...

#include <DGtal/images/bijectiveRotations/RBC.h>

Public Types

typedef RBC_vec< TSpace, TInputValue, TOutputValue >::Circle Circle
 

Public Member Functions

 RBC (const RBC_vec< TSpace, TInputValue, TOutputValue > &aRot, const double angle, const TOutputValue center)
 
template<typename TImage >
TImage rotateImage (const TImage &img) const
 Rotates the whole image Image circle by circle. More...
 
TOutputValue operator() (const TInputValue &aInput) const
 
std::string tostring () const
 
void set_angle (const double newAngle)
 
TOutputValue center () const
 

Data Fields

RBC_vec< TSpace, TInputValue, TOutputValue > rot
 
double my_angle
 
TOutputValue my_center
 

Detailed Description

template<typename TSpace, typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point>
struct DGtal::RBC< TSpace, TInputValue, TOutputValue >

RBC : Bijective Rotation through Circles.

Description of template struct RBC

Template Parameters
TSpacea 2 dimensional space.
TInputValuetype of the input point e.g., TSpace::RealPoint.
TOutputValuetype of the output point e.g., TSpace::Point

Definition at line 55 of file RBC.h.

Member Typedef Documentation

◆ Circle

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point>
typedef RBC_vec<TSpace,TInputValue,TOutputValue>::Circle DGtal::RBC< TSpace, TInputValue, TOutputValue >::Circle

Definition at line 57 of file RBC.h.

Constructor & Destructor Documentation

◆ RBC()

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point>
DGtal::RBC< TSpace, TInputValue, TOutputValue >::RBC ( const RBC_vec< TSpace, TInputValue, TOutputValue > &  aRot,
const double  angle,
const TOutputValue  center 
)
inline

RBC Constructor.

Parameters
anglethe angle given in radians.
centerthe center of rotation.
aRotRBC Circles initialiser

Definition at line 65 of file RBC.h.

66  : rot( aRot ),my_angle(angle),my_center(center) {}
TOutputValue center() const
Definition: RBC.h:110
TOutputValue my_center
Definition: RBC.h:114
RBC_vec< TSpace, TInputValue, TOutputValue > rot
Definition: RBC.h:56
double my_angle
Definition: RBC.h:113

Member Function Documentation

◆ center()

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point>
TOutputValue DGtal::RBC< TSpace, TInputValue, TOutputValue >::center ( ) const
inline
Returns
the centre of rotation

Definition at line 110 of file RBC.h.

110 {return my_center;}

References DGtal::RBC< TSpace, TInputValue, TOutputValue >::my_center.

◆ operator()()

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

Definition at line 95 of file RBC.h.

96  {
97  return (*this).rot.operator()(aInput);
98  }

◆ rotateImage()

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point>
template<typename TImage >
TImage DGtal::RBC< TSpace, TInputValue, TOutputValue >::rotateImage ( const TImage &  img) const
inline

Rotates the whole image Image circle by circle.

Definition at line 70 of file RBC.h.

71  {
72  typedef typename TImage::Domain TDomain;
74  typedef std::pair < typename TSpace::Point, typename TSpace::Point > Bounds;
75 
76  typename TSpace::Point bottomLeft(-1,-1);
77  typename TSpace::Point topRight(1,1);
78 
79  MyDomainTransformer domainTransformer ( rot );
80  Bounds bounds = domainTransformer ( img.domain() );
81  TDomain transformedDomain ( bounds.first+bottomLeft, bounds.second+topRight );
82  TImage rotatedImage ( transformedDomain );
83 
84 
85 
86  // for ( auto r = 1; r < rot.size(); r++ )
87  // rotateCircle( img, rotatedImage, my_center, my_angle, r );
88 
89  for (typename TDomain::ConstIterator it = img.domain().begin(); it != img.domain().end(); ++it ) {
90  rotatedImage.setValue((*this).rot.operator()(*it),img(*it));
91  }
92  return rotatedImage;
93  }
Aim: implements bounds of transformed domain.
MyDigitalSurface::ConstIterator ConstIterator
MyPointD Point
Definition: testClone2.cpp:383
HyperRectDomain< Space > Domain

References DGtal::RBC< TSpace, TInputValue, TOutputValue >::rot.

◆ set_angle()

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point>
void DGtal::RBC< TSpace, TInputValue, TOutputValue >::set_angle ( const double  newAngle)
inline

Definition at line 104 of file RBC.h.

104  {
105  my_angle=newAngle;
106  rot.setAngle()= newAngle;
107  }

References DGtal::RBC< TSpace, TInputValue, TOutputValue >::my_angle, and DGtal::RBC< TSpace, TInputValue, TOutputValue >::rot.

◆ tostring()

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point>
std::string DGtal::RBC< TSpace, TInputValue, TOutputValue >::tostring ( ) const
inline

Definition at line 100 of file RBC.h.

100  {
101  return {"RBC"};
102  }

Field Documentation

◆ my_angle

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point>
double DGtal::RBC< TSpace, TInputValue, TOutputValue >::my_angle

Definition at line 113 of file RBC.h.

Referenced by DGtal::RBC< TSpace, TInputValue, TOutputValue >::set_angle().

◆ my_center

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point>
TOutputValue DGtal::RBC< TSpace, TInputValue, TOutputValue >::my_center

Definition at line 114 of file RBC.h.

Referenced by DGtal::RBC< TSpace, TInputValue, TOutputValue >::center().

◆ rot

template<typename TSpace , typename TInputValue = typename TSpace::RealPoint, typename TOutputValue = typename TSpace::Point>
RBC_vec<TSpace,TInputValue,TOutputValue> DGtal::RBC< TSpace, TInputValue, TOutputValue >::rot

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