|
DGtal 2.0.0
|
Aim: A wrapper class around a STL associative container for storing sets of digital points within some given domain. More...
#include <DGtal/kernel/sets/DigitalSetByAssociativeContainer.h>
Public Types | |
| typedef TDomain | Domain |
| Domain type. | |
| typedef TContainer | Container |
| Container type. | |
| typedef DigitalSetByAssociativeContainer< Domain, Container > | Self |
| Self Type. | |
| typedef Domain::Space | Space |
| Type of digital space. | |
| typedef Domain::Point | Point |
| Type of points in the space. | |
| typedef Container::iterator | Iterator |
| Iterator type of the container. | |
| typedef Container::const_iterator | ConstIterator |
| ConstIterator type of the container;. | |
| typedef Container::value_type | value_type |
| Value type of the container. | |
| typedef Container::size_type | Size |
| Size type of the container;. | |
Public Member Functions | |
| BOOST_CONCEPT_ASSERT ((concepts::CDomain< TDomain >)) | |
| Concept checks. | |
| BOOST_CONCEPT_ASSERT ((concepts::CSTLAssociativeContainer< TContainer >)) | |
| BOOST_STATIC_ASSERT ((boost::is_same< typename Container::key_type, Point >::value)) | |
| ~DigitalSetByAssociativeContainer () | |
| DigitalSetByAssociativeContainer (Clone< Domain > d) | |
| DigitalSetByAssociativeContainer (const DigitalSetByAssociativeContainer &other) | |
| DigitalSetByAssociativeContainer & | operator= (const DigitalSetByAssociativeContainer &other) |
| const Domain & | domain () const |
| CowPtr< Domain > | domainPointer () const |
| Size | size () const |
| bool | empty () const |
| void | insert (const Point &p) |
| template<typename PointInputIterator> | |
| void | insert (PointInputIterator first, PointInputIterator last) |
| void | insertNew (const Point &p) |
| template<typename PointInputIterator> | |
| void | insertNew (PointInputIterator first, PointInputIterator last) |
| Size | erase (const Point &p) |
| void | erase (Iterator it) |
| void | erase (Iterator first, Iterator last) |
| void | clear () |
| ConstIterator | find (const Point &p) const |
| Iterator | find (const Point &p) |
| ConstIterator | begin () const |
| ConstIterator | end () const |
| Iterator | begin () |
| Iterator | end () |
| const Container & | container () const |
| Container & | container () |
| DigitalSetByAssociativeContainer< Domain, Container > & | operator+= (const DigitalSetByAssociativeContainer< Domain, Container > &aSet) |
| bool | operator() (const Point &p) const |
| template<typename TOutputIterator> | |
| void | computeComplement (TOutputIterator &ito) const |
| void | assignFromComplement (const DigitalSetByAssociativeContainer< Domain, Container > &other_set) |
| void | computeBoundingBox (Point &lower, Point &upper) const |
| void | selfDisplay (std::ostream &out) const |
| bool | isValid () const |
| std::string | className () const |
Protected Member Functions | |
| DigitalSetByAssociativeContainer () | |
Protected Attributes | |
| CowPtr< Domain > | myDomain |
| Container | mySet |
Aim: A wrapper class around a STL associative container for storing sets of digital points within some given domain.
Description of template class 'DigitalSetByAssociativeContainer'
Model of CDigitalSet.
| TDomain | type of domain on which the set will be defined (model of concepts::CDomain). |
| TContainer | STL associative container to store points (model of concepts::CSTLAssociativeContainer). |
Definition at line 89 of file DigitalSetByAssociativeContainer.h.
| typedef Container::const_iterator DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::ConstIterator |
ConstIterator type of the container;.
Definition at line 108 of file DigitalSetByAssociativeContainer.h.
| typedef TContainer DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::Container |
Container type.
Definition at line 97 of file DigitalSetByAssociativeContainer.h.
| typedef TDomain DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::Domain |
Domain type.
Definition at line 94 of file DigitalSetByAssociativeContainer.h.
| typedef Container::iterator DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::Iterator |
Iterator type of the container.
Definition at line 106 of file DigitalSetByAssociativeContainer.h.
| typedef Domain::Point DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::Point |
Type of points in the space.
Definition at line 104 of file DigitalSetByAssociativeContainer.h.
| typedef DigitalSetByAssociativeContainer<Domain, Container> DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::Self |
Definition at line 100 of file DigitalSetByAssociativeContainer.h.
| typedef Container::size_type DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::Size |
Size type of the container;.
Definition at line 112 of file DigitalSetByAssociativeContainer.h.
| typedef Domain::Space DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::Space |
Type of digital space.
Definition at line 102 of file DigitalSetByAssociativeContainer.h.
| typedef Container::value_type DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::value_type |
Value type of the container.
Definition at line 110 of file DigitalSetByAssociativeContainer.h.
| DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::~DigitalSetByAssociativeContainer | ( | ) |
Destructor.
| DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::DigitalSetByAssociativeContainer | ( | Clone< Domain > | d | ) |
Constructor. Creates the empty set in the domain [d].
| d | any domain. |
| DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::DigitalSetByAssociativeContainer | ( | const DigitalSetByAssociativeContainer< TDomain, TContainer > & | other | ) |
Copy constructor.
| other | the object to clone. |
|
protected |
Default Constructor. Forbidden since a Domain is necessary for defining a set.
| void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::assignFromComplement | ( | const DigitalSetByAssociativeContainer< Domain, Container > & | other_set | ) |
Builds the complement in the domain of the set [other_set] in this.
| other_set | defines the set whose complement is assigned to 'this'. |
Referenced by testLayers(), and testSimpleExpander().
| Iterator DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::begin | ( | ) |
| ConstIterator DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::begin | ( | ) | const |
Referenced by checkCut(), convexHull(), main(), main(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), testBreadthFirstPropagation(), testDepthFirstPropagation(), testDistancePropagation(), testSetTable(), testSimplePoints2D(), and testVoronoiMap().
| DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::BOOST_CONCEPT_ASSERT | ( | (concepts::CDomain< TDomain >) | ) |
Concept checks.
| DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::BOOST_CONCEPT_ASSERT | ( | (concepts::CSTLAssociativeContainer< TContainer >) | ) |
| DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::BOOST_STATIC_ASSERT | ( | (boost::is_same< typename Container::key_type, Point >::value) | ) |
| std::string DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::className | ( | ) | const |
Referenced by checkCut(), checkOutputConvexHullBorder(), main(), main(), specificTestLatticePolytope2D(), testBoard2D(), and testLatticePolytope2D().
| void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::clear | ( | ) |
Clears the set.
| void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::computeBoundingBox | ( | Point & | lower, |
| Point & | upper ) const |
Computes the bounding box of this set.
| lower | the first point of the bounding box (lowest in all directions). |
| upper | the last point of the bounding box (highest in all directions). |
| void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::computeComplement | ( | TOutputIterator & | ito | ) | const |
Computes the complement in the domain of this set
| ito | an output iterator |
| TOutputIterator | a model of output iterator |
| Container & DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::container | ( | ) |
Give access to the underlying container.
| const Container & DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::container | ( | ) | const |
Give access to the underlying container.
| const Domain & DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::domain | ( | ) | const |
Referenced by brut_force_voronoi_map_complete(), Fixture_complex_diamond::create_complex_from_set(), Fixture_complex_fig4::create_complex_from_set(), Fixture_isthmus::create_complex_from_set(), Fixture_X::create_complex_from_set(), main(), main(), TEST_CASE(), TEST_CASE(), and TEST_CASE().
| CowPtr< Domain > DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::domainPointer | ( | ) | const |
| bool DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::empty | ( | ) | const |
| Iterator DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::end | ( | ) |
| ConstIterator DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::end | ( | ) | const |
Referenced by checkCut(), convexHull(), main(), main(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), testBreadthFirstPropagation(), testDepthFirstPropagation(), testDistancePropagation(), testSetFromImage(), testSetTable(), testSimplePoints2D(), and testVoronoiMap().
| Size DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::erase | ( | const Point & | p | ) |
Removes point [p] from the set.
| p | the point to remove. |
Referenced by Fixture_complex_diamond::create_set(), Fixture_object_diamond_with_hole::Fixture_object_diamond_with_hole(), main(), main(), Object3D(), Objects2D::Objects2D(), testSetTable(), testSimplePoints2D(), testSimplePoints3D(), and testVoronoiMap().
| void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::erase | ( | Iterator | first, |
| Iterator | last ) |
Removes the collection of points specified by the two iterators from this set.
| first | the start point in this set. |
| last | the last point in this set. |
| void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::erase | ( | Iterator | it | ) |
Removes the point pointed by [it] from the set.
| it | an iterator on this set. Note: generally faster than giving just the point. |
| Iterator DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::find | ( | const Point & | p | ) |
| p | any digital point. |
| ConstIterator DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::find | ( | const Point & | p | ) | const |
| p | any digital point. |
Referenced by checkCut(), and testSetFromImage().
| void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::insert | ( | const Point & | p | ) |
Adds point [p] to this set.
| p | any digital point. |
Referenced by Fixture_X::create_set(), DGtal::ShortcutsGeometry< Z3i::KSpace >::getDirectionToClosestSite(), DGtal::ShortcutsGeometry< Z3i::KSpace >::getDistanceToClosestSite(), DGtal::ShortcutsGeometry< Z3i::KSpace >::getDistanceTransformation(), DGtal::ShortcutsGeometry< Z3i::KSpace >::getDistanceTransformation(), DGtal::ShortcutsGeometry< Z3i::KSpace >::getVoronoiMap(), DGtal::ShortcutsGeometry< Z3i::KSpace >::getVoronoiMap(), main(), TEST_CASE(), TEST_CASE(), testFindABel(), testImageFromSet(), testLayers(), testOrderingDigitalSurfaceFacesAroundVertex(), testSimpleExpander(), testSimpleRandom2D(), and testSimpleRandom3D().
| void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::insert | ( | PointInputIterator | first, |
| PointInputIterator | last ) |
| void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::insertNew | ( | const Point & | p | ) |
Adds point [p] to this set if the point is not already in the set.
| p | any digital point. |
Referenced by Fixture_complex_diamond::create_set(), Fixture_complex_fig4::create_set(), Fixture_isthmus::create_set(), Fixture_object_diamond_with_hole::Fixture_object_diamond_with_hole(), main(), Object3D(), testBoard2D(), testExpander(), testImageAdapter(), testObject3D(), testObjectBorder(), testObjectGraph(), testSimple2D(), testSimple3D(), testSimplePoints3D(), and testVoronoiMap().
| void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::insertNew | ( | PointInputIterator | first, |
| PointInputIterator | last ) |
| bool DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
| bool DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::operator() | ( | const Point & | p | ) | const |
| p | any point. |
| DigitalSetByAssociativeContainer< Domain, Container > & DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::operator+= | ( | const DigitalSetByAssociativeContainer< Domain, Container > & | aSet | ) |
set union to left.
| aSet | any other set. |
| DigitalSetByAssociativeContainer & DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::operator= | ( | const DigitalSetByAssociativeContainer< TDomain, TContainer > & | other | ) |
Assignment.
| other | the object to copy. |
| void DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
| out | the output stream where the object is written. |
| Size DGtal::DigitalSetByAssociativeContainer< TDomain, TContainer >::size | ( | ) | const |
Referenced by checkCut(), main(), main(), TEST_CASE(), testObjectGraph(), and testSetFromImage().
|
protected |
The associated domain. The pointed domain may be changed but it remains valid during the lifetime of the set.
Definition at line 351 of file DigitalSetByAssociativeContainer.h.
|
protected |
The container storing the points of the set.
Definition at line 356 of file DigitalSetByAssociativeContainer.h.