DGtal  0.9.4.1
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends
DGtal::VoxelComplex< TKSpace, TObject, TCellContainer > Class Template Reference

#include <DGtal/topology/VoxelComplex.h>

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

Public Types

using Self = VoxelComplex< TKSpace, TObject, TCellContainer >
 
using Parent = CubicalComplex< TKSpace, TCellContainer >
 
using KSpace = TKSpace
 
using CellContainer = TCellContainer
 
using Data = typename CellContainer::mapped_type
 
using Object = TObject
 
using DigitalTopology = typename TObject::DigitalTopology
 
using Integer = typename KSpace::Integer
 
using Cell = typename KSpace::Cell
 
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, TCellContainer >
enum  CellType { Maximal, Free, Any }
 
typedef CubicalComplex< TKSpace, TCellContainer > Self
 
typedef TKSpace KSpace
 
typedef TCellContainer CellContainer
 
typedef CellContainer::mapped_type Data
 
typedef KSpace::Integer Integer
 
typedef KSpace::Cell Cell
 
typedef KSpace::Cells Cells
 
typedef KSpace::Space Space
 
typedef KSpace::Size Size
 
typedef KSpace::Point Point
 
typedef KSpace::DirIterator DirIterator
 
typedef CellContainer CellMap
 
typedef CellMap::const_iterator CellMapConstIterator
 
typedef CellMap::iterator CellMapIterator
 
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

 BOOST_CONCEPT_ASSERT ((concepts::CSTLAssociativeContainer< typename TObject::DigitalSet::Container >))
 
 VoxelComplex (const VoxelComplex &other)
 
Selfoperator= (const Self &other)
 
void construct (const TObject &obj)
 
void construct (const typename Object::DigitalSet &input_set, const Alias< ConfigMap > input_table)
 
void setSimplicityTable (const Alias< ConfigMap > input_table)
 
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())
 
void clear ()
 
const Object::PointobjPointFromVoxel (const Cell &voxel) 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
 
Clique Kneighborhood (const Cell &input_cell) const
 
const ObjectpopulateObjectFromCells ()
 
bool isSimple (const Cell &input_spel) const
 
bool isConnected () const
 
Objectobject ()
 
const Objectobject () const
 
Object::DigitalSetobjectSet ()
 
const Object::DigitalSetobjectSet () 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 Object::Point &A, const typename Object::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
 
- Public Member Functions inherited from DGtal::CubicalComplex< TKSpace, TCellContainer >
 BOOST_CONCEPT_ASSERT ((concepts::CCellularGridSpaceND< TKSpace >))
 
 BOOST_STATIC_ASSERT (IsPairAssociativeContainer< TCellContainer >::value)
 
 BOOST_CONCEPT_ASSERT ((concepts::CSTLAssociativeContainer< TCellContainer >))
 
 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)
 
 BOOST_STATIC_CONSTANT (uint32_t, COLLAPSIBLE=0x20000000)
 
 BOOST_STATIC_CONSTANT (uint32_t, FIXED=0x40000000)
 
 BOOST_STATIC_CONSTANT (uint32_t, USER1=0x80000000)
 
 BOOST_STATIC_CONSTANT (uint32_t, VALUE=0x0fffffff)
 
 ~CubicalComplex ()
 
 CubicalComplex (ConstAlias< KSpace > aK)
 
 CubicalComplex (const CubicalComplex &other)
 
template<typename TDigitalSet >
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
 
ConstIterator end () const
 
Iterator begin ()
 
Iterator end ()
 
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, Iteratorequal_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)
 
template<class InputIterator >
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())
 
template<typename CellConstIterator >
void insertCells (CellConstIterator it, CellConstIterator itE, const Data &data=Data())
 
template<typename CellConstIterator >
void insertCells (Dimension d, CellConstIterator it, CellConstIterator itE, const Data &data=Data())
 
bool belongs (const Cell &aCell) const
 
bool belongs (Dimension d, const Cell &aCell) const
 
Size eraseCell (const Cell &aCell)
 
Size eraseCell (Dimension d, const Cell &aCell)
 
void eraseCell (CellMapIterator it)
 
void eraseCells (CellMapIterator it, CellMapIterator itE)
 
