DGtal
0.6.devel
|
#include <ImageContainerBySTLVector.h>
Data Structures | |
class | SpanIterator |
Public Types | |
typedef ImageContainerBySTLVector < TDomain, TValue > | Self |
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 TValue | Value |
typedef vector< Value >::iterator | Iterator |
typedef vector< Value > ::const_iterator | ConstIterator |
typedef vector< Value > ::reverse_iterator | ReverseIterator |
typedef vector< Value > ::const_reverse_iterator | ConstReverseIterator |
typedef vector< Value > ::difference_type | Difference |
typedef vector< Value >::iterator | OutputIterator |
typedef vector< Value > ::reverse_iterator | ReverseOutputIterator |
typedef SimpleRandomAccessConstRangeFromPoint < ConstIterator, DistanceFunctorFromPoint< Self > > | ConstRange |
typedef SimpleRandomAccessRangeFromPoint < ConstIterator, Iterator, DistanceFunctorFromPoint< Self > > | Range |
Static Public Attributes | |
static const Domain::Dimension | dimension = Domain::dimension |
Private Attributes | |
Domain | myDomain |
Vector | myExtent |
Additional Inherited Members | |
![]() | |
T | elements |
Description of class 'ImageContainerBySTLVector'
Aim: Model of CImage implementing the association Point<->Value using a STL vector as container. A linearization of domain points is used to build the STL vector index.
As a model of 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 writing purposes.
Lastly, built-in iterators and a fast span iterator to perform 1D scans are also provided.
TDomain | a HyperRectDomain. |
TValue | at least a model of CLabel. |
Definition at line 126 of file ImageContainerBySTLVector.h.
typedef vector<Value>::const_iterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::ConstIterator |
Definition at line 266 of file ImageContainerBySTLVector.h.
typedef SimpleRandomAccessConstRangeFromPoint<ConstIterator,DistanceFunctorFromPoint<Self> > DGtal::ImageContainerBySTLVector< TDomain, TValue >::ConstRange |
Definition at line 275 of file ImageContainerBySTLVector.h.
typedef vector<Value>::const_reverse_iterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::ConstReverseIterator |
Definition at line 268 of file ImageContainerBySTLVector.h.
typedef vector<Value>::difference_type DGtal::ImageContainerBySTLVector< TDomain, TValue >::Difference |
Definition at line 269 of file ImageContainerBySTLVector.h.
typedef Domain::Dimension DGtal::ImageContainerBySTLVector< TDomain, TValue >::Dimension |
Definition at line 140 of file ImageContainerBySTLVector.h.
typedef TDomain DGtal::ImageContainerBySTLVector< TDomain, TValue >::Domain |
Definition at line 135 of file ImageContainerBySTLVector.h.
typedef Domain::Integer DGtal::ImageContainerBySTLVector< TDomain, TValue >::Integer |
Definition at line 138 of file ImageContainerBySTLVector.h.
typedef vector<Value>::iterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::Iterator |
Definition at line 265 of file ImageContainerBySTLVector.h.
typedef vector<Value>::iterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::OutputIterator |
Definition at line 271 of file ImageContainerBySTLVector.h.
typedef Domain::Point DGtal::ImageContainerBySTLVector< TDomain, TValue >::Point |
Definition at line 136 of file ImageContainerBySTLVector.h.
typedef SimpleRandomAccessRangeFromPoint<ConstIterator,Iterator,DistanceFunctorFromPoint<Self> > DGtal::ImageContainerBySTLVector< TDomain, TValue >::Range |
Definition at line 276 of file ImageContainerBySTLVector.h.
typedef vector<Value>::reverse_iterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::ReverseIterator |
Definition at line 267 of file ImageContainerBySTLVector.h.
typedef vector<Value>::reverse_iterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::ReverseOutputIterator |
Definition at line 272 of file ImageContainerBySTLVector.h.
typedef ImageContainerBySTLVector<TDomain, TValue> DGtal::ImageContainerBySTLVector< TDomain, TValue >::Self |
Definition at line 131 of file ImageContainerBySTLVector.h.
typedef Domain::Size DGtal::ImageContainerBySTLVector< TDomain, TValue >::Size |
Definition at line 139 of file ImageContainerBySTLVector.h.
typedef TValue DGtal::ImageContainerBySTLVector< TDomain, TValue >::Value |
Definition at line 152 of file ImageContainerBySTLVector.h.
typedef Domain::Vector DGtal::ImageContainerBySTLVector< TDomain, TValue >::Vector |
Definition at line 137 of file ImageContainerBySTLVector.h.
typedef Point DGtal::ImageContainerBySTLVector< TDomain, TValue >::Vertex |
Definition at line 141 of file ImageContainerBySTLVector.h.
|
inline |
Constructor from a Domain
aDomain | the image domain. |
Definition at line 48 of file ImageContainerBySTLVector.ih.
References DGtal::ImageContainerBySTLVector< TDomain, TValue >::myDomain.
|
inline |
Copy constructor
other | the object to copy. |
Definition at line 58 of file ImageContainerBySTLVector.ih.
|
inline |
DGtal::ImageContainerBySTLVector< TDomain, TValue >::BOOST_CONCEPT_ASSERT | ( | (CDomain< TDomain >) | ) |
domain
DGtal::ImageContainerBySTLVector< TDomain, TValue >::BOOST_CONCEPT_ASSERT | ( | (CLabel< TValue >) | ) |
range of values
DGtal::ImageContainerBySTLVector< TDomain, TValue >::BOOST_STATIC_ASSERT | ( | (boost::is_same< Domain, HyperRectDomain< SpaceND< dimension, Integer > > >::value) | ) |
domain should be rectangular
|
inline |
Definition at line 187 of file ImageContainerBySTLVector.ih.
|
inline |
Definition at line 132 of file ImageContainerBySTLVector.ih.
|
inline |
Definition at line 123 of file ImageContainerBySTLVector.ih.
|
inline |
Definition at line 149 of file ImageContainerBySTLVector.ih.
|
inline |
Returns the value of the image at a given SpanIterator position.
it | position given by a SpanIterator. |
Definition at line 509 of file ImageContainerBySTLVector.h.
|
inline |
Definition at line 177 of file ImageContainerBySTLVector.ih.
|
inline |
Linearized a point and return the vector position.
aPoint | the point to convert to an index |
aPoint | in the container |
Definition at line 304 of file ImageContainerBySTLVector.ih.
Referenced by DGtal::ImageContainerBySTLVector< TDomain, TValue >::SpanIterator::SpanIterator().
|
inline |
Get the value of an image at a given position given by a Point.
aPoint | the point. |
Definition at line 92 of file ImageContainerBySTLVector.ih.
|
inline |
Assignment operator
other | the object to copy. |
Definition at line 68 of file ImageContainerBySTLVector.ih.
References DGtal::ImageContainerBySTLVector< TDomain, TValue >::myDomain, and DGtal::ImageContainerBySTLVector< TDomain, TValue >::myExtent.
|
inline |
Definition at line 141 of file ImageContainerBySTLVector.ih.
|
inline |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Definition at line 167 of file ImageContainerBySTLVector.ih.
void DGtal::ImageContainerBySTLVector< 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. |
Referenced by DGtal::VoronoiMap< TSpace, TPointPredicate, p >::compute(), DGtal::DistanceTransformation< TSpace, TPointPredicate, p, IntegerLong >::computeFirstStep1D(), DGtal::VoronoiMap< TSpace, TPointPredicate, p >::computeOtherStep1D(), and DGtal::DistanceTransformation< TSpace, TPointPredicate, p, IntegerLong >::computeOtherStep1D().
|
inline |
Set a value on an Image at a position specified by an SpanIterator.
it | iterator on the location. |
aValue | the value. |
Definition at line 466 of file ImageContainerBySTLVector.h.
|
inline |
Create a begin() SpanIterator at a given position in a given direction.
aPoint | the starting point of the SpanIterator. |
aDimension | the dimension on which the iterator iterates. |
Definition at line 481 of file ImageContainerBySTLVector.h.
Referenced by DGtal::DistanceTransformation< TSpace, TPointPredicate, p, IntegerLong >::computeOtherStep1D().
|
inline |
Create an end() SpanIterator at a given position in a given direction.
aPoint | a point belonging to the current image dimension (not necessarily the point used in the span_begin() method. |
aDimension | the dimension on which the iterator iterates. |
Definition at line 496 of file ImageContainerBySTLVector.h.
Referenced by DGtal::DistanceTransformation< TSpace, TPointPredicate, p, IntegerLong >::computeOtherStep1D().
|
inline |
Translate the underlying domain by aShift
aShift | any vector |
Definition at line 158 of file ImageContainerBySTLVector.ih.
Referenced by DGtal::DistanceTransformation< TSpace, TPointPredicate, p, IntegerLong >::compute().
|
static |
static constants
Definition at line 144 of file ImageContainerBySTLVector.h.
|
private |
Image domain.
Definition at line 161 of file ImageContainerBySTLVector.h.
Referenced by DGtal::ImageContainerBySTLVector< TDomain, TValue >::ImageContainerBySTLVector(), DGtal::ImageContainerBySTLVector< TDomain, TValue >::operator=(), and DGtal::ImageContainerBySTLVector< Domain, Value >::spanEnd().
|
private |
Domain extent (stored for linearization efficiency)
Definition at line 164 of file ImageContainerBySTLVector.h.
Referenced by DGtal::ImageContainerBySTLVector< TDomain, TValue >::operator=(), and DGtal::ImageContainerBySTLVector< TDomain, TValue >::SpanIterator::SpanIterator().