DGtal  1.5.beta
DGtal::VoxelComplex< TKSpace, TCellContainer > Class Template Reference

This class represents a voxel complex living in some Khalimsky space. Voxel complexes are derived from. More...

#include <DGtal/topology/VoxelComplex.h>

Inheritance diagram for DGtal::VoxelComplex< TKSpace, TCellContainer >:
[legend]

Public Types

using Self = VoxelComplex< TKSpace, TCellContainer >
 
using Parent = CubicalComplex< TKSpace, TCellContainer >
 
using KSpace = TKSpace
 
using CellContainer = TCellContainer
 
using Data = typename CellContainer::mapped_type
 
using Integer = typename KSpace::Integer
 
using Cell = typename KSpace::Cell
 
using PreCell = typename Cell::PreCell
 
using Cells = typename KSpace::Cells
 
using Space = typename KSpace::Space
 
using Size = typename KSpace::Size
 
using Point = typename KSpace::Point
 
using DirIterator = typename KSpace::DirIterator
 
using CellMap = CellContainer
 
using CellMapConstIterator = typename CellMap::const_iterator
 
using CellMapIterator = typename CellMap::iterator
 
using Clique = Parent
 
using CliqueContainer = std::vector< Clique >
 
using ConfigMap = boost::dynamic_bitset<>
 
using PointToMaskMap = std::unordered_map< Point, unsigned int >
 
- Public Types inherited from DGtal::CubicalComplex< TKSpace, typename TKSpace::template CellMap< CubicalCellData >::Type >
enum  CellType
 Possible cell types within a complex. More...
 
typedef CubicalComplex< TKSpace, typename TKSpace::template CellMap< CubicalCellData >::Type > Self
 
typedef TKSpace KSpace
 Type of the cellular grid space. More...
 
typedef typename TKSpace::template CellMap< CubicalCellData >::Type CellContainer
 Type for storing cells, an associative container Cell -> Data. More...
 
typedef CellContainer::mapped_type Data
 Type of data associated to each cell. More...
 
typedef KSpace::Integer Integer
 Type for integers in the space. More...
 
typedef KSpace::Cell Cell
 Type for a cell in the space. More...
 
typedef Cell::PreCell PreCell
 Type for a precell in the space. More...
 
typedef KSpace::Cells Cells
 Type for a sequence of cells in the space. More...
 
typedef KSpace::Space Space
 Type of the digital space. More...
 
typedef KSpace::Size Size
 Type for a number of elements. More...
 
typedef KSpace::Point Point
 Type for a point in the digital space. More...
 
typedef KSpace::DirIterator DirIterator
 Type for iterating over cell directions. More...
 
typedef CellContainer CellMap
 Type for storing cells, an associative container Cell -> Data. More...
 
typedef CellMap::const_iterator CellMapConstIterator
 Const iterator for visiting type CellMap. More...
 
typedef CellMap::iterator CellMapIterator
 Iterator for visiting type CellMap. More...
 
typedef ConstIterator const_iterator
 
typedef Iterator iterator
 
typedef Cell value_type
 
typedef Cell const & reference
 
typedef Cell const & const_reference
 
typedef CellContainer::size_type size_type
 
typedef CellContainer::difference_type difference_type
 
typedef Cell const * pointer
 
typedef Cell const * const_pointer
 

Public Member Functions

 VoxelComplex (const VoxelComplex &other)
 
Selfoperator= (const Self &other)
 
template<typename TDigitalSet >
void construct (const TDigitalSet &input_set, const Alias< ConfigMap > input_table)
 
void setSimplicityTable (const Alias< ConfigMap > input_table)
 
void copySimplicityTable (const Self &other)
 
const ConfigMaptable () const
 
const bool & isTableLoaded () const
 
void voxelClose (const Cell &kcell)
 
void cellsClose (Dimension k_d, const Cells &cells)
 
void insertVoxelCell (const Cell &kcell, const bool &close_it=true, const Data &data=Data())
 
void insertVoxelCell (const std::pair< Cell, Data > &data_pair, const bool &close_it=true)
 
void insertVoxelPoint (const Point &dig_point, const bool &close_it=true, const Data &data=Data())
 
template<typename TDigitalSet >
void dumpVoxels (TDigitalSet &in_out_set) 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::set< CellneighborhoodVoxels (const Cell &input_cell) const
 
