DGtal::Image< Domain, ValueType, ImageContainer > Class Template Reference

#include <Image.h>

Public Types

typedef Domain::Point Point
typedef ImageContainer::Iterator Iterator
typedef
ImageContainer::ConstIterator 
ConstIterator
typedef
ImageContainer::SpanIterator 
SpanIterator

Public Member Functions

 BOOST_CONCEPT_ASSERT ((CImageContainer< Point, ValueType, ImageContainer >))
 Image (const typename Domain::Point &aPointA, const typename Domain::Point &aPointB)
 ~Image ()
ValueType operator() (const Point &aPoint)
ValueType operator() (const Iterator &aIt)
ValueType operator() (const SpanIterator &aIt)
void setValue (const Point &aPoint, const ValueType aVal)
void setValue (Iterator &aIt, const ValueType aVal)
void setValue (SpanIterator &aIt, const ValueType aVal)
Iterator begin ()
Iterator end ()
SpanIterator span_begin (const Point &aPoint, const std::size_t aDimension)
SpanIterator span_end (const Point &aPoint, const std::size_t aDimension)
Iterator rend ()
Iterator rbegin ()
ConstIterator begin () const
ConstIterator end () const
ConstIterator rend () const
ConstIterator rbegin () const
void selfDisplay (std::ostream &out) const
bool isValid () const
void setDefaultValue (const ValueType aValue)

Private Member Functions

Imageoperator= (const Image &other)

Private Attributes

ValueType myDefaultValue
ImageContainer myImageMap

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
class DGtal::Image< Domain, ValueType, ImageContainer >


Member Typedef Documentation

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
typedef ImageContainer::ConstIterator DGtal::Image< Domain, ValueType, ImageContainer >::ConstIterator
template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
typedef ImageContainer::Iterator DGtal::Image< Domain, ValueType, ImageContainer >::Iterator
template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
typedef Domain::Point DGtal::Image< Domain, ValueType, ImageContainer >::Point
template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
typedef ImageContainer::SpanIterator DGtal::Image< Domain, ValueType, ImageContainer >::SpanIterator

Constructor & Destructor Documentation

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
DGtal::Image< Domain, ValueType, ImageContainer >::Image ( const typename Domain::Point &  aPointA,
const typename Domain::Point &  aPointB 
)

Constuctor as the bounding box of two points.

Parameters:
aPointA first point.
aPointB second point.
template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
DGtal::Image< Domain, ValueType, ImageContainer >::~Image (  ) 

Destructor.x


Member Function Documentation

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
ConstIterator DGtal::Image< Domain, ValueType, ImageContainer >::begin (  )  const [inline]

ImageContainer built-in begin() const iterator

Returns:
the built-in begin() const iterator

References DGtal::Image< Domain, ValueType, ImageContainer >::myImageMap.

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
Iterator DGtal::Image< Domain, ValueType, ImageContainer >::begin (  )  [inline]

ImageContainer built-in begin() iterator

Returns:
the built-in begin() iterator

References DGtal::Image< Domain, ValueType, ImageContainer >::myImageMap.

Referenced by testBuiltInIterators(), and testSpanIterators().

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
DGtal::Image< Domain, ValueType, ImageContainer >::BOOST_CONCEPT_ASSERT ( (CImageContainer< Point, ValueType, ImageContainer >)   ) 
template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
ConstIterator DGtal::Image< Domain, ValueType, ImageContainer >::end (  )  const [inline]

ImageContainer built-in end() const iterator

Returns:
the built-in end() const iterator

References DGtal::Image< Domain, ValueType, ImageContainer >::myImageMap.

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
Iterator DGtal::Image< Domain, ValueType, ImageContainer >::end (  )  [inline]

ImageContainer built-in end() iterator

Returns:
the built-in end() iterator

References DGtal::Image< Domain, ValueType, ImageContainer >::myImageMap.

Referenced by testBuiltInIterators(), and testSpanIterators().

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
bool DGtal::Image< Domain, ValueType, ImageContainer >::isValid (  )  const

Checks the validity/consistency of the object.

Returns:
'true' if the object is valid, 'false' otherwise.

Referenced by testImageContainer(), and testSimpleImage().

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
ValueType DGtal::Image< Domain, ValueType, ImageContainer >::operator() ( const SpanIterator aIt  ) 

Generic function to get the value of an image at a point

Parameters:
aPoint 
template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
ValueType DGtal::Image< Domain, ValueType, ImageContainer >::operator() ( const Iterator aIt  ) 

Generic function to get the value of an image at position given by a build-in iterator.

Todo:
verifier le default value sur les iterateurs
Parameters:
aIt the iteror
Returns:
the value referenced by the iterator
template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
ValueType DGtal::Image< Domain, ValueType, ImageContainer >::operator() ( const Point aPoint  ) 