template<typename CellConstIterator >
Size eraseCells (CellConstIterator it, CellConstIterator itE)
 
template<typename CellConstIterator >
Size eraseCells (Dimension d, CellConstIterator it, CellConstIterator itE)
 
template<typename CellOutputIterator >
void faces (CellOutputIterator &outIt, const Cell &aCell, bool hintClosed=false) const
 
template<typename CellOutputIterator >
void directFaces (CellOutputIterator &outIt, const Cell &aCell, bool hintClosed=false) const
 
template<typename CellMapIteratorOutputIterator >
void directFacesIterators (CellMapIteratorOutputIterator &outIt, const Cell &aCell)
 
template<typename CellOutputIterator >
void coFaces (CellOutputIterator &outIt, const Cell &aCell, bool hintOpen=false) const
 
template<typename CellOutputIterator >
void directCoFaces (CellOutputIterator &outIt, const Cell &aCell, bool hintOpen=false) const
 
template<typename CellMapIteratorOutputIterator >
void directCoFacesIterators (CellMapIteratorOutputIterator &outIt, const Cell &aCell)
 
CellMapConstIterator begin (Dimension d) const
 
CellMapConstIterator end (Dimension d) const
 
CellMapIterator begin (Dimension d)
 
CellMapIterator end (Dimension d)
 
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
 
- Static Public Attributes inherited from DGtal::CubicalComplex< TKSpace, TCellContainer >
static const Dimension dimension = KSpace::dimension
 

Protected Member Functions

 VoxelComplex ()
 
const PointToMaskMappointToMask () const
 
void instantiateEmptyObject (const typename Object::DigitalSet &dig_set)
 
- Protected Member Functions inherited from DGtal::CubicalComplex< TKSpace, TCellContainer >
 CubicalComplex ()
 

Protected Attributes

Object myObject
 
CountedPtrOrPtr< ConfigMapmyTablePtr
 
CountedPtrOrPtr< PointToMaskMapmyPointToMaskPtr
 
bool myIsTableLoaded {false}
 
- Protected Attributes inherited from DGtal::CubicalComplex< TKSpace, TCellContainer >
const KSpacemyKSpace
 
std::vector< CellMapmyCells
 

Friends

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

Detailed Description

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
class DGtal::VoxelComplex< TKSpace, TObject, 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 [28]

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 52 of file VoxelComplex.h.

Member Typedef Documentation

◆ Cell

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

Type for a cell in the space.

Definition at line 123 of file VoxelComplex.h.

◆ CellContainer

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

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

Definition at line 109 of file VoxelComplex.h.

◆ CellMap

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

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

Definition at line 135 of file VoxelComplex.h.

◆ CellMapConstIterator

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

Type Const iterator for visiting type CellMap.

Definition at line 137 of file VoxelComplex.h.

◆ CellMapIterator

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

Type Iterator for visiting type CellMap.

Definition at line 139 of file VoxelComplex.h.

◆ Cells

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

Type for a sequence of cells in the space.

Definition at line 125 of file VoxelComplex.h.

◆ Clique

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

Definition at line 142 of file VoxelComplex.h.

◆ CliqueContainer

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

Definition at line 143 of file VoxelComplex.h.

◆ ConfigMap

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

Definition at line 146 of file VoxelComplex.h.

◆ Data

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

Type of data associated to each cell.

Definition at line 111 of file VoxelComplex.h.

◆ DigitalTopology

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

Type of the associated DigitalTopology of Object.

Definition at line 115 of file VoxelComplex.h.

◆ DirIterator

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

Type for iterating over cell directions.

Definition at line 133 of file VoxelComplex.h.

◆ Integer

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

Type for integers in the space.

Definition at line 121 of file VoxelComplex.h.

◆ KSpace

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

Type of the cellular grid space.

Definition at line 107 of file VoxelComplex.h.

◆ Object

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

Type for input Object storing the digital set of spels with a topology

Definition at line 113 of file VoxelComplex.h.

◆ Parent

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

Type of the parent class CubicalComplex.

Definition at line 105 of file VoxelComplex.h.

◆ Point

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

Type for a point in the digital space.

Definition at line 131 of file VoxelComplex.h.

◆ PointToMaskMap

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

