30#if defined(VoxelComplex_RECURSES)
31#error Recursive header files inclusion detected in VoxelComplex.h
34#define VoxelComplex_RECURSES
36#if !defined 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>
51template <
typename TKSpace,
typename TCellContainer>
54template <
typename TKSpace,
typename TCellContainer>
55VoxelComplex<TKSpace, TCellContainer> &
56operator-=(VoxelComplex<TKSpace, TCellContainer> &,
57 const VoxelComplex<TKSpace, TCellContainer> &);
58template <
typename TKSpace,
typename TCellContainer>
59VoxelComplex<TKSpace, TCellContainer>
60operator-(
const VoxelComplex<TKSpace, TCellContainer> &,
61 const VoxelComplex<TKSpace, TCellContainer> &);
89template <
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;
567template <
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: Smart or simple pointer on T. It can be a smart pointer based on reference counts or a simple po...
Aim: This class represents an arbitrary cubical complex living in some Khalimsky space....
void construct(const TDigitalSet &set)
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
PointVector< dim, Integer > Point
NumberTraits< Integer >::UnsignedVersion Size
Type used to represent sizes in the digital space.
SpaceND< dim, Integer > Space
static const constexpr Dimension dimension
typename PreCellularGridSpace::DirIterator DirIterator
KhalimskyCell< dim, Integer > Cell
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
typename KSpace::Point Point
typename CellMap::const_iterator CellMapConstIterator
std::pair< bool, Clique > K_2(const Cell &face2, 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)
std::pair< bool, Clique > K_1(const Cell &face1, bool verbose=false) const
std::pair< bool, Clique > criticalCliquePair(const Dimension d, const CellMapConstIterator &cellMapIterator) const
void cellsClose(Dimension k_d, const Cells &cells)
typename KSpace::Space Space
typename KSpace::Integer Integer
void copySimplicityTable(const Self &other)
std::set< Cell > properNeighborhoodVoxels(const Cell &input_cell) const
void setSimplicityTable(const Alias< ConfigMap > input_table)
void voxelClose(const Cell &kcell)
CubicalComplex< TKSpace, TCellContainer > Parent
std::pair< bool, Clique > K_2(const typename KSpace::Point &A, const typename KSpace::Point &B, bool verbose=false) const
const ConfigMap & table() const
const bool & isTableLoaded() const
std::array< CliqueContainer, dimension+1 > criticalCliques(const Parent &cubical, bool verbose=false) const
VoxelComplex(const VoxelComplex &other)
bool myIsTableLoaded
Flag if using a LUT for simplicity.
Clique Kneighborhood(const Cell &input_cell) const
CliqueContainer criticalCliquesForD(const Dimension d, const Parent &cubical, bool verbose=false) const
const PointToMaskMap & pointToMask() const
std::pair< bool, Clique > K_3(const Cell &input_spel, bool verbose=false) const
std::set< Cell > neighborhoodVoxels(const Cell &input_cell) const
std::pair< bool, Clique > K_0(const Cell &face0, bool verbose=false) const
void insertVoxelPoint(const Point &dig_point, const bool &close_it=true, const Data &data=Data())
TCellContainer CellContainer
CountedPtrOrPtr< PointToMaskMap > myPointToMaskPtr
CountedPtrOrPtr< ConfigMap > myTablePtr
void construct(const TDigitalSet &input_set, const Alias< ConfigMap > input_table)
Self & operator=(const Self &other)
typename KSpace::DirIterator DirIterator
std::pair< bool, Clique > K_2(const Cell &A, const Cell &B, bool verbose=false) const
bool isSpel(const Cell &c) const
std::array< CliqueContainer, dimension+1 > criticalCliques(bool verbose=false) const
bool isSimple(const Cell &input_spel) const
static const Dimension dimension
The dimension of the embedding space.
void pointelsFromCell(std::set< Cell > &pointels_out, const Cell &input_cell) const
void spelsFromCell(std::set< Cell > &spels_out, const Cell &input_cell) 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
Container operator-(const Container &S1, const Container &S2)
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::uint32_t Dimension
CubicalComplex< TKSpace, TCellContainer > & operator-=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
KhalimskyPreCell< dim, Integer > PreCell