std::set< CellproperNeighborhoodVoxels (const Cell &input_cell) const
 
Clique Kneighborhood (const Cell &input_cell) const
 
bool isSimpleByThinning (const Cell &input_spel) const
 
bool isSimple (const Cell &input_spel) const
 
std::pair< bool, CliquecriticalCliquePair (const Dimension d, const CellMapConstIterator &cellMapIterator) const
 
std::array< CliqueContainer, dimension+1 > criticalCliques (const Parent &cubical, bool verbose=false) const
 
std::array< CliqueContainer, dimension+1 > criticalCliques (bool verbose=false) const
 
CliqueContainer criticalCliquesForD (const Dimension d, const Parent &cubical, bool verbose=false) const
 
std::pair< bool, CliqueK_2 (const Cell &A, const Cell &B, bool verbose=false) const
 
std::pair< bool, CliqueK_2 (const typename KSpace::Point &A, const typename KSpace::Point &B, bool verbose=false) const
 
std::pair< bool, CliqueK_2 (const Cell &face2, bool verbose=false) const
 
std::pair< bool, CliqueK_1 (const Cell &face1, bool verbose=false) const
 
std::pair< bool, CliqueK_0 (const Cell &face0, bool verbose=false) const
 
std::pair< bool, CliqueK_3 (const Cell &input_spel, bool verbose=false) const
 
bool isSpel (const Cell &c) const
 
Cell surfelBetweenAdjacentSpels (const Cell &A, const Cell &B) const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 
std::string className () const
 
template<typename TDigitalSet >
void construct (const TDigitalSet &set)
 
- Public Member Functions inherited from DGtal::CubicalComplex< TKSpace, typename TKSpace::template CellMap< CubicalCellData >::Type >
 BOOST_CONCEPT_ASSERT ((concepts::CCellularGridSpaceND< TKSpace >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CSTLAssociativeContainer< typename TKSpace::template CellMap< CubicalCellData >::Type >))
 
 BOOST_STATIC_ASSERT (IsPairAssociativeContainer< typename TKSpace::template CellMap< CubicalCellData >::Type >::value)
 
 BOOST_STATIC_ASSERT ((boost::is_base_of< CubicalCellData, Data >::value))
 
 BOOST_STATIC_ASSERT ((boost::is_same< typename TKSpace::Cell, typename CellContainer::key_type >::value))
 
 BOOST_STATIC_CONSTANT (uint32_t, REMOVED=0x10000000)
 Flag Used to indicate in a cell data that this cell has been (virtually) removed. More...
 
 BOOST_STATIC_CONSTANT (uint32_t, COLLAPSIBLE=0x20000000)
 Flag Used to indicate in a cell data that this cell is collapsible. More...
 
 BOOST_STATIC_CONSTANT (uint32_t, FIXED=0x40000000)
 Flag Used to indicate in a cell data that this cell is fixed. More...
 
 BOOST_STATIC_CONSTANT (uint32_t, USER1=0x80000000)
 User flag for a cell. More...
 
 BOOST_STATIC_CONSTANT (uint32_t, VALUE=0x0fffffff)
 Value for a cell. More...
 
 ~CubicalComplex ()
 
 CubicalComplex (ConstAlias< KSpace > aK)
 
 CubicalComplex (const CubicalComplex &other)
 
void construct (const TDigitalSet &set)
 
CubicalComplexoperator= (const CubicalComplex &other)
 
void clear ()
 
void clear (Dimension d)
 
void fillData (Data data=Data())
 
void fillData (Dimension d, Data data=Data())
 
Dimension dim () const
 
Dimension dim (const Cell &aCell) const
 
Size nbCells (Dimension d) const
 
Integer euler () const
 
const KSpacespace () const
 
const CellMapgetCells (const Dimension d) const
 
CellMapgetCells (const Dimension d)
 
ConstIterator begin () const
 
Iterator begin ()
 
CellMapConstIterator begin (Dimension d) const
 
CellMapIterator begin (Dimension d)
 
ConstIterator end () const
 
Iterator end ()
 
CellMapConstIterator end (Dimension d) const
 
CellMapIterator end (Dimension d)
 
Size count (const Cell &aCell) const
 
Size size () const
 
Size max_size () const
 
