36#if defined(ImageContainerBySTLVector_RECURSES)
37#error Recursive header files inclusion detected in ImageContainerBySTLVector.h
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>
78 typedef typename TImage::Point
Point;
124 template <
typename TDomain,
typename TValue>
264 typedef typename std::vector<Value>::iterator
Iterator;
268 typedef typename std::vector<Value>::difference_type
Difference;
350 ( *myMap ) [
myPos ] = aVal;
507 tmp[ aDimension ] =
myDomain.upperBound() [ aDimension ] + 1;
542 template <
typename Domain,
typename V>
547 object.selfDisplay ( out );
556#include "DGtal/images/ImageContainerBySTLVector.ih"
563#undef ImageContainerBySTLVector_RECURSES
TImage::Difference Difference
DistanceFunctorFromPoint(const TImage *aImagePtr)
Difference operator()(const Point &aPoint) const
const TImage * myImagePtr
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
Space::Dimension Dimension
ImageContainerBySTLVector< Domain, Value > * myMap
Copy of the underlying images.
Dimension myDimension
Dimension on which the iterator must iterate.
void setValue(const Value aVal)
ptrdiff_t difference_type
bool operator!=(const SpanIterator &it) const
Size myPos
Current Point in the domain.
bool operator==(const SpanIterator &it) const
std::bidirectional_iterator_tag iterator_category
Size myShift
Padding variable.
SpanIterator & operator--()
const Value & operator*()
SpanIterator(const Point &p, const Dimension aDim, ImageContainerBySTLVector< Domain, Value > *aMap)
SpanIterator & operator++()
ImageContainerBySTLVector(const Domain &aDomain)
std::vector< TValue > Parent
std::vector< Value >::const_reverse_iterator ConstReverseIterator
Domain myDomain
Image domain.
Value operator()(const Point &aPoint) const
BOOST_STATIC_ASSERT((boost::is_same< Domain, HyperRectDomain< typename Domain::Space > >::value))
domain should be rectangular
std::vector< Value >::reverse_iterator ReverseOutputIterator
void setValue(const Point &aPoint, const Value &aValue)
const Vector & extent() const
std::vector< Value >::difference_type Difference
ImageContainerBySTLVector(const ImageContainerBySTLVector &other)
const Domain & domain() const
void selfDisplay(std::ostream &out) const
std::string className() const
BOOST_CONCEPT_ASSERT((concepts::CLabel< TValue >))
range of values
std::vector< Value >::iterator OutputIterator
ImageContainerBySTLVector< TDomain, TValue > Self
std::vector< Value >::const_iterator ConstIterator
std::vector< Value >::iterator Iterator
SpanIterator spanEnd(const Point &aPoint, const Dimension aDimension)
SimpleRandomAccessRangeFromPoint< ConstIterator, Iterator, DistanceFunctorFromPoint< Self > > Range
SimpleRandomAccessConstRangeFromPoint< ConstIterator, DistanceFunctorFromPoint< Self > > ConstRange
ImageContainerBySTLVector & operator=(const ImageContainerBySTLVector &other)
std::vector< Value >::reverse_iterator ReverseIterator
void translateDomain(const Vector &aShift)
void setValue(SpanIterator &it, const Value &aValue)
Vector myExtent
Domain extent (stored for linearization efficiency)
Value getValue(SpanIterator &it)
SpanIterator spanBegin(const Point &aPoint, const Dimension aDimension)
~ImageContainerBySTLVector()
Size linearized(const Point &aPoint) const
ConstRange constRange() const
BOOST_STATIC_CONSTANT(Dimension, dimension=Domain::Space::dimension)
BOOST_CONCEPT_ASSERT((concepts::CDomain< TDomain >))
domain
const Container & container() const
Domain::Dimension Dimension
Aim: model of CConstBidirectionalRangeFromPoint that adapts any range of elements bounded by two iter...
Aim: model of CBidirectionalRangeFromPoint that adapts any range of elements bounded by two iterators...
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Aim: This concept represents a digital domain, i.e. a non mutable subset of points of the given digit...
Aim: Define the concept of DGtal labels. Models of CLabel can be default-constructible,...