DGtal  1.3.beta
BasicPointFunctors.h
1 
17 #pragma once
18 
32 #if defined(BasicPointFunctors_RECURSES)
33 #error Recursive header files inclusion detected in BasicPointFunctors.h
34 #else // defined(BasicPointFunctors_RECURSES)
35 
36 #define BasicPointFunctors_RECURSES
37 
38 #if !defined BasicPointFunctors_h
39 
40 #define BasicPointFunctors_h
41 
43 // Inclusions
44 #include <iostream>
45 #include <iterator>
46 #include <array>
47 #include <cmath>
48 
49 #include "DGtal/base/Common.h"
50 #include "DGtal/helpers/StdDefs.h"
51 #include "DGtal/kernel/SpaceND.h"
52 #include "DGtal/kernel/NumberTraits.h"
53 #include "DGtal/base/BasicBoolFunctors.h"
54 #include "DGtal/kernel/CPointPredicate.h"
55 #include "DGtal/base/CQuantity.h"
56 #include "DGtal/kernel/domains/CDomain.h"
57 #include "DGtal/base/ConstAlias.h"
59 
60 namespace DGtal
61 {
62 namespace functors
63  {
65  // template class Projector
105  template <typename S = SpaceND< 2, DGtal::Z2i::Integer > >
106  struct Projector
107  {
108  typedef S Space;
109  typedef typename Space::Dimension Dimension;
111  typedef typename Space::Integer Integer;
112  typedef typename Space::Point Point;
113 
117  Projector(const Integer& aDefaultInteger = NumberTraits<Integer>::zero());
118 
119 
125  template<typename TIterator>
126  void init ( const TIterator& itb, const TIterator& ite );
127 
128 
133  void initRemoveOneDim ( const Dimension &dimRemoved );
134 
139  void initAddOneDim ( const Dimension & newDim );
140 
141 
147  template<typename TInputPoint>
148  Point operator()( const TInputPoint& aPoint ) const;
149 
150  private:
155  std::array<Dimension, dimension> myDims;
156 
162 
163  }; // end of class ConstantPointFunctors
164 
165 
166 
167 
168 
199  template <typename TDomain3D, typename TInteger = DGtal::Z3i::Integer >
201  {
202  public:
203 
205  typedef typename Space::Dimension Dimension;
206  typedef typename Space::Point Point;
207  typedef typename Space::Integer Integer;
218  SliceRotator2D( const Dimension &dimAdded, const TDomain3D &aDomain3DImg,
219  const Integer &sliceIndex, const Dimension &dimRotated,
220  double rotationAngle):
221  myPosDimAdded(dimAdded), mySliceIndex(sliceIndex), myDomain(aDomain3DImg),
222  myDimRotated(dimRotated), myRotationAngle(rotationAngle), myDefaultPoint (aDomain3DImg.lowerBound())
223  {
224  myCenter[0] = aDomain3DImg.lowerBound()[0]+((aDomain3DImg.upperBound())[0]-(aDomain3DImg.lowerBound())[0])/2.0;
225  myCenter[1] = aDomain3DImg.lowerBound()[1]+((aDomain3DImg.upperBound())[1]-(aDomain3DImg.lowerBound())[1])/2.0;
226  myCenter[2] = aDomain3DImg.lowerBound()[2]+((aDomain3DImg.upperBound())[2]-(aDomain3DImg.lowerBound())[2])/2.0;
227  myCenter[dimAdded]=sliceIndex;
228  };
229 
240  SliceRotator2D( const Dimension &dimAdded, const TDomain3D &aDomain3DImg,
241  const Integer &sliceIndex, const Dimension &dimRotated,
242  double rotationAngle, const Point &defaultPoint):
243  myPosDimAdded(dimAdded), mySliceIndex(sliceIndex), myDomain(aDomain3DImg),
244  myDimRotated(dimRotated), myRotationAngle(rotationAngle), myDefaultPoint (defaultPoint)
245  {
246  myCenter[0] = aDomain3DImg.lowerBound()[0]+((aDomain3DImg.upperBound())[0]-(aDomain3DImg.lowerBound())[0])/2.0;
247  myCenter[1] = aDomain3DImg.lowerBound()[1]+((aDomain3DImg.upperBound())[1]-(aDomain3DImg.lowerBound())[1])/2.0;
248  myCenter[2] = aDomain3DImg.lowerBound()[2]+((aDomain3DImg.upperBound())[2]-(aDomain3DImg.lowerBound())[2])/2.0;
249  myCenter[dimAdded]=sliceIndex;
250  };
251 
263  SliceRotator2D( const Dimension &dimAdded, const TDomain3D &aDomain3DImg, const Integer &sliceIndex,
264  const Dimension &dimRotated, const Point &ptCenter, double rotationAngle, const Point &defaultPoint):
265  myPosDimAdded(dimAdded), mySliceIndex(sliceIndex), myDomain(aDomain3DImg),
266  myDimRotated(dimRotated), myRotationAngle(rotationAngle), myCenter(ptCenter), myDefaultPoint (defaultPoint)
267  {
268  };
269 
281  SliceRotator2D( const Dimension &dimAdded, const TDomain3D &aDomain3DImg, const Integer &sliceIndex,
282  const Dimension &dimRotated, const Point &ptCenter, double rotationAngle):
283  myPosDimAdded(dimAdded), mySliceIndex(sliceIndex), myDomain(aDomain3DImg),
284  myDimRotated(dimRotated), myRotationAngle(rotationAngle), myCenter(ptCenter), myDefaultPoint (aDomain3DImg.lowerBound())
285  {
286  };
287 
294  template <typename TPointDimMinus>
295  inline
296  Point operator()(const TPointDimMinus& aPoint) const
297  {
298  Point pt;
299  Dimension pos=0;
300  std::vector<Dimension> indexesRotate;
301  for( Dimension i=0; i<pt.size(); i++)
302  {
303  if(i!=myPosDimAdded)
304  {
305  pt[i]= aPoint[pos];
306  pos++;
307  }else
308  {
309  pt[i]=mySliceIndex;
310  }
311  }
312  for( Dimension i=0; i<pt.size(); i++)
313  {
314  if(i!=myDimRotated)
315  indexesRotate.push_back(i);
316  }
317  double d1 = pt[indexesRotate[0]] - myCenter[indexesRotate[0]];
318  double d2 = pt[indexesRotate[1]] - myCenter[indexesRotate[1]];
319 
320  pt[indexesRotate[0]] = myCenter[indexesRotate[0]] + static_cast<Integer>(round(d1*cos(myRotationAngle)-d2*sin(myRotationAngle) ));
321  pt[indexesRotate[1]] = myCenter[indexesRotate[1]] + static_cast<Integer>(round(d1*sin(myRotationAngle)+d2*cos(myRotationAngle) ));
322 
323  if(myDomain.isInside(pt))
324  return pt;
325  else
326  return myDefaultPoint;
327  }
328  private:
329  // position of insertion of the new dimension
331  // the index of the slice associated to the new domain.
333  TDomain3D myDomain;
338  };
339 
340 
371  template <typename TDomain3D, typename TInteger = DGtal::Z3i::Integer >
373  {
374  public:
375 
377  typedef typename Space::Point Point;
378  typedef typename Space::Integer Integer;
379 
390  Point2DEmbedderIn3D( const TDomain3D &aDomain3DImg,
391  const Point &anOriginPoint, const Point &anUpperPointOnAxis1,
392  const Point &anUpperPointOnAxis2,
393  const Point &aDefautPoint = Point(0,0,0)): myDomain(aDomain3DImg),
394  myOriginPointEmbeddedIn3D(anOriginPoint),
395  myDefaultPoint (aDefautPoint),
396  myFirstAxisEmbeddedDirection(Point(anUpperPointOnAxis1[0]-anOriginPoint[0],
397  anUpperPointOnAxis1[1]-anOriginPoint[1],
398  anUpperPointOnAxis1[2]-anOriginPoint[2])),
399  mySecondAxisEmbeddedDirection(Point(anUpperPointOnAxis2[0]-anOriginPoint[0],
400  anUpperPointOnAxis2[1]-anOriginPoint[1],
401  anUpperPointOnAxis2[2]-anOriginPoint[2]))
402 
403 
404  {
407  }
408 
409 
422  Point2DEmbedderIn3D( const TDomain3D &aDomain3DImg,
423  const Point &anOriginPoint, const typename Space::RealPoint & aNormalVector,
424  const typename Point::Component &aWidth,
425  const Point &aDefautPoint = Point(0,0,0)): myDomain(aDomain3DImg),
426  myDefaultPoint (aDefautPoint)
427  {
428  double d = -aNormalVector[0]*anOriginPoint[0] - aNormalVector[1]*anOriginPoint[1] - aNormalVector[2]*anOriginPoint[2];
429  typename Space::RealPoint pRefOrigin;
430  if(aNormalVector[0]!=0){
431  pRefOrigin [0]= -d/aNormalVector[0];
432  pRefOrigin [1]= 0.0;
433  pRefOrigin [2]= 0.0;
434  if(pRefOrigin==anOriginPoint){
435  pRefOrigin[1]=-1.0;
436  }
437  }else if (aNormalVector[1]!=0){
438  pRefOrigin [0]= 0.0;
439  pRefOrigin [1]= -d/aNormalVector[1];
440  pRefOrigin [2]= 0.0;
441  if(pRefOrigin==anOriginPoint){
442  pRefOrigin[0]=-1.0;
443  }
444  }else if (aNormalVector[2]!=0){
445  pRefOrigin [0]= 0.0;
446  pRefOrigin [1]= 0.0;
447  pRefOrigin [2]= -d/aNormalVector[2];
448  if(pRefOrigin==anOriginPoint){
449  pRefOrigin[0]=-1.0;
450  }
451  }
452  typename Space::RealPoint uDir1;
453  uDir1=(pRefOrigin-anOriginPoint)/((pRefOrigin-anOriginPoint).norm());
454  typename Space::RealPoint uDir2;
455  uDir2[0] = uDir1[1]*aNormalVector[2]-uDir1[2]*aNormalVector[1];
456  uDir2[1] = uDir1[2]*aNormalVector[0]-uDir1[0]*aNormalVector[2];
457  uDir2[2] = uDir1[0]*aNormalVector[1]-uDir1[1]*aNormalVector[0];
458 
459  uDir2/=uDir2.norm();
460 
461  myOriginPointEmbeddedIn3D = anOriginPoint + Point(uDir1*aWidth/2) + Point(uDir2*aWidth/2);
464  }
465 
466 
480  Point2DEmbedderIn3D( const TDomain3D &aDomain3DImg,
481  const Point &anOriginPoint, const typename Space::RealPoint & aNormalVector,
482  const typename Space::RealPoint & orientXaxisVector,
483  const typename Point::Component &aWidth,
484  const Point &aDefautPoint = Point(0,0,0)): myDomain(aDomain3DImg),
485  myDefaultPoint (aDefautPoint)
486  {
487 
488  typename Space::RealPoint uDir1;
489  uDir1 = orientXaxisVector/orientXaxisVector.norm();
490  typename Space::RealPoint uDir2;
491  uDir2[0] = uDir1[1]*aNormalVector[2]-uDir1[2]*aNormalVector[1];
492  uDir2[1] = uDir1[2]*aNormalVector[0]-uDir1[0]*aNormalVector[2];
493  uDir2[2] = uDir1[0]*aNormalVector[1]-uDir1[1]*aNormalVector[0];
494  uDir2/=uDir2.norm();
495  myOriginPointEmbeddedIn3D = anOriginPoint + Point(-uDir1*aWidth/2) + Point(-uDir2*aWidth/2);
498  }
499 
500 
508  template <typename TPoint2D>
509  inline
510  Point operator()(const TPoint2D& aPoint, bool checkInsideDomain=true) const
511  {
512  Point pt ;
513  for( Dimension i=0; i<pt.size(); i++){
514 
515  pt[i] = static_cast<Integer>(floor(NumberTraits<Integer>::castToDouble(aPoint[0])
517  pt[i] += static_cast<Integer>(floor(NumberTraits<Integer>::castToDouble(aPoint[1])
519  }
520 
521  if(myDomain.isInside(pt)|| !checkInsideDomain)
522  {
523  return pt;
524  }
525  else
526  {
527 #ifdef DEBUG_VERBOSE
528  trace.warning() << "Warning pt outside the 3D domain " << pt << std::endl;
529 #endif
530  return myDefaultPoint;
531  }
532  }
533 
534 
540  inline
541  void shiftOriginPoint(const typename Space::RealPoint& shift)
542  {
543  for( Dimension i=0; i<myOriginPointEmbeddedIn3D.size(); i++){
545  }
546  }
547 
548 
549  private:
550  TDomain3D myDomain;
551 
552  // Origin (or lower point) of the 2D image embedded in the 3D domain
554 
556 
557  // Point giving the direction of the embedded first axis of the 2D image.
559 
560  // Point giving the direction of the embedded second axis of the 2D image.
562 
563  };
564 
565 
569  template< typename TPointPredicate, typename TDomain, typename TValue=typename TDomain::Integer >
571  {
572  typedef TPointPredicate PointPredicate;
573  typedef TDomain Domain;
574  typedef TValue Value;
575  typedef typename Domain::Point Point;
576 
580 
589  const Value aTrueValue, const Value aFalseValue );
590 
592 
598  Value operator()( const Point& aPoint ) const;
599 
607 
608  private:
610  const Domain * myDomain;
613 
614  };
615 
616 
636  template <typename TDomain, typename TInteger = DGtal::int32_t, typename TValue = typename TDomain::Size >
638  {
639  public:
640  typedef typename TDomain::Space Space;
641  typedef typename TDomain::Size Size;
642  typedef typename TDomain::Integer IntergerDom;
643  typedef typename Space::Dimension Dimension;
644  typedef typename Space::Point Point;
645 
657  BasicDomainSubSampler(const TDomain &aSourceDomain, const std::vector<TValue> &aGridSize,
658  const Point &aGridShift): mySourceDomain(aSourceDomain),
659  myGridShift(aGridShift),
660  myGridSize(aGridSize)
661  {
662  Point domainUpperBound=aSourceDomain.upperBound();
663  Point domainLowerBound=aSourceDomain.lowerBound();
664 
665  for (Dimension dim=0; dim< Space::dimension; dim++){
666  domainLowerBound[dim] = static_cast<IntergerDom>(floor(NumberTraits<IntergerDom>::castToDouble(domainLowerBound[dim]) /
667  NumberTraits<TValue>::castToDouble( aGridSize[dim] )));
668  domainUpperBound[dim] = static_cast<IntergerDom>(floor(NumberTraits<IntergerDom>::castToDouble(domainUpperBound[dim]) /
669  NumberTraits<TValue>::castToDouble( aGridSize[dim] )));
670  }
671  myNewDomain = TDomain(domainLowerBound,
672  domainUpperBound);
673  Point upperGrid;
674  for (Dimension dim=0; dim < Space::dimension; dim++)
675  upperGrid[dim] = myGridSize[dim];
676  myGridSampleDomain = TDomain(Point::diagonal(0), upperGrid);
677  };
678 
679 
693  inline
694  Point operator()(const Point& aPoint) const
695  {
696  Point ptRes = Point::diagonal(0);
697  if(!myNewDomain.isInside(aPoint)){
698  trace.error() << " The point is not in the source domain: "<< aPoint << std::endl;
699  return ptRes;
700  }
701 
702  for (Dimension dim=0; dim< Space::dimension; dim++){
703  ptRes[dim] = static_cast<TInteger>(floor(NumberTraits<TInteger>::castToDouble(aPoint[dim])*
705  }
706  ptRes +=myGridShift;
707 
708  if(!mySourceDomain.isInside(ptRes)){
709  // we are looking for a point inside the domain
710  for(typename TDomain::ConstIterator it = myGridSampleDomain.begin();
711  it!= myGridSampleDomain.end(); it++){
712  if (mySourceDomain.isInside(ptRes+(*it)))
713  return ptRes+(*it);
714  }
715  }
716  return ptRes;
717  }
718 
725  inline
726  const TDomain & getSubSampledDomain(){
727  return myNewDomain;
728  }
729 
730  private:
731  TDomain mySourceDomain;
732  TDomain myNewDomain;
733  // used to search a point when the resulting point is outside the source domain.
736  std::vector<TValue> myGridSize;
737  };
738 
739 
757  template <typename TDomain>
759  {
760  public:
761  typedef typename TDomain::Space Space;
762  typedef typename TDomain::Size Size;
763  typedef typename Space::Dimension Dimension;
764  typedef typename Space::Point Point;
765 
778  FlipDomainAxis(const TDomain &aSourceDomain, const std::vector<Size> & axisFlipped): mySourceDomain(aSourceDomain),
779  myAxisFlipped(axisFlipped){
780  };
781 
782 
792  inline
793  Point operator()(const Point& aPoint) const
794  {
795  Point ptRes;
796  for (Dimension dim=0; dim< Space::dimension; dim++){
797  ptRes[dim] = aPoint[dim];
798  }
799  for(Dimension i = 0; i< myAxisFlipped.size(); i++){
800  ptRes[myAxisFlipped[i]] = mySourceDomain.upperBound()[myAxisFlipped[i]]-aPoint[myAxisFlipped[i]];
801  }
802  return ptRes;
803  }
804 
805  private:
806  TDomain mySourceDomain;
807  std::vector<Size> myAxisFlipped;
808  };
809 
810 
811  template <typename TRealVector, typename TVector>
813  {
814  BOOST_STATIC_ASSERT(( TRealVector::dimension == TVector::dimension ));
815  inline
816  TVector operator () ( const TRealVector & point ) const
817  {
818  TVector out;
819  for ( unsigned int i = 0; i < TVector::dimension; i++ )
820  out[i] = std::round ( point[i] );
821  return out;
822  }
823  };
824 
825  }//namespace functors
826 } // namespace dgtal
827 
828 
830 // Includes inline functions.
831 #include "DGtal/kernel/BasicPointFunctors.ih"
832 // //
834 
835 #endif // !defined BasicPointFunctors_h
836 #undef BasicPointFunctors_RECURSES
837 #endif // else defined(BasicPointFunctors_RECURSES)
DGtal::functors::Point2DEmbedderIn3D::Point2DEmbedderIn3D
Point2DEmbedderIn3D(const TDomain3D &aDomain3DImg, const Point &anOriginPoint, const Point &anUpperPointOnAxis1, const Point &anUpperPointOnAxis2, const Point &aDefautPoint=Point(0, 0, 0))
Definition: BasicPointFunctors.h:390
DGtal::functors::FlipDomainAxis::Dimension
Space::Dimension Dimension
Definition: BasicPointFunctors.h:763
DGtal::functors::SliceRotator2D::myDimRotated
Dimension myDimRotated
Definition: BasicPointFunctors.h:334
DGtal::functors::Projector
Aim: Functor that maps a point P of dimension i to a point Q of dimension j. The member myDims is an ...
Definition: BasicPointFunctors.h:106
ConstIterator
MyDigitalSurface::ConstIterator ConstIterator
Definition: greedy-plane-segmentation-ex2.cpp:93
DGtal::functors::FlipDomainAxis::FlipDomainAxis
FlipDomainAxis(const TDomain &aSourceDomain, const std::vector< Size > &axisFlipped)
Definition: BasicPointFunctors.h:778
DGtal::functors::Projector::myDims
std::array< Dimension, dimension > myDims
Definition: BasicPointFunctors.h:155
DGtal::SpaceND::Dimension
DGtal::Dimension Dimension
Copy of the type used for the dimension.
Definition: SpaceND.h:129
DGtal::functors::PointFunctorFromPointPredicateAndDomain::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CPointPredicate< PointPredicate >))
DGtal::functors::Projector::Point
Space::Point Point
Definition: BasicPointFunctors.h:112
DGtal::functors::Point2DEmbedderIn3D::Point
Space::Point Point
Definition: BasicPointFunctors.h:377
DGtal::functors::Projector::BOOST_STATIC_CONSTANT
BOOST_STATIC_CONSTANT(Dimension, dimension=Space::dimension)
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::functors::Projector::Dimension
Space::Dimension Dimension
Definition: BasicPointFunctors.h:109
DGtal::functors::SliceRotator2D::Integer
Space::Integer Integer
Definition: BasicPointFunctors.h:207
DGtal::functors::PointFunctorFromPointPredicateAndDomain::myFalseValue
Value myFalseValue
Definition: BasicPointFunctors.h:612
DGtal::functors::BasicDomainSubSampler::Space
TDomain::Space Space
Definition: BasicPointFunctors.h:640
DGtal::functors::Projector::Space
S Space
Definition: BasicPointFunctors.h:108
DGtal::functors::PointFunctorFromPointPredicateAndDomain::operator=
PointFunctorFromPointPredicateAndDomain & operator=(const PointFunctorFromPointPredicateAndDomain &other)
DGtal::NumberTraits
Aim: The traits class for all models of Cinteger.
Definition: NumberTraits.h:562
DGtal::Trace::error
std::ostream & error()
DGtal::functors::BasicDomainSubSampler::Point
Space::Point Point
Definition: BasicPointFunctors.h:644
DGtal::functors::BasicDomainSubSampler::Size
TDomain::Size Size
Definition: BasicPointFunctors.h:641
DGtal::functors::PointFunctorFromPointPredicateAndDomain::PointFunctorFromPointPredicateAndDomain
PointFunctorFromPointPredicateAndDomain(ConstAlias< PointPredicate > aPtrPredicate, ConstAlias< Domain > aDomain, const Value aTrueValue, const Value aFalseValue)
Constructor.
DGtal::functors::Point2DEmbedderIn3D::Space
SpaceND< 3, TInteger > Space
Definition: BasicPointFunctors.h:376
DGtal::functors::Projector::initRemoveOneDim
void initRemoveOneDim(const Dimension &dimRemoved)
DGtal::functors::PointFunctorFromPointPredicateAndDomain
Create a point functor from a point predicate and a domain.
Definition: BasicPointFunctors.h:570
aPoint
const Point aPoint(3, 4)
DGtal::trace
Trace trace
Definition: Common.h:154
DGtal::functors::BasicDomainSubSampler::Dimension
Space::Dimension Dimension
Definition: BasicPointFunctors.h:643
DGtal::functors::SliceRotator2D::SliceRotator2D
SliceRotator2D(const Dimension &dimAdded, const TDomain3D &aDomain3DImg, const Integer &sliceIndex, const Dimension &dimRotated, const Point &ptCenter, double rotationAngle)
Definition: BasicPointFunctors.h:281
DGtal::Dimension
DGtal::uint32_t Dimension
Definition: Common.h:137
DGtal::functors::SliceRotator2D::myDefaultPoint
Point myDefaultPoint
Definition: BasicPointFunctors.h:337
DGtal::functors::SliceRotator2D::Point
Space::Point Point
Definition: BasicPointFunctors.h:206
DGtal::functors::Point2DEmbedderIn3D::Point2DEmbedderIn3D
Point2DEmbedderIn3D(const TDomain3D &aDomain3DImg, const Point &anOriginPoint, const typename Space::RealPoint &aNormalVector, const typename Point::Component &aWidth, const Point &aDefautPoint=Point(0, 0, 0))
Definition: BasicPointFunctors.h:422
DGtal::functors::SliceRotator2D::myPosDimAdded
Dimension myPosDimAdded
Definition: BasicPointFunctors.h:330
DGtal::functors::Point2DEmbedderIn3D::mySecondAxisEmbeddedDirection
Space::RealPoint mySecondAxisEmbeddedDirection
Definition: BasicPointFunctors.h:561
DGtal::functors::SliceRotator2D::Dimension
Space::Dimension Dimension
Definition: BasicPointFunctors.h:205
DGtal::functors::VectorRounding
Definition: BasicPointFunctors.h:812
DGtal::functors::FlipDomainAxis::Size
TDomain::Size Size
Definition: BasicPointFunctors.h:762
dim
unsigned int dim(const Vector &z)
Definition: viewDualSurface.cpp:174
DGtal::PointVector< dim, Integer >::diagonal
static Self diagonal(Component val=1)
DGtal::functors::SliceRotator2D::SliceRotator2D
SliceRotator2D(const Dimension &dimAdded, const TDomain3D &aDomain3DImg, const Integer &sliceIndex, const Dimension &dimRotated, const Point &ptCenter, double rotationAngle, const Point &defaultPoint)
Definition: BasicPointFunctors.h:263
DGtal::functors::Projector::Projector
Projector(const Integer &aDefaultInteger=NumberTraits< Integer >::zero())
DGtal::functors::PointFunctorFromPointPredicateAndDomain::Point
Domain::Point Point
Definition: BasicPointFunctors.h:575
DGtal::functors::Point2DEmbedderIn3D::Integer
Space::Integer Integer
Definition: BasicPointFunctors.h:378
DGtal::functors::PointFunctorFromPointPredicateAndDomain::myTrueValue
Value myTrueValue
Definition: BasicPointFunctors.h:611
DGtal::functors::BasicDomainSubSampler::operator()
Point operator()(const Point &aPoint) const
Definition: BasicPointFunctors.h:694
DGtal::functors::Projector::myDefaultInteger
Integer myDefaultInteger
Definition: BasicPointFunctors.h:161
Size
HalfEdgeDataStructure::Size Size
Definition: testHalfEdgeDataStructure.cpp:50
DGtal::functors::Point2DEmbedderIn3D::myDefaultPoint
Point myDefaultPoint
Definition: BasicPointFunctors.h:555
DGtal::PointVector< dim, Integer >::Component
Integer Component
Type for Vector elements.
Definition: PointVector.h:614
DGtal::SpaceND
Definition: SpaceND.h:95
DGtal::functors::SliceRotator2D::Space
SpaceND< 3, TInteger > Space
Definition: BasicPointFunctors.h:204
DGtal::functors::FlipDomainAxis::Space
TDomain::Space Space
Definition: BasicPointFunctors.h:761
DGtal::functors::BasicDomainSubSampler::IntergerDom
TDomain::Integer IntergerDom
Definition: BasicPointFunctors.h:642
DGtal::functors::FlipDomainAxis
Aim: Functor that flips the domain coordinate system from some selected axis. For instance,...
Definition: BasicPointFunctors.h:758
DGtal::functors::FlipDomainAxis::Point
Space::Point Point
Definition: BasicPointFunctors.h:764
DGtal::functors::SliceRotator2D::myDomain
TDomain3D myDomain
Definition: BasicPointFunctors.h:333
DGtal::concepts::CDomain
Aim: This concept represents a digital domain, i.e. a non mutable subset of points of the given digit...
Definition: CDomain.h:129
DGtal::functors::FlipDomainAxis::mySourceDomain
TDomain mySourceDomain
Definition: BasicPointFunctors.h:806
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::functors::SliceRotator2D::myRotationAngle
double myRotationAngle
Definition: BasicPointFunctors.h:335
DGtal::functors::BasicDomainSubSampler::BasicDomainSubSampler
BasicDomainSubSampler(const TDomain &aSourceDomain, const std::vector< TValue > &aGridSize, const Point &aGridShift)
Definition: BasicPointFunctors.h:657
DGtal::functors::Point2DEmbedderIn3D::myOriginPointEmbeddedIn3D
Space::RealPoint myOriginPointEmbeddedIn3D
Definition: BasicPointFunctors.h:553
DGtal::functors::FlipDomainAxis::myAxisFlipped
std::vector< Size > myAxisFlipped
Definition: BasicPointFunctors.h:807
DGtal::functors::PointFunctorFromPointPredicateAndDomain::PointPredicate
TPointPredicate PointPredicate
Definition: BasicPointFunctors.h:572
DGtal::SpaceND::dimension
static const Dimension dimension
static constants to store the dimension.
Definition: SpaceND.h:132
DGtal::functors::PointFunctorFromPointPredicateAndDomain::myDomain
const Domain * myDomain
Definition: BasicPointFunctors.h:610
DGtal::functors::BasicDomainSubSampler
Aim: Functor that subsamples an initial domain by given a grid size and a shift vector....
Definition: BasicPointFunctors.h:637
DGtal::functors::SliceRotator2D
Special Point Functor that adds one dimension to a 2D point and apply on it a rotation of angle alpha...
Definition: BasicPointFunctors.h:200
DGtal::functors::Projector::Integer
Space::Integer Integer
Definition: BasicPointFunctors.h:111
DGtal::functors::SliceRotator2D::SliceRotator2D
SliceRotator2D(const Dimension &dimAdded, const TDomain3D &aDomain3DImg, const Integer &sliceIndex, const Dimension &dimRotated, double rotationAngle)
Definition: BasicPointFunctors.h:218
DGtal::functors::Projector::initAddOneDim
void initAddOneDim(const Dimension &newDim)
DGtal::concepts::CQuantity
Aim: defines the concept of quantity in DGtal.
Definition: CQuantity.h:92
DGtal::functors::Point2DEmbedderIn3D::myDomain
TDomain3D myDomain
Definition: BasicPointFunctors.h:550
Integer
Point::Coordinate Integer
Definition: examplePlaneProbingParallelepipedEstimator.cpp:44
DGtal::functors::VectorRounding::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((TRealVector::dimension==TVector::dimension))
DGtal::functors::BasicDomainSubSampler::myGridSampleDomain
TDomain myGridSampleDomain
Definition: BasicPointFunctors.h:734
DGtal::functors::SliceRotator2D::SliceRotator2D
SliceRotator2D(const Dimension &dimAdded, const TDomain3D &aDomain3DImg, const Integer &sliceIndex, const Dimension &dimRotated, double rotationAngle, const Point &defaultPoint)
Definition: BasicPointFunctors.h:240
DGtal::functors::PointFunctorFromPointPredicateAndDomain::myPtrPredicate
const PointPredicate * myPtrPredicate
Definition: BasicPointFunctors.h:609
DGtal::PointVector::norm
double norm(const NormType type=L_2) const
DGtal::functors::Point2DEmbedderIn3D::Point2DEmbedderIn3D
Point2DEmbedderIn3D(const TDomain3D &aDomain3DImg, const Point &anOriginPoint, const typename Space::RealPoint &aNormalVector, const typename Space::RealPoint &orientXaxisVector, const typename Point::Component &aWidth, const Point &aDefautPoint=Point(0, 0, 0))
Definition: BasicPointFunctors.h:480
DGtal::functors::SliceRotator2D::myCenter
PointVector< 3, double > myCenter
Definition: BasicPointFunctors.h:336
DGtal::functors::SliceRotator2D::operator()
Point operator()(const TPointDimMinus &aPoint) const
Definition: BasicPointFunctors.h:296
DGtal::PointVector< dim, Integer >
DGtal::functors::PointFunctorFromPointPredicateAndDomain::Domain
TDomain Domain
Definition: BasicPointFunctors.h:573
DGtal::functors::Projector::init
void init(const TIterator &itb, const TIterator &ite)
DGtal::concepts::CPointPredicate
Aim: Defines a predicate on a point.
Definition: CPointPredicate.h:80
DGtal::functors::PointFunctorFromPointPredicateAndDomain::operator()
Value operator()(const Point &aPoint) const
operator ()
DGtal::functors::FlipDomainAxis::operator()
Point operator()(const Point &aPoint) const
Definition: BasicPointFunctors.h:793
Space
SpaceND< 2 > Space
Definition: testSimpleRandomAccessRangeFromPoint.cpp:42
DGtal::functors::BasicDomainSubSampler::myNewDomain
TDomain myNewDomain
Definition: BasicPointFunctors.h:732
DGtal::functors::BasicDomainSubSampler::mySourceDomain
TDomain mySourceDomain
Definition: BasicPointFunctors.h:731
DGtal::functors::BasicDomainSubSampler::getSubSampledDomain
const TDomain & getSubSampledDomain()
Definition: BasicPointFunctors.h:726
DGtal::Trace::warning
std::ostream & warning()
DGtal::functors::Point2DEmbedderIn3D::operator()
Point operator()(const TPoint2D &aPoint, bool checkInsideDomain=true) const
Definition: BasicPointFunctors.h:510
DGtal::functors::VectorRounding::operator()
TVector operator()(const TRealVector &point) const
Definition: BasicPointFunctors.h:816
DGtal::functors::PointFunctorFromPointPredicateAndDomain::Value
TValue Value
Definition: BasicPointFunctors.h:574
DGtal::functors::BasicDomainSubSampler::myGridShift
Point myGridShift
Definition: BasicPointFunctors.h:735
DGtal::PointVector::size
static Dimension size()
DGtal::SpaceND::Integer
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition: SpaceND.h:102
DGtal::functors::BasicDomainSubSampler::myGridSize
std::vector< TValue > myGridSize
Definition: BasicPointFunctors.h:736
DGtal::functors::SliceRotator2D::mySliceIndex
Integer mySliceIndex
Definition: BasicPointFunctors.h:332
DGtal::functors::Projector::operator()
Point operator()(const TInputPoint &aPoint) const
DGtal::functors::Point2DEmbedderIn3D
Aim: Functor that embeds a 2D point into a 3D space from two axis vectors and an origin point given i...
Definition: BasicPointFunctors.h:372
DGtal::functors::Point2DEmbedderIn3D::shiftOriginPoint
void shiftOriginPoint(const typename Space::RealPoint &shift)
Definition: BasicPointFunctors.h:541
DGtal::functors::Point2DEmbedderIn3D::myFirstAxisEmbeddedDirection
Space::RealPoint myFirstAxisEmbeddedDirection
Definition: BasicPointFunctors.h:558