31 #if defined(Surfaces_RECURSES) 32 #error Recursive header files inclusion detected in Surfaces.h 33 #else // defined(Surfaces_RECURSES) 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>
86 typedef typename KSpace::SCell
SCell;
112 template <
typename Po
intPredicate>
115 const PointPredicate & pp,
145 template <typename PointPredicate>
148 const PointPredicate & pp,
149 Point x1, Point x2 );
181 template <typename SCellSet, typename PointPredicate >
186 const PointPredicate & pp,
187 const SCell & start_surfel );
222 template <typename SCellSet, typename PointPredicate >
227 const PointPredicate & pp,
228 const SCell & start_surfel );
256 template <typename SCellSet, typename SurfelPredicate >
261 const SurfelPredicate & pp,
262 const SCell & start_surfel );
291 template <typename SCellSet, typename SurfelPredicate >
296 const SurfelPredicate & pp,
297 const SCell & start_surfel );
332 template <typename PointPredicate >
337 const PointPredicate & pp,
338 const SCell & start_surfel );
381 template <typename PointPredicate>
387 const PointPredicate & pp,
388 const SCell & start_surfel );
424 template <typename SurfelPredicate >
429 const SurfelPredicate & sp,
430 const SCell & start_surfel );
475 template <typename SurfelPredicate>
481 const SurfelPredicate & sp,
482 const SCell & start_surfel );
510 template <typename PointPredicate>
516 const PointPredicate & pp,
517 const SCell & start_surfel );
546 template <typename PointPredicate>
549 (
std::vector<
std::vector< Point > > & aVectPointContour2D,
550 const KSpace & aKSpace,
551 const PointPredicate & pp,
578 template <typename PointPredicate>
581 (
std::vector<
std::vector<SCell> > & aVectSCellContour2D,
582 const KSpace & aKSpace,
584 const PointPredicate & pp );
614 template <typename PointPredicate >
617 (
std::vector<
std::vector<SCell> > & aVectConnectedSCell,
618 const KSpace & aKSpace,
620 const PointPredicate & pp,
621 bool forceOrientCellExterior=false );
650 template <typename PointPredicate>
653 const KSpace & aKSpace,
654 const PointPredicate & pp );
681 template <typename CellSet, typename PointPredicate >
684 const KSpace & aKSpace,
685 const PointPredicate & pp,
686 const Point & aLowerBound,
687 const Point & aUpperBound );
709 template <typename SCellSet, typename PointPredicate >
712 const KSpace & aKSpace,
713 const PointPredicate & pp,
714 const Point & aLowerBound,
715 const Point & aUpperBound );
739 template <typename OutputIterator, typename PointPredicate >
742 const KSpace & aKSpace,
743 const PointPredicate & pp,
744 const Point & aLowerBound,
745 const Point & aUpperBound );
769 template <typename OutputIterator, typename PointPredicate >
772 const KSpace & aKSpace,
773 const PointPredicate & pp,
774 const Point & aLowerBound,
775 const Point & aUpperBound );
800 template < typename TSurfelPredicate, typename TImageContainer>
804 const TSurfelPredicate & aSurfPred,
805 TImageContainer & anImage,
806 const typename TImageContainer::
Value & aValue,
807 bool empty_is_inside=false,
808 bool incrementMode=true );
829 template < typename SurfelPredicate, typename TImageContainer>
833 const SurfelPredicate & aSurfPred,
834 TImageContainer & anImage,
835 const typename TImageContainer::
Value & aValue,
836 bool empty_is_outside=true,
837 bool incrementMode=true );
886 Surfaces ( const Surfaces & other );
894 Surfaces & operator= ( const Surfaces & other );
908 template <typename TKSpace>
910 operator<< (
std::ostream & out, const Surfaces<TKSpace> &
object );
917 #include "DGtal/topology/helpers/Surfaces.ih" 922 #endif // !defined Surfaces_h 924 #undef Surfaces_RECURSES 925 #endif // else defined(Surfaces_RECURSES) static void uMakeBoundary(CellSet &aBoundary, const KSpace &aKSpace, const PointPredicate &pp, const Point &aLowerBound, const Point &aUpperBound)
static void orientSCellExterior(std::vector< SCell > &aVectOfSCell, const KSpace &aKSpace, const PointPredicate &pp)
static void extractAllPointContours4C(std::vector< std::vector< Point > > &aVectPointContour2D, const KSpace &aKSpace, const PointPredicate &pp, const SurfelAdjacency< 2 > &aSAdj)
KSpace::DirIterator DirIterator
Aim: A utility class for constructing surfaces (i.e. set of (n-1)-cells).
DGtal::uint32_t Dimension
static void track2DSurface(std::vector< SCell > &aSCellContour, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const SurfelPredicate &sp, const SCell &start_surfel)
Aim: Represent adjacencies between surfel elements, telling if it follows an interior to exterior ord...
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)
void selfDisplay(std::ostream &out) const
static SCell findABel(const KSpace &K, const PointPredicate &pp, unsigned int nbtries=1000)
static void sMakeBoundary(SCellSet &aBoundary, const KSpace &aKSpace, const PointPredicate &pp, const Point &aLowerBound, const Point &aUpperBound)
static void track2DBoundary(std::vector< SCell > &aSCellContour2D, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const PointPredicate &pp, const SCell &start_surfel)
static void trackBoundary(SCellSet &surface, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const PointPredicate &pp, const SCell &start_surfel)
static void trackClosedSurface(SCellSet &surface, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const SurfelPredicate &pp, const SCell &start_surfel)
static void uWriteBoundary(OutputIterator &out_it, const KSpace &aKSpace, const PointPredicate &pp, const Point &aLowerBound, const Point &aUpperBound)
static void extractAllConnectedSCell(std::vector< std::vector< SCell > > &aVectConnectedSCell, const KSpace &aKSpace, const SurfelAdjacency< KSpace::dimension > &aSurfelAdj, const PointPredicate &pp, bool forceOrientCellExterior=false)
DGtal is the top-level namespace which contains all DGtal functions and types.
static void sWriteBoundary(OutputIterator &out_it, const KSpace &aKSpace, const PointPredicate &pp, const Point &aLowerBound, const Point &aUpperBound)
static void extractAll2DSCellContours(std::vector< std::vector< SCell > > &aVectSCellContour2D, const KSpace &aKSpace, const SurfelAdjacency< KSpace::dimension > &aSurfelAdj, const PointPredicate &pp)
static void track2DBoundaryPoints(std::vector< Point > &aVectorOfPoints, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const PointPredicate &pp, const SCell &start_surfel)
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 void trackClosedBoundary(SCellSet &surface, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const PointPredicate &pp, const SCell &start_surfel)
static void trackSurface(SCellSet &surface, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const SurfelPredicate &pp, const SCell &start_surfel)
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 track2DSliceSurface(std::vector< SCell > &aSCellContour, const KSpace &K, const Dimension &trackDir, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const SurfelPredicate &sp, const SCell &start_surfel)