Generic function to get the value of an image at a point. If the point is out of the image range, a default value is returned. The default value can be changed by setDefaultValue.

Parameters:
aPoint the point
Returns:
the value at the point
Parameters:
aPoint 
template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
Image& DGtal::Image< Domain, ValueType, ImageContainer >::operator= ( const Image< Domain, ValueType, ImageContainer > &  other  )  [private]

Assignment.

Parameters:
other the object to copy.
Returns:
a reference on 'this'. Forbidden by default.
template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
ConstIterator DGtal::Image< Domain, ValueType, ImageContainer >::rbegin (  )  const [inline]

ImageContainer built-in rbegin() const iterator

Returns:
the built-in rbegin() const iterator

References DGtal::Image< Domain, ValueType, ImageContainer >::myImageMap.

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
Iterator DGtal::Image< Domain, ValueType, ImageContainer >::rbegin (  )  [inline]

ImageContainer built-in rbegin() iterator

Returns:
the built-in rbegin() iterator

References DGtal::Image< Domain, ValueType, ImageContainer >::myImageMap.

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
ConstIterator DGtal::Image< Domain, ValueType, ImageContainer >::rend (  )  const [inline]

ImageContainer built-in rend() const iterator

Returns:
the built-in rend() const iterator

References DGtal::Image< Domain, ValueType, ImageContainer >::myImageMap.

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
Iterator DGtal::Image< Domain, ValueType, ImageContainer >::rend (  )  [inline]

ImageContainer built-in rend() iterator

Returns:
the built-in rend() iterator

References DGtal::Image< Domain, ValueType, ImageContainer >::myImageMap.

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
void DGtal::Image< Domain, ValueType, ImageContainer >::selfDisplay ( std::ostream &  out  )  const

Writes/Displays the object on an output stream.

Parameters:
out the output stream where the object is written.
template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
void DGtal::Image< Domain, ValueType, ImageContainer >::setDefaultValue ( const ValueType  aValue  )  [inline]

Change the default value of type DefaultValue used in case of out_of_range.

Parameters:
aValue the new default value.

References DGtal::Image< Domain, ValueType, ImageContainer >::myDefaultValue.

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
void DGtal::Image< Domain, ValueType, ImageContainer >::setValue ( SpanIterator aIt,
const ValueType  aVal 
) [inline]

Set a value in a Image position given by a span iterator

Parameters:
aIt the span iterator
aVal the value to store

References DGtal::Image< Domain, ValueType, ImageContainer >::myImageMap.

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
void DGtal::Image< Domain, ValueType, ImageContainer >::setValue ( Iterator aIt,
const ValueType  aVal 
) [inline]

Set a value in a Image position given by a built-in iterator

Parameters:
aIt the built-in iterator
aVal the value to store

References DGtal::Image< Domain, ValueType, ImageContainer >::myImageMap.

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
void DGtal::Image< Domain, ValueType, ImageContainer >::setValue ( const Point aPoint,
const ValueType  aVal 
) [inline]

Set a value in a Image position.

Parameters:
aPoint the position as a Point
aVal the value to store

References DGtal::Image< Domain, ValueType, ImageContainer >::myImageMap.

Referenced by testSpanIterators().

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
SpanIterator DGtal::Image< Domain, ValueType, ImageContainer >::span_begin ( const Point aPoint,
const std::size_t  aDimension 
) [inline]

ImageContainer span iterator starting at aPoint along dimension.

Parameters:
aPoint starting point
aDimension direction of the span iterator
Returns:
the begin span iterator

References DGtal::Image< Domain, ValueType, ImageContainer >::myImageMap.

Referenced by testSpanIterators().

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
SpanIterator DGtal::Image< Domain, ValueType, ImageContainer >::span_end ( const Point aPoint,
const std::size_t  aDimension 
) [inline]

ImageContainer span "end" iterator starting at aPoint along dimension.

Parameters:
aPoint starting point
aDimension direction of the span iterator
Returns:
the end span iterator

References DGtal::Image< Domain, ValueType, ImageContainer >::myImageMap.

Referenced by testSpanIterators().


Field Documentation

template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
ValueType DGtal::Image< Domain, ValueType, ImageContainer >::myDefaultValue [private]
template<typename Domain, typename ValueType, typename ImageContainer = ImageContainerBySTLVector<typename Domain::Point, ValueType >>
ImageContainer DGtal::Image< Domain, ValueType, ImageContainer >::myImageMap [private]

The documentation for this class was generated from the following file:
Generated on Mon Jul 12 08:23:46 2010 for DGtal by  doxygen 1.6.3