Aim: Implements thinning algorithms in cubical complexes. The implementation supports any model of cubical complex, for instance a DGtal::CubicalComplex< KhalimskySpaceND< 3, int > >. Three approaches are provided. The first—ParDirCollapse—bases on directional collapse of free pairs of faces. Second—CollapseSurface—is an extension of ParDirCollapse such that faces of dimension one lower than the dimension of the complex are kept. The last approach —CollapseIsthmus—is also an extension of ParDirCollapse such that faces of dimension one lower than the complex are preserved when they do not contain free faces of dimension two lower than the complex. Paper: Chaussard, J. and Couprie, M., Surface Thinning in 3D Cubical Complexes, Combinatorial Image Analysis, (2009)
More...
#include <DGtal/topology/ParDirCollapse.h>
template<typename CC>
class DGtal::ParDirCollapse< CC >
Aim: Implements thinning algorithms in cubical complexes. The implementation supports any model of cubical complex, for instance a DGtal::CubicalComplex< KhalimskySpaceND< 3, int > >. Three approaches are provided. The first—ParDirCollapse—bases on directional collapse of free pairs of faces. Second—CollapseSurface—is an extension of ParDirCollapse such that faces of dimension one lower than the dimension of the complex are kept. The last approach —CollapseIsthmus—is also an extension of ParDirCollapse such that faces of dimension one lower than the complex are preserved when they do not contain free faces of dimension two lower than the complex. Paper: Chaussard, J. and Couprie, M., Surface Thinning in 3D Cubical Complexes, Combinatorial Image Analysis, (2009)
Description of class 'ParDirCollapse'
- Template Parameters
-
Definition at line 77 of file ParDirCollapse.h.
◆ Cell
◆ CellMapConstIterator
Type of const iterator over a map of cells.
Definition at line 94 of file ParDirCollapse.h.
◆ Cells
◆ KSpace
◆ Point
◆ Size
◆ ParDirCollapse() [1/3]
Constructor.
- Parameters
-
k | – const reference to Khalimsky space |
◆ ParDirCollapse() [2/3]
Constructor. Forbidden by default (protected to avoid g++ warnings).
◆ ParDirCollapse() [3/3]
Copy constructor.
- Parameters
-
other | the object to clone. Forbidden by default. |
◆ attach()
This method should be use to point to a complex to which one wish to apply one of the thinning algorithms.
- Parameters
-
pComplex | – Cubical complex |
Referenced by main(), and TEST_CASE().
◆ BOOST_CONCEPT_ASSERT()
◆ BOOST_STATIC_ASSERT()
◆ collapseIsthmus()
Extension of basic algorithm—ParDirCollapse—which preserve KSpace::dimension - 1 faces which are not included in any KSpace::dimension cells. Moreover, cells to be kept have not to be collapsible.
Referenced by main(), and TEST_CASE().
◆ collapseSurface()
Extension of basic algorithm—ParDirCollapse—which preserve KSpace::dimension - 1 faces which are not included in any KSpace::dimension cells.
Referenced by main(), and TEST_CASE().
◆ completeFreepair()
Calculate an orientation of a freepair.
- Parameters
-
F | – cell of a dimension one lower than G. |
G | – cell of a dimension one higher than F. |
orient | – freepair orientation |
dir | – freepair direction |
- Returns
- – true if G was found as collapisble, false otherwise.
◆ eval()
This method applies a given number of iterations to a complex provided by the attach() method.
- Parameters
-
iterations | – number of iterations |
- Returns
- total number of removed cells.
Referenced by main(), and TEST_CASE().
◆ getDirection()
Calculate an orientation of a freepair.
- Parameters
-
F | – cell of a dimension one lower than G. |
G | – cell of a dimension one higher than F. |
◆ getOrientation()
Calculate an orientation of a freepair.
- Parameters
-
F | – cell of a dimension one lower than G. |
G | – cell of a dimension one higher than F. |
◆ isIsthmus()
Check if a given face of dimension: KSpace::dimension - 1, does not constitute a freepair. Note that, a given face has to not be included in any face of dimension: KSpace::dimension.
- Parameters
-
F | – cell of dimension one lower than KSpace. |
- Returns
- true if F does not constitute a freepair and false otherwise.
◆ isNotIncludedInUpperDim()
Check if a given face of dimension n is included in a face of dimmension n + 1.
- Parameters
-
F | – cell of dimension smaller than KSpace::dimension. |
- Returns
- true if a face is not included in any other and false otherwise.
◆ isValid()
Checks the validity/consistency of the object.
- Returns
- 'true' if the object is valid, 'false' otherwise.
◆ operator=()
Assignment.
- Parameters
-
- Returns
- a reference on 'this'. Forbidden by default.
◆ complex
Reference to Khalimsky space in which a given complex is embedded.
Definition at line 213 of file ParDirCollapse.h.
◆ verbose
The documentation for this class was generated from the following file: