DGtal 1.4.0
|
Aim: A utility class for constructing surfaces (i.e. set of (n-1)-cells). More...
#include <DGtal/topology/helpers/Surfaces.h>
Public Types | |
typedef TKSpace | KSpace |
typedef KSpace::Integer | Integer |
typedef KSpace::Point | Point |
typedef KSpace::Vector | Vector |
typedef KSpace::Cell | Cell |
typedef KSpace::SCell | SCell |
typedef KSpace::Surfel | Surfel |
typedef KSpace::DirIterator | DirIterator |
typedef std::vector< Cell > | CellRange |
Public Member Functions | |
~Surfaces () | |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Static Public Member Functions | |
template<typename PointPredicate > | |
static SCell | findABel (const KSpace &K, const PointPredicate &pp, unsigned int nbtries=1000) |
template<typename PointPredicate > | |
static SCell | findABel (const KSpace &K, const PointPredicate &pp, Point x1, Point x2) |
template<typename SCellSet , typename PointPredicate > | |
static void | trackBoundary (SCellSet &surface, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const PointPredicate &pp, const SCell &start_surfel) |
template<typename SCellSet , typename PointPredicate > | |
static void | trackClosedBoundary (SCellSet &surface, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const PointPredicate &pp, const SCell &start_surfel) |
template<typename SCellSet , typename SurfelPredicate > | |
static void | trackSurface (SCellSet &surface, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const SurfelPredicate &pp, const SCell &start_surfel) |
template<typename SCellSet , typename SurfelPredicate > | |
static void | trackClosedSurface (SCellSet &surface, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const SurfelPredicate &pp, const SCell &start_surfel) |
template<typename PointPredicate > | |
static void | track2DBoundary (std::vector< SCell > &aSCellContour2D, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const PointPredicate &pp, const SCell &start_surfel) |
template<typename PointPredicate > | |
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) |
template<typename SurfelPredicate > | |
static void | track2DSurface (std::vector< SCell > &aSCellContour, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const SurfelPredicate &sp, const SCell &start_surfel) |
template<typename SurfelPredicate > | |
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) |
template<typename PointPredicate > | |
static void | track2DBoundaryPoints (std::vector< Point > &aVectorOfPoints, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const PointPredicate &pp, const SCell &start_surfel) |
template<typename PointPredicate > | |
static void | extractAllPointContours4C (std::vector< std::vector< Point > > &aVectPointContour2D, const KSpace &aKSpace, const PointPredicate &pp, const SurfelAdjacency< 2 > &aSAdj) |
template<typename PointPredicate > | |
static void | extractAll2DSCellContours (std::vector< std::vector< SCell > > &aVectSCellContour2D, const KSpace &aKSpace, const SurfelAdjacency< KSpace::dimension > &aSurfelAdj, const PointPredicate &pp) |
template<typename PointPredicate > | |
static void | extractAllConnectedSCell (std::vector< std::vector< SCell > > &aVectConnectedSCell, const KSpace &aKSpace, const SurfelAdjacency< KSpace::dimension > &aSurfelAdj, const PointPredicate &pp, bool forceOrientCellExterior=false) |
template<typename PointPredicate > | |
static void | orientSCellExterior (std::vector< SCell > &aVectOfSCell, const KSpace &aKSpace, const PointPredicate &pp) |
template<typename CellSet , typename PointPredicate > | |
static void | uMakeBoundary (CellSet &aBoundary, const KSpace &aKSpace, const PointPredicate &pp, const Point &aLowerBound, const Point &aUpperBound) |
template<typename SCellSet , typename PointPredicate > | |
static void | sMakeBoundary (SCellSet &aBoundary, const KSpace &aKSpace, const PointPredicate &pp, const Point &aLowerBound, const Point &aUpperBound) |
template<typename OutputIterator , typename PointPredicate > | |
static void | uWriteBoundary (OutputIterator &out_it, const KSpace &aKSpace, const PointPredicate &pp, const Point &aLowerBound, const Point &aUpperBound) |
template<typename OutputIterator , typename PointPredicate > | |
static void | sWriteBoundary (OutputIterator &out_it, const KSpace &aKSpace, const PointPredicate &pp, const Point &aLowerBound, const Point &aUpperBound) |
template<typename TSurfelPredicate , typename TImageContainer > | |
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) |
template<typename SurfelPredicate , typename TImageContainer > | |
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 CellRange | getPrimalVertices (const KSpace &K, const SCell &s) |
static CellRange | getPrimalVertices (const KSpace &K, const Surfel &s, bool ccw) |
Protected Member Functions | |
Surfaces () | |
Private Member Functions | |
Surfaces (const Surfaces &other) | |
Surfaces & | operator= (const Surfaces &other) |
Aim: A utility class for constructing surfaces (i.e. set of (n-1)-cells).
Description of template class 'Surfaces'
TKSpace | the type of cellular grid space (e.g. a KhalimskySpaceND). |
Note that many methods requires a surfel adjacency so as to know how connected surfels are linked (first by the interior or first by the exterior). Secondly, many methods are parameterized by a PointPredicate which describes the shape as a characteristic function. This is to be more generic than a simple DigitalSet. With this approach, shapes can be defined implicitly.
Essentially a backport from ImaGene.
Definition at line 78 of file Surfaces.h.
typedef KSpace::Cell DGtal::Surfaces< TKSpace >::Cell |
Definition at line 86 of file Surfaces.h.
typedef std::vector<Cell> DGtal::Surfaces< TKSpace >::CellRange |
Definition at line 90 of file Surfaces.h.
typedef KSpace::DirIterator DGtal::Surfaces< TKSpace >::DirIterator |
Definition at line 89 of file Surfaces.h.
typedef KSpace::Integer DGtal::Surfaces< TKSpace >::Integer |
Definition at line 83 of file Surfaces.h.
typedef TKSpace DGtal::Surfaces< TKSpace >::KSpace |
Definition at line 82 of file Surfaces.h.
typedef KSpace::Point DGtal::Surfaces< TKSpace >::Point |
Definition at line 84 of file Surfaces.h.
typedef KSpace::SCell DGtal::Surfaces< TKSpace >::SCell |
Definition at line 87 of file Surfaces.h.
typedef KSpace::Surfel DGtal::Surfaces< TKSpace >::Surfel |
Definition at line 88 of file Surfaces.h.
typedef KSpace::Vector DGtal::Surfaces< TKSpace >::Vector |
Definition at line 85 of file Surfaces.h.
DGtal::Surfaces< TKSpace >::~Surfaces | ( | ) |
Destructor.
|
protected |
Constructor. Forbidden by default (protected to avoid g++ warnings).
|
private |
Copy constructor.
other | the object to clone. Forbidden by default. |
|
static |
Extract all contours as a vector containing the set of contours composed of SCell. Each contour is represented by a vector of signed surfels whose elements represents a boundary component of a digital shape defined by the predicate [pp]. The algorithms tracks surfels along the boundary of the shape.
PointPredicate | a model of concepts::CPointPredicate describing the inside of a digital shape, meaning a functor taking a Point and returning 'true' whenever the point belongs to the shape. |
aVectSCellContour2D | (modified) a vector of contour represented by a vector of cells (which are all surfels), containing the ordered list of the boundary component of [spelset]. |
aKSpace | any space. |
aSurfelAdj | the surfel adjacency chosen for the tracking. |
pp | an instance of a model of concepts::CPointPredicate, for instance a SetPredicate for a digital set representing a shape. |
Referenced by main().
|
static |
Extract all surfel elements associated to each connected components of the given DigitalSet. The connected surfel set are given as result in a vector containing all components. The orientation of the resulting SCell indicates the exterior orientation according the positive axis.
PointPredicate | a model of concepts::CPointPredicate describing the inside of a digital shape, meaning a functor taking a Point and returning 'true' whenever the point belongs to the shape. |
aVectConnectedSCell | (modified) a vector containing for each connected components a vector of the sequence of connected SCells. |
aKSpace | any space. |
aSurfelAdj | the surfel adjacency chosen for the tracking. |
pp | an instance of a model of concepts::CPointPredicate, for instance a SetPredicate for a digital set representing a shape. |
forceOrientCellExterior | if 'true', used to change the default cell orientation in order to get the direction of shape exterior (default =false). This is used only for displaying cells with Viewer3D. This mechanism should evolve shortly. |
Referenced by main(), and test3dSurfaceHelper().
|
static |
Function that extracts all the boundaries of a 2D shape (specified by a predicate on point) in a 2D KSpace. The boundaries are returned as a vector of vector of points.
Extract all 4-connected contours as a vector containing the sequence of contour Points. Each contour is represented by a vector of points defined by the sequence of pointels extracted from the boundary surfels. Calls extractAll2DSCellContours.
PointPredicate | a model of concepts::CPointPredicate describing the inside of a digital shape, meaning a functor taking a Point and returning 'true' whenever the point belongs to the shape. |
aVectPointContour2D | (modified) a vector of contour represented by a vector of cells (which are all surfels), containing the ordered list of the boundary component of [pp]. |
aKSpace | any space. |
pp | an instance of a model of concepts::CPointPredicate, for instance a SetPredicate for a digital set representing a shape. |
aSAdj | the surfel adjacency chosen for the tracking. |
Referenced by main().
|
static |
Find a bel in some digital set given two hints (one point inside, one point outside).
PointPredicate | a model of concepts::CPointPredicate describing the inside of a digital shape, meaning a functor taking a Point and returning 'true' whenever the point belongs to the shape. |
K | any cellular grid space. |
pp | an instance of a model of concepts::CPointPredicate, for instance a SetPredicate for a digital set representing a shape, which should be at least partially included in the bounds of space [K]. |
x1 | a point within the bounds of K and such that pp( x1 ) != pp( x2 ). |
x2 | a point within the bounds of K and such that pp( x1 ) != pp( x2 ). |
|
static |
Find a bel in some digital set by random tries then dichotomy.
PointPredicate | a model of concepts::CPointPredicate describing the inside of a digital shape, meaning a functor taking a Point and returning 'true' whenever the point belongs to the shape. |
K | any cellular grid space. |
pp | an instance of a model of concepts::CPointPredicate, for instance a SetPredicate for a digital set representing a shape, which should be at least partially included in the bounds of space [K]. |
nbtries | the maximum number of random tries (default 1000). |
Referenced by accuracyTest(), ballGenerator(), ballGenerator(), estimatorOnShapeDigitization(), getSlice(), laplace_sphere(), main(), main(), DGtal::Shortcuts< TKSpace >::makeLightDigitalSurface(), TEST_CASE(), TEST_CASE(), testBallQuad(), testCombinatorialSurface(), testCompareEstimator(), testCube(), testCurvature2d(), testDigitalSurfaceBoostGraphInterface(), testDigitization(), testEstimatorCache(), testFindABel(), testFindABel(), testFitting(), testGaussianCurvature3d(), testImplicitDigitalSurface(), testLightImplicitDigitalSurface(), testLocalConvolutionNormalVectorEstimator(), testLocalConvolutionNormalVectorEstimator(), testLocalEstimatorFromFunctorAdapter(), testMeanCurvature3d(), testPrincipalCurvatures3d(), testRaySurface(), testTrueLocalEstimatorOnShapeDigitization(), and testUmbrellaComputer().
|
static |
Given a space K and an oriented cell s, returns its vertices.
K | any cellular grid space. |
s | any signed cell. |
|
static |
Given a space K and a surfel s, returns its vertices in ccw or cw order.
K | any cellular grid space of dimension 3. |
s | any surfel, a signed cell of dimension 2. |
ccw | when 'true', the order corresponds to a ccw orientation seen from the exterior normal to the surfel, otherwise it is a cw order. |
bool DGtal::Surfaces< TKSpace >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
|
private |
Assignment.
other | the object to copy. |
|
static |
Orient the SCell positively in the direction of the exterior of the DigitalSet shape. It simply check if the direct incident Cell in the first upper dimension (obtain with KhalimskySpaceND::sDirectIncident) belongs to the DigitalSet or not.
This method is used to change the default cell orientation in order to get the direction of shape exterior (default =false). This is used only for displaying cells with Viewer3D. This mechanism should evolve shortly.
PointPredicate | a model of concepts::CPointPredicate describing the inside of a digital shape, meaning a functor taking a Point and returning 'true' whenever the point belongs to the shape. |
aVectOfSCell | (modified) a vector containing the SCell to be oriented positively in the direction of the exterior. |
aKSpace | any space. |
pp | an instance of a model of concepts::CPointPredicate, for instance a SetPredicate for a digital set representing a shape. |
void DGtal::Surfaces< TKSpace >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
|
static |
Creates a set of signed surfels whose elements represents all the boundary components of a digital shape described by the predicate [pp].
SCellSet | a model of a set of SCell (e.g., std::set<SCell>). |
PointPredicate | a model of concepts::CPointPredicate describing the inside of a digital shape, meaning a functor taking a Point and returning 'true' whenever the point belongs to the shape. |
aBoundary | (modified) a set of cells (which are all surfels), the boundary component of [aSpelSet]. |
aKSpace | any space. |
pp | an instance of a model of concepts::CPointPredicate, for instance a SetPredicate for a digital set representing a shape. |
aLowerBound | and |
aUpperBound | points giving the bounds of the extracted boundary. |
Referenced by laplacian(), main(), main(), DGtal::Shortcuts< TKSpace >::makeDigitalSurface(), DGtal::Shortcuts< TKSpace >::makeIdxDigitalSurface(), and DGtal::Shortcuts< TKSpace >::makeLightDigitalSurfaces().
|
static |
Writes on the output iterator out_it the signed surfels whose elements represents all the boundary elements of a digital shape described by the predicate [pp].
OutputIterator | any output iterator (like std::back_insert_iterator< std::vector<SCell> >). |
PointPredicate | a model of concepts::CPointPredicate describing the inside of a digital shape, meaning a functor taking a Point and returning 'true' whenever the point belongs to the shape. |
out_it | any output iterator for writing the signed cells. |
aKSpace | any space. |
pp | an instance of a model of concepts::CPointPredicate, for instance a SetPredicate for a digital set representing a shape. |
aLowerBound | and |
aUpperBound | points giving the bounds of the extracted boundary. |
|
static |
Function that extracts the boundary of a 2D shape (specified by a predicate on point) in a 2D KSpace. The boundary is returned as a vector of surfels. The surfels are guaranteed to be in the direct orientation ordering.
Creates a vector of signed surfels whose elements represents a 2D boundary component of a digital shape described by a PointPredicate. The algorithm tracks surfels along the boundary of the shape by starting from the given [start_surfel]. It only tracks the boundary of a 2D shape.
PointPredicate | a model of concepts::CPointPredicate describing the inside of a digital shape, meaning a functor taking a Point and returning 'true' whenever the point belongs to the shape. |
aSCellContour2D | (modified) a vector of cells (which are all surfels), containing the ordered list of the boundary component of [spelset] which touches [start_surfel]. |
K | any space of dimension 2. |
surfel_adj | the surfel adjacency chosen for the tracking. |
pp | an instance of a model of concepts::CPointPredicate, for instance a SetPredicate for a digital set representing a shape, which should be at least partially included in the bounds of space [K]. |
start_surfel | a signed surfel which should be between an element of [shape] and an element not in [shape]. |
Referenced by accuracyTest(), main(), and main().
|
static |
Function that extracts the boundary of a 2D shape (specified by a predicate on point) in a 2D KSpace. The boundary is returned as a vector of points.
This method uses random tries to find a first linel separating an interior pixel from an exterior one. It then follows direct orientations to extract the 4-connected set of points.
aVectorOfPoints | (returns) the sequence of points of the boundary component of the digitized shape containing [start_surfel]. |
K | any space of dimension 2. |
surfel_adj | the surfel adjacency chosen for the tracking. |
pp | an instance of a model of concepts::CPointPredicate, for instance a SetPredicate for a digital set representing a shape, which should be at least partially included in the bounds of space [K]. |
start_surfel | a signed surfel which should be between an element of [shape] and an element not in [shape]. |
Referenced by ballGenerator(), ballGenerator(), estimatorOnShapeDigitization(), testCompareEstimator(), testDigitization(), and testTrueLocalEstimatorOnShapeDigitization().
|
static |
Function that extracts a 2D slice of the boundary of a nD shape (specified by a predicate on point) in a nD KSpace. The boundary is returned as a vector of surfels. The surfels are guaranteed to be in the direct orientation ordering.
Creates a vector of signed surfels whose elements represents a 2D boundary component of a digital shape described by a PointPredicate. The algorithms tracks surfels along the boundary of the shape by starting from the given [start_surfel], along the direction specified by [trackDir]. More precisely, it is the boundary of the slice of the shape along directions [trackDir] and the orthogonal direction of [start_surfel].
PointPredicate | a model of concepts::CPointPredicate describing the inside of a digital shape, meaning a functor taking a Point and returning 'true' whenever the point belongs to the shape. |
aSCellContour2D | (modified) a vector of cells (which are all surfels), containing the ordered list of the boundary component of [spelset] which touches [start_surfel]. |
K | any space (dimension is arbitrary). |
trackDir | the initial track direction at [start_surfel], should be different from the orthogonal direction of [start_surfel]. |
surfel_adj | the surfel adjacency chosen for the tracking. |
pp | an instance of a model of concepts::CPointPredicate, for instance a SetPredicate for a digital set representing a shape, which should be at least partially included in the bounds of space [K]. |
start_surfel | a signed surfel which should be between an element of [shape] and an element not in [shape]. |
Referenced by main().
|
static |
Function that extracts a 2D slice of a n-1 digital surface (specified by a predicate on surfel) in a nD KSpace. The boundary is returned as a vector of surfels. The surfels (of dimension n-1) are guaranteed to be in the direct orientation ordering.
Creates a vector of signed surfels whose elements represents a component of a slice of digital surface described by a SurfelPredicate. The algorithm tracks surfels along the surface by starting from the given start_surfel and by moving along the directions trackDir and the orthogonal direction to start_surfel. All surfels are returned so as to follow the direct orientation. If the surface is open, the first surfel is at one extremity (the indirect extremity) while the last surfel is at the other extremity. Otherwise, the first surfel is start_surfel.
SurfelPredicate | a model of CSurfelPredicate, meaning a functor taking a Surfel (SCell) and returning 'true' whenever the surfel belongs to the digital surface. Models include FrontierPredicate and BoundaryPredicate. |
aSCellContour | (modified) a vector of cells (which are all surfels), containing the ordered list of surfels that forms the connected component of the digital surface slice containing surfel start_surfel and the direction trackDir. |
K | any space (dimension is arbitrary). |
trackDir | the initial track direction at [start_surfel], should be different from the orthogonal direction of [start_surfel]. |
surfel_adj | the surfel adjacency chosen for the tracking. |
sp | an instance of a model of CSurfelPredicate, for instance a FrontierPredicate or a BoundaryPredicate. |
start_surfel | a signed surfel such that sp(start_surfel) is true. |
|
static |
Function that extracts a 1d-contour (specified by a predicate on surfel) in a 2D KSpace. The boundary is returned as a vector of surfels. The surfels are guaranteed to be in the direct orientation ordering.
Creates a vector of signed surfels whose elements represents a component of a digital surface described by a SurfelPredicate. The algorithm tracks surfels along the surface by starting from the given start_surfel. All surfels are returned so as to follow the direct orientation. If the surface is open, the first surfel is at one extremity (the indirect extremity) while the last surfel is at the other extremity. Otherwise, the first surfel is start_surfel.
SurfelPredicate | a model of CSurfelPredicate, meaning a functor taking a Surfel (SCell) and returning 'true' whenever the surfel belongs to the digital surface. Models include FrontierPredicate and BoundaryPredicate. |
aSCellContour | (modified) a vector of cells (which are all surfels), containing the ordered list of surfels that forms the connected component containing surfel [start_surfel]. |
K | any space of dimension 2. |
surfel_adj | the surfel adjacency chosen for the tracking. |
sp | an instance of a model of CSurfelPredicate, for instance a FrontierPredicate or a BoundaryPredicate. |
start_surfel | a signed surfel such that sp(start_surfel) is true. |
|
static |
Function that extracts the boundary of a nD digital shape (specified by a predicate on point), closed or open, in a nD KSpace. The boundary is returned as a set of surfels.
Creates a set of signed surfels whose elements represents a boundary component of a digital shape described by a PointPredicate. The algorithms tracks surfels along the boundary of the shape.
SCellSet | a model of a set of SCell (e.g., std::set<SCell>). |
PointPredicate | a model of concepts::CPointPredicate describing the inside of a digital shape, meaning a functor taking a Point and returning 'true' whenever the point belongs to the shape. |
surface | (modified) a set of cells (which are all surfels), the boundary component of [spelset] which touches [start_surfel]. |
K | any space. |
surfel_adj | the surfel adjacency chosen for the tracking. |
pp | an instance of a model of concepts::CPointPredicate, for instance a SetPredicate for a digital set representing a shape, which should be at least partially included in the bounds of space [K]. |
start_surfel | a signed surfel which should be between an element of [shape] and an element not in [shape]. |
Referenced by main(), testDigitalSurfaceBoostGraphInterface(), and testSurfelAdjacency().
|
static |
Function that extracts the closed boundary of a nD digital shape (specified by a predicate on point), in a nD KSpace. The boundary is returned as a set of surfels.
Creates a set of signed surfels whose elements represents a boundary component of a digital shape described by a PointPredicate. The algorithms tracks surfels along the boundary of the shape. It follows only direct orientations, so that it is faster than trackBoundary but requires the object to be fully inside the space. Follows the idea of Artzy, Frieder and Herman algorithm [Artzy:1981-cgip], but in nD.
SCellSet | a model of a set of SCell (e.g., std::set<SCell>). |
PointPredicate | a model of concepts::CPointPredicate describing the inside of a digital shape, meaning a functor taking a Point and returning 'true' whenever the point belongs to the shape. |
surface | (modified) a set of cells (which are all surfels), the boundary component of [spelset] which touches [start_surfel]. |
K | any space. |
surfel_adj | the surfel adjacency chosen for the tracking. |
pp | an instance of a model of concepts::CPointPredicate, for instance a SetPredicate for a digital set representing a shape, which should be at least partially included in the bounds of space [K]. |
start_surfel | a signed surfel which should be between an element of [shape] and an element not in [shape]. |
Referenced by testSurfelAdjacency().
|
static |
Function that extracts a closed n-1 digital surface (specified by a predicate on surfel) in a nD KSpace. The surface is returned as a set of surfels.
Creates a set of signed surfels whose elements represents a boundary component of a digital surface described by a SurfelPredicate. The algorithms tracks surfels along the surface. This is an optimized version of trackSurface, which is valid only when the tracked surface is closed.
SCellSet | a model of a set of SCell (e.g., std::set<SCell>). |
SurfelPredicate | a model of CSurfelPredicate describing whether a surfel belongs or not to the surface. |
surface | (modified) a set of cells (which are all surfels), the boundary component of [spelset] which touches [start_surfel]. |
K | any space. |
surfel_adj | the surfel adjacency chosen for the tracking. |
pp | an instance of a model of CSurfelPredicate. |
start_surfel | a signed surfel which should be part of the surface, ie. 'sp(start_surfel)==true'. |
|
static |
Function that extracts a n-1 digital surface (specified by a predicate on surfel), closed or open, in a nD KSpace. The surface is returned as a set of surfels.
Creates a set of signed surfels whose elements represents a boundary component of a digital surface described by a SurfelPredicate. The algorithms tracks surfels along the surface.
SCellSet | a model of a set of SCell (e.g., std::set<SCell>). |
SurfelPredicate | a model of CSurfelPredicate describing whether a surfel belongs or not to the surface. |
surface | (modified) a set of cells (which are all surfels), the boundary component of [spelset] which touches [start_surfel]. |
K | any space. |
surfel_adj | the surfel adjacency chosen for the tracking. |
pp | an instance of a model of CSurfelPredicate. |
start_surfel | a signed surfel which should be part of the surface, ie. 'sp(start_surfel)==true'. |
|
static |
Given a boundary surface [aSurfPred] in [aKSpace] (given as SurfelPredicate), fills its exterior in a given image [anImage] by a specific value [aValue] (considered as increment if [incrementMode] is set to true). The technique is to fill line by line and tests the intersection with the surface. Note that the set of the surfel of the boundary has to be a closed surface.
aKSpace | the digital space. |
aSurfPred | the digital Jordan surface. |
anImage | the image to be filled. |
aValue | the value to fill the image. |
empty_is_outside | when 'true', an empty line is considered exterior, otherwise interior. |
incrementMode | if set to 'true' the image value is incremented by [aValue] instead to be set to [aValue] (default). |
Referenced by test3dSurfaceHelper(), and testComputeInterior().
|
static |
Given a boundary surface [aSurfPred] in [aKSpace] (given as SurfelPredicate), fills its interior in a given image [anImage] by a specific value [aValue] (considered as increment if [incrementMode] is set to true). The technique is to fill line by line and tests the intersection with the surface. Note that the set of the surfel of the boundary has to be a closed surface.
aKSpace | the digital space. |
aSurfPred | the digital Jordan surface. |
anImage | the image to be filled. |
aValue | the value to fill the image. |
empty_is_inside | when 'true', an empty line is considered interior, otherwise exterior (set by default to false). |
incrementMode | if set to 'true' the image value is incremented by [aValue] instead to be set to [aValue] (default). |
Referenced by test3dSurfaceHelper(), and testComputeInterior().
|
static |
Creates a set of unsigned surfels whose elements represents all the boundary components of a digital shape described by the predicate [pp].
CellSet | a model of a set of Cell (e.g., std::set<Cell>). |
PointPredicate | a model of concepts::CPointPredicate describing the inside of a digital shape, meaning a functor taking a Point and returning 'true' whenever the point belongs to the shape. |
aBoundary | (modified) a set of cells (which are all surfels), the boundary component of [aSpelSet]. |
aKSpace | any space. |
pp | an instance of a model of concepts::CPointPredicate, for instance a SetPredicate for a digital set representing a shape. |
aLowerBound | and |
aUpperBound | points giving the bounds of the extracted boundary. |
Referenced by main().
|
static |
Writes on the output iterator out_it the unsigned surfels whose elements represents all the boundary elements of a digital shape described by the predicate [pp].
OutputIterator | any output iterator (like std::back_insert_iterator< std::vector<Cell> >). |
PointPredicate | a model of concepts::CPointPredicate describing the inside of a digital shape, meaning a functor taking a Point and returning 'true' whenever the point belongs to the shape. |
out_it | any output iterator for writing the cells. |
aKSpace | any space. |
pp | an instance of a model of concepts::CPointPredicate, for instance a SetPredicate for a digital set representing a shape. |
aLowerBound | and |
aUpperBound | points giving the bounds of the extracted boundary. |