bool empty () const
 
std::pair< ConstIterator, ConstIteratorequal_range (const Cell &aCell) const
 
std::pair< Iterator, Iterator > equal_range (const Cell &aCell)
 
void erase (Iterator position)
 
Size erase (const Cell &aCell)
 
void erase (Iterator first, Iterator last)
 
ConstIterator find (const Cell &aCell) const
 
Iterator find (const Cell &aCell)
 
std::pair< Iterator, bool > insert (const Cell &aCell)
 
Iterator insert (Iterator position, const Cell &aCell)
 
void insert (InputIterator first, InputIterator last)
 
void swap (CubicalComplex &other)
 
Dataoperator[] (const Cell &aCell)
 
bool operator() (const Cell &aCell) const
 
void insertCell (const Cell &aCell, const Data &data=Data())
 
void insertCell (Dimension d, const Cell &aCell, const Data &data=Data())
 
void insertCells (CellConstIterator it, CellConstIterator itE, const Data &data=Data())
 
void insertCells (Dimension d, CellConstIterator it, CellConstIterator itE, const Data &data=Data())
 
bool belongs (const Cell &aCell) const
 
bool belongs (const PreCell &aCell) const
 
bool belongs (Dimension d, const Cell &aCell) const
 
bool belongs (Dimension d, const PreCell &aCell) const
 
Size eraseCell (const Cell &aCell)
 
Size eraseCell (Dimension d, const Cell &aCell)
 
void eraseCell (CellMapIterator it)
 
void eraseCells (CellMapIterator it, CellMapIterator itE)
 
Size eraseCells (CellConstIterator it, CellConstIterator itE)
 
Size eraseCells (Dimension d, CellConstIterator it, CellConstIterator itE)
 
void faces (CellOutputIterator &outIt, const Cell &aCell, bool hintClosed=false) const
 
void directFaces (CellOutputIterator &outIt, const Cell &aCell, bool hintClosed=false) const
 
void directFacesIterators (CellMapIteratorOutputIterator &outIt, const Cell &aCell)
 
void coFaces (CellOutputIterator &outIt, const Cell &aCell, bool hintOpen=false) const
 
void directCoFaces (CellOutputIterator &outIt, const Cell &aCell, bool hintOpen=false) const
 
void directCoFacesIterators (CellMapIteratorOutputIterator &outIt, const Cell &aCell)
 
CellMapConstIterator findCell (const Cell &aCell) const
 
CellMapConstIterator findCell (Dimension d, const Cell &aCell) const
 
CellMapIterator findCell (const Cell &aCell)
 
CellMapIterator findCell (Dimension d, const Cell &aCell)
 
Cells cellBoundary (const Cell &aCell, bool hintClosed=false) const
 
Cells cellCoBoundary (const Cell &aCell, bool hintOpen=false) const
 
bool isCellInterior (const Cell &aCell) const
 
bool isCellBoundary (const Cell &aCell) const
 
CellType computeCellType (const Cell &c, CellMapIterator &it_cell_up, Dimension n=dimension)
 
CubicalComplex interior () const
 
CubicalComplex boundary (bool hintClosed=false) const
 
void getInteriorAndBoundary (CubicalComplex &intcc, CubicalComplex &bdcc, bool hintClosed=false) const
 
CubicalComplex closure (const CubicalComplex &S, bool hintClosed=false) const
 
CubicalComplex star (const CubicalComplex &S, bool hintOpen=false) const
 
CubicalComplex link (const CubicalComplex &S, bool hintClosed=false, bool hintOpen=false) const
 
void close ()
 
void close (Dimension k)
 
void open ()
 
void open (Dimension k)
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 
std::string className () const
 

Static Public Attributes

static const Dimension dimension = KSpace::dimension
 The dimension of the embedding space. More...
 
- Static Public Attributes inherited from DGtal::CubicalComplex< TKSpace, typename TKSpace::template CellMap< CubicalCellData >::Type >
static const Dimension dimension
 The dimension of the embedding space. More...
 

Protected Member Functions

 VoxelComplex ()
 
const PointToMaskMappointToMask () const
 
- Protected Member Functions inherited from DGtal::CubicalComplex< TKSpace, typename TKSpace::template CellMap< CubicalCellData >::Type >
 CubicalComplex ()
 

