28 #if defined(ERRORVECTORFIELD_RECURSES)
29 #error Recursive header files inclusion detected in ErrorVectorField.h
32 #define ERRORVECTORFIELD_RECURSES
34 #if !defined ERRORVECTORFIELD_h
36 #define ERRORVECTORFIELD_h
40 #include <DGtal/images/RigidTransformation2D.h>
43 template<
typename TSpace,
typename TDomain,
typename TBijectiveReflections,
typename TInputValue =
typename TSpace::RealPo
int,
typename TOutputValue =
typename TSpace::Po
int>
44 struct ErrorVectorField{
47 typedef std::vector<std::vector<typename TSpace::RealPoint>>
VectorField;
56 ErrorVectorField(
const TBijectiveReflections& reflections,
const double theta,
const typename TSpace::Point center):
normalVectors(reflections),
targetRotation(center,theta,{0,0}),
my_center(center),
originCenteredRotation({0,0},theta,{0,0})
71 std::vector<typename TSpace::RealPoint> pixelError;
79 pixelError.push_back(error);
82 if(continuityVecField) {
84 for(
int veci = -1 ; veci <2 ; ++veci) {
85 for(
int vecj = -1 ; vecj<2 ; ++vecj) {
86 if(veci!=0 || vecj!=0){
89 pixelError.push_back(neigh_rot-preflections);
98 outVecField.push_back(pixelError);
109 #undef ERRORVECTORFIELD_RECURSES
MyDigitalSurface::ConstIterator ConstIterator
DGtal is the top-level namespace which contains all DGtal functions and types.
RealRotation targetRotation
ErrorVectorField(const TBijectiveReflections &reflections, const double theta, const typename TSpace::Point center)
RealRotation originCenteredRotation
std::vector< std::vector< typename TSpace::RealPoint > > VectorField
VectorField getOutputVectorFieldFromContour(const TDomain &set2dContour, bool continuityVecField=false)
functors::ForwardRigidTransformation2D< TSpace, TInputValue, typename TSpace::RealPoint, functors::Identity > RealRotation
TBijectiveReflections normalVectors
PointVector< 3, double > RealPoint