|
DGtal 1.4.2
|
#include <DGtal/images/ImageContainerBySTLMap.h>
Public Types | |
| typedef ImageContainerBySTLMap< TDomain, TValue > | Self |
| typedef std::map< typename TDomain::Point, TValue > | Parent |
| typedef Parent | Container |
| typedef TDomain | Domain |
| typedef Domain::Point | Point |
| typedef Domain::Vector | Vector |
| typedef Domain::Integer | Integer |
| typedef Domain::Size | Size |
| typedef Domain::Dimension | Dimension |
| typedef Point | Vertex |
| typedef CowPtr< const Domain > | DomainPtr |
| typedef TValue | Value |
| typedef DefaultConstImageRange< Self > | ConstRange |
| typedef DefaultImageRange< Self > | Range |
| typedef SetValueIterator< Self > | OutputIterator |
| output iterator | |
| typedef std::map< Point, Value >::iterator | Iterator |
| built-in iterators | |
| typedef std::map< Point, Value >::const_iterator | ConstIterator |
| typedef std::map< Point, Value >::reverse_iterator | ReverseIterator |
| typedef std::map< Point, Value >::const_reverse_iterator | ConstReverseIterator |
Public Member Functions | |
| BOOST_CONCEPT_ASSERT ((concepts::CDomain< TDomain >)) | |
| domain | |
| BOOST_CONCEPT_ASSERT ((concepts::CLabel< TValue >)) | |
| range of values | |
| ImageContainerBySTLMap (Clone< const Domain > aDomain, const Value &aValue=0) | |
| ImageContainerBySTLMap (const ImageContainerBySTLMap &other) | |
| ImageContainerBySTLMap & | operator= (const ImageContainerBySTLMap &other) |
| ~ImageContainerBySTLMap () | |
| Value | operator() (const Point &aPoint) const |
| void | setValue (const Point &aPoint, const Value &aValue) |
| const Domain & | domain () const |
| ConstRange | constRange () const |
| Range | range () |
| const Container & | container () const |
| Container & | container () |
| void | selfDisplay (std::ostream &out) const |
| bool | isValid () const |
| std::string | className () const |
| OutputIterator | outputIterator () |
Static Public Attributes | |
| static const Domain::Dimension | dimension |
| static constants | |
Private Attributes | |
| DomainPtr | myDomainPtr |
| Value | myDefaultValue |
| Default value. | |
Description of class 'ImageContainerBySTLMap'
Aim: Model of CImage implementing the association Point<->Value using an STL map.
Once constructed, the image is valid, i.e. every point of the image domain has a value, which can be read and overwritten. Note that the default value (returned for points that are not stored in the underlying STL map) can be chosen by the user.
As a model of concepts::CImage, this class provides two ways of accessing values:
This class also provides a setValue() method and an output iterator, which is returned by the outputIterator() method for writting purposes.
Definition at line 96 of file ImageContainerBySTLMap.h.
| std::map<Point,Value>::const_iterator DGtal::ImageContainerBySTLMap< TDomain, TValue >::ConstIterator |
Definition at line 251 of file ImageContainerBySTLMap.h.
| DefaultConstImageRange<Self> DGtal::ImageContainerBySTLMap< TDomain, TValue >::ConstRange |
Definition at line 125 of file ImageContainerBySTLMap.h.
| std::map<Point,Value>::const_reverse_iterator DGtal::ImageContainerBySTLMap< TDomain, TValue >::ConstReverseIterator |
Definition at line 253 of file ImageContainerBySTLMap.h.
| Parent DGtal::ImageContainerBySTLMap< TDomain, TValue >::Container |
Definition at line 104 of file ImageContainerBySTLMap.h.
| Domain::Dimension DGtal::ImageContainerBySTLMap< TDomain, TValue >::Dimension |
Definition at line 113 of file ImageContainerBySTLMap.h.
| TDomain DGtal::ImageContainerBySTLMap< TDomain, TValue >::Domain |
Definition at line 108 of file ImageContainerBySTLMap.h.
| CowPtr< const Domain > DGtal::ImageContainerBySTLMap< TDomain, TValue >::DomainPtr |
Definition at line 117 of file ImageContainerBySTLMap.h.
| Domain::Integer DGtal::ImageContainerBySTLMap< TDomain, TValue >::Integer |
Definition at line 111 of file ImageContainerBySTLMap.h.
| std::map<Point,Value>::iterator DGtal::ImageContainerBySTLMap< TDomain, TValue >::Iterator |
built-in iterators
Definition at line 250 of file ImageContainerBySTLMap.h.
| SetValueIterator<Self> DGtal::ImageContainerBySTLMap< TDomain, TValue >::OutputIterator |
output iterator
Definition at line 129 of file ImageContainerBySTLMap.h.
| std::map<typename TDomain::Point, TValue > DGtal::ImageContainerBySTLMap< TDomain, TValue >::Parent |
Definition at line 103 of file ImageContainerBySTLMap.h.
| Domain::Point DGtal::ImageContainerBySTLMap< TDomain, TValue >::Point |
Definition at line 109 of file ImageContainerBySTLMap.h.
| DefaultImageRange<Self> DGtal::ImageContainerBySTLMap< TDomain, TValue >::Range |
Definition at line 126 of file ImageContainerBySTLMap.h.
| std::map<Point,Value>::reverse_iterator DGtal::ImageContainerBySTLMap< TDomain, TValue >::ReverseIterator |
Definition at line 252 of file ImageContainerBySTLMap.h.
| ImageContainerBySTLMap<TDomain,TValue> DGtal::ImageContainerBySTLMap< TDomain, TValue >::Self |
Definition at line 102 of file ImageContainerBySTLMap.h.
| Domain::Size DGtal::ImageContainerBySTLMap< TDomain, TValue >::Size |
Definition at line 112 of file ImageContainerBySTLMap.h.
| TValue DGtal::ImageContainerBySTLMap< TDomain, TValue >::Value |
Definition at line 124 of file ImageContainerBySTLMap.h.
| Domain::Vector DGtal::ImageContainerBySTLMap< TDomain, TValue >::Vector |
Definition at line 110 of file ImageContainerBySTLMap.h.
| Point DGtal::ImageContainerBySTLMap< TDomain, TValue >::Vertex |
Definition at line 114 of file ImageContainerBySTLMap.h.
| DGtal::ImageContainerBySTLMap< TDomain, TValue >::ImageContainerBySTLMap | ( | Clone< const Domain > | aDomain, |
| const Value & | aValue = 0 ) |
Constructor from a pointer to a domain.
If Domain is a heavy type, consider giving instead a smart pointer on the domain (like CountedPtr).
| aDomain | the image domain. |
| aValue | a default value associated to the domain points that are not contained in the underlying map. |
| DGtal::ImageContainerBySTLMap< TDomain, TValue >::ImageContainerBySTLMap | ( | const ImageContainerBySTLMap< TDomain, TValue > & | other | ) |
Copy operator
| other | the object to copy. |
| DGtal::ImageContainerBySTLMap< TDomain, TValue >::~ImageContainerBySTLMap | ( | ) |
Destructor.
| DGtal::ImageContainerBySTLMap< TDomain, TValue >::BOOST_CONCEPT_ASSERT | ( | (concepts::CDomain< TDomain >) | ) |
domain
| DGtal::ImageContainerBySTLMap< TDomain, TValue >::BOOST_CONCEPT_ASSERT | ( | (concepts::CLabel< TValue >) | ) |
range of values
| std::string DGtal::ImageContainerBySTLMap< TDomain, TValue >::className | ( | ) | const |
| ConstRange DGtal::ImageContainerBySTLMap< TDomain, TValue >::constRange | ( | ) | const |
|
inline |
Give access to the underlying container.
Definition at line 229 of file ImageContainerBySTLMap.h.
|
inline |
Give access to the underlying container.
Definition at line 224 of file ImageContainerBySTLMap.h.
| const Domain & DGtal::ImageContainerBySTLMap< TDomain, TValue >::domain | ( | ) | const |
| bool DGtal::ImageContainerBySTLMap< TDomain, TValue >::isValid | ( | ) | const |
| Value DGtal::ImageContainerBySTLMap< TDomain, TValue >::operator() | ( | const Point & | aPoint | ) | const |
Get the value of an image at a given position given by a Point.
| aPoint | the point. |
| ImageContainerBySTLMap & DGtal::ImageContainerBySTLMap< TDomain, TValue >::operator= | ( | const ImageContainerBySTLMap< TDomain, TValue > & | other | ) |
Assignement operator
| other | the object to copy. |
| OutputIterator DGtal::ImageContainerBySTLMap< TDomain, TValue >::outputIterator | ( | ) |
Construct a Iterator on the image
| Range DGtal::ImageContainerBySTLMap< TDomain, TValue >::range | ( | ) |
| void DGtal::ImageContainerBySTLMap< TDomain, TValue >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
| out | the output stream where the object is written. |
| void DGtal::ImageContainerBySTLMap< TDomain, TValue >::setValue | ( | const Point & | aPoint, |
| const Value & | aValue ) |
Set a value on an Image at a position specified by a Point.
it must be a point in the image domain.| aPoint | the point. |
| aValue | the value. |
|
static |
static constants
Definition at line 120 of file ImageContainerBySTLMap.h.
|
private |
Default value.
Definition at line 140 of file ImageContainerBySTLMap.h.
|
private |
Shared pointer on the image domain, Since the domain is not mutable, not assignable, it is shared by all the copies of *this
Definition at line 137 of file ImageContainerBySTLMap.h.