DGtal  0.9.2
SegmentComputerEstimators.h
1 
17 #pragma once
18 
36 #if defined(SegmentComputerEstimators_RECURSES)
37 #error Recursive header files inclusion detected in SegmentComputerEstimators.h
38 #else // defined(SegmentComputerEstimators_RECURSES)
39 
40 #define SegmentComputerEstimators_RECURSES
41 
42 #if !defined SegmentComputerEstimators_h
43 
44 #define SegmentComputerEstimators_h
45 
47 // Inclusions
48 #include <cmath>
49 #include "DGtal/base/Common.h"
50 #include "DGtal/helpers/StdDefs.h"
51 #include "boost/utility.hpp"
52 
54 
55 
56 namespace DGtal
57 {
58 
62  namespace detail
63  {
65  // class PosIndepScaleIndepSCEstimator
67 
83  template <typename TSegmentComputer, typename Functor,
84  typename ReturnType = typename Functor::Value>
86  {
87 
88  public:
89 
90  // ----------------------- inner type ------------------------------
91  typedef TSegmentComputer SegmentComputer;
92  typedef typename SegmentComputer::ConstIterator ConstIterator;
93  typedef ReturnType Quantity;
94 
95  // ----------------------- Internal data ------------------------------
96  public:
100  ConstIterator myBegin;
104  ConstIterator myEnd;
108  const SegmentComputer* mySCPtr;
112  Functor myFunctor;
113 
114  // ----------------------- Standard services ------------------------------
115  public:
116 
121  bool isValid() const
122  {
123  return (mySCPtr != 0);
124  };
125 
126  // ----------------------- Interface --------------------------------------
127  public:
128 
132  PosIndepScaleIndepSCEstimator(): myBegin(), myEnd(), mySCPtr(0), myFunctor() {}
133 
140  void init(const double /*h*/, const ConstIterator& itb, const ConstIterator& ite)
141  {
142  myBegin = itb;
143  myEnd = ite;
144  }
145 
150  void attach(const SegmentComputer& aSC)
151  {
152  mySCPtr = &aSC;
153  };
154 
159  Quantity eval(const ConstIterator& /*it*/) const
160  {
161  ASSERT( mySCPtr );
162  return myFunctor( *mySCPtr );
163  }
164 
174  template <typename OutputIterator>
175  OutputIterator eval(const ConstIterator& itb, const ConstIterator& ite,
176  OutputIterator result) const
177  {
178  ASSERT( mySCPtr );
179 
180  // do-while loop to deal with the case of a whole circular range
181  if (isNotEmpty(itb, ite))
182  {
183  ConstIterator it = itb;
184  do
185  {
186  *result++ = myFunctor( *mySCPtr );
187  ++it;
188  } while (it != ite);
189  }
190 
191  return result;
192  }
193 
194  }; // end of class PosIndepScaleIndepSCEstimator
195 
197  // class PosIndepScaleDepSCEstimator
199 
215  template <typename TSegmentComputer, typename Functor,
216  typename ReturnType = typename Functor::Value>
218  {
219 
220  public:
221 
222  // ----------------------- inner type ------------------------------
223  typedef TSegmentComputer SegmentComputer;
224  typedef typename SegmentComputer::ConstIterator ConstIterator;
225  typedef ReturnType Quantity;
226 
227  // ----------------------- internal data ------------------------------
228  public:
232  double myH;
236  ConstIterator myBegin;
240  ConstIterator myEnd;
244  const SegmentComputer* mySCPtr;
248  Functor myFunctor;
249 
250  // ----------------------- Standard services ------------------------------
251  public:
252 
258  : myH( 0.0 ), myBegin(), myEnd(), mySCPtr(0), myFunctor()
259  {
260  }
266  : myH( other.myH ), myBegin( other.myBegin ), myEnd( other.myEnd ),
267  mySCPtr( other.mySCPtr ), myFunctor( other.myFunctor )
268  {
269  }
275  {
276  if (this != &other)
277  {
278  myH = other.myH;
279  myBegin = other.myBegin;
280  myEnd = other.myEnd;
281  mySCPtr = other.mySCPtr;
282  myFunctor = other.myFunctor;
283  }
284  return *this;
285  }
290 
295  bool isValid() const
296  {
297  return (myH > 0)&&(mySCPtr != 0);
298  };
299 
300 
301 
302  // ----------------------- Interface --------------------------------------
303  public:
304 
311  void init(const double h, const ConstIterator& itb, const ConstIterator& ite)
312  {
313  myH = h;
314  myBegin = itb;
315  myEnd = ite;
316  ASSERT( myH > 0 );
317  }
318 
323  void attach(const SegmentComputer& aSC)
324  {
325  mySCPtr = &aSC;
326  ASSERT( mySCPtr );
327  };
328 
333  Quantity eval(const ConstIterator& /*it*/) const
334  {
335  ASSERT( isValid() );
336  return myFunctor( *mySCPtr, myH );
337  }
338 
348  template <typename OutputIterator>
349  OutputIterator eval(const ConstIterator& itb, const ConstIterator& ite,
350  OutputIterator result) const
351  {
352  ASSERT( isValid() );
353 
354  // do-while loop to deal with the case of a whole circular range
355  if (isNotEmpty(itb, ite))
356  {
357  ConstIterator it = itb;
358  do
359  {
360  *result++ = myFunctor( *mySCPtr, myH );
361  ++it;
362  } while (it != ite);
363  }
364 
365  return result;
366  }
367 
368  }; // end of class PosIndepScaleDepSCEstimator
369 
371  // class PosDepScaleIndepSCEstimator
373 
388  template <typename TSegmentComputer, typename Functor,
389  typename ReturnType = typename Functor::Value>
391  {
392 
393  public:
394 
395  // ----------------------- inner type ------------------------------
396  typedef TSegmentComputer SegmentComputer;
397  typedef typename SegmentComputer::ConstIterator ConstIterator;
398  typedef ReturnType Quantity;
399 
400  // ----------------------- Internal data ------------------------------
401  public:
405  ConstIterator myBegin;
409  ConstIterator myEnd;
413  const SegmentComputer* mySCPtr;
417  Functor myFunctor;
418 
419  // ----------------------- Standard services ------------------------------
420  public:
421 
426  bool isValid() const
427  {
428  return (mySCPtr != 0);
429  };
430 
431  // ----------------------- Interface --------------------------------------
432  public:
433 
437  PosDepScaleIndepSCEstimator(): myBegin(), myEnd(), mySCPtr(0), myFunctor() {}
438 
444  void init(const double /*h*/, const ConstIterator& itb, const ConstIterator& ite)
445  {
446  myBegin = itb;
447  myEnd = ite;
448  }
449 
454  void attach(const SegmentComputer& aSC)
455  {
456  mySCPtr = &aSC;
457  };
458 
464  Quantity eval(const ConstIterator& it) const
465  {
466  ASSERT( mySCPtr );
467  return myFunctor( it, *mySCPtr );
468  }
469 
479  template <typename OutputIterator>
480  OutputIterator eval(const ConstIterator& itb, const ConstIterator& ite,
481  OutputIterator result) const
482  {
483  ASSERT( mySCPtr );
484 
485  // do-while loop to deal with the case of a whole circular range
486  if (isNotEmpty(itb, ite))
487  {
488  ConstIterator it = itb;
489  do
490  {
491  *result++ = myFunctor( it, *mySCPtr );
492  ++it;
493  } while (it != ite);
494  }
495 
496  return result;
497  }
498 
499  }; // end of class PosDepScaleIndepSCEstimator
500 
502  // class PosDepScaleDepSCEstimator
504 
519  template <typename TSegmentComputer, typename Functor,
520  typename ReturnType = typename Functor::Value>
522  {
523 
524  public:
525 
526  // ----------------------- inner type ------------------------------
527  typedef TSegmentComputer SegmentComputer;
528  typedef typename SegmentComputer::ConstIterator ConstIterator;
529  typedef ReturnType Quantity;
530 
531  // ----------------------- internal data ------------------------------
532  public:
536  double myH;
540  ConstIterator myBegin;
544  ConstIterator myEnd;
548  const SegmentComputer* mySCPtr;
552  Functor myFunctor;
553 
554  // ----------------------- Standard services ------------------------------
555  public:
556 
562  : myH( 0.0 ), myBegin(), myEnd(), mySCPtr(0), myFunctor()
563  {
564  }
570  : myH( other.myH ), myBegin( other.myBegin ), myEnd( other.myEnd ),
571  mySCPtr( other.mySCPtr ), myFunctor( other.myFunctor )
572  {
573  }
579  {
580  if (this != &other)
581  {
582  myH = other.myH;
583  myBegin = other.myBegin;
584  myEnd = other.myEnd;
585  mySCPtr = other.mySCPtr;
586  myFunctor = other.myFunctor;
587  }
588  return *this;
589  }
594 
599  bool isValid() const
600  {
601  return (myH > 0)&&(mySCPtr != 0);
602  };
603 
604 
605 
606  // ----------------------- Interface --------------------------------------
607  public:
608 
615  void init(const double h, const ConstIterator& itb, const ConstIterator& ite)
616  {
617  myH = h;
618  myBegin = itb;
619  myEnd = ite;
620  ASSERT( myH > 0 );
621  }
622 
627  void attach(const SegmentComputer& aSC)
628  {
629  mySCPtr = &aSC;
630  ASSERT( mySCPtr );
631  };
632 
638  Quantity eval(const ConstIterator& it) const
639  {
640  ASSERT( isValid() );
641  return myFunctor( it, *mySCPtr, myH );
642  }
643 
653  template <typename OutputIterator>
654  OutputIterator eval(const ConstIterator& itb, const ConstIterator& ite,
655  OutputIterator result) const
656  {
657  ASSERT( isValid() );
658 
659  // do-while loop to deal with the case of a whole circular range
660  if (isNotEmpty(itb, ite))
661  {
662  ConstIterator it = itb;
663  do
664  {
665  *result++ = myFunctor( it, *mySCPtr, myH );
666  ++it;
667  } while (it != ite);
668  }
669 
670  return result;
671  }
672 
673  }; // end of class PosDepScaleDepSCEstimator
674 
677 
683  {
684  public:
685  typedef double Value;
686 
687 
701  template<typename DSS>
702  Value operator() (const DSS& aDSS) const
703  {
705  ::castToDouble(aDSS.a());
707  ::castToDouble(aDSS.b());
708 
709  return std::atan2(a,b);
710  }
711  };
717  {
718  public:
720  typedef RealVector Value;
721 
734  template<typename DSS>
735  Value operator() (const DSS& aDSS) const
736  {
738  ::castToDouble( aDSS.b() );
740  ::castToDouble( aDSS.a() );
741  RealVector v(x,y);
742  double norm = v.norm(RealVector::L_2);
743  v /= norm;
744  return v;
745  }
746  };
751  template<typename DSS>
753  {
754  public:
755  typedef typename DSS::Vector Value;
756 
766  Value operator() (const DSS& aDSS) const
767  {
768  return Value(aDSS.b(), aDSS.a());
769  }
770  };
783  template<bool isCCW = true>
785  {
786  public:
787  typedef double Value;
788 
802  template<typename DCA>
803  Value operator() (const DCA& aDCA, const double& aH = 1.0) const
804  {
805  if ( aDCA.isStraight() )
806  return 0.0;
807  else
808  return ( aDCA.getSeparatingCircle().getCurvature() / aH );
809  }
810  };
811  template<>
812  struct CurvatureFromDCA<false>
813  {
814  public:
815  typedef double Value;
816 
817  template<typename DCA>
818  Value operator() (const DCA& aDCA, const Value& aH = 1.0) const
819  {
820  if ( aDCA.isStraight() )
821  return 0.0;
822  else
823  return - ( aDCA.getSeparatingCircle().getCurvature() / aH );
824  }
825  };
831  {
832  public:
834 
835 
849  template<typename DCA>
850  Value operator() (const typename DCA::ConstIterator& it,
851  const DCA& aDCA) const
852  {
853  typedef typename DCA::Pair Pair;
854  typedef typename DCA::Point Point;
855  typedef typename Point::Coordinate Coordinate;
856 
857  if ( !aDCA.isStraight() )
858  {
859  //separating circle center
860  double c0, c1, r;
861  aDCA.getSeparatingCircle().getParameters(c0, c1, r);
862  //point
863  Pair pair = *it;
864  Point i = pair.first;
865  Point o = pair.second;
866  double m0 = NumberTraits<Coordinate>::castToDouble(i[0]+o[0]) / 2.0;
867  double m1 = NumberTraits<Coordinate>::castToDouble(i[1]+o[1]) / 2.0;
868  //normal vector
869  double v0 = m0 - c0;
870  double v1 = m1 - c1;
871  //norm
872  double n = std::sqrt(v0*v0 + v1*v1);
873  return Value( v0/n, v1/n );
874  }
875  else
876  {
877  //separating straight line and normal vector
878  double a, b, c;
879  aDCA.getStabbingLineComputerPtr()->getParameters(a, b, c);
880  //norm
881  double n = std::sqrt(a*a + b*b);
882  return Value( a/n, b/n );
883  }
884  }
885  };
886 
892  {
893  public:
895 
911  template<typename DCA>
912  Value operator() (const typename DCA::ConstIterator& it,
913  const DCA& aDCA) const
914  {
916  Value normal = f(it, aDCA);
917  return Value( normal[1], normal[0] );
918  }
919  };
920 
927  {
928  public:
929  typedef std::pair<double,double> Value;
930 
947  template<typename DCA>
948  Value operator() (const typename DCA::ConstIterator& it,
949  const DCA& aDCA, const double& aH) const
950  {
951  typedef typename DCA::Pair Pair;
952  typedef typename DCA::Point Point;
953  typedef typename Point::Coordinate Coordinate;
954 
955  if ( !aDCA.isStraight() )
956  {
957  //separating circle center
958  double c0, c1, r;
959  aDCA.getSeparatingCircle().getParameters(c0, c1, r);
960  //points
961  Pair pair = *it;
962  Point i = pair.first;
963  Point o = pair.second;
964  //distances
965  double distI0 = NumberTraits<Coordinate>::castToDouble(i[0]) - c0;
966  double distI1 = NumberTraits<Coordinate>::castToDouble(i[1]) - c1;
967  double distI = std::sqrt( distI0*distI0 + distI1*distI1 ) - r;
968  double distO0 = NumberTraits<Coordinate>::castToDouble(o[0]) - c0;
969  double distO1 = NumberTraits<Coordinate>::castToDouble(o[1]) - c1;
970  double distO = std::sqrt( distO0*distO0 + distO1*distO1 ) - r;
971  return Value( distI*aH, distO*aH );
972  }
973  else
974  {
975  //separating straight line
976  double a, b, c;
977  aDCA.getStabbingLineComputerPtr()->getParameters(a, b, c);
978  //norm
979  double n = std::sqrt(a*a + b*b);
980  //points
981  Pair pair = *it;
982  Point i = pair.first;
983  Point o = pair.second;
984  //distances
985  double rI = NumberTraits<Coordinate>::castToDouble(i[0])*a +
987  double distI = rI / n;
988  double rO = NumberTraits<Coordinate>::castToDouble(o[0])*a +
990  double distO = rO / n;
991  return Value( distI*aH, distO*aH );
992  }
993  }
994  };
995 
996  }//namespace detail
997 
998 
999 
1000  //-------------------------------------------------------------------------------------------
1009  template <typename DSSComputer>
1011  public detail::PosIndepScaleIndepSCEstimator<DSSComputer, detail::NormalizedTangentVectorFromDSS>
1012  {
1013  typedef
1016 
1017  public:
1027  };
1028 
1029  //-------------------------------------------------------------------------------------------
1038  template <typename DSSComputer>
1040  public detail::PosIndepScaleIndepSCEstimator<DSSComputer, detail::TangentVectorFromDSS<DSSComputer> >
1041  {
1042  typedef
1045 
1046  public:
1056  };
1057 
1058  //-------------------------------------------------------------------------------------------
1068  template <typename DSSComputer>
1070  public detail::PosIndepScaleIndepSCEstimator<DSSComputer, detail::TangentAngleFromDSS>
1071  {
1072  typedef
1075 
1076  public:
1086  };
1087 
1088  //-------------------------------------------------------------------------------------------
1106  template <typename DCAComputer, bool isCCW = true>
1108  public detail::PosIndepScaleDepSCEstimator<DCAComputer,
1109  detail::CurvatureFromDCA<isCCW> >
1110  {
1111  typedef
1114 
1115  public:
1125  };
1126 
1127  //-------------------------------------------------------------------------------------------
1136  template <typename DCAComputer>
1138  public detail::PosDepScaleIndepSCEstimator<DCAComputer,
1139  detail::NormalVectorFromDCA>
1140  {
1141  typedef
1144 
1145  public:
1155  };
1156 
1157  //-------------------------------------------------------------------------------------------
1166  template <typename DCAComputer>
1168  public detail::PosDepScaleIndepSCEstimator<DCAComputer,
1169  detail::TangentVectorFromDCA>
1170  {
1171  typedef
1174 
1175  public:
1185  };
1186 
1187  //-------------------------------------------------------------------------------------------
1197  template <typename DCAComputer>
1199  public detail::PosDepScaleDepSCEstimator<DCAComputer,
1200  detail::DistanceFromDCA>
1201  {
1202  typedef
1205 
1206  public:
1216  };
1217 
1221  namespace detail
1222  {
1235  {
1236  public:
1237  typedef double Value;
1238 
1239  template<typename DSS>
1240  Value operator() (const DSS& aDSS) const
1241  {
1242  typedef typename DSS::Vector Vector;
1243  //length
1244  Vector v = ( *aDSS.begin() - *boost::prior(aDSS.end()) );
1245  Value l = v.norm(Vector::L_2);
1246  //result
1247  return 1/( (l*l)/8 + 0.5 );
1248  }
1249  };
1250 
1263  {
1264  public:
1265  typedef double Value;
1266 
1267  template<typename DSS>
1268  Value operator() (const DSS& aDSS) const
1269  {
1270  typedef typename DSS::Vector Vector;
1271  //length
1272  Vector v = ( *aDSS.begin() - *boost::prior(aDSS.end()) );
1273  Value l = v.norm(Vector::L_2);
1274  //width
1275  Vector t( aDSS.b(), aDSS.a() );
1276  Value w = 1.0 / v.norm(Vector::L_2);
1277  //result
1278  return 1.0/( (l*l)/(8*w) + w/2 );
1279  }
1280  };
1281 
1283  // class CurvatureFromDSSBaseEstimator
1285 
1300  template <typename DSSComputer, typename Functor = detail::CurvatureFromDSSLength >
1302  {
1303 
1304  public:
1305 
1306  // ----------------------- inner type ------------------------------------
1307  typedef DSSComputer SegmentComputer;
1308  typedef typename DSSComputer::ConstIterator ConstIterator;
1309  typedef double Quantity;
1310 
1312 
1313  // ----------------------- internal data ------------------------------
1314  public:
1318  double myH;
1322  ConstIterator myBegin;
1326  ConstIterator myEnd;
1330  const SegmentComputer* mySCPtr;
1335 
1336  // ----------------------- Standard services ------------------------------
1337  public:
1338 
1344  : myH( 0.0 ), myBegin(), myEnd(), mySCPtr(0), myFunctor()
1345  {
1346  }
1352  : myH( other.myH ), myBegin( other.myBegin ), myEnd( other.myEnd ),
1353  mySCPtr( other.mySCPtr ), myFunctor( other.myFunctor )
1354  {
1355  }
1361  {
1362  if (this != &other)
1363  {
1364  myH = other.myH;
1365  myBegin = other.myBegin;
1366  myEnd = other.myEnd;
1367  mySCPtr = other.mySCPtr;
1368  myFunctor = other.myFunctor;
1369  }
1370  return *this;
1371  }
1376 
1381  bool isValid() const
1382  {
1383  return (myH > 0)&&(mySCPtr != 0);
1384  };
1385 
1386  // ----------------------- Interface --------------------------------------
1387  public:
1388 
1395  void init(const double h, const ConstIterator& itb, const ConstIterator& ite)
1396  {
1397  myH = h;
1398  myBegin = itb;
1399  myEnd = ite;
1400  ASSERT( myH > 0 );
1401  }
1402 
1407  Quantity eval(const ConstIterator& /*it*/)
1408  {
1409  ASSERT( isValid() );
1410 
1411  //types
1412  typedef typename DSSComputer::Integer Integer;
1413  typedef typename DSSComputer::Vector Vector;
1414 
1415  //curvature value
1416  Quantity k = 0;
1417 
1418 
1419  //begin and end iterators
1420  //(back point on the first point)
1421  //(front point on the last point)
1422  ConstIterator back = mySCPtr->begin();
1423  ConstIterator front = mySCPtr->end();
1424  bool isConnectedAtBack = isNotEmpty(myBegin, back)
1425  &&((*boost::prior(back)-*back).norm(Vector::L_1) <= NumberTraits<Integer>::ONE);
1426  bool isConnectedAtFront = isNotEmpty(front, myEnd)
1427  &&((*boost::prior(front)-*front).norm(Vector::L_1) <= NumberTraits<Integer>::ONE);
1428 
1429 
1430  if (isConnectedAtBack) {
1431  if (isConnectedAtFront) {
1432 
1433  --back;
1434 
1435  //parameters
1436  Integer mu = mySCPtr->mu();
1437  Integer omega = mySCPtr->omega();
1438 
1439  //cases
1440  if ( (mySCPtr->remainder(*back)<=mu-1)&&
1441  (mySCPtr->remainder(*front)<=mu-1) ) { //convex
1442  k = myFunctor(*mySCPtr) / myH;
1443  } else if ( (mySCPtr->remainder(*back)>=mu+omega)&&
1444  (mySCPtr->remainder(*front)>=mu+omega) ) { //concave
1445  k = -myFunctor(*mySCPtr) / myH;
1446  } //else //inflection
1447 
1448  } else {
1449 
1450  --back;
1451 
1452  //parameters
1453  Integer mu = mySCPtr->mu();
1454  Integer omega = mySCPtr->omega();
1455 
1456  //cases
1457  if ( (mySCPtr->remainder(*back)<=mu-1) ) { //convex
1458  k = myFunctor(*mySCPtr) / myH;
1459  } else if ( (mySCPtr->remainder(*back)>=mu+omega) ) { //concave
1460  k = -myFunctor(*mySCPtr) / myH;
1461  } //else //inflection
1462 
1463  }
1464  } else if (isConnectedAtFront) {
1465 
1466  //parameters
1467  Integer mu = mySCPtr->mu();
1468  Integer omega = mySCPtr->omega();
1469 
1470  //cases
1471  if ( (mySCPtr->remainder(*front)<=mu-1) ) { //convex
1472  k = myFunctor(*mySCPtr) / myH;
1473  } else if ( (mySCPtr->remainder(*front)>=mu+omega) ) { //concave
1474  k = -myFunctor(*mySCPtr) / myH;
1475  } //else //inflection
1476 
1477  } //else cannot be extended: k is set to 0
1478 
1479  return k;
1480 
1481  }
1482 
1492  template <typename OutputIterator>
1493  OutputIterator eval(const ConstIterator& itb, const ConstIterator& ite,
1494  OutputIterator result)
1495  {
1496  ASSERT( isValid() );
1497 
1498  // do-while loop to deal with the case of a whole circular range
1499  if (isNotEmpty(itb, ite))
1500  {
1501  ConstIterator it = itb;
1502  do
1503  {
1504  *result++ = eval( it );
1505  ++it;
1506  } while (it != ite);
1507  }
1508 
1509  return result;
1510  }
1511 
1516  void attach(const SegmentComputer& aSC)
1517  {
1518  mySCPtr = &aSC;
1519  ASSERT( mySCPtr );
1520  };
1521 
1522 
1523  }; // end of class CurvatureFromDSSBaseEstimator
1524 
1525  }//namespace detail
1526 
1527 
1528 
1529  //-------------------------------------------------------------------------------------------
1551  template <typename DSSComputer>
1553  public detail::CurvatureFromDSSBaseEstimator<DSSComputer, detail::CurvatureFromDSSLength >
1554  {
1555 
1557 
1558  public:
1568  };
1569 
1570  //-------------------------------------------------------------------------------------------
1588  template <typename DSSComputer>
1590  public detail::CurvatureFromDSSBaseEstimator<DSSComputer, detail::CurvatureFromDSSLengthAndWidth >
1591  {
1592 
1594 
1595  public:
1604  CurvatureFromDSSEstimator( const CurvatureFromDSSEstimator & other ): Super(other) {};
1605  };
1606 
1607 
1608 } // namespace DGtal
1609 
1610 // //
1612 
1613 #endif // !defined SegmentComputerEstimators_h
1614 
1615 #undef SegmentComputerEstimators_RECURSES
1616 #endif // else defined(SegmentComputerEstimators_RECURSES)
OutputIterator eval(const ConstIterator &itb, const ConstIterator &ite, OutputIterator result) const
PosDepScaleDepSCEstimator & operator=(const PosDepScaleDepSCEstimator &other)
Quantity eval(const ConstIterator &it) const
Value operator()(const typename DCA::ConstIterator &it, const DCA &aDCA) const
Value operator()(const typename DCA::ConstIterator &it, const DCA &aDCA) const
Quantity eval(const ConstIterator &) const
detail::PosIndepScaleIndepSCEstimator< DSSComputer, detail::NormalizedTangentVectorFromDSS > Super
Value operator()(const typename DCA::ConstIterator &it, const DCA &aDCA, const double &aH) const
static double castToDouble(const T &aT)
Definition: NumberTraits.h:154
PosIndepScaleDepSCEstimator & operator=(const PosIndepScaleDepSCEstimator &other)
void init(const double h, const ConstIterator &itb, const ConstIterator &ite)
void init(const double, const ConstIterator &itb, const ConstIterator &ite)
detail::PosDepScaleDepSCEstimator< DCAComputer, detail::DistanceFromDCA > Super
PosIndepScaleDepSCEstimator(const PosIndepScaleDepSCEstimator &other)
TangentVectorFromDSSEstimator(const TangentVectorFromDSSEstimator &other)
Quantity eval(const ConstIterator &it) const
detail::PosIndepScaleIndepSCEstimator< DSSComputer, detail::TangentAngleFromDSS > Super
Aim: Defines a unary functor, which associates arguments to results.
Definition: CUnaryFunctor.h:89
CurvatureFromDSSEstimator(const CurvatureFromDSSEstimator &other)
OutputIterator eval(const ConstIterator &itb, const ConstIterator &ite, OutputIterator result) const
detail::CurvatureFromDSSBaseEstimator< DSSComputer, detail::CurvatureFromDSSLengthAndWidth > Super
bool isNotEmpty(const IC &itb, const IC &ite, IteratorType)
void init(const double h, const ConstIterator &itb, const ConstIterator &ite)
detail::PosIndepScaleDepSCEstimator< DCAComputer, detail::CurvatureFromDCA< isCCW > > Super
Aim: The traits class for all models of Cinteger.
Definition: NumberTraits.h:69
CurvatureFromDCAEstimator(const CurvatureFromDCAEstimator &other)
Quantity eval(const ConstIterator &) const
TangentFromDSSEstimator(const TangentFromDSSEstimator &other)
DistanceFromDCAEstimator(const DistanceFromDCAEstimator &other)
OutputIterator eval(const ConstIterator &itb, const ConstIterator &ite, OutputIterator result) const
CurvatureFromDSSLengthEstimator(const CurvatureFromDSSLengthEstimator &other)
DGtal is the top-level namespace which contains all DGtal functions and types.
detail::PosIndepScaleIndepSCEstimator< DSSComputer, detail::TangentVectorFromDSS< DSSComputer > > Super
TangentAngleFromDSSEstimator(const TangentAngleFromDSSEstimator &other)
detail::PosDepScaleIndepSCEstimator< DCAComputer, detail::NormalVectorFromDCA > Super
void init(const double, const ConstIterator &itb, const ConstIterator &ite)
OutputIterator eval(const ConstIterator &itb, const ConstIterator &ite, OutputIterator result)
detail::PosDepScaleIndepSCEstimator< DCAComputer, detail::TangentVectorFromDCA > Super
PosDepScaleDepSCEstimator(const PosDepScaleDepSCEstimator &other)
Value operator()(const DCA &aDCA, const double &aH=1.0) const
void init(const double h, const ConstIterator &itb, const ConstIterator &ite)
Value operator()(const DSS &aDSS) const
NormalFromDCAEstimator(const NormalFromDCAEstimator &other)
Value operator()(const DSS &aDSS) const
detail::CurvatureFromDSSBaseEstimator< DSSComputer, detail::CurvatureFromDSSLength > Super
CurvatureFromDSSBaseEstimator & operator=(const CurvatureFromDSSBaseEstimator &other)
TangentFromDCAEstimator(const TangentFromDCAEstimator &other)
OutputIterator eval(const ConstIterator &itb, const ConstIterator &ite, OutputIterator result) const
BOOST_CONCEPT_ASSERT((concepts::CUnaryFunctor< Functor, SegmentComputer, Quantity >))
CurvatureFromDSSBaseEstimator(const CurvatureFromDSSBaseEstimator &other)