Protected Attributes

CountedPtrOrPtr< ConfigMapmyTablePtr
 
CountedPtrOrPtr< PointToMaskMapmyPointToMaskPtr
 
bool myIsTableLoaded {false}
 Flag if using a LUT for simplicity. More...
 
- Protected Attributes inherited from DGtal::CubicalComplex< TKSpace, typename TKSpace::template CellMap< CubicalCellData >::Type >
const KSpacemyKSpace
 The Khalimsky space in which lives the cubical complex. More...
 
std::vector< CellMapmyCells
 

Friends

SelfDGtal::operator-= (Self &, const Self &)
 
Self DGtal::operator- (const Self &, const Self &)
 

Detailed Description

template<typename TKSpace, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
class DGtal::VoxelComplex< TKSpace, TCellContainer >

This class represents a voxel complex living in some Khalimsky space. Voxel complexes are derived from.

Description of template class 'VoxelComplex'

See also
cubical complexes, with specialized methods to deal with spels.

The aim is to implement critical kernels, ie, cliques of spels, as shown by M.Couprie and G.Bertrand [39]

Implemented using resources from CubicalComplex and (Digital) Object for simplicity check in voxels.

Template Parameters
TKSpaceany model of concepts::CCellularGridSpaceND, i.e. a type that models a Khalimsky space.
TCellContainerany model of associative container, mapping a KSpace::Cell to a CubicalCellData or any type deriving from it. It could be for instance a std::map or a std::unordered_map. Note that unfortunately, unordered_map are (strangely) not models of boost::AssociativeContainer, hence we cannot check concepts here.

Definition at line 91 of file VoxelComplex.h.

Member Typedef Documentation

◆ Cell

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::Cell = typename KSpace::Cell

Type for a cell in the space.

Definition at line 114 of file VoxelComplex.h.

◆ CellContainer

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::CellContainer = TCellContainer

Type for storing cells, an associative container < Cell -> Data

Definition at line 104 of file VoxelComplex.h.

◆ CellMap

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::CellMap = CellContainer

Type for storing cells, an associative container Cell -> Data.

Definition at line 128 of file VoxelComplex.h.

◆ CellMapConstIterator

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::CellMapConstIterator = typename CellMap::const_iterator

Type Const iterator for visiting type CellMap.

Definition at line 130 of file VoxelComplex.h.

◆ CellMapIterator

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::CellMapIterator = typename CellMap::iterator

Type Iterator for visiting type CellMap.

Definition at line 132 of file VoxelComplex.h.

◆ Cells

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::Cells = typename KSpace::Cells

Type for a sequence of cells in the space.

Definition at line 118 of file VoxelComplex.h.

◆ Clique

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::Clique = Parent

Definition at line 135 of file VoxelComplex.h.

◆ CliqueContainer

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::CliqueContainer = std::vector<Clique>

Definition at line 136 of file VoxelComplex.h.

◆ ConfigMap

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::ConfigMap = boost::dynamic_bitset<>

Definition at line 139 of file VoxelComplex.h.

◆ Data

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::Data = typename CellContainer::mapped_type

Type of data associated to each cell.

Definition at line 106 of file VoxelComplex.h.

◆ DirIterator

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::DirIterator = typename KSpace::DirIterator

Type for iterating over cell directions.

Definition at line 126 of file VoxelComplex.h.

◆ Integer

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::Integer = typename KSpace::Integer

Type for integers in the space.

Definition at line 112 of file VoxelComplex.h.

◆ KSpace

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::KSpace = TKSpace

Type of the cellular grid space.

Definition at line 102 of file VoxelComplex.h.

◆ Parent

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::Parent = CubicalComplex<TKSpace, TCellContainer>

Type of the parent class CubicalComplex.

Definition at line 100 of file VoxelComplex.h.

◆ Point

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::Point = typename KSpace::Point

Type for a point in the digital space.

Definition at line 124 of file VoxelComplex.h.

◆ PointToMaskMap

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::PointToMaskMap = std::unordered_map<Point, unsigned int>

Definition at line 140 of file VoxelComplex.h.

◆ PreCell

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::PreCell = typename Cell::PreCell

Type for a PreCell in the space.

Definition at line 116 of file VoxelComplex.h.

◆ Self

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::Self = VoxelComplex<TKSpace, TCellContainer>

