DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
ParDirCollapse.h
1
16
17
#pragma once
18
35
36
#if defined(ParDirCollapse_RECURSES)
37
#error Recursive header files inclusion detected in ParDirCollapse.h
38
#else
// defined(ParDirCollapse_RECURSES)
40
#define ParDirCollapse_RECURSES
41
42
#if !defined ParDirCollapse_h
44
#define ParDirCollapse_h
45
47
// Inclusions
48
#include "DGtal/helpers/StdDefs.h"
49
#include "DGtal/base/Common.h"
50
#include "DGtal/kernel/PointVector.h"
51
// Cellular grid
52
#include "DGtal/topology/CubicalComplex.h"
53
#include "DGtal/topology/CubicalComplexFunctions.h"
55
56
namespace
DGtal
57
{
59
// class ParDirCollapse
76
template
<
typename
CC >
77
class
ParDirCollapse
78
{
79
BOOST_STATIC_ASSERT
((
CC::KSpace::dimension
>= 2 ));
80
BOOST_CONCEPT_ASSERT
((
boost::Container< CC >
));
81
// ----------------------- Types ------------------------------
82
public
:
84
typedef
typename
CC::KSpace
KSpace
;
86
typedef
typename
CC::Point
Point
;
88
typedef
typename
CC::Size
Size
;
90
typedef
typename
KSpace::Cell
Cell
;
92
typedef
typename
KSpace::Cells
Cells
;
94
typedef
typename
CC::CellMapConstIterator
CellMapConstIterator
;
95
96
// ----------------------- Standard services ------------------------------
101
bool
isValid
()
const
;
102
103
// ----------------------- Interface --------------------------------------
104
public
:
109
ParDirCollapse
(
const
KSpace
& k );
110
117
void
attach
(
Alias< CC >
pComplex );
118
125
unsigned
int
eval
(
unsigned
int
iterations );
126
132
void
collapseSurface
();
133
140
void
collapseIsthmus
();
141
142
// ------------------------- Internals ------------------------------------
143
private
:
149
int
getOrientation
(
const
Cell
& F,
const
Cell
& G )
const
;
150
156
int
getDirection
(
const
Cell
& F,
const
Cell
& G )
const
;
157
167
bool
completeFreepair
(
CellMapConstIterator
F,
Cell
& G,
int
orient,
int
dir );
168
174
bool
isNotIncludedInUpperDim
(
CellMapConstIterator
F );
175
182
bool
isIsthmus
(
CellMapConstIterator
F );
183
184
// ------------------------- Hidden services ------------------------------
185
protected
:
190
ParDirCollapse
();
191
192
private
:
198
ParDirCollapse
(
const
ParDirCollapse
& other );
199
206
ParDirCollapse
&
operator=
(
const
ParDirCollapse
& other );
207
208
209
// ------------------------- Private Data --------------------------------
210
private
:
211
213
const
KSpace
&
K
;
215
CC
*
complex
;
216
// ------------------------- Public Data --------------------------------
217
public
:
218
bool
verbose
=
true
;
219
220
};
// end of class ParDirCollapse
221
222
}
// namespace DGtal
223
224
226
// Includes inline functions.
227
#if !defined(BUILD_INLINE)
228
#include "DGtal/topology/ParDirCollapse.ih"
229
#endif
230
231
232
// //
234
235
#endif
// !defined ParDirCollapse_h
236
237
#undef ParDirCollapse_RECURSES
238
#endif
// else defined(ParDirCollapse_RECURSES)
DGtal::Alias
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition
Alias.h:183
DGtal::CubicalComplex< KSpace, Map >::KSpace
KSpace KSpace
Definition
CubicalComplex.h:233
DGtal::CubicalComplex< KSpace, Map >::Size
KSpace::Size Size
Definition
CubicalComplex.h:248
DGtal::CubicalComplex< KSpace, Map >::Point
KSpace::Point Point
Definition
CubicalComplex.h:249
DGtal::CubicalComplex< KSpace, Map >::dimension
static const Dimension dimension
Definition
CubicalComplex.h:242
DGtal::CubicalComplex< KSpace, Map >::CellMapConstIterator
CellMap::const_iterator CellMapConstIterator
Definition
CubicalComplex.h:252
DGtal::KhalimskySpaceND< 3, Integer >::Cell
KhalimskyCell< dim, Integer > Cell
Definition
KhalimskySpaceND.h:415
DGtal::KhalimskySpaceND< 3, Integer >::Cells
AnyCellCollection< Cell > Cells
Definition
KhalimskySpaceND.h:439
DGtal::ParDirCollapse::collapseSurface
void collapseSurface()
DGtal::ParDirCollapse::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((CC::KSpace::dimension >=2))
DGtal::ParDirCollapse::ParDirCollapse
ParDirCollapse(const KSpace &k)
DGtal::ParDirCollapse::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((boost::Container< CC >))
DGtal::ParDirCollapse::KSpace
CC::KSpace KSpace
Any model of concepts::CCellularGridSpaceND, i.e. a type that models a Khalimsky space.
Definition
ParDirCollapse.h:84
DGtal::ParDirCollapse::ParDirCollapse
ParDirCollapse()
DGtal::ParDirCollapse::CellMapConstIterator
CC::CellMapConstIterator CellMapConstIterator
Type of const iterator over a map of cells.
Definition
ParDirCollapse.h:94
DGtal::ParDirCollapse::verbose
bool verbose
Definition
ParDirCollapse.h:218
DGtal::ParDirCollapse::complex
CC * complex
Pointer to complex.
Definition
ParDirCollapse.h:215
DGtal::ParDirCollapse::attach
void attach(Alias< CC > pComplex)
DGtal::ParDirCollapse::isNotIncludedInUpperDim
bool isNotIncludedInUpperDim(CellMapConstIterator F)
DGtal::ParDirCollapse::Cells
KSpace::Cells Cells
Type of collection of cells.
Definition
ParDirCollapse.h:92
DGtal::ParDirCollapse::collapseIsthmus
void collapseIsthmus()
DGtal::ParDirCollapse::eval
unsigned int eval(unsigned int iterations)
DGtal::ParDirCollapse::Size
CC::Size Size
Type of containers size.
Definition
ParDirCollapse.h:88
DGtal::ParDirCollapse::isIsthmus
bool isIsthmus(CellMapConstIterator F)
DGtal::ParDirCollapse::K
const KSpace & K
Reference to Khalimsky space in which a given complex is embedded.
Definition
ParDirCollapse.h:213
DGtal::ParDirCollapse::isValid
bool isValid() const
DGtal::ParDirCollapse::getOrientation
int getOrientation(const Cell &F, const Cell &G) const
DGtal::ParDirCollapse::operator=
ParDirCollapse & operator=(const ParDirCollapse &other)
DGtal::ParDirCollapse::Cell
KSpace::Cell Cell
Type of cells in Khalimsky space.
Definition
ParDirCollapse.h:90
DGtal::ParDirCollapse::completeFreepair
bool completeFreepair(CellMapConstIterator F, Cell &G, int orient, int dir)
DGtal::ParDirCollapse::ParDirCollapse
ParDirCollapse(const ParDirCollapse &other)
DGtal::ParDirCollapse::getDirection
int getDirection(const Cell &F, const Cell &G) const
DGtal::ParDirCollapse::Point
CC::Point Point
Type of integer point.
Definition
ParDirCollapse.h:86
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
boost::Container
Go to http://www.sgi.com/tech/stl/Container.html.
Definition
Boost.dox:104
CC
CubicalComplex< KSpace, Map > CC
Definition
testCubicalComplex.cpp:58
src
DGtal
topology
ParDirCollapse.h
Generated on
for DGtal by
1.18.0