Definition at line 147 of file VoxelComplex.h.

◆ Self

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

Type of this instance of VoxelComplex.

Definition at line 99 of file VoxelComplex.h.

◆ Size

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

Type for a number of elements.

Definition at line 129 of file VoxelComplex.h.

◆ Space

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

Type of the digital space.

Definition at line 127 of file VoxelComplex.h.

Constructor & Destructor Documentation

◆ VoxelComplex() [1/2]

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
DGtal::VoxelComplex< TKSpace, TObject, 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 TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::VoxelComplex ( const VoxelComplex< TKSpace, TObject, TCellContainer > &  other)

Copy constructor.

Parameters
otherVoxelComplex to copy.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::BOOST_CONCEPT_ASSERT ( (concepts::CSTLAssociativeContainer< typename TObject::DigitalSet::Container >)  )

◆ cellsClose()

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TObject, 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 TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::string DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::className ( ) const
Returns
the style name used for drawing this object.

◆ clear()

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

Clears the voxel complex, which becomes empty. This includes the khalmisky cells and also the object points.

◆ construct() [1/2]

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::construct ( const TObject &  obj)

Construct the VoxelComplex with target obj

Parameters
objinput object to copy to the complex.

◆ construct() [2/2]

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::construct ( const typename Object::DigitalSet 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

◆ criticalCliquePair()

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

Function to call , , , according to dimension d

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

◆ criticalCliques() [1/2]

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

Return all critical cliques for cubical. It calls

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

Definition at line 401 of file VoxelComplex.h.

Referenced by DGtal::VoxelComplex< KSpace, FixtureObject >::criticalCliques().

401  {
402  ASSERT((dimension + 1) == 4);
403  std::array<CliqueContainer, dimension + 1> criticals;
404  if (verbose) {
405  trace.beginBlock("criticalCliques of CubicalComplex");
406  trace.info() << cubical << std::endl;
407  }
408  for (size_t d = 0; d != dimension + 1; ++d)
409  criticals[d] = criticalCliquesForD(d, cubical, verbose);
410 
411  if (verbose) {
412  trace.info() << std::endl;
413  trace.endBlock();
414  }
415  return criticals;
416  }
void beginBlock(const std::string &keyword="")
Trace trace
Definition: Common.h:137
double endBlock()
CliqueContainer criticalCliquesForD(const Dimension d, const Parent &cubical, bool verbose=false) const
std::ostream & info()
static const Dimension dimension
The dimension of the embedding space.
Definition: VoxelComplex.h:118

◆ criticalCliques() [2/2]

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

Helper. Call of this VoxelComplex.

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

Definition at line 425 of file VoxelComplex.h.

425  {
426  return criticalCliques(*this, verbose);
427  }
std::array< CliqueContainer, dimension+1 > criticalCliques(const Parent &cubical, bool verbose=false) const
Definition: VoxelComplex.h:401

◆ criticalCliquesForD()

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
CliqueContainer DGtal::VoxelComplex< TKSpace, TObject, 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 .

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< KSpace, FixtureObject >::criticalCliques().

◆ insertVoxelCell() [1/2]

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

Insert cell (voxel) in the khalimsky space AND in the object set.

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

Referenced by DGtal::VoxelComplex< KSpace, FixtureObject >::insertVoxelCell().

◆ insertVoxelCell() [2/2]

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TObject, 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

Definition at line 255 of file VoxelComplex.h.

256  {
257  insertVoxelCell(data_pair.first, close_it, data_pair.second);
258  }
void insertVoxelCell(const Cell &kcell, const bool &close_it=true, const Data &data=Data())

◆ insertVoxelPoint()

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

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

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

◆ instantiateEmptyObject()

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::instantiateEmptyObject ( const typename Object::DigitalSet dig_set)
protected

Populate myObject member with an empty set with valid domain and topology. Used in VoxelComplex::construct with digital sets.

Parameters
dig_setinput digital set.

◆ isConnected()

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
bool DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::isConnected ( ) const
Returns
true if object is connected, false if disconnected.
Note
connectedness::unkwown is not possible.
See also
Object::computeConnectedness.

◆ isSimple()

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

Check if the input_spel from khalimsky space is simple using object properties.

Parameters
input_spelkhalimsky space spel.
Returns
true if input_spel is simple.
Note
It uses isSimple from Object. There are no guarantees than objectSet and khalimsky space are synchronized so user must take care of the sync of space and kspace, using insertion methods such as
See also
insertVoxelCell, insertVoxelPoint
Object::isSimple

◆ isSpel()

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
bool DGtal::VoxelComplex< TKSpace, TObject, 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 TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
const bool& DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::isTableLoaded ( ) const

Get const reference to isTableLoaded bool member.

Returns
true if table for simplicity has been loaded.

◆ isValid()

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
bool DGtal::VoxelComplex< TKSpace, TObject, 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 TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::pair<bool, Clique> DGtal::VoxelComplex< TKSpace, TObject, 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 TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::pair<bool, Clique> DGtal::VoxelComplex< TKSpace, TObject, 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 TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::pair<bool, Clique> DGtal::VoxelComplex< TKSpace, TObject, 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 TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::pair<bool, Clique> DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::K_2 ( const typename Object::Point A,
const typename Object::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_2() [3/3]

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::pair<bool, Clique> DGtal::VoxelComplex< TKSpace, TObject, 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_3()

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
std::pair<bool, Clique> DGtal::VoxelComplex< TKSpace, TObject, 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 TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
Clique DGtal::VoxelComplex< TKSpace, TObject, 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.

◆ object() [1/2]

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
Object& DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::object ( )
Returns
Object representing the spels.

◆ object() [2/2]

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
const Object& DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::object ( ) const
Returns
Object representing the spels, read only.

◆ objectSet() [1/2]

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
Object::DigitalSet& DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::objectSet ( )
Returns
digitalSet of Object representing the spels.

◆ objectSet() [2/2]

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
const Object::DigitalSet& DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::objectSet ( ) const
Returns
digitalSet of Object representing the spels, read only.

◆ objPointFromVoxel()

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
const Object::Point& DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::objPointFromVoxel ( const Cell voxel) const

Get reference to a point in the DigitalSet of myObject corresponding to input voxel

Parameters
voxelinput voxel
Returns
A point in myObject

◆ operator=()

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

Assignment.

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

◆ pointelsFromCell()

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TObject, 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 TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
const PointToMaskMap& DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::pointToMask ( ) const
protected

pointToMask map, used internally in VoxelComplex::isSimple for LookUpTableFunctions.h::getSpelNeighborhoodConfigurationOccupancy

Returns
reference to pointToMaskMap member.
See also
LookUpTableFunctions.h::pointToBitMaskMap()

◆ populateObjectFromCells()

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

Populate this complex object from the spels belonging to the Khalimsky space.

Returns
const reference to object().

◆ selfDisplay()

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TObject, 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 TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TObject, 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 TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
void DGtal::VoxelComplex< TKSpace, TObject, 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 TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
Cell DGtal::VoxelComplex< TKSpace, TObject, 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 TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
const ConfigMap& DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::table ( ) const

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

Returns
table[conf]->bool for simplicity.

◆ voxelClose()

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

Close input voxel.

Parameters
kcellinput voxel to close.
See also
cellsClose

Friends And Related Function Documentation

◆ DGtal::functions::operator-

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

◆ DGtal::functions::operator-=

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

Field Documentation

◆ dimension

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

The dimension of the embedding space.

Definition at line 118 of file VoxelComplex.h.

Referenced by DGtal::VoxelComplex< KSpace, FixtureObject >::criticalCliques().

◆ myIsTableLoaded

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

Flag if using a LUT for simplicity.

Definition at line 544 of file VoxelComplex.h.

◆ myObject

template<typename TKSpace, typename TObject, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
Object DGtal::VoxelComplex< TKSpace, TObject, TCellContainer >::myObject
protected

Object with a topology representing spels.

Definition at line 539 of file VoxelComplex.h.

Referenced by DGtal::functions::operator-(), and DGtal::functions::operator-=().

◆ myPointToMaskPtr

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

ConfigurationMask (LUT table).

Definition at line 543 of file VoxelComplex.h.

◆ myTablePtr

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

Look Up Table to speed computations of .

Definition at line 541 of file VoxelComplex.h.


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