Type of this instance of VoxelComplex.

Definition at line 94 of file VoxelComplex.h.

◆ Size

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::Size = typename KSpace::Size

Type for a number of elements.

Definition at line 122 of file VoxelComplex.h.

◆ Space

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
using DGtal::VoxelComplex< TKSpace, TCellContainer >::Space = typename KSpace::Space

Type of the digital space.

Definition at line 120 of file VoxelComplex.h.

Constructor & Destructor Documentation

◆ VoxelComplex() [1/2]

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
DGtal::VoxelComplex< TKSpace, TCellContainer >::VoxelComplex ( )
protected

Default constructor. Note that the state of the VoxelComplex is invalid without a k-space. Use CubicalComplex(KSpace ks) constructor.

◆ VoxelComplex() [2/2]

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
DGtal::VoxelComplex< TKSpace, TCellContainer >::VoxelComplex ( const VoxelComplex< TKSpace, TCellContainer > &  other)

Copy constructor.

Parameters
otherVoxelComplex to copy.

Member Function Documentation

◆ cellsClose()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TCellContainer >::cellsClose ( Dimension  k_d,
const Cells cells 
)

Iterate over all the input cells and close them.

Parameters
k_ddimension
cellsinput cells to close around.

◆ className()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::string DGtal::VoxelComplex< TKSpace, TCellContainer >::className ( ) const
Returns
the style name used for drawing this object.

◆ construct() [1/2]

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
template<typename TDigitalSet >
void DGtal::VoxelComplex< TKSpace, TCellContainer >::construct ( const TDigitalSet &  input_set,
const Alias< ConfigMap input_table 
)

Construct from digital set and precomputed look up table for simplicity. Object and methods involving object will be empty/invalid. But they might not be needed thanks to the loaded table.

Note
if you require object operation but also wants the speed up of the table call construct from object, and then loadTable.
Parameters
input_setpoints to construct the CubicalComplex. Calls CubicalComplex::construct
input_tableinput table[conf]->bool
See also
LookUpTableFunctions.h

◆ construct() [2/2]

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
template<typename TDigitalSet >
void DGtal::CubicalComplex< TKSpace, TCellContainer >::construct ( typename TDigitalSet  )

Construct a complex from a digital set.

Template Parameters
TDigitalSeteither kind of DigitalSet
Parameters
set- a digital set from which to create a complex. Set has to be of the same dimension as a Khalimsky space.

◆ copySimplicityTable()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TCellContainer >::copySimplicityTable ( const Self other)

Copy table variables from other Complex.

Parameters
othercomplex to copy table from

◆ criticalCliquePair()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::pair<bool, Clique> DGtal::VoxelComplex< TKSpace, TCellContainer >::criticalCliquePair ( const Dimension  d,
const CellMapConstIterator cellMapIterator 
) const

Function to call K_0, K_1, K_2, K_3 according to dimension d

Parameters
ddimension.
cellMapIteratorcell iterator of cubical or voxel complex.
Returns
<is_critical, Clique>

◆ criticalCliques() [1/2]

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::array<CliqueContainer, dimension + 1> DGtal::VoxelComplex< TKSpace, TCellContainer >::criticalCliques ( bool  verbose = false) const
inline

Helper. Call criticalCliques of this VoxelComplex.

Parameters
verboseprint messages
Returns
array with cliques containers for dimension: 0, 1, ..., d

Definition at line 408 of file VoxelComplex.h.

408  {
409  return criticalCliques(*this, verbose);
410  }
std::array< CliqueContainer, dimension+1 > criticalCliques(const Parent &cubical, bool verbose=false) const
Definition: VoxelComplex.h:384

References DGtal::VoxelComplex< TKSpace, TCellContainer >::criticalCliques().

◆ criticalCliques() [2/2]

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::array<CliqueContainer, dimension + 1> DGtal::VoxelComplex< TKSpace, TCellContainer >::criticalCliques ( const Parent cubical,
bool  verbose = false 
) const
inline

Return all critical cliques for cubical. It calls criticalCliquesForD

Parameters
cubicaltarget complex to get critical cliques.
verboseprint messages
Returns
All critical cliques arranged by dimension.

Definition at line 384 of file VoxelComplex.h.

