30 #if defined(VoxelComplex_RECURSES)
31 #error Recursive header files inclusion detected in VoxelComplex.h
32 #else // defined(VoxelComplex_RECURSES)
34 #define VoxelComplex_RECURSES
36 #if !defined VoxelComplex_h
38 #define VoxelComplex_h
42 #include "boost/dynamic_bitset.hpp"
43 #include <DGtal/kernel/sets/DigitalSetBySTLSet.h>
44 #include <DGtal/topology/CubicalComplex.h>
45 #include <DGtal/topology/DigitalTopology.h>
46 #include <DGtal/topology/Object.h>
51 template <
typename TKSpace,
typename TCellContainer>
54 template <
typename TKSpace,
typename TCellContainer>
55 VoxelComplex<TKSpace, TCellContainer> &
56 operator-=(VoxelComplex<TKSpace, TCellContainer> &,
57 const VoxelComplex<TKSpace, TCellContainer> &);
58 template <
typename TKSpace,
typename TCellContainer>
59 VoxelComplex<TKSpace, TCellContainer>
60 operator-(
const VoxelComplex<TKSpace, TCellContainer> &,
61 const VoxelComplex<TKSpace, TCellContainer> &);
89 template <
typename TKSpace,
90 typename TCellContainer =
typename TKSpace::template CellMap< CubicalCellData >::Type >
106 using Data =
typename CellContainer::mapped_type;
173 template <
typename TDigitalSet >
190 template <
typename TDigitalSet >
259 const bool &close_it =
true) {
281 template<
typename TDigitalSet>
328 const Cell &input_cell)
const;
415 std::pair<bool, Clique>
428 std::array<CliqueContainer, dimension + 1>
431 std::array<CliqueContainer, dimension + 1> criticals;
436 for (
size_t d = 0; d !=
dimension + 1; ++d)
452 std::array<CliqueContainer, dimension + 1>
472 bool verbose =
false)
const;
486 bool verbose =
false)
const;
499 bool verbose =
false)
const;
510 std::pair<bool, Clique>
K_2(
const Cell &face2,
bool verbose =
false)
const;
520 std::pair<bool, Clique>
K_1(
const Cell &face1,
bool verbose =
false)
const;
530 std::pair<bool, Clique>
K_0(
const Cell &face0,
bool verbose =
false)
const;
543 std::pair<bool, Clique>
K_3(
const Cell &input_spel,
544 bool verbose =
false)
const;
612 template <
typename TKSpace,
typename TCellContainer>
621 #include "DGtal/topology/VoxelComplex.ih"
626 #endif // !defined VoxelComplex_h
628 #undef VoxelComplex_RECURSES
629 #endif // else defined(VoxelComplex_RECURSES)
const bool & isTableLoaded() const
std::set< Cell > properNeighborhoodVoxels(const Cell &input_cell) const
static constexpr const Dimension dimension
KForm< Calculus, order, duality > operator-(const KForm< Calculus, order, duality > &form_a, const KForm< Calculus, order, duality > &form_b)
std::vector< Clique > CliqueContainer
typename KSpace::Size Size
AnyCellCollection< Cell > Cells
std::set< Cell > neighborhoodVoxels(const Cell &input_cell) const
DGtal::uint32_t Dimension
typename Cell::PreCell PreCell
void beginBlock(const std::string &keyword="")
typename KSpace::DirIterator DirIterator
This class represents a voxel complex living in some Khalimsky space. Voxel complexes are derived fro...
CountedPtrOrPtr< PointToMaskMap > myPointToMaskPtr
CubicalComplex< TKSpace, TCellContainer > Parent
bool myIsTableLoaded
Flag if using a LUT for simplicity.
void dumpVoxels(TDigitalSet &in_out_set)
void insertVoxelPoint(const Point &dig_point, const bool &close_it=true, const Data &data=Data())
std::array< CliqueContainer, dimension+1 > criticalCliques(const Parent &cubical, bool verbose=false) const
KhalimskyPreCell< dim, Integer > PreCell
KhalimskyCell< dim, Integer > Cell
CubicalComplex< TKSpace, TCellContainer > & operator-=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
PointVector< dim, Integer > Point
typename KSpace::Space Space
void construct(const TDigitalSet &input_set, const Alias< ConfigMap > input_table)
void insertVoxelCell(const std::pair< Cell, Data > &data_pair, const bool &close_it=true)
const PointToMaskMap & pointToMask() const
NumberTraits< Integer >::UnsignedVersion Size
Type used to represent sizes in the digital space.
bool isSimpleByThinning(const Cell &input_spel) const
DGtal is the top-level namespace which contains all DGtal functions and types.
Size erase(const Cell &aCell)
typename TKSpace::template CellMap< CubicalCellData >::Type CellContainer
SpaceND< dim, Integer > Space
CliqueContainer criticalCliquesForD(const Dimension d, const Parent &cubical, bool verbose=false) const
static const Dimension dimension
The dimension of the embedding space.
void erase(typename Parent::Iterator position)
void voxelClose(const Cell &kcell)
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
std::pair< bool, Clique > K_3(const Cell &input_spel, bool verbose=false) const
void cellsClose(Dimension k_d, const Cells &cells)
Clique Kneighborhood(const Cell &input_cell) const
const ConfigMap & table() const
void erase(typename Parent::Iterator first, typename Parent::Iterator last)
CountedPtrOrPtr< ConfigMap > myTablePtr
typename KSpace::Cells Cells
std::array< CliqueContainer, dimension+1 > criticalCliques(bool verbose=false) const
typename PreCellularGridSpace::DirIterator DirIterator
std::pair< bool, Clique > K_0(const Cell &face0, bool verbose=false) const
std::pair< bool, Clique > K_2(const typename KSpace::Point &A, const typename KSpace::Point &B, bool verbose=false) const
bool isSpel(const Cell &c) const
VoxelComplex(const VoxelComplex &other)
std::pair< bool, Clique > K_2(const Cell &face2, bool verbose=false) const
Self & operator=(const Self &other)
void construct(const TDigitalSet &input_set)
std::pair< bool, Clique > K_1(const Cell &face1, bool verbose=false) const
typename KSpace::Integer Integer
typename CellContainer::mapped_type Data
void insertVoxelCell(const Cell &kcell, const bool &close_it=true, const Data &data=Data())
void spelsFromCell(std::set< Cell > &spels_out, const Cell &input_cell) const
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
std::pair< bool, Clique > criticalCliquePair(const Dimension d, const CellMapConstIterator &cellMapIterator) const
void selfDisplay(std::ostream &out) const
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
void setSimplicityTable(const Alias< ConfigMap > input_table)
boost::dynamic_bitset<> ConfigMap
void pointelsFromCell(std::set< Cell > &pointels_out, const Cell &input_cell) const
void copySimplicityTable(const Self &other)
typename KSpace::Point Point
bool isSimple(const Cell &input_spel) const
Aim: This class represents an arbitrary cubical complex living in some Khalimsky space....
Cell surfelBetweenAdjacentSpels(const Cell &A, const Cell &B) const
typename CellMap::const_iterator CellMapConstIterator
typename KSpace::Cell Cell
std::pair< bool, Clique > K_2(const Cell &A, const Cell &B, bool verbose=false) const
std::unordered_map< Point, unsigned int > PointToMaskMap
std::string className() const
typename CellMap::iterator CellMapIterator