31 #if defined(CubicalComplexFunctions_RECURSES)
32 #error Recursive header files inclusion detected in CubicalComplexFunctions.h
35 #define CubicalComplexFunctions_RECURSES
37 #if !defined CubicalComplexFunctions_h
39 #define CubicalComplexFunctions_h
44 #include "DGtal/base/Common.h"
45 #include "DGtal/topology/CubicalComplex.h"
46 #include <DGtal/topology/helpers/NeighborhoodConfigurationsHelper.h>
59 template <
typename TKSpace,
typename TCellContainer>
60 inline CubicalComplex< TKSpace, TCellContainer >
76 template <
typename TKSpace,
typename TCellContainer>
77 inline CubicalComplex< TKSpace, TCellContainer >
95 template <
typename TKSpace,
typename TCellContainer>
96 inline CubicalComplex< TKSpace, TCellContainer >&
101 for (
Dimension i = 0; i <= CC::dimension; ++i )
116 template <
typename TKSpace,
typename TCellContainer>
117 inline CubicalComplex< TKSpace, TCellContainer >
123 for (
Dimension i = 0; i <= CC::dimension; ++i )
137 template <
typename TKSpace,
typename TCellContainer>
138 inline CubicalComplex< TKSpace, TCellContainer >
144 for (
Dimension i = 0; i <= CC::dimension; ++i )
158 template <
typename TKSpace,
typename TCellContainer>
159 inline CubicalComplex< TKSpace, TCellContainer >&
164 for (
Dimension i = 0; i <= CC::dimension; ++i )
165 functions::setops::operator|=( S1.
myCells[ i ], S2.
myCells[ i ] );
178 template <
typename TKSpace,
typename TCellContainer>
179 inline CubicalComplex< TKSpace, TCellContainer >
185 for (
Dimension i = 0; i <= CC::dimension; ++i )
199 template <
typename TKSpace,
typename TCellContainer>
200 inline CubicalComplex< TKSpace, TCellContainer >&
205 for (
Dimension i = 0; i <= CC::dimension; ++i )
206 functions::setops::operator&=( S1.
myCells[ i ], S2.
myCells[ i ] );
220 template <
typename TKSpace,
typename TCellContainer>
221 inline CubicalComplex< TKSpace, TCellContainer >
227 for (
Dimension i = 0; i <= CC::dimension; ++i )
243 template <
typename TKSpace,
typename TCellContainer>
244 inline CubicalComplex< TKSpace, TCellContainer >&
249 for (
Dimension i = 0; i <= CC::dimension; ++i )
250 functions::setops::operator^=( S1.
myCells[ i ], S2.
myCells[ i ] );
264 template <
typename TKSpace,
typename TCellContainer>
271 for (
Dimension i = 0; i <= CC::dimension; ++i )
291 template <
typename TKSpace,
typename TCellContainer>
298 for (
Dimension i = 0; i <= CC::dimension; ++i )
315 template <
typename TKSpace,
typename TCellContainer>
322 for (
Dimension i = 0; i <= CC::dimension; ++i )
338 template <
typename TKSpace,
typename TCellContainer>
345 for (
Dimension i = 0; i <= CC::dimension; ++i )
351 namespace functions {
392 template <
typename TKSpace,
typename TCellContainer,
393 typename CellConstIterator,
394 typename CellMapIteratorPriority >
396 CellConstIterator S_itB, CellConstIterator S_itE,
397 const CellMapIteratorPriority& priority,
398 bool hintIsSClosed =
false,
bool hintIsKClosed =
false,
399 bool verbose =
false );
431 template <
typename TKSpace,
typename TCellContainer,
432 typename BdryCellOutputIterator,
433 typename InnerCellOutputIterator>
438 BdryCellOutputIterator itBdry,
439 InnerCellOutputIterator itInner );
457 template <
typename TObject,
typename TKSpace,
typename TCellContainer>
458 std::unique_ptr<TObject>
482 template<
typename TComplex>
485 const TComplex & input_complex,
487 const std::unordered_map<
496 #include "DGtal/topology/CubicalComplexFunctions.ih"
503 #undef CubicalComplexFunctions_RECURSES
Aim: This class represents an arbitrary cubical complex living in some Khalimsky space....
const KSpace & space() const
std::vector< CellMap > myCells
NeighborhoodConfiguration getSpelNeighborhoodConfigurationOccupancy(const TComplex &input_complex, const typename TComplex::Point ¢er, const std::unordered_map< typename TComplex::Point, NeighborhoodConfiguration > &mapPointToMask)
uint64_t collapse(CubicalComplex< TKSpace, TCellContainer > &K, CellConstIterator S_itB, CellConstIterator S_itE, const CellMapIteratorPriority &priority, bool hintIsSClosed=false, bool hintIsKClosed=false, bool verbose=false)
void filterCellsWithinBounds(const CubicalComplex< TKSpace, TCellContainer > &K, const typename TKSpace::Point &kLow, const typename TKSpace::Point &kUp, BdryCellOutputIterator itBdry, InnerCellOutputIterator itInner)
bool isEqual(const Container &S1, const Container &S2)
std::unique_ptr< TObject > objectFromSpels(const CubicalComplex< TKSpace, TCellContainer > &C)
bool isSubset(const Container &S1, const Container &S2)
DGtal is the top-level namespace which contains all DGtal functions and types.
bool operator>=(PointVector< ptDim, LeftEuclideanRing, LeftContainer > const &lhs, PointVector< ptDim, RightEuclideanRing, RightContainer > const &rhs)
Comparison operator on Points/Vectors (GreaterOrEqualThan).
CubicalComplex< TKSpace, TCellContainer > & operator^=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
bool operator==(PointVector< ptDim, LeftEuclideanRing, LeftContainer > const &lhs, PointVector< ptDim, RightEuclideanRing, RightContainer > const &rhs)
Equality operator between two Points/Vectors.
uint32_t NeighborhoodConfiguration
CubicalComplex< TKSpace, TCellContainer > & operator&=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
bool operator!=(PointVector< ptDim, LeftEuclideanRing, LeftContainer > const &lhs, PointVector< ptDim, RightEuclideanRing, RightContainer > const &rhs)
Difference operator on Points/Vectors.
CubicalComplex< TKSpace, TCellContainer > operator~(const CubicalComplex< TKSpace, TCellContainer > &)
bool operator<=(PointVector< ptDim, LeftEuclideanRing, LeftContainer > const &lhs, PointVector< ptDim, RightEuclideanRing, RightContainer > const &rhs)
Comparison operator on Points/Vectors (LesserOrEqualThan).
DGtal::uint32_t Dimension
CubicalComplex< TKSpace, TCellContainer > operator^(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
KForm< Calculus, order, duality > operator*(const typename Calculus::Scalar &scalar, const KForm< Calculus, order, duality > &form)
boost::uint64_t uint64_t
unsigned 64-bit integer.
CubicalComplex< TKSpace, TCellContainer > & operator|=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
KForm< Calculus, order, duality > operator-(const KForm< Calculus, order, duality > &form_a, const KForm< Calculus, order, duality > &form_b)
CubicalComplex< TKSpace, TCellContainer > operator&(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
CubicalComplex< TKSpace, TCellContainer > operator|(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
CubicalComplex< TKSpace, TCellContainer > & operator-=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
CubicalComplex< KSpace, Map > CC