384  {
385  ASSERT((dimension + 1) == 4);
386  std::array<CliqueContainer, dimension + 1> criticals;
387  if (verbose) {
388  trace.beginBlock("criticalCliques of CubicalComplex");
389  trace.info() << cubical << std::endl;
390  }
391  for (Dimension d = 0; d != dimension + 1; ++d)
392  criticals[d] = criticalCliquesForD(d, cubical, verbose);
393 
394  if (verbose) {
395  trace.info() << std::endl;
396  trace.endBlock();
397  }
398  return criticals;
399  }
void beginBlock(const std::string &keyword="")
std::ostream & info()
double endBlock()
CliqueContainer criticalCliquesForD(const Dimension d, const Parent &cubical, bool verbose=false) const
static const Dimension dimension
The dimension of the embedding space.
Definition: VoxelComplex.h:109
DGtal::uint32_t Dimension
Definition: Common.h:136
Trace trace
Definition: Common.h:153

References DGtal::Trace::beginBlock(), DGtal::VoxelComplex< TKSpace, TCellContainer >::criticalCliquesForD(), DGtal::VoxelComplex< TKSpace, TCellContainer >::dimension, DGtal::Trace::endBlock(), DGtal::Trace::info(), and DGtal::trace.

Referenced by DGtal::VoxelComplex< TKSpace, TCellContainer >::criticalCliques().

◆ criticalCliquesForD()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
CliqueContainer DGtal::VoxelComplex< TKSpace, TCellContainer >::criticalCliquesForD ( const Dimension  d,
const Parent cubical,
bool  verbose = false 
) const

Main method to iterate over cells of selected dimension in a complex, returning critical cliques. Uses criticalCliquePair.

Parameters
ddimension of cell.
cubicaltarget complex to get critical cliques.
verboseprint messages
Returns
CliqueContainer with the computed cliques for the specified dimension.
Note
it uses OpenMP if available.

Referenced by DGtal::VoxelComplex< TKSpace, TCellContainer >::criticalCliques().

◆ dumpVoxels()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
template<typename TDigitalSet >
void DGtal::VoxelComplex< TKSpace, TCellContainer >::dumpVoxels ( TDigitalSet &  in_out_set) const

Dump the voxels (kcell with dimension 3) into a input container.

Template Parameters
TDigitalSetthe type of the container
Parameters
in_out_setinput and output digital set, voxels gets inserted in the set. Note that the input digital set is not cleared in this function before inserting.

◆ insertVoxelCell() [1/2]

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TCellContainer >::insertVoxelCell ( const Cell kcell,
const bool &  close_it = true,
const Data data = Data() 
)

Insert cell (voxel) in the khalimsky space

Parameters
kcellinput voxel
close_itif true, apply voxelClose.
dataassociated data with the input cell.
See also
insertCell

Referenced by DGtal::VoxelComplex< TKSpace, TCellContainer >::insertVoxelCell().

◆ insertVoxelCell() [2/2]

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TCellContainer >::insertVoxelCell ( const std::pair< Cell, Data > &  data_pair,
const bool &  close_it = true 
)
inline

Insert cell(voxel) in K-space and in the object set.

Parameters
data_pairpair<Cell, Data>
close_itif true, apply voxelClose

Definition at line 250 of file VoxelComplex.h.

251  {
252  insertVoxelCell(data_pair.first, close_it, data_pair.second);
253  }
void insertVoxelCell(const Cell &kcell, const bool &close_it=true, const Data &data=Data())

References DGtal::VoxelComplex< TKSpace, TCellContainer >::insertVoxelCell().

◆ insertVoxelPoint()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TCellContainer >::insertVoxelPoint ( const Point dig_point,
const bool &  close_it = true,
const Data data = Data() 
)

Create a uSpel from the input Point and insert it using insertVoxelCell.

See also
insertVoxelCell
Parameters
dig_pointinput point of the KSpace
close_itflag to apply voxelClose
dataassociated data with the input point.

◆ isSimple()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
bool DGtal::VoxelComplex< TKSpace, TCellContainer >::isSimple ( const Cell input_spel) const

Check if the input_spel from khalimsky space is simple using either a simplicity_table if loaded, or isSimpleByThinning.

Parameters
input_spelkhalimsky space spel.
Returns
true if input_spel is simple.

