30 #if defined(VoxelComplex_RECURSES)
31 #error Recursive header files inclusion detected in VoxelComplex.h
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;
181 template <
typename TDigitalSet >
251 const bool &close_it =
true) {
273 template<
typename TDigitalSet>
288 const Cell &input_cell)
const;
370 std::pair<bool, Clique>
383 std::array<CliqueContainer, dimension + 1>
386 std::array<CliqueContainer, dimension + 1> criticals;
407 std::array<CliqueContainer, dimension + 1>
427 bool verbose =
false)
const;
441 bool verbose =
false)
const;
454 bool verbose =
false)
const;
465 std::pair<bool, Clique>
K_2(
const Cell &face2,
bool verbose =
false)
const;
475 std::pair<bool, Clique>
K_1(
const Cell &face1,
bool verbose =
false)
const;
485 std::pair<bool, Clique>
K_0(
const Cell &face0,
bool verbose =
false)
const;
498 std::pair<bool, Clique>
K_3(
const Cell &input_spel,
499 bool verbose =
false)
const;
567 template <
typename TKSpace,
typename TCellContainer>
576 #include "DGtal/topology/VoxelComplex.ih"
583 #undef VoxelComplex_RECURSES
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Aim: This class represents an arbitrary cubical complex living in some Khalimsky space....
void construct(const TDigitalSet &set)
typename PreCellularGridSpace::DirIterator DirIterator
AnyCellCollection< Cell > Cells
void beginBlock(const std::string &keyword="")
This class represents a voxel complex living in some Khalimsky space. Voxel complexes are derived fro...
void dumpVoxels(TDigitalSet &in_out_set) const
std::pair< bool, Clique > K_2(const typename KSpace::Point &A, const typename KSpace::Point &B, bool verbose=false) const
typename KSpace::Point Point
typename CellMap::const_iterator CellMapConstIterator
std::pair< bool, Clique > K_3(const Cell &input_spel, bool verbose=false) const
typename CellContainer::mapped_type Data
std::unordered_map< Point, unsigned int > PointToMaskMap
void insertVoxelCell(const std::pair< Cell, Data > &data_pair, const bool &close_it=true)
void cellsClose(Dimension k_d, const Cells &cells)
typename KSpace::Space Space
typename KSpace::Integer Integer
const PointToMaskMap & pointToMask() const
Self & operator=(const Self &other)
void copySimplicityTable(const Self &other)
void setSimplicityTable(const Alias< ConfigMap > input_table)
void voxelClose(const Cell &kcell)
CubicalComplex< TKSpace, TCellContainer > Parent
std::set< Cell > neighborhoodVoxels(const Cell &input_cell) const
const ConfigMap & table() const
std::array< CliqueContainer, dimension+1 > criticalCliques(bool verbose=false) const
VoxelComplex(const VoxelComplex &other)
bool myIsTableLoaded
Flag if using a LUT for simplicity.
std::array< CliqueContainer, dimension+1 > criticalCliques(const Parent &cubical, bool verbose=false) const
Clique Kneighborhood(const Cell &input_cell) const
CliqueContainer criticalCliquesForD(const Dimension d, const Parent &cubical, bool verbose=false) const
void insertVoxelPoint(const Point &dig_point, const bool &close_it=true, const Data &data=Data())
std::pair< bool, Clique > K_2(const Cell &A, const Cell &B, bool verbose=false) const
TCellContainer CellContainer
std::pair< bool, Clique > criticalCliquePair(const Dimension d, const CellMapConstIterator &cellMapIterator) const
CountedPtrOrPtr< PointToMaskMap > myPointToMaskPtr
CountedPtrOrPtr< ConfigMap > myTablePtr
std::set< Cell > properNeighborhoodVoxels(const Cell &input_cell) const
void construct(const TDigitalSet &input_set, const Alias< ConfigMap > input_table)
typename KSpace::DirIterator DirIterator
bool isSpel(const Cell &c) const
bool isSimple(const Cell &input_spel) const
std::pair< bool, Clique > K_2(const Cell &face2, bool verbose=false) const
static const Dimension dimension
The dimension of the embedding space.
std::pair< bool, Clique > K_0(const Cell &face0, bool verbose=false) const
const bool & isTableLoaded() const
void pointelsFromCell(std::set< Cell > &pointels_out, const Cell &input_cell) const
void spelsFromCell(std::set< Cell > &spels_out, const Cell &input_cell) const
std::pair< bool, Clique > K_1(const Cell &face1, bool verbose=false) const
Cell surfelBetweenAdjacentSpels(const Cell &A, const Cell &B) const
boost::dynamic_bitset<> ConfigMap
void selfDisplay(std::ostream &out) const
bool isSimpleByThinning(const Cell &input_spel) const
void insertVoxelCell(const Cell &kcell, const bool &close_it=true, const Data &data=Data())
typename KSpace::Cell Cell
std::string className() const
typename CellMap::iterator CellMapIterator
typename Cell::PreCell PreCell
std::vector< Clique > CliqueContainer
typename KSpace::Cells Cells
typename KSpace::Size Size
Point::Coordinate Integer
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::uint32_t Dimension
KForm< Calculus, order, duality > operator-(const KForm< Calculus, order, duality > &form_a, const KForm< Calculus, order, duality > &form_b)
CubicalComplex< TKSpace, TCellContainer > & operator-=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
HalfEdgeDataStructure::Size Size