31 #if defined(Surfaces_RECURSES)
32 #error Recursive header files inclusion detected in Surfaces.h
35 #define Surfaces_RECURSES
37 #if !defined Surfaces_h
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/Exceptions.h"
46 #include "DGtal/topology/SurfelAdjacency.h"
47 #include "DGtal/topology/SurfelNeighborhood.h"
52 #pragma warning(disable : 4290)
77 template <
typename TKSpace>
115 template <
typename Po
intPredicate>
118 const PointPredicate & pp,
119 unsigned int nbtries = 1000 );
148 template <
typename Po
intPredicate>
151 const PointPredicate & pp,
184 template <
typename SCellSet,
typename Po
intPredicate >
189 const PointPredicate & pp,
190 const SCell & start_surfel );
225 template <
typename SCellSet,
typename Po
intPredicate >
230 const PointPredicate & pp,
231 const SCell & start_surfel );
259 template <
typename SCellSet,
typename SurfelPredicate >
264 const SurfelPredicate & pp,
265 const SCell & start_surfel );
294 template <
typename SCellSet,
typename SurfelPredicate >
299 const SurfelPredicate & pp,
300 const SCell & start_surfel );
335 template <
typename Po
intPredicate >
340 const PointPredicate & pp,
341 const SCell & start_surfel );
384 template <
typename Po
intPredicate>
390 const PointPredicate & pp,
391 const SCell & start_surfel );
427 template <
typename SurfelPredicate >
432 const SurfelPredicate & sp,
433 const SCell & start_surfel );
478 template <
typename SurfelPredicate>
484 const SurfelPredicate & sp,
485 const SCell & start_surfel );
513 template <
typename Po
intPredicate>
519 const PointPredicate & pp,
520 const SCell & start_surfel );
549 template <
typename Po
intPredicate>
552 ( std::vector< std::vector< Point > > & aVectPointContour2D,
554 const PointPredicate & pp,
581 template <
typename Po
intPredicate>
584 ( std::vector< std::vector<SCell> > & aVectSCellContour2D,
587 const PointPredicate & pp );
617 template <
typename Po
intPredicate >
620 ( std::vector< std::vector<SCell> > & aVectConnectedSCell,
623 const PointPredicate & pp,
624 bool forceOrientCellExterior=
false );
653 template <
typename Po
intPredicate>
657 const PointPredicate & pp );
684 template <
typename CellSet,
typename Po
intPredicate >
688 const PointPredicate & pp,
689 const Point & aLowerBound,
690 const Point & aUpperBound );
712 template <
typename SCellSet,
typename Po
intPredicate >
716 const PointPredicate & pp,
717 const Point & aLowerBound,
718 const Point & aUpperBound );
742 template <
typename OutputIterator,
typename Po
intPredicate >
746 const PointPredicate & pp,
747 const Point & aLowerBound,
748 const Point & aUpperBound );
772 template <
typename OutputIterator,
typename Po
intPredicate >
776 const PointPredicate & pp,
777 const Point & aLowerBound,
778 const Point & aUpperBound );
803 template <
typename TSurfelPredicate,
typename TImageContainer>
807 const TSurfelPredicate & aSurfPred,
810 bool empty_is_inside=
false,
811 bool incrementMode=
true );
832 template <
typename SurfelPredicate,
typename TImageContainer>
836 const SurfelPredicate & aSurfPred,
839 bool empty_is_outside=
true,
840 bool incrementMode=
true );
926 template <
typename TKSpace>
935 #include "DGtal/topology/helpers/Surfaces.ih"
942 #undef Surfaces_RECURSES
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
typename PreCellularGridSpace::DirIterator DirIterator
Aim: A utility class for constructing surfaces (i.e. set of (n-1)-cells).
static void track2DBoundaryPoints(std::vector< Point > &aVectorOfPoints, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const PointPredicate &pp, const SCell &start_surfel)
static void extractAllConnectedSCell(std::vector< std::vector< SCell > > &aVectConnectedSCell, const KSpace &aKSpace, const SurfelAdjacency< KSpace::dimension > &aSurfelAdj, const PointPredicate &pp, bool forceOrientCellExterior=false)
static void trackClosedBoundary(SCellSet &surface, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const PointPredicate &pp, const SCell &start_surfel)
static void extractAll2DSCellContours(std::vector< std::vector< SCell > > &aVectSCellContour2D, const KSpace &aKSpace, const SurfelAdjacency< KSpace::dimension > &aSurfelAdj, const PointPredicate &pp)
static void trackBoundary(SCellSet &surface, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const PointPredicate &pp, const SCell &start_surfel)
Surfaces & operator=(const Surfaces &other)
static SCell findABel(const KSpace &K, const PointPredicate &pp, unsigned int nbtries=1000)
static void trackSurface(SCellSet &surface, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const SurfelPredicate &pp, const SCell &start_surfel)
void selfDisplay(std::ostream &out) const
static SCell findABel(const KSpace &K, const PointPredicate &pp, Point x1, Point x2)
static void extractAllPointContours4C(std::vector< std::vector< Point > > &aVectPointContour2D, const KSpace &aKSpace, const PointPredicate &pp, const SurfelAdjacency< 2 > &aSAdj)
static CellRange getPrimalVertices(const KSpace &K, const SCell &s)
static void uMakeBoundary(CellSet &aBoundary, const KSpace &aKSpace, const PointPredicate &pp, const Point &aLowerBound, const Point &aUpperBound)
Surfaces(const Surfaces &other)
unsigned static int uFillInterior(const KSpace &aKSpace, const TSurfelPredicate &aSurfPred, TImageContainer &anImage, const typename TImageContainer::Value &aValue, bool empty_is_inside=false, bool incrementMode=true)
static CellRange getPrimalVertices(const KSpace &K, const Surfel &s, bool ccw)
static void orientSCellExterior(std::vector< SCell > &aVectOfSCell, const KSpace &aKSpace, const PointPredicate &pp)
static void track2DBoundary(std::vector< SCell > &aSCellContour2D, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const PointPredicate &pp, const SCell &start_surfel)
std::vector< Cell > CellRange
static void sWriteBoundary(OutputIterator &out_it, const KSpace &aKSpace, const PointPredicate &pp, const Point &aLowerBound, const Point &aUpperBound)
static void track2DSliceSurface(std::vector< SCell > &aSCellContour, const KSpace &K, const Dimension &trackDir, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const SurfelPredicate &sp, const SCell &start_surfel)
static void uWriteBoundary(OutputIterator &out_it, const KSpace &aKSpace, const PointPredicate &pp, const Point &aLowerBound, const Point &aUpperBound)
static void trackClosedSurface(SCellSet &surface, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const SurfelPredicate &pp, const SCell &start_surfel)
static void track2DSliceBoundary(std::vector< SCell > &aSCellContour2D, const KSpace &K, const Dimension &trackDir, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const PointPredicate &pp, const SCell &start_surfel)
static void track2DSurface(std::vector< SCell > &aSCellContour, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const SurfelPredicate &sp, const SCell &start_surfel)
KSpace::DirIterator DirIterator
unsigned static int uFillExterior(const KSpace &aKSpace, const SurfelPredicate &aSurfPred, TImageContainer &anImage, const typename TImageContainer::Value &aValue, bool empty_is_outside=true, bool incrementMode=true)
static void sMakeBoundary(SCellSet &aBoundary, const KSpace &aKSpace, const PointPredicate &pp, const Point &aLowerBound, const Point &aUpperBound)
CountedPtr< SH3::DigitalSurface > surface
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::uint32_t Dimension
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.