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>
532 operator<< ( std::ostream & out, const ImageContainerBySTLVector<Domain, V> & object )
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 >::iterator Iterator
Aim: Define the concept of DGtal labels. Models of CLabel can be default-constructible, assignable and equality comparable.
SpanIterator & operator++()
Difference operator()(const Point &aPoint) const
ptrdiff_t difference_type
void setValue(const Value aVal)
Domain::Dimension Dimension
SpanIterator spanEnd(const Point &aPoint, const Dimension aDimension)
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
ImageContainerBySTLVector< TDomain, TValue > Self
std::vector< Value >::reverse_iterator ReverseOutputIterator
bool operator==(const SpanIterator &it) const
void selfDisplay(std::ostream &out) const
ImageContainerBySTLVector & operator=(const ImageContainerBySTLVector &other)
void setValue(SpanIterator &it, const Value &aValue)
Value operator()(const Point &aPoint) const
Space::Dimension Dimension
const TImage * myImagePtr
Value getValue(SpanIterator &it)
SpanIterator(const Point &p, const Dimension aDim, ImageContainerBySTLVector< Domain, Value > *aMap)
std::bidirectional_iterator_tag iterator_category
Aim: model of CBidirectionalRangeFromPoint that adapts any range of elements bounded by two iterators...
TImage::Difference Difference
Aim: model of CConstBidirectionalRangeFromPoint that adapts any range of elements bounded by two iter...
std::vector< Value >::const_reverse_iterator ConstReverseIterator
Size myShift
Padding variable.
Aim: This concept represents a digital domain, i.e. a non mutable subset of points of the given digit...
SimpleRandomAccessRangeFromPoint< ConstIterator, Iterator, DistanceFunctorFromPoint< Self > > Range
std::vector< Value >::difference_type Difference
Dimension myDimension
Dimension on which the iterator must iterate.
ImageContainerBySTLVector< Domain, Value > * myMap
Copy of the underlying images.
std::vector< Value >::reverse_iterator ReverseIterator
DistanceFunctorFromPoint(const TImage *aImagePtr)
Domain myDomain
Image domain.
~ImageContainerBySTLVector()
Vector myExtent
Domain extent (stored for linearization efficiency)
const Value & operator*()
BOOST_STATIC_CONSTANT(Dimension, dimension=Domain::Space::dimension)
DGtal is the top-level namespace which contains all DGtal functions and types.
ConstRange constRange() const
SpanIterator spanBegin(const Point &aPoint, const Dimension aDimension)
const Domain & domain() const
ImageContainerBySTLVector(const Domain &aDomain)
SpanIterator & operator--()
std::vector< Value >::const_iterator ConstIterator
std::vector< Value >::iterator OutputIterator
BOOST_CONCEPT_ASSERT((concepts::CDomain< TDomain >))
domain
void translateDomain(const Vector &aShift)
void setValue(const Point &aPoint, const Value &aValue)
Size linearized(const Point &aPoint) const
bool operator!=(const SpanIterator &it) const
BOOST_STATIC_ASSERT((boost::is_same< Domain, HyperRectDomain< typename Domain::Space > >::value))
domain should be rectangular
std::string className() const
Size myPos
Current Point in the domain.
SimpleRandomAccessConstRangeFromPoint< ConstIterator, DistanceFunctorFromPoint< Self > > ConstRange