◆ isSimpleByThinning()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
bool DGtal::VoxelComplex< TKSpace, TCellContainer >::isSimpleByThinning ( const Cell input_spel) const

Use thinning to check if cell is simple. First create a CubicalComplex from the neighbor voxels on input_cell. This does not include input_cell itself, close the new clique and apply a collapse operation. A input_spel is simple in the complex, if after the collapse on the proper neighborhood clique, there is only one pointel.

Parameters
input_spelinput spel for checking its simplicity.
Returns
true if input_spell can be removed without altering the topology.

◆ isSpel()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
bool DGtal::VoxelComplex< TKSpace, TCellContainer >::isSpel ( const Cell c) const

True if input cell is a cell with max dimension.

Parameters
cinput Cell
Returns
true if c is a Spel

◆ isTableLoaded()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
const bool& DGtal::VoxelComplex< TKSpace, TCellContainer >::isTableLoaded ( ) const

Get const reference to isTableLoaded bool member.

Returns
true if table for simplicity has been loaded.

◆ isValid()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
bool DGtal::VoxelComplex< TKSpace, TCellContainer >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

◆ K_0()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::pair<bool, Clique> DGtal::VoxelComplex< TKSpace, TCellContainer >::K_0 ( const Cell face0,
bool  verbose = false 
) const

Compute the criticality of the pointel and the associated 0-clique.

Parameters
face0a pointel cell.
verboseflag for verbose output
Returns
<is_critical, 0-clique>

◆ K_1()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::pair<bool, Clique> DGtal::VoxelComplex< TKSpace, TCellContainer >::K_1 ( const Cell face1,
bool  verbose = false 
) const

Compute the criticality of the linel and the associated 1-clique.

Parameters
face1linel between two pointels
verboseflag for verbose output
Returns
<is_critical, 1-clique>

◆ K_2() [1/3]

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::pair<bool, Clique> DGtal::VoxelComplex< TKSpace, TCellContainer >::K_2 ( const Cell A,
const Cell B,
bool  verbose = false 
) const

Compute the criticality of the surfel between A,B voxels and returns the associated 2-clique.

Parameters
ASpel (voxel).
BSpel (voxel).
verboseflag for verbose output
Returns
<is_critical, 2-clique>
Note
A,B can be swaped with same result.

◆ K_2() [2/3]

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::pair<bool, Clique> DGtal::VoxelComplex< TKSpace, TCellContainer >::K_2 ( const Cell face2,
bool  verbose = false 
) const

K_2 from a 2-face (surfel)

See also
VoxelComplex::K_2
Parameters
face2surfel between 2 spels
verboseflag for verbose output
Returns
<is_critical, 2-clique>

◆ K_2() [3/3]

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::pair<bool, Clique> DGtal::VoxelComplex< TKSpace, TCellContainer >::K_2 ( const typename KSpace::Point A,
const typename KSpace::Point B,
bool  verbose = false 
) const

K_2 from two DigitalSet Points (uCoords)

See also
VoxelComplex::K_2
Parameters
Avoxel point
Bvoxel point
verboseflag for verbose output
Returns
<is_critical, 2-clique>

◆ K_3()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::pair<bool, Clique> DGtal::VoxelComplex< TKSpace, TCellContainer >::K_3 ( const Cell input_spel,
bool  verbose = false 
) const

Compute the criticality of the spel and the associated 3-clique. It uses isSimple to check criticality.

Parameters
input_spelinput spel
verbosebool flag
Returns
<is_critical, 3-clique (=spel)>
See also
VoxelComplex::isSimple

◆ Kneighborhood()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
Clique DGtal::VoxelComplex< TKSpace, TCellContainer >::Kneighborhood ( const Cell input_cell) const

Get a clique holding the K-neighborhood of the input cell. The K-neighborhood is calculated first, getting the pointels from input_cell (

See also
pointelsFromCell) and then, getting all the spels from all those pointels (
spelsFromCell).
Parameters
input_cellinput cell from which get the surrounding spels.
Returns
Clique with the the cells forming the K-Neighborhood of the input_cell.

◆ neighborhoodVoxels()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::set<Cell> DGtal::VoxelComplex< TKSpace, TCellContainer >::neighborhoodVoxels ( const Cell input_cell) const

Return the neighbor spels of input_cell

