DGtal 1.3.0
Loading...
Searching...
No Matches
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)
39#define DigitalSurfaceConvolver_RECURSES
40
41#if !defined DigitalSurfaceConvolver_h
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
59namespace DGtal
60{
61
63// template class DigitalSurfaceConvolver
75template< typename TFunctor, typename TKernelFunctor, typename TKSpace, typename TDigitalKernel, Dimension dimension = TKSpace::dimension >
77{
78public:
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;
94 typedef typename KSpace::Space::RealPoint RealPoint;
96
97 typedef std::pair< KernelConstIterator, KernelConstIterator > PairIterators;
99
102
103 // ----------------------- Standard services ------------------------------
104
105public:
106
115
121
122
127
128 // ----------------------- Interface --------------------------------------
129
130public:
131
147 void init ( const Point & pOrigin,
149 ConstAlias< std::vector< PairIterators > > masks );
150
166 void init ( const Point & pOrigin,
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
300protected:
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
392private:
393
395
397
398
399 const KSpace & myKSpace;
400
402
404
406
407 const std::vector< PairIterators > * myMasks;
408
411
413
414 // ------------------------- Hidden services ------------------------------
415
416protected:
422
423private:
424
432
433 // ------------------------- Internals ------------------------------------
434
435private:
436
437}; // end of class DigitalSurfaceConvolver
438
439template< typename TFunctor, typename TKernelFunctor, typename TKSpace, typename TDigitalKernel >
440class DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >
441{
442 // ----------------------- Types ------------------------------------------
443
444public:
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;
460 typedef typename KSpace::Space::RealPoint RealPoint;
462
463 typedef std::pair< KernelConstIterator, KernelConstIterator > PairIterators;
465
468
469 // ----------------------- Standard services ------------------------------
470
471public:
472
481
487
492
493 // ----------------------- Interface --------------------------------------
494
495public:
496
512 void init ( const Point & pOrigin,
514 ConstAlias< std::vector< PairIterators > > masks );
515
531 void init ( const Point & pOrigin,
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
665protected:
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
757private:
758
760
762
764
765
766 const KSpace & myKSpace;
767
769
771
773
774 const std::vector< PairIterators > * myMasks;
775
778
780
781 // ------------------------- Hidden services ------------------------------
782
783protected:
789
790private:
791
799
800 // ------------------------- Internals ------------------------------------
801
802private:
803
804}; // end of class DigitalSurfaceConvolver
805
806template< typename TFunctor, typename TKernelFunctor, typename TKSpace, typename TDigitalKernel >
807class DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >
808{
809 // ----------------------- Types ------------------------------------------
810
811public:
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;
827 typedef typename KSpace::Space::RealPoint RealPoint;
829
830
831 typedef std::pair< KernelConstIterator, KernelConstIterator > PairIterators;
833
836
837 // ----------------------- Standard services ------------------------------
838
839public:
840
850 ConstAlias< KSpace > space );
851
857
862
863 // ----------------------- Interface --------------------------------------
864
865public:
866
882 void init ( const Point & pOrigin,
884 ConstAlias< std::vector< PairIterators > > masks );
885
901 void init ( const Point & pOrigin,
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
1034protected:
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
1127private:
1128
1130
1132
1134
1135
1137
1139
1141
1143
1144 const std::vector< PairIterators > * myMasks;
1145
1148
1150
1151 // ------------------------- Hidden services ------------------------------
1152
1153protected:
1159
1160private:
1161
1169
1170 // ------------------------- Internals ------------------------------------
1171
1172private:
1173
1174}; // end of class DigitalSurfaceConvolver
1175
1176
1177
1184template< typename TF, typename TKF, typename TKS, typename TDK, Dimension dimension >
1185std::ostream&
1187
1188template< typename TF, typename TKF, typename TKS, typename TDK >
1189std::ostream&
1190operator<< ( std::ostream & out, const DGtal::DigitalSurfaceConvolver< TF, TKF, TKS, TDK, 2 > & object );
1191
1192template< typename TF, typename TKF, typename TKS, typename TDK >
1193std::ostream&
1194operator<< ( 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)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:187
Container::const_iterator ConstIterator
ConstIterator type of the container;.
void evalCovarianceMatrix(const SurfelIterator &itbegin, const SurfelIterator &itend, OutputIterator &result) const
void eval(const SurfelIterator &itbegin, const SurfelIterator &itend, OutputIterator &result, EvalFunctor functor) const
void init(const Point &pOrigin, ConstAlias< PairIterators > fullKernel, ConstAlias< std::vector< PairIterators > > masks)
EvalFunctor::Value eval(const SurfelIterator &it, EvalFunctor functor) const
DigitalSurfaceConvolver(ConstAlias< Functor > f, ConstAlias< KernelFunctor > g, ConstAlias< KSpace > space)
const DigitalKernel * myKernel
Two choice to iterate over the full kernel. See init() for more information.
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)
static Spel defaultOuterSpel
default Spel, used as default parameter in core_eval and core_evalCovarianceMatrix functions
void computeCovarianceMatrix(const Quantity *aMomentMatrix, CovarianceMatrix &aCovarianceMatrix) const
computeCovarianceMatrix compute the covariance matrix from matrix of moments.
static Quantity defaultOuterSum
default Quantity, used as default parameter in core_eval function
void evalCovarianceMatrix(const SurfelIterator &itbegin, const SurfelIterator &itend, OutputIterator &result, EvalFunctor functor) const
void fillMoments(Quantity *aMomentMatrix, const Spel &aSpel, double direction) const
fillMoments fill the matrix of moments with a given spel.
EvalFunctor::Value evalCovarianceMatrix(const SurfelIterator &it, EvalFunctor functor) const
static Quantity defaultInnerSum
default Quantity, used as default parameter in core_eval function
bool isInitFullMasks
If the user uses init with masks. See init() for more information.
void eval(const SurfelIterator &itbegin, const SurfelIterator &itend, OutputIterator &result) const
const std::vector< PairIterators > * myMasks
Pointer of vector of iterators for kernel partial masks.
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...
bool isInitKernelAndMasks
If the user uses init with masks and digital (full) kernel. See init() for more information.
static Spel defaultInnerSpel
default Spel, used as default parameter in core_eval and core_evalCovarianceMatrix functions
static const int nbMoments
the number of moments is dependent to the dimension. In 2D, they are 6 moments such that p+q <= 2....
const PairIterators * myKernelMask
Two choice to iterate over the full kernel. See init() for more information.
void init(const Point &pOrigin, ConstAlias< DigitalKernel > fullKernel, ConstAlias< std::vector< PairIterators > > masks)
void eval(const SurfelIterator &itbegin, const SurfelIterator &itend, OutputIterator &result) const
static Quantity defaultOuterSum
default Quantity, used as default parameter in core_eval function
const PairIterators * myKernelMask
Two choice to iterate over the full kernel. See init() for more information.
void evalCovarianceMatrix(const SurfelIterator &itbegin, const SurfelIterator &itend, OutputIterator &result, EvalFunctor functor) const
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...
void init(const Point &pOrigin, ConstAlias< DigitalKernel > fullKernel, ConstAlias< std::vector< PairIterators > > masks)
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)
void evalCovarianceMatrix(const SurfelIterator &itbegin, const SurfelIterator &itend, OutputIterator &result) const
const std::vector< PairIterators > * myMasks
Pointer of vector of iterators for kernel partial masks.
void computeCovarianceMatrix(const Quantity *aMomentMatrix, CovarianceMatrix &aCovarianceMatrix) const
computeCovarianceMatrix compute the covariance matrix from matrix of moments.
EvalFunctor::Value evalCovarianceMatrix(const SurfelIterator &it, EvalFunctor functor) const
static Quantity defaultInnerSum
default Quantity, used as default parameter in core_eval function
void eval(const SurfelIterator &itbegin, const SurfelIterator &itend, OutputIterator &result, EvalFunctor functor) const
bool isInitFullMasks
If the user uses init with masks. See init() for more information.
bool isInitKernelAndMasks
If the user uses init with masks and digital (full) kernel. See init() for more information.
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 ...
const DigitalKernel * myKernel
Two choice to iterate over the full kernel. See init() for more information.
DigitalSurfaceConvolver(ConstAlias< Functor > f, ConstAlias< KernelFunctor > g, ConstAlias< KSpace > space)
void init(const Point &pOrigin, ConstAlias< PairIterators > fullKernel, ConstAlias< std::vector< PairIterators > > masks)
static Spel defaultInnerSpel
default Spel, used as default parameter in core_eval and core_evalCovarianceMatrix functions
EvalFunctor::Value eval(const SurfelIterator &it, EvalFunctor functor) const
static Spel defaultOuterSpel
default Spel, used as default parameter in core_eval and core_evalCovarianceMatrix functions
void fillMoments(Quantity *aMomentMatrix, const Spel &aSpel, double direction) const
fillMoments fill the matrix of moments with a given spel.
void computeCovarianceMatrix(const Quantity *aMomentMatrix, CovarianceMatrix &aCovarianceMatrix) const
computeCovarianceMatrix compute the covariance matrix from matrix of moments.
static Quantity defaultOuterSum
default Quantity, used as default parameter in core_eval function
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...
const Functor & myFFunctor
Const ref of the shape functor.
std::pair< KernelConstIterator, KernelConstIterator > PairIterators
Embedder myEmbedder
Converter Digital point -> Euclidean point.
bool isInitKernelAndMasks
If the user uses init with masks and digital (full) kernel. See init() for more information.
static Quantity defaultInnerMoments[6]
default array of Quantity, used as default parameter in core_evalCovarianceMatrix function
Quantity eval(const SurfelIterator &it) const
static Quantity defaultInnerSum
default Quantity, used as default parameter in core_eval function
Z2i::DigitalSet::ConstIterator KernelConstIterator
Spel myKernelSpelOrigin
Copy of the origin cell of the kernel.
static Quantity defaultOuterMoments[6]
default array of Quantity, used as default parameter in core_evalCovarianceMatrix function
void init(const Point &pOrigin, ConstAlias< DigitalKernel > fullKernel, ConstAlias< std::vector< PairIterators > > masks)
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)
void eval(const SurfelIterator &itbegin, const SurfelIterator &itend, OutputIterator &result, EvalFunctor functor) const
const DigitalKernel * myKernel
Two choice to iterate over the full kernel. See init() for more information.
BOOST_CONCEPT_ASSERT((concepts::CCellFunctor< Functor >))
const KernelFunctor & myGFunctor
Const ref of the kernel functor.
const std::vector< PairIterators > * myMasks
Pointer of vector of iterators for kernel partial masks.
static Spel defaultOuterSpel
default Spel, used as default parameter in core_eval and core_evalCovarianceMatrix functions
void init(const Point &pOrigin, ConstAlias< PairIterators > fullKernel, ConstAlias< std::vector< PairIterators > > masks)
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...
PointVector< dimension, Quantity > VectorQuantity
SimpleMatrix< Quantity, dimension, dimension > MatrixQuantity
const PairIterators * myKernelMask
Two choice to iterate over the full kernel. See init() for more information.
const KSpace & myKSpace
Const ref of the shape Kspace.
EvalFunctor::Value eval(const SurfelIterator &it, EvalFunctor functor) const
void evalCovarianceMatrix(const SurfelIterator &itbegin, const SurfelIterator &itend, OutputIterator &result, EvalFunctor functor) const
void eval(const SurfelIterator &itbegin, const SurfelIterator &itend, OutputIterator &result) const
BOOST_CONCEPT_ASSERT((concepts::CCellFunctor< KernelFunctor >))
DigitalSurfaceConvolver(ConstAlias< Functor > f, ConstAlias< KernelFunctor > g, ConstAlias< KSpace > space)
static Spel defaultInnerSpel
default Spel, used as default parameter in core_eval and core_evalCovarianceMatrix functions
bool isInitFullMasks
If the user uses init with masks. See init() for more information.
CovarianceMatrix evalCovarianceMatrix(const SurfelIterator &it) const
EvalFunctor::Value evalCovarianceMatrix(const SurfelIterator &it, EvalFunctor functor) const
KSpace::Space::RealPoint RealPoint
DigitalSurfaceConvolver(const DigitalSurfaceConvolver &other)
void evalCovarianceMatrix(const SurfelIterator &itbegin, const SurfelIterator &itend, OutputIterator &result) const
SimpleMatrix< double, dimension, dimension > CovarianceMatrix
DigitalSurfaceConvolver & operator=(const DigitalSurfaceConvolver &other)
void fillMoments(Quantity *aMomentMatrix, const Spel &aSpel, double direction) const
fillMoments fill the matrix of moments with a given spel.
CanonicSCellEmbedder< KSpace > Embedder
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:593
Aim: implements basic MxN Matrix services (M,N>=1).
Definition: SimpleMatrix.h:76
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::uint32_t Dimension
Definition: Common.h:137
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
Aim: Defines a functor on cells.
Definition: CCellFunctor.h:90