DGtal  1.3.beta
DigitalSurfaceConvolver.h
1 
17 #pragma once
18 
35 #if defined(DigitalSurfaceConvolver_RECURSES)
36 #error Recursive header files inclusion detected in DigitalSurfaceConvolver.h
37 #else // defined(DigitalSurfaceConvolver_RECURSES)
38 
39 #define DigitalSurfaceConvolver_RECURSES
40 
41 #if !defined DigitalSurfaceConvolver_h
42 
43 #define DigitalSurfaceConvolver_h
44 
46 // Inclusions
47 #include <iostream>
48 #include "DGtal/base/Common.h"
49 #include "DGtal/kernel/PointVector.h"
50 #include "DGtal/math/linalg/SimpleMatrix.h"
51 #include "DGtal/base/ConstAlias.h"
52 #include "DGtal/base/Alias.h"
53 #include "DGtal/base/Clone.h"
54 #include "DGtal/topology/CCellFunctor.h"
55 #include "DGtal/topology/CanonicSCellEmbedder.h"
56 #include "DGtal/topology/SCellsFunctors.h"
58 
59 namespace DGtal
60 {
61 
63 // template class DigitalSurfaceConvolver
75 template< typename TFunctor, typename TKernelFunctor, typename TKSpace, typename TDigitalKernel, Dimension dimension = TKSpace::dimension >
77 {
78 public:
79 
80  typedef TFunctor Functor;
81  typedef TKSpace KSpace;
82  typedef TKernelFunctor KernelFunctor;
83  typedef TDigitalKernel DigitalKernel;
84 
86 
87  typedef double Quantity;
91 
92  typedef typename KSpace::SCell Spel;
93  typedef typename KSpace::Point Point;
96 
97  typedef std::pair< KernelConstIterator, KernelConstIterator > PairIterators;
99 
102 
103  // ----------------------- Standard services ------------------------------
104 
105 public:
106 
115 
121 
122 
127 
128  // ----------------------- Interface --------------------------------------
129 
130 public:
131 
147  void init ( const Point & pOrigin,
148  ConstAlias< PairIterators > fullKernel,
149  ConstAlias< std::vector< PairIterators > > masks );
150 
166  void init ( const Point & pOrigin,
167  ConstAlias< DigitalKernel > fullKernel,
168  ConstAlias< std::vector< PairIterators > > masks );
169 
179  template< typename SurfelIterator >
180  Quantity eval ( const SurfelIterator & it ) const;
181 
182 
194  template< typename SurfelIterator, typename EvalFunctor >
195  typename EvalFunctor::Value eval ( const SurfelIterator & it,
196  EvalFunctor functor ) const;
197 
198 
209  template< typename SurfelIterator, typename OutputIterator >
210  void eval ( const SurfelIterator & itbegin,
211  const SurfelIterator & itend,
212  OutputIterator & result ) const;
213 
226  template< typename SurfelIterator, typename OutputIterator, typename EvalFunctor >
227  void eval ( const SurfelIterator & itbegin,
228  const SurfelIterator & itend,
229  OutputIterator & result,
230  EvalFunctor functor ) const;
231 
232 
242  template< typename SurfelIterator >
243  CovarianceMatrix evalCovarianceMatrix ( const SurfelIterator & it ) const;
244 
256  template< typename SurfelIterator, typename EvalFunctor >
257  typename EvalFunctor::Value evalCovarianceMatrix ( const SurfelIterator & it,
258  EvalFunctor functor ) const;
259 
270  template< typename SurfelIterator, typename OutputIterator >
271  void evalCovarianceMatrix ( const SurfelIterator & itbegin,
272  const SurfelIterator & itend,
273  OutputIterator & result ) const;
274 
287  template< typename SurfelIterator, typename OutputIterator, typename EvalFunctor >
288  void evalCovarianceMatrix ( const SurfelIterator & itbegin,
289  const SurfelIterator & itend,
290  OutputIterator & result,
291  EvalFunctor functor ) const;
292 
293 
298  bool isValid () const;
299 
300 protected:
301 
312  void computeCovarianceMatrix( const Quantity * aMomentMatrix, CovarianceMatrix & aCovarianceMatrix ) const;
313 
325  void fillMoments( Quantity* aMomentMatrix, const Spel & aSpel, double direction ) const;
326 
327 #ifdef _MSC_VER
328  // For Visual Studio, to be defined as a static const, it has to be intialized into the header file
329  static const int nbMoments = 6;
330 #else
331  static const int nbMoments;
332 #endif //_MSC_VER
339 
354  template< typename SurfelIterator >
355  bool core_eval ( const SurfelIterator & it,
356  Quantity & innerSum,
357  Quantity & outerSum,
358  bool useLastResults = false,
359  Spel & lastInnerSpel = defaultInnerSpel,
360  Spel & lastOuterSpel = defaultOuterSpel,
361  Quantity & lastInnerSum = defaultInnerSum,
362  Quantity & lastOuterSum = defaultOuterSum ) const;
363 
378  template< typename SurfelIterator >
379  bool core_evalCovarianceMatrix ( const SurfelIterator & it,
380  CovarianceMatrix & innerMatrix,
381  CovarianceMatrix & outerMatrix,
382  bool useLastResults = false,
383  Spel & lastInnerSpel = defaultInnerSpel,
384  Spel & lastOuterSpel = defaultOuterSpel,
385  Quantity * lastInnerMoments = defaultInnerMoments,
386  Quantity * lastOuterMoments = defaultOuterMoments ) const;
387 
388 
389 
390  // ------------------------- Private Datas --------------------------------
391 
392 private:
393 
394  const Functor & myFFunctor;
395 
397 
398 
399  const KSpace & myKSpace;
400 
402 
404 
406 
407  const std::vector< PairIterators > * myMasks;
408 
411 
413 
414  // ------------------------- Hidden services ------------------------------
415 
416 protected:
422 
423 private:
424 
432 
433  // ------------------------- Internals ------------------------------------
434 
435 private:
436 
437 }; // end of class DigitalSurfaceConvolver
438 
439 template< typename TFunctor, typename TKernelFunctor, typename TKSpace, typename TDigitalKernel >
440 class DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >
441 {
442  // ----------------------- Types ------------------------------------------
443 
444 public:
445 
446  typedef TFunctor Functor;
447  typedef TKSpace KSpace;
448  typedef TKernelFunctor KernelFunctor;
449  typedef TDigitalKernel DigitalKernel;
450 
452 
453  typedef double Quantity;
457 
458  typedef typename KSpace::SCell Spel;
459  typedef typename KSpace::Point Point;
462 
463  typedef std::pair< KernelConstIterator, KernelConstIterator > PairIterators;
465 
468 
469  // ----------------------- Standard services ------------------------------
470 
471 public:
472 
481 
487 
492 
493  // ----------------------- Interface --------------------------------------
494 
495 public:
496 
512  void init ( const Point & pOrigin,
513  ConstAlias< PairIterators > fullKernel,
514  ConstAlias< std::vector< PairIterators > > masks );
515 
531  void init ( const Point & pOrigin,
532  ConstAlias< DigitalKernel > fullKernel,
533  ConstAlias< std::vector< PairIterators > > masks );
534 
544  template< typename SurfelIterator >
545  Quantity eval ( const SurfelIterator & it ) const;
546 
547 
559  template< typename SurfelIterator, typename EvalFunctor >
560  typename EvalFunctor::Value eval ( const SurfelIterator & it,
561  EvalFunctor functor ) const;
562 
563 
574  template< typename SurfelIterator, typename OutputIterator >
575  void eval ( const SurfelIterator & itbegin,
576  const SurfelIterator & itend,
577  OutputIterator & result ) const;
578 
591  template< typename SurfelIterator, typename OutputIterator, typename EvalFunctor >
592  void eval ( const SurfelIterator & itbegin,
593  const SurfelIterator & itend,
594  OutputIterator & result,
595  EvalFunctor functor ) const;
596 
597 
607  template< typename SurfelIterator >
608  CovarianceMatrix evalCovarianceMatrix ( const SurfelIterator & it ) const;
609 
621  template< typename SurfelIterator, typename EvalFunctor >
622  typename EvalFunctor::Value evalCovarianceMatrix ( const SurfelIterator & it,
623  EvalFunctor functor ) const;
624 
635  template< typename SurfelIterator, typename OutputIterator >
636  void evalCovarianceMatrix ( const SurfelIterator & itbegin,
637  const SurfelIterator & itend,
638  OutputIterator & result ) const;
639 
652  template< typename SurfelIterator, typename OutputIterator, typename EvalFunctor >
653  void evalCovarianceMatrix ( const SurfelIterator & itbegin,
654  const SurfelIterator & itend,
655  OutputIterator & result,
656  EvalFunctor functor ) const;
657 
658 
663  bool isValid () const;
664 
665 protected:
666 
677  void computeCovarianceMatrix( const Quantity * aMomentMatrix, CovarianceMatrix & aCovarianceMatrix ) const;
678 
690  void fillMoments( Quantity* aMomentMatrix, const Spel & aSpel, double direction ) const;
691 
692 #ifdef _MSC_VER
693  // For Visual Studio, to be defined as a static const, it has to be intialized into the header file
694  static const int nbMoments = 6;
695 #else
696  static const int nbMoments;
697 #endif //_MSC_VER
704 
719  template< typename SurfelIterator >
720  bool core_eval ( const SurfelIterator & it,
721  Quantity & innerSum,
722  Quantity & outerSum,
723  bool useLastResults = false,
724  Spel & lastInnerSpel = defaultInnerSpel,
725  Spel & lastOuterSpel = defaultOuterSpel,
726  Quantity & lastInnerSum = defaultInnerSum,
727  Quantity & lastOuterSum = defaultOuterSum ) const;
728 
743  template< typename SurfelIterator >
744  bool core_evalCovarianceMatrix ( const SurfelIterator & it,
745  CovarianceMatrix & innerMatrix,
746  CovarianceMatrix & outerMatrix,
747  bool useLastResults = false,
748  Spel & lastInnerSpel = defaultInnerSpel,
749  Spel & lastOuterSpel = defaultOuterSpel,
750  Quantity * lastInnerMoments = defaultInnerMoments,
751  Quantity * lastOuterMoments = defaultOuterMoments ) const;
752 
753 
754 
755  // ------------------------- Private Datas --------------------------------
756 
757 private:
758 
760 
761  const Functor & myFFunctor;
762 
764 
765 
766  const KSpace & myKSpace;
767 
769 
771 
773 
774  const std::vector< PairIterators > * myMasks;
775 
778 
780 
781  // ------------------------- Hidden services ------------------------------
782 
783 protected:
789 
790 private:
791 
799 
800  // ------------------------- Internals ------------------------------------
801 
802 private:
803 
804 }; // end of class DigitalSurfaceConvolver
805 
806 template< typename TFunctor, typename TKernelFunctor, typename TKSpace, typename TDigitalKernel >
807 class DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >
808 {
809  // ----------------------- Types ------------------------------------------
810 
811 public:
812 
813  typedef TFunctor Functor;
814  typedef TKSpace KSpace;
815  typedef TKernelFunctor KernelFunctor;
816  typedef TDigitalKernel DigitalKernel;
817 
819 
820  typedef double Quantity;
824 
825  typedef typename KSpace::SCell Spel;
826  typedef typename KSpace::Point Point;
829 
830 
831  typedef std::pair< KernelConstIterator, KernelConstIterator > PairIterators;
833 
836 
837  // ----------------------- Standard services ------------------------------
838 
839 public:
840 
850  ConstAlias< KSpace > space );
851 
857 
862 
863  // ----------------------- Interface --------------------------------------
864 
865 public:
866 
882  void init ( const Point & pOrigin,
883  ConstAlias< PairIterators > fullKernel,
884  ConstAlias< std::vector< PairIterators > > masks );
885 
901  void init ( const Point & pOrigin,
902  ConstAlias< DigitalKernel > fullKernel,
903  ConstAlias< std::vector< PairIterators > > masks );
904 
914  template< typename SurfelIterator >
915  Quantity eval ( const SurfelIterator & it ) const;
916 
917 
929  template< typename SurfelIterator, typename EvalFunctor >
930  typename EvalFunctor::Value eval ( const SurfelIterator & it,
931  EvalFunctor functor ) const;
932 
933 
944  template< typename SurfelIterator, typename OutputIterator >
945  void eval ( const SurfelIterator & itbegin,
946  const SurfelIterator & itend,
947  OutputIterator & result ) const;
948 
961  template< typename SurfelIterator, typename OutputIterator, typename EvalFunctor >
962  void eval ( const SurfelIterator & itbegin,
963  const SurfelIterator & itend,
964  OutputIterator & result,
965  EvalFunctor functor ) const;
966 
967 
977  template< typename SurfelIterator >
978  CovarianceMatrix evalCovarianceMatrix ( const SurfelIterator & it ) const;
979 
991  template< typename SurfelIterator, typename EvalFunctor >
992  typename EvalFunctor::Value evalCovarianceMatrix ( const SurfelIterator & it,
993  EvalFunctor functor ) const;
994 
1005  template< typename SurfelIterator, typename OutputIterator >
1006  void evalCovarianceMatrix ( const SurfelIterator & itbegin,
1007  const SurfelIterator & itend,
1008  OutputIterator & result ) const;
1009 
1022  template< typename SurfelIterator, typename OutputIterator, typename EvalFunctor >
1023  void evalCovarianceMatrix ( const SurfelIterator & itbegin,
1024  const SurfelIterator & itend,
1025  OutputIterator & result,
1026  EvalFunctor functor ) const;
1027 
1032  bool isValid() const;
1033 
1034 protected:
1035 
1047  void computeCovarianceMatrix ( const Quantity * aMomentMatrix, CovarianceMatrix & aCovarianceMatrix ) const;
1048 
1061  void fillMoments ( Quantity * aMomentMatrix, const Spel & aSpel, double direction ) const;
1062 
1063 #ifdef _MSC_VER
1064  // For Visual Studio, to be defined as a static const, it has to be intialized into the header file
1065  static const int nbMoments = 10;
1066 #else
1067  static const int nbMoments;
1068 #endif //_MSC_VER
1075 
1090  template< typename SurfelIterator >
1091  bool core_eval ( const SurfelIterator & it,
1092  Quantity & innerSum,
1093  Quantity & outerSum,
1094  bool useLastResults = false,
1095  Spel & lastInnerSpel = defaultInnerSpel,
1096  Spel & lastOuterSpel = defaultOuterSpel,
1097  Quantity & lastInnerSum = defaultInnerSum,
1098  Quantity & lastOuterSum = defaultOuterSum ) const;
1099 
1114  template< typename SurfelIterator >
1115  bool core_evalCovarianceMatrix ( const SurfelIterator & it,
1116  CovarianceMatrix & innerMatrix,
1117  CovarianceMatrix & outerMatrix,
1118  bool useLastResults = false,
1119  Spel & lastInnerSpel = defaultInnerSpel,
1120  Spel & lastOuterSpel = defaultOuterSpel,
1121  Quantity * lastInnerMoments = defaultInnerMoments,
1122  Quantity * lastOuterMoments = defaultOuterMoments ) const;
1123 
1124 
1125  // ------------------------- Private Datas --------------------------------
1126 
1127 private:
1128 
1130 
1132 
1134 
1135 
1136  const KSpace & myKSpace;
1137 
1139 
1141 
1143 
1144  const std::vector< PairIterators > * myMasks;
1145 
1148 
1150 
1151  // ------------------------- Hidden services ------------------------------
1152 
1153 protected:
1159 
1160 private:
1161 
1169 
1170  // ------------------------- Internals ------------------------------------
1171 
1172 private:
1173 
1174 }; // end of class DigitalSurfaceConvolver
1175 
1176 
1177 
1184 template< typename TF, typename TKF, typename TKS, typename TDK, Dimension dimension >
1185 std::ostream&
1187 
1188 template< typename TF, typename TKF, typename TKS, typename TDK >
1189 std::ostream&
1190 operator<< ( std::ostream & out, const DGtal::DigitalSurfaceConvolver< TF, TKF, TKS, TDK, 2 > & object );
1191 
1192 template< typename TF, typename TKF, typename TKS, typename TDK >
1193 std::ostream&
1194 operator<< ( std::ostream & out, const DGtal::DigitalSurfaceConvolver<TF, TKF, TKS, TDK, 3 > & object );
1195 
1196 
1197 } // namespace DGtal
1198 
1199 
1201 // Includes inline functions.
1202 #include "DGtal/geometry/surfaces/DigitalSurfaceConvolver.ih"
1203 
1204 
1205 // //
1207 
1208 #endif // !defined DigitalSurfaceConvolver_h
1209 
1210 #undef DigitalSurfaceConvolver_RECURSES
1211 #endif // else defined(DigitalSurfaceConvolver_RECURSES)
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::Quantity
double Quantity
Definition: DigitalSurfaceConvolver.h:820
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::Domain
Z3i::Domain Domain
Definition: DigitalSurfaceConvolver.h:818
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::myMasks
const std::vector< PairIterators > * myMasks
Pointer of vector of iterators for kernel partial masks.
Definition: DigitalSurfaceConvolver.h:1144
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::Embedder
CanonicSCellEmbedder< KSpace > Embedder
Definition: DigitalSurfaceConvolver.h:464
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::nbMoments
static const int nbMoments
the number of moments is dependent to the dimension. In 2D, they are 6 moments such that p+q <= 2....
Definition: DigitalSurfaceConvolver.h:696
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::KernelConstIterator
Z2i::DigitalSet::ConstIterator KernelConstIterator
Definition: DigitalSurfaceConvolver.h:461
DGtal::DigitalSurfaceConvolver::myKSpace
const KSpace & myKSpace
Const ref of the shape Kspace.
Definition: DigitalSurfaceConvolver.h:399
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::myKSpace
const KSpace & myKSpace
Const ref of the shape Kspace.
Definition: DigitalSurfaceConvolver.h:1136
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::~DigitalSurfaceConvolver
~DigitalSurfaceConvolver()
Definition: DigitalSurfaceConvolver.h:491
DGtal::DigitalSurfaceConvolver::Point
KSpace::Point Point
Definition: DigitalSurfaceConvolver.h:93
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::Spel
KSpace::SCell Spel
Definition: DigitalSurfaceConvolver.h:458
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::CovarianceMatrix
SimpleMatrix< double, 2, 2 > CovarianceMatrix
Definition: DigitalSurfaceConvolver.h:456
DGtal::ConstAlias
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:186
DGtal::HyperRectDomain< Space >
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::defaultOuterSpel
static Spel defaultOuterSpel
default Spel, used as default parameter in core_eval and core_evalCovarianceMatrix functions
Definition: DigitalSurfaceConvolver.h:699
DGtal::DigitalSurfaceConvolver::core_evalCovarianceMatrix
bool core_evalCovarianceMatrix(const SurfelIterator &it, CovarianceMatrix &innerMatrix, CovarianceMatrix &outerMatrix, bool useLastResults=false, Spel &lastInnerSpel=defaultInnerSpel, Spel &lastOuterSpel=defaultOuterSpel, Quantity *lastInnerMoments=defaultInnerMoments, Quantity *lastOuterMoments=defaultOuterMoments) const
core_evalCovarianceMatrix method used ( in intern by evalCovarianceMatrix() ) to compute the covarian...
DGtal::DigitalSurfaceConvolver::VectorQuantity
PointVector< dimension, Quantity > VectorQuantity
Definition: DigitalSurfaceConvolver.h:88
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::myKernel
const DigitalKernel * myKernel
Two choice to iterate over the full kernel. See init() for more information.
Definition: DigitalSurfaceConvolver.h:776
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::Point
KSpace::Point Point
Definition: DigitalSurfaceConvolver.h:459
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::myKernelSpelOrigin
Spel myKernelSpelOrigin
Copy of the origin cell of the kernel.
Definition: DigitalSurfaceConvolver.h:1149
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::isInitKernelAndMasks
bool isInitKernelAndMasks
If the user uses init with masks and digital (full) kernel. See init() for more information.
Definition: DigitalSurfaceConvolver.h:1142
DGtal::DigitalSurfaceConvolver::MatrixQuantity
SimpleMatrix< Quantity, dimension, dimension > MatrixQuantity
Definition: DigitalSurfaceConvolver.h:89
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::KernelConstIterator
Z3i::DigitalSet::ConstIterator KernelConstIterator
Definition: DigitalSurfaceConvolver.h:828
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::Functor
TFunctor Functor
Definition: DigitalSurfaceConvolver.h:813
DGtal::DigitalSurfaceConvolver::KernelFunctor
TKernelFunctor KernelFunctor
Definition: DigitalSurfaceConvolver.h:82
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::~DigitalSurfaceConvolver
~DigitalSurfaceConvolver()
Definition: DigitalSurfaceConvolver.h:861
DGtal::DigitalSurfaceConvolver::myMasks
const std::vector< PairIterators > * myMasks
Pointer of vector of iterators for kernel partial masks.
Definition: DigitalSurfaceConvolver.h:407
DGtal::DigitalSurfaceConvolver::myKernelSpelOrigin
Spel myKernelSpelOrigin
Copy of the origin cell of the kernel.
Definition: DigitalSurfaceConvolver.h:412
DGtal::concepts::CCellFunctor
Aim: Defines a functor on cells.
Definition: CCellFunctor.h:89
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::defaultInnerSum
static Quantity defaultInnerSum
default Quantity, used as default parameter in core_eval function
Definition: DigitalSurfaceConvolver.h:1073
DGtal::DigitalSurfaceConvolver::defaultInnerSum
static Quantity defaultInnerSum
default Quantity, used as default parameter in core_eval function
Definition: DigitalSurfaceConvolver.h:337
DGtal::Dimension
DGtal::uint32_t Dimension
Definition: Common.h:137
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::myKernel
const DigitalKernel * myKernel
Two choice to iterate over the full kernel. See init() for more information.
Definition: DigitalSurfaceConvolver.h:1146
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::myEmbedder
Embedder myEmbedder
Converter Digital point -> Euclidean point.
Definition: DigitalSurfaceConvolver.h:768
DGtal::DigitalSurfaceConvolver::fillMoments
void fillMoments(Quantity *aMomentMatrix, const Spel &aSpel, double direction) const
fillMoments fill the matrix of moments with a given spel.
DGtal::DigitalSurfaceConvolver::Domain
Z2i::Domain Domain
Definition: DigitalSurfaceConvolver.h:85
DGtal::SignedKhalimskyCell
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
Definition: KhalimskySpaceND.h:208
DGtal::DigitalSurfaceConvolver::defaultInnerSpel
static Spel defaultInnerSpel
default Spel, used as default parameter in core_eval and core_evalCovarianceMatrix functions
Definition: DigitalSurfaceConvolver.h:333
DGtal::DigitalSurfaceConvolver::RealPoint
KSpace::Space::RealPoint RealPoint
Definition: DigitalSurfaceConvolver.h:94
DGtal::DigitalSurfaceConvolver::evalCovarianceMatrix
CovarianceMatrix evalCovarianceMatrix(const SurfelIterator &it) const
DGtal::DigitalSurfaceConvolver::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CCellFunctor< Functor >))
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::Domain
Z2i::Domain Domain
Definition: DigitalSurfaceConvolver.h:451
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::MatrixQuantity
SimpleMatrix< Quantity, 3, 3 > MatrixQuantity
Definition: DigitalSurfaceConvolver.h:822
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::DigitalKernel
TDigitalKernel DigitalKernel
Definition: DigitalSurfaceConvolver.h:816
DGtal::DigitalSurfaceConvolver::KernelConstIterator
Z2i::DigitalSet::ConstIterator KernelConstIterator
Definition: DigitalSurfaceConvolver.h:95
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::Functor
TFunctor Functor
Definition: DigitalSurfaceConvolver.h:446
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::PairIterators
std::pair< KernelConstIterator, KernelConstIterator > PairIterators
Definition: DigitalSurfaceConvolver.h:463
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::defaultOuterSum
static Quantity defaultOuterSum
default Quantity, used as default parameter in core_eval function
Definition: DigitalSurfaceConvolver.h:1074
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::Point
KSpace::Point Point
Definition: DigitalSurfaceConvolver.h:826
DGtal::DigitalSurfaceConvolver::KSpace
TKSpace KSpace
Definition: DigitalSurfaceConvolver.h:81
DGtal::DigitalSurfaceConvolver::nbMoments
static const int nbMoments
the number of moments is dependent to the dimension. In 2D, they are 6 moments such that p+q <= 2 (se...
Definition: DigitalSurfaceConvolver.h:331
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::defaultInnerSum
static Quantity defaultInnerSum
default Quantity, used as default parameter in core_eval function
Definition: DigitalSurfaceConvolver.h:702
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::KernelFunctor
TKernelFunctor KernelFunctor
Definition: DigitalSurfaceConvolver.h:448
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::VectorQuantity
PointVector< 3, Quantity > VectorQuantity
Definition: DigitalSurfaceConvolver.h:821
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::nbMoments
static const int nbMoments
the number of moments is dependent to the dimension. In 3D, they are 10 moments such that p+q+s <= 2 ...
Definition: DigitalSurfaceConvolver.h:1067
DGtal::DigitalSurfaceConvolver::eval
Quantity eval(const SurfelIterator &it) const
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::myEmbedder
Embedder myEmbedder
Converter Digital point -> Euclidean point.
Definition: DigitalSurfaceConvolver.h:1138
DGtal::DigitalSurfaceConvolver::Spel
KSpace::SCell Spel
Definition: DigitalSurfaceConvolver.h:92
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::myFFunctor
const Functor & myFFunctor
Const ref of the shape functor.
Definition: DigitalSurfaceConvolver.h:1131
DGtal::DigitalSurfaceConvolver::computeCovarianceMatrix
void computeCovarianceMatrix(const Quantity *aMomentMatrix, CovarianceMatrix &aCovarianceMatrix) const
computeCovarianceMatrix compute the covariance matrix from matrix of moments.
DGtal::DigitalSurfaceConvolver::defaultOuterSum
static Quantity defaultOuterSum
default Quantity, used as default parameter in core_eval function
Definition: DigitalSurfaceConvolver.h:338
DGtal::SimpleMatrix
Aim: implements basic MxN Matrix services (M,N>=1).
Definition: SimpleMatrix.h:75
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::DigitalKernel
TDigitalKernel DigitalKernel
Definition: DigitalSurfaceConvolver.h:449
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::myKSpace
const KSpace & myKSpace
Const ref of the shape Kspace.
Definition: DigitalSurfaceConvolver.h:766
DGtal::DigitalSurfaceConvolver::myKernelMask
const PairIterators * myKernelMask
Two choice to iterate over the full kernel. See init() for more information.
Definition: DigitalSurfaceConvolver.h:410
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::VectorQuantity
PointVector< 2, Quantity > VectorQuantity
Definition: DigitalSurfaceConvolver.h:454
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::myMasks
const std::vector< PairIterators > * myMasks
Pointer of vector of iterators for kernel partial masks.
Definition: DigitalSurfaceConvolver.h:774
DGtal::DigitalSurfaceConvolver::myKernel
const DigitalKernel * myKernel
Two choice to iterate over the full kernel. See init() for more information.
Definition: DigitalSurfaceConvolver.h:409
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::Embedder
CanonicSCellEmbedder< KSpace > Embedder
Definition: DigitalSurfaceConvolver.h:832
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::defaultInnerSpel
static Spel defaultInnerSpel
default Spel, used as default parameter in core_eval and core_evalCovarianceMatrix functions
Definition: DigitalSurfaceConvolver.h:1069
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::MatrixQuantity
SimpleMatrix< Quantity, 2, 2 > MatrixQuantity
Definition: DigitalSurfaceConvolver.h:455
DGtal::DigitalSurfaceConvolver::Functor
TFunctor Functor
Definition: DigitalSurfaceConvolver.h:80
DGtal::DigitalSurfaceConvolver::myGFunctor
const KernelFunctor & myGFunctor
Const ref of the kernel functor.
Definition: DigitalSurfaceConvolver.h:396
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::myGFunctor
const KernelFunctor & myGFunctor
Const ref of the kernel functor.
Definition: DigitalSurfaceConvolver.h:1133
DGtal::DigitalSurfaceConvolver::myEmbedder
Embedder myEmbedder
Converter Digital point -> Euclidean point.
Definition: DigitalSurfaceConvolver.h:401
DGtal::DigitalSurfaceConvolver::isValid
bool isValid() const
DGtal::DigitalSurfaceConvolver::DigitalSurfaceConvolver
DigitalSurfaceConvolver()
DGtal::DigitalSurfaceConvolver::defaultOuterMoments
static Quantity defaultOuterMoments[6]
default array of Quantity, used as default parameter in core_evalCovarianceMatrix function
Definition: DigitalSurfaceConvolver.h:336
DGtal::DigitalSurfaceConvolver::operator=
DigitalSurfaceConvolver & operator=(const DigitalSurfaceConvolver &other)
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::myKernelMask
const PairIterators * myKernelMask
Two choice to iterate over the full kernel. See init() for more information.
Definition: DigitalSurfaceConvolver.h:1147
DGtal::DigitalSurfaceConvolver::Quantity
double Quantity
Definition: DigitalSurfaceConvolver.h:87
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::RealPoint
KSpace::Space::RealPoint RealPoint
Definition: DigitalSurfaceConvolver.h:827
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::defaultOuterSpel
static Spel defaultOuterSpel
default Spel, used as default parameter in core_eval and core_evalCovarianceMatrix functions
Definition: DigitalSurfaceConvolver.h:1070
DGtal::DigitalSurfaceConvolver::~DigitalSurfaceConvolver
~DigitalSurfaceConvolver()
Definition: DigitalSurfaceConvolver.h:126
DGtal::DigitalSurfaceConvolver::isInitKernelAndMasks
bool isInitKernelAndMasks
If the user uses init with masks and digital (full) kernel. See init() for more information.
Definition: DigitalSurfaceConvolver.h:405
DGtal::DigitalSurfaceConvolver::CovarianceMatrix
SimpleMatrix< double, dimension, dimension > CovarianceMatrix
Definition: DigitalSurfaceConvolver.h:90
DGtal::SpaceND::RealPoint
PointVector< dim, double > RealPoint
Definition: SpaceND.h:117
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::myFFunctor
const Functor & myFFunctor
Const ref of the shape functor.
Definition: DigitalSurfaceConvolver.h:761
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::CovarianceMatrix
SimpleMatrix< double, 3, 3 > CovarianceMatrix
Definition: DigitalSurfaceConvolver.h:823
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::myGFunctor
const KernelFunctor & myGFunctor
Const ref of the kernel functor.
Definition: DigitalSurfaceConvolver.h:763
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::KSpace
TKSpace KSpace
Definition: DigitalSurfaceConvolver.h:814
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::PairIterators
std::pair< KernelConstIterator, KernelConstIterator > PairIterators
Definition: DigitalSurfaceConvolver.h:831
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::dimension
const Dimension dimension
Current dimension (= 2)
Definition: DigitalSurfaceConvolver.h:759
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::RealPoint
KSpace::Space::RealPoint RealPoint
Definition: DigitalSurfaceConvolver.h:460
DGtal::PointVector
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:165
DGtal::DigitalSurfaceConvolver::PairIterators
std::pair< KernelConstIterator, KernelConstIterator > PairIterators
Definition: DigitalSurfaceConvolver.h:97
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::myKernelSpelOrigin
Spel myKernelSpelOrigin
Copy of the origin cell of the kernel.
Definition: DigitalSurfaceConvolver.h:779
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::defaultOuterSum
static Quantity defaultOuterSum
default Quantity, used as default parameter in core_eval function
Definition: DigitalSurfaceConvolver.h:703
DGtal::DigitalSurfaceConvolver::DigitalKernel
TDigitalKernel DigitalKernel
Definition: DigitalSurfaceConvolver.h:83
DGtal::DigitalSurfaceConvolver
Definition: DigitalSurfaceConvolver.h:76
DGtal::DigitalSurfaceConvolver::Embedder
CanonicSCellEmbedder< KSpace > Embedder
Definition: DigitalSurfaceConvolver.h:98
DGtal::DigitalSurfaceConvolver::init
void init(const Point &pOrigin, ConstAlias< PairIterators > fullKernel, ConstAlias< std::vector< PairIterators > > masks)
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::defaultInnerSpel
static Spel defaultInnerSpel
default Spel, used as default parameter in core_eval and core_evalCovarianceMatrix functions
Definition: DigitalSurfaceConvolver.h:698
DGtal::DigitalSetByAssociativeContainer::ConstIterator
Container::const_iterator ConstIterator
ConstIterator type of the container;.
Definition: DigitalSetByAssociativeContainer.h:108
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::dimension
const Dimension dimension
Current dimension (= 3)
Definition: DigitalSurfaceConvolver.h:1129
DGtal::DigitalSurfaceConvolver::myFFunctor
const Functor & myFFunctor
Const ref of the shape functor.
Definition: DigitalSurfaceConvolver.h:394
DGtal::DigitalSurfaceConvolver::defaultInnerMoments
static Quantity defaultInnerMoments[6]
default array of Quantity, used as default parameter in core_evalCovarianceMatrix function
Definition: DigitalSurfaceConvolver.h:335
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::Quantity
double Quantity
Definition: DigitalSurfaceConvolver.h:453
DGtal::CanonicSCellEmbedder< KSpace >
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::isInitFullMasks
bool isInitFullMasks
If the user uses init with masks. See init() for more information.
Definition: DigitalSurfaceConvolver.h:770
DGtal::DigitalSurfaceConvolver::isInitFullMasks
bool isInitFullMasks
If the user uses init with masks. See init() for more information.
Definition: DigitalSurfaceConvolver.h:403
Point
MyPointD Point
Definition: testClone2.cpp:383
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::Spel
KSpace::SCell Spel
Definition: DigitalSurfaceConvolver.h:825
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::KernelFunctor
TKernelFunctor KernelFunctor
Definition: DigitalSurfaceConvolver.h:815
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::isInitKernelAndMasks
bool isInitKernelAndMasks
If the user uses init with masks and digital (full) kernel. See init() for more information.
Definition: DigitalSurfaceConvolver.h:772
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::isInitFullMasks
bool isInitFullMasks
If the user uses init with masks. See init() for more information.
Definition: DigitalSurfaceConvolver.h:1140
Value
double Value
Definition: testSimpleRandomAccessRangeFromPoint.cpp:38
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::KSpace
TKSpace KSpace
Definition: DigitalSurfaceConvolver.h:447
DGtal::DigitalSurfaceConvolver::core_eval
bool core_eval(const SurfelIterator &it, Quantity &innerSum, Quantity &outerSum, bool useLastResults=false, Spel &lastInnerSpel=defaultInnerSpel, Spel &lastOuterSpel=defaultOuterSpel, Quantity &lastInnerSum=defaultInnerSum, Quantity &lastOuterSum=defaultOuterSum) const
core_eval method used ( in intern by eval() ) to compute the Quantity on a given surfel (*it)
DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::myKernelMask
const PairIterators * myKernelMask
Two choice to iterate over the full kernel. See init() for more information.
Definition: DigitalSurfaceConvolver.h:777
DGtal::DigitalSurfaceConvolver::defaultOuterSpel
static Spel defaultOuterSpel
default Spel, used as default parameter in core_eval and core_evalCovarianceMatrix functions
Definition: DigitalSurfaceConvolver.h:334