36 #if defined(ImageContainerBySTLVector_RECURSES)
37 #error Recursive header files inclusion detected in ImageContainerBySTLVector.h
38 #else // defined(ImageContainerBySTLVector_RECURSES)
40 #define ImageContainerBySTLVector_RECURSES
42 #if !defined ImageContainerBySTLVector_h
44 #define ImageContainerBySTLVector_h
50 #include "DGtal/base/Common.h"
51 #include "DGtal/base/SimpleRandomAccessConstRangeFromPoint.h"
52 #include "DGtal/base/SimpleRandomAccessRangeFromPoint.h"
53 #include "DGtal/base/CLabel.h"
54 #include "DGtal/kernel/domains/CDomain.h"
55 #include "DGtal/kernel/SpaceND.h"
56 #include "DGtal/kernel/domains/HyperRectDomain.h"
57 #include "DGtal/kernel/NumberTraits.h"
72 template<
typename TImage>
124 template <
typename TDomain,
typename TValue>
262 typedef typename std::vector<Value>::iterator
Iterator;
266 typedef typename std::vector<Value>::difference_type
Difference;
337 ( *myMap ) [
myPos ] = aVal;
463 it.setValue ( aValue );
478 return SpanIterator (
aPoint, aDimension,
this );
494 tmp[ aDimension ] =
myDomain.upperBound() [ aDimension ] + 1;
495 return SpanIterator ( tmp, aDimension,
this );
529 template <
typename Domain,
typename V>
534 object.selfDisplay ( out );
543 #include "DGtal/images/ImageContainerBySTLVector.ih"
548 #endif // !defined ImageContainerBySTLVector_h
550 #undef ImageContainerBySTLVector_RECURSES
551 #endif // else defined(ImageContainerBySTLVector_RECURSES)
std::vector< Value >::reverse_iterator ReverseIterator
Vector myExtent
Domain extent (stored for linearization efficiency)
Space::Dimension Dimension
ImageContainerBySTLVector(const ImageContainerBySTLVector &other)
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
Aim: model of CConstBidirectionalRangeFromPoint that adapts any range of elements bounded by two iter...
Domain myDomain
Image domain.
~ImageContainerBySTLVector()
const TImage * myImagePtr
BOOST_STATIC_CONSTANT(Dimension, dimension=Domain::Space::dimension)
SpanIterator & operator--()
ImageContainerBySTLVector(const Domain &aDomain)
ptrdiff_t difference_type
std::vector< Value >::const_iterator ConstIterator
ConstRange constRange() const
SpanIterator spanBegin(const Point &aPoint, const Dimension aDimension)
void translateDomain(const Vector &aShift)
Difference operator()(const Point &aPoint) const
const Domain & domain() const
void setValue(const Point &aPoint, const Value &aValue)
Size linearized(const Point &aPoint) const
BOOST_STATIC_ASSERT((boost::is_same< Domain, HyperRectDomain< typename Domain::Space > >::value))
domain should be rectangular
Dimension myDimension
Dimension on which the iterator must iterate.
void setValue(const Value aVal)
std::vector< Value >::iterator OutputIterator
BOOST_CONCEPT_ASSERT((concepts::CDomain< TDomain >))
domain
SimpleRandomAccessConstRangeFromPoint< ConstIterator, DistanceFunctorFromPoint< Self > > ConstRange
std::string className() const
SpanIterator & operator++()
ImageContainerBySTLVector< Domain, Value > * myMap
Copy of the underlying images.
Aim: This concept represents a digital domain, i.e. a non mutable subset of points of the given digit...
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: model of CBidirectionalRangeFromPoint that adapts any range of elements bounded by two iterators...
const Value & operator*()
TImage::Difference Difference
std::vector< Value >::iterator Iterator
DistanceFunctorFromPoint(const TImage *aImagePtr)
SpanIterator spanEnd(const Point &aPoint, const Dimension aDimension)
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Aim: Define the concept of DGtal labels. Models of CLabel can be default-constructible,...
std::vector< Value >::reverse_iterator ReverseOutputIterator
Domain::Dimension Dimension
void selfDisplay(std::ostream &out) const
void setValue(SpanIterator &it, const Value &aValue)
std::bidirectional_iterator_tag iterator_category
SpanIterator(const Point &p, const Dimension aDim, ImageContainerBySTLVector< Domain, Value > *aMap)
ImageContainerBySTLVector< TDomain, TValue > Self
Value operator()(const Point &aPoint) const
Size myShift
Padding variable.
Value getValue(SpanIterator &it)
ImageContainerBySTLVector & operator=(const ImageContainerBySTLVector &other)
BOOST_CONCEPT_ASSERT((concepts::CLabel< TValue >))
range of values
bool operator==(const SpanIterator &it) const
std::vector< Value >::const_reverse_iterator ConstReverseIterator
Size myPos
Current Point in the domain.
SimpleRandomAccessRangeFromPoint< ConstIterator, Iterator, DistanceFunctorFromPoint< Self > > Range
bool operator!=(const SpanIterator &it) const
std::vector< Value >::difference_type Difference