|
DGtal
0.6.devel
|
#include <DigitalSetFromMap.h>

Public Types | |
| typedef TMapImage | Image |
| typedef std::pair< const typename Image::Point, typename Image::Value > | Pair |
| typedef DigitalSetFromMap< Image > | Self |
| typedef Image::Domain | Domain |
| typedef Domain::Point | Point |
| typedef Domain::Size | Size |
| typedef Pair1st< Point > | Functor |
| typedef ConstIteratorAdapter < typename Image::ConstIterator, Functor, Point > | ConstIterator |
| typedef ConstIteratorAdapter < typename Image::Iterator, Functor, Point > | Iterator |
Public Member Functions | |
| ~DigitalSetFromMap () | |
| DigitalSetFromMap (Image &aImage, const typename Image::Value &aDefaultValue=0) | |
| DigitalSetFromMap (const DigitalSetFromMap &other) | |
| DigitalSetFromMap & | operator= (const DigitalSetFromMap &other) |
| const Domain & | domain () 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 () |
| template<typename TDigitalSet > | |
| Self & | operator+= (const TDigitalSet &aSet) |
| template<typename TOutputIterator > | |
| void | computeComplement (TOutputIterator &ito) const |
| template<typename TDigitalSet > | |
| void | assignFromComplement (const TDigitalSet &otherSet) |
| void | computeBoundingBox (Point &lower, Point &upper) const |
| void | selfDisplay (std::ostream &out) const |
| bool | isValid () const |
| std::string | className () const |
Protected Member Functions | |
| DigitalSetFromMap () | |
Protected Attributes | |
| Image * | myImgPtr |
| Functor | myFun |
| Image::Value | myDefault |
Aim: An adapter for viewing an associative image container like ImageContainerBySTLMap as a simple digital set. This class is merely based on an aliasing pointer on the image, which must exists elsewhere.
Description of template class 'DigitalSetFromMap'
Model of CDigitalSet.
| TMapImage | type of associative image container |
Definition at line 73 of file DigitalSetFromMap.h.
| typedef ConstIteratorAdapter<typename Image::ConstIterator, Functor, Point> DGtal::DigitalSetFromMap< TMapImage >::ConstIterator |
Definition at line 88 of file DigitalSetFromMap.h.
| typedef Image::Domain DGtal::DigitalSetFromMap< TMapImage >::Domain |
Definition at line 83 of file DigitalSetFromMap.h.
| typedef Pair1st<Point> DGtal::DigitalSetFromMap< TMapImage >::Functor |
Definition at line 87 of file DigitalSetFromMap.h.
| typedef TMapImage DGtal::DigitalSetFromMap< TMapImage >::Image |
Definition at line 77 of file DigitalSetFromMap.h.
| typedef ConstIteratorAdapter<typename Image::Iterator, Functor, Point> DGtal::DigitalSetFromMap< TMapImage >::Iterator |
Definition at line 89 of file DigitalSetFromMap.h.
| typedef std::pair<const typename Image::Point, typename Image::Value> DGtal::DigitalSetFromMap< TMapImage >::Pair |
Definition at line 79 of file DigitalSetFromMap.h.
| typedef Domain::Point DGtal::DigitalSetFromMap< TMapImage >::Point |
Definition at line 84 of file DigitalSetFromMap.h.
| typedef DigitalSetFromMap<Image> DGtal::DigitalSetFromMap< TMapImage >::Self |
Definition at line 80 of file DigitalSetFromMap.h.
| typedef Domain::Size DGtal::DigitalSetFromMap< TMapImage >::Size |
Definition at line 85 of file DigitalSetFromMap.h.
|
inline |
|
inline |
Constructor. Link the adapter to an existing image.
| aImage | any associative image container. |
| aDefaultValue | value assigned to new points in the underlying image (0 by default). |
Definition at line 52 of file DigitalSetFromMap.ih.
|
inline |
Copy constructor.
| other | the object to clone. |
Definition at line 61 of file DigitalSetFromMap.ih.
|
protected |
Default Constructor. Forbidden since a Domain is necessary for defining a set.
|
inline |
Builds the complement in the domain of the set [other_set] in this.
| otherSet | defines the set whose complement is assigned to 'this'. |
| TDigitalSet | a model of digital set. |
Definition at line 291 of file DigitalSetFromMap.ih.
|
inline |
Definition at line 208 of file DigitalSetFromMap.ih.
|
inline |
Definition at line 226 of file DigitalSetFromMap.ih.
|
inline |
Definition at line 349 of file DigitalSetFromMap.ih.
|
inline |
Clears the set.
Definition at line 181 of file DigitalSetFromMap.ih.
References DGtal::DigitalSetFromMap< TMapImage >::clear().
Referenced by DGtal::DigitalSetFromMap< TMapImage >::clear().
|
inline |
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). |
Definition at line 310 of file DigitalSetFromMap.ih.
|
inline |
Fill a given set through the output iterator ito with the complement of this set in the domain.
| ito | the output iterator |
| TOutputIterator | a model of output iterator |
Definition at line 272 of file DigitalSetFromMap.ih.
|
inline |
Definition at line 86 of file DigitalSetFromMap.ih.
References DGtal::DigitalSetFromMap< TMapImage >::domain().
Referenced by DGtal::DigitalSetFromMap< TMapImage >::domain().
|
inline |
Definition at line 110 of file DigitalSetFromMap.ih.
References DGtal::DigitalSetFromMap< TMapImage >::empty().
Referenced by DGtal::DigitalSetFromMap< TMapImage >::empty().
|
inline |
Definition at line 217 of file DigitalSetFromMap.ih.
|
inline |
Definition at line 235 of file DigitalSetFromMap.ih.
| DGtal::DigitalSetFromMap< TMapImage >::Size DGtal::DigitalSetFromMap< TMapImage >::erase | ( | const Point & | p | ) |
Removes point [p] from the set.
| p | the point to remove. |
Definition at line 163 of file DigitalSetFromMap.ih.
References DGtal::DigitalSetFromMap< TMapImage >::erase().
Referenced by DGtal::DigitalSetFromMap< TMapImage >::erase().
|
inline |
Removes the point pointed by [it] from the set.
| it | an iterator on this set. Note: generally faster than giving just the point. |
Definition at line 172 of file DigitalSetFromMap.ih.
References DGtal::DigitalSetFromMap< TMapImage >::erase().
| void DGtal::DigitalSetFromMap< TMapImage >::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. |
|
inline |
| p | any digital point. |
Definition at line 190 of file DigitalSetFromMap.ih.
|
inline |
|
inline |
| void DGtal::DigitalSetFromMap< TMapImage >::insert | ( | PointInputIterator | first, |
| PointInputIterator | last | ||
| ) |
Adds the collection of points specified by the two iterators to this set.
| first | the start point in the collection of Point. |
| last | the last point in the collection of Point. |
Definition at line 131 of file DigitalSetFromMap.ih.
|
inline |
Adds point [p] to this set if the point is not already in the set.
| p | any digital point. |
Definition at line 142 of file DigitalSetFromMap.ih.
|
inline |
Adds the collection of points specified by the two iterators to this set.
| first | the start point in the collection of Point. |
| last | the last point in the collection of Point. |
Definition at line 154 of file DigitalSetFromMap.ih.
|
inline |
Checks the validity/consistency of the object.
Definition at line 338 of file DigitalSetFromMap.ih.
|
inline |
set union to left.
| aSet | any other set. |
| TDigitalSet | a model of digital set. |
Definition at line 246 of file DigitalSetFromMap.ih.
|
inline |
Assignment.
| other | the object to copy. |
Definition at line 71 of file DigitalSetFromMap.ih.
References DGtal::DigitalSetFromMap< TMapImage >::myDefault, DGtal::DigitalSetFromMap< TMapImage >::myFun, and DGtal::DigitalSetFromMap< TMapImage >::myImgPtr.
|
inline |
Writes/Displays the object on an output stream.
| out | the output stream where the object is written. |
Definition at line 330 of file DigitalSetFromMap.ih.
Referenced by DGtal::operator<<().
|
inline |
Definition at line 101 of file DigitalSetFromMap.ih.
References DGtal::DigitalSetFromMap< TMapImage >::size().
Referenced by DGtal::DigitalSetFromMap< TMapImage >::size().
|
protected |
Default value for point insertion
Definition at line 107 of file DigitalSetFromMap.h.
Referenced by DGtal::DigitalSetFromMap< TMapImage >::operator=().
|
protected |
Functor transforming pairs point-value into points
Definition at line 102 of file DigitalSetFromMap.h.
Referenced by DGtal::DigitalSetFromMap< TMapImage >::operator=().
|
protected |
Aliasing pointer on the image
Definition at line 97 of file DigitalSetFromMap.h.
Referenced by DGtal::DigitalSetFromMap< TMapImage >::operator=().
1.8.1.1