Parameters
input_cellcenter of the neighborhood
Returns
neighborhood of input_cell

◆ operator=()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
Self& DGtal::VoxelComplex< TKSpace, TCellContainer >::operator= ( const Self other)

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.

◆ pointelsFromCell()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TCellContainer >::pointelsFromCell ( std::set< Cell > &  pointels_out,
const Cell input_cell 
) const

Get pointels that are Faces of input_cell.

Note
If input_cell is a spel, then it will be emplaced only if it belongs to the complex.
Parameters
pointels_outin/out pointels.
input_cellinput cell from which get the surrounding pointels.
See also
KhalimskySpaceND::uFaces

◆ pointToMask()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
const PointToMaskMap& DGtal::VoxelComplex< TKSpace, TCellContainer >::pointToMask ( ) const
protected

pointToMask map, used internally in VoxelComplex::isSimple for functions::getSpelNeighborhoodConfigurationOccupancy

Returns
reference to pointToMaskMap member.
See also
pointToMaskMap()

◆ properNeighborhoodVoxels()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::set<Cell> DGtal::VoxelComplex< TKSpace, TCellContainer >::properNeighborhoodVoxels ( const Cell input_cell) const

Return a set of of voxels forming the properNeighborhood of the inputCell.

Parameters
input_cellcenter of the neighborhood
See also
neighborhoodVoxels
Kneighborhood
Returns
properNeighborhood

◆ selfDisplay()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TCellContainer >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ setSimplicityTable()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TCellContainer >::setSimplicityTable ( const Alias< ConfigMap input_table)

Set precomputed look up table for simplicity.

Parameters
input_tableinput table[conf]->bool
See also
LookUpTableFunctions.h

◆ spelsFromCell()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TCellContainer >::spelsFromCell ( std::set< Cell > &  spels_out,
const Cell input_cell 
) const

Get spels that are coFaces of input_cell.

Note
If input_cell is a spel, then it will be emplaced only if it belongs to the complex.
Parameters
spels_outin/out spels.
input_cellinput cell from which get the surrounding spels.
See also
KhalimskySpaceND::uCoFaces

◆ surfelBetweenAdjacentSpels()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
Cell DGtal::VoxelComplex< TKSpace, TCellContainer >::surfelBetweenAdjacentSpels ( const Cell A,
const Cell B 
) const

Surfel between two adjacent spels.

Parameters
Ainput spel cell
Binput spel cell
Returns
Surfel between adjacent spels A,B

◆ table()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
const ConfigMap& DGtal::VoxelComplex< TKSpace, TCellContainer >::table ( ) const

Get const reference to table[conf]->bool for simplicity.

Returns
table[conf]->bool for simplicity.

◆ voxelClose()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TCellContainer >::voxelClose ( const Cell kcell)

Close input voxel.

Parameters
kcellinput voxel to close.
See also
cellsClose

Friends And Related Function Documentation

◆ DGtal::operator-

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
Self DGtal::operator- ( const Self ,
const Self  
)
friend

◆ DGtal::operator-=

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
Self& DGtal::operator-= ( Self ,
const Self  
)
friend

Field Documentation

◆ dimension

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
const Dimension DGtal::VoxelComplex< TKSpace, TCellContainer >::dimension = KSpace::dimension
static

The dimension of the embedding space.

Definition at line 109 of file VoxelComplex.h.

Referenced by DGtal::VoxelComplex< TKSpace, TCellContainer >::criticalCliques().

◆ myIsTableLoaded

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
bool DGtal::VoxelComplex< TKSpace, TCellContainer >::myIsTableLoaded {false}
protected

Flag if using a LUT for simplicity.

Definition at line 525 of file VoxelComplex.h.

◆ myPointToMaskPtr

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
CountedPtrOrPtr<PointToMaskMap> DGtal::VoxelComplex< TKSpace, TCellContainer >::myPointToMaskPtr
protected

ConfigurationMask (LUT table).

Definition at line 524 of file VoxelComplex.h.

◆ myTablePtr

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
CountedPtrOrPtr<ConfigMap> DGtal::VoxelComplex< TKSpace, TCellContainer >::myTablePtr
protected

Look Up Table to speed computations of isSimple.

Definition at line 522 of file VoxelComplex.h.


The documentation for this class was generated from the following file: