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.
More...
#include <DGtal/kernel/sets/DigitalSetFromMap.h>
template<typename TMapImage>
class DGtal::DigitalSetFromMap< TMapImage >
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.
- Template Parameters
-
TMapImage | type of associative image container |
- Examples
- geometry/volumes/distance/exampleFMM2D.cpp, geometry/volumes/distance/exampleFMM3D.cpp, and tutorial-examples/FMMErosion.cpp.
Definition at line 74 of file DigitalSetFromMap.h.
◆ ConstIterator
template<typename TMapImage >
◆ Container
template<typename TMapImage >
◆ Domain
template<typename TMapImage >
◆ Functor
template<typename TMapImage >
◆ Image
template<typename TMapImage >
◆ Iterator
template<typename TMapImage >
◆ Pair
template<typename TMapImage >
◆ Point
template<typename TMapImage >
◆ Self
template<typename TMapImage >
◆ Size
template<typename TMapImage >
◆ ~DigitalSetFromMap()
template<typename TMapImage >
◆ DigitalSetFromMap() [1/3]
template<typename TMapImage >
Constructor. Link the adapter to an existing image.
- Parameters
-
aImage | any associative image container. |
aDefaultValue | value assigned to new points in the underlying image (0 by default). |
◆ DigitalSetFromMap() [2/3]
template<typename TMapImage >
Copy constructor.
- Parameters
-
other | the object to clone. |
◆ DigitalSetFromMap() [3/3]
template<typename TMapImage >
Default Constructor. Forbidden since a Domain is necessary for defining a set.
◆ assignFromComplement()
template<typename TMapImage >
template<typename TDigitalSet >
Builds the complement in the domain of the set [other_set] in this.
- Parameters
-
otherSet | defines the set whose complement is assigned to 'this'. |
- Template Parameters
-
TDigitalSet | a model of digital set. |
◆ begin() [1/2]
template<typename TMapImage >
- Returns
- an iterator on the first element in this set.
◆ begin() [2/2]
template<typename TMapImage >
- Returns
- a const iterator on the first element in this set.
◆ className()
template<typename TMapImage >
- Returns
- the style name used for drawing this object.
◆ clear()
template<typename TMapImage >
Clears the set.
- Postcondition
- this set is empty.
◆ computeBoundingBox()
template<typename TMapImage >
Computes the bounding box of this set.
- Parameters
-
lower | the first point of the bounding box (lowest in all directions). |
upper | the last point of the bounding box (highest in all directions). |
◆ computeComplement()
template<typename TMapImage >
template<typename TOutputIterator >
Fill a given set through the output iterator ito with the complement of this set in the domain.
- Parameters
-
- Template Parameters
-
TOutputIterator | a model of output iterator |
◆ container() [1/2]
template<typename TMapImage >
◆ container() [2/2]
template<typename TMapImage >
◆ domain()
template<typename TMapImage >
- Returns
- the embedding domain.
◆ domainPointer()
template<typename TMapImage >
- Returns
- a counted pointer on the embedding domain.
◆ empty()
template<typename TMapImage >
- Returns
- 'true' iff the set is empty (no element).
◆ end() [1/2]
template<typename TMapImage >
- Returns
- a iterator on the element after the last in this set.
◆ end() [2/2]
template<typename TMapImage >
- Returns
- a const iterator on the element after the last in this set.
◆ erase() [1/3]
template<typename TMapImage >
Removes point [p] from the set.
- Parameters
-
- Returns
- the number of removed elements (0 or 1).
◆ erase() [2/3]
template<typename TMapImage >
Removes the collection of points specified by the two iterators from this set.
- Parameters
-
first | the start point in this set. |
last | the last point in this set. |
◆ erase() [3/3]
template<typename TMapImage >
Removes the point pointed by [it] from the set.
- Parameters
-
it | an iterator on this set. Note: generally faster than giving just the point. |
◆ find() [1/2]
template<typename TMapImage >
- Parameters
-
- Returns
- an iterator pointing on [p] if found, otherwise end().
◆ find() [2/2]
template<typename TMapImage >
- Parameters
-
- Returns
- a constant iterator pointing on [p] if found, otherwise end().
◆ insert() [1/2]
template<typename TMapImage >
Adds point [p] to this set.
- Parameters
-
- Precondition
- p should belong to the associated domain.
◆ insert() [2/2]
template<typename TMapImage >
template<typename PointInputIterator >
Adds the collection of points specified by the two iterators to this set.
- Parameters
-
first | the start point in the collection of Point. |
last | the last point in the collection of Point. |
- Precondition
- all points should belong to the associated domain.
◆ insertNew() [1/2]
template<typename TMapImage >
Adds point [p] to this set if the point is not already in the set.
- Parameters
-
- Precondition
- p should belong to the associated domain.
-
p should not belong to this.
◆ insertNew() [2/2]
template<typename TMapImage >
template<typename PointInputIterator >
Adds the collection of points specified by the two iterators to this set.
- Parameters
-
first | the start point in the collection of Point. |
last | the last point in the collection of Point. |
- Precondition
- all points should belong to the associated domain.
-
each point should not belong to this.
◆ isValid()
template<typename TMapImage >
Checks the validity/consistency of the object.
- Returns
- 'true' if the object is valid, 'false' otherwise.
◆ operator()()
template<typename TMapImage >
- Parameters
-
- Returns
- 'true' if and only if p belongs to this set.
◆ operator+=()
template<typename TMapImage >
template<typename TDigitalSet >
set union to left.
- Parameters
-
- Template Parameters
-
TDigitalSet | a model of digital set. |
◆ operator=()
template<typename TMapImage >
Assignment.
- Parameters
-
- Returns
- a reference on 'this'.
◆ selfDisplay()
template<typename TMapImage >
Writes/Displays the object on an output stream.
- Parameters
-
out | the output stream where the object is written. |
◆ size()
template<typename TMapImage >
- Returns
- the number of elements in the set.
◆ myDefault
template<typename TMapImage >
◆ myFun
template<typename TMapImage >
◆ myImgPtr
template<typename TMapImage >
The documentation for this class was generated from the following file: