Data Structures | Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes

DGtal::ImageContainerBySTLVector< TDomain, TValueType > Class Template Reference

#include <ImageContainerBySTLVector.h>

Inheritance diagram for DGtal::ImageContainerBySTLVector< TDomain, TValueType >:
Inheritance graph
[legend]
Collaboration diagram for DGtal::ImageContainerBySTLVector< TDomain, TValueType >:
Collaboration graph
[legend]

Data Structures

struct  DefaultDrawStyle
class  SpanIterator

Public Types

typedef TValueType ValueType
typedef TDomain Domain
typedef Domain::Point Point
typedef Domain::Vector Vector
typedef Domain::Dimension Dimension
typedef Domain::Integer Integer
typedef Domain::Size Size
typedef vector< ValueType >
::iterator 
Iterator
typedef vector< ValueType >
::const_iterator 
ConstIterator

Public Member Functions

 BOOST_CONCEPT_ASSERT ((CValueType< TValueType >))
 BOOST_CONCEPT_ASSERT ((CDomain< TDomain >))
 ImageContainerBySTLVector (const Point &aPointA, const Point &aPointB)
 ~ImageContainerBySTLVector ()
ValueType operator() (const Point &aPoint) const
ValueType operator() (ConstIterator &it) const
ValueType operator() (Iterator &it) const
void setValue (const Point &aPoint, const ValueType &aValue)
void setValue (Iterator &it, const ValueType &aValue)
void selfDisplay (std::ostream &out) const
bool isValid () const
Vector extent () const
Point lowerBound () const
Point upperBound () const
void setValue (SpanIterator &it, const ValueType &aValue)
SpanIterator spanBegin (const Point &aPoint, const Dimension aDimension)
SpanIterator spanEnd (const Point &aPoint, const Dimension aDimension)
ValueType operator() (const SpanIterator &it)
DrawableWithDGtalBoarddefaultStyle () const
std::string styleName () const
template<typename Colormap >
void selfDraw (DGtalBoard &board, const ValueType &minValue, const ValueType &maxValue) const

Static Public Attributes

static const Domain::Dimension staticDimension = Domain::staticDimension

Private Member Functions

Size linearized (const Point &aPoint) const

Private Attributes

Point myLowerBound
Point myUpperBound

Detailed Description

template<typename TDomain, typename TValueType>
class DGtal::ImageContainerBySTLVector< TDomain, TValueType >

Description of class 'ImageContainerBySTLVector'

Aim: Model of CImageContainer implementing the association Point<->Value using a std::vector. This class provides built-in iterators and fast SpanIterators to perform 1D scans.

See also:
testImage.cpp
testImageContainerBenchmark.cpp
Examples:

distancetransform2D.cpp.


Member Typedef Documentation

template<typename TDomain, typename TValueType>
typedef vector<ValueType>::const_iterator DGtal::ImageContainerBySTLVector< TDomain, TValueType >::ConstIterator
template<typename TDomain, typename TValueType>
typedef Domain::Dimension DGtal::ImageContainerBySTLVector< TDomain, TValueType >::Dimension
template<typename TDomain, typename TValueType>
typedef TDomain DGtal::ImageContainerBySTLVector< TDomain, TValueType >::Domain
template<typename TDomain, typename TValueType>
typedef Domain::Integer DGtal::ImageContainerBySTLVector< TDomain, TValueType >::Integer
template<typename TDomain, typename TValueType>
typedef vector<ValueType>::iterator DGtal::ImageContainerBySTLVector< TDomain, TValueType >::Iterator
template<typename TDomain, typename TValueType>
typedef Domain::Point DGtal::ImageContainerBySTLVector< TDomain, TValueType >::Point
template<typename TDomain, typename TValueType>
typedef Domain::Size DGtal::ImageContainerBySTLVector< TDomain, TValueType >::Size
template<typename TDomain, typename TValueType>
typedef TValueType DGtal::ImageContainerBySTLVector< TDomain, TValueType >::ValueType
template<typename TDomain, typename TValueType>
typedef Domain::Vector DGtal::ImageContainerBySTLVector< TDomain, TValueType >::Vector

Constructor & Destructor Documentation

template<typename TDomain, typename TValueType>
DGtal::ImageContainerBySTLVector< TDomain, TValueType >::ImageContainerBySTLVector ( const Point aPointA,
const Point aPointB 
)
template<typename TDomain, typename TValueType>
DGtal::ImageContainerBySTLVector< TDomain, TValueType >::~ImageContainerBySTLVector (  ) 

Member Function Documentation

template<typename TDomain, typename TValueType>
DGtal::ImageContainerBySTLVector< TDomain, TValueType >::BOOST_CONCEPT_ASSERT ( (CValueType< TValueType >)   ) 
template<typename TDomain, typename TValueType>
DGtal::ImageContainerBySTLVector< TDomain, TValueType >::BOOST_CONCEPT_ASSERT ( (CDomain< TDomain >)   ) 
template<typename TDomain, typename TValueType>
DrawableWithDGtalBoard* DGtal::ImageContainerBySTLVector< TDomain, TValueType >::defaultStyle (  )  const

Default drawing style object.

Returns:
the dyn. alloc. default style for this object.
template<typename TDomain, typename TValueType>
Vector DGtal::ImageContainerBySTLVector< TDomain, TValueType >::extent (  )  const

Returns the extent of an Image.

Returns:
the image extent as a Vector.
template<typename TDomain, typename TValueType>
bool DGtal::ImageContainerBySTLVector< TDomain, TValueType >::isValid (  )  const [inline]
Returns:
the validity of the Image
template<typename TDomain, typename TValueType>
Size DGtal::ImageContainerBySTLVector< TDomain, TValueType >::linearized ( const Point aPoint  )  const [private]

Linearized a point and return the vector position.

Parameters:
aPoint the point to convert to an index
Returns:
the index of
Parameters:
aPoint in the container

Referenced by DGtal::ImageContainerBySTLVector< TDomain, TValueType >::SpanIterator::SpanIterator().

template<typename TDomain, typename TValueType>
Point DGtal::ImageContainerBySTLVector< TDomain, TValueType >::lowerBound (  )  const [inline]
Returns:
the image lower point.
template<typename TDomain, typename TValueType>
ValueType DGtal::ImageContainerBySTLVector< TDomain, TValueType >::operator() ( const SpanIterator it  )  [inline]

Returns the value of the image at a given SpanIterator position.

Parameters:
it position given by a SpanIterator.
Returns:
an object of type ValueType.
template<typename TDomain, typename TValueType>
ValueType DGtal::ImageContainerBySTLVector< TDomain, TValueType >::operator() ( ConstIterator it  )  const [inline]

Get the value of an image at a given position given by a ConstIterator.

Parameters:
it position in the image.
Returns:
the value at aPoint.
template<typename TDomain, typename TValueType>
ValueType DGtal::ImageContainerBySTLVector< TDomain, TValueType >::operator() ( Iterator it  )  const [inline]

Get the value of an image at a given position given by a Iterator.

Parameters:
it position in the image.
Returns:
the value at aPoint.
template<typename TDomain, typename TValueType>
ValueType DGtal::ImageContainerBySTLVector< TDomain, TValueType >::operator() ( const Point aPoint  )  const

Get the value of an image at a given position.

Parameters:
aPoint position in the image.
Returns:
the value at aPoint.
template<typename TDomain, typename TValueType>
void DGtal::ImageContainerBySTLVector< TDomain, TValueType >::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 TDomain, typename TValueType>
template<typename Colormap >
void DGtal::ImageContainerBySTLVector< TDomain, TValueType >::selfDraw ( DGtalBoard board,
const ValueType minValue,
const ValueType maxValue 
) const

Draw the object on a DGtalBoard board.

Parameters:
board the output board where the object is drawn.
minValue the minimum value contained in the image (used in the colormap settings)
maxValue the maximum value contained in the image (used in the colormap settings)
Template Parameters:
Coloramp any models of CColormap.
template<typename TDomain, typename TValueType>
void DGtal::ImageContainerBySTLVector< TDomain, TValueType >::setValue ( SpanIterator it,
const ValueType aValue 
) [inline]

Set a value on an Image at a position specified by an SpanIterator.

Parameters:
it iterator on the location.
aValue the value.
template<typename TDomain, typename TValueType>
void DGtal::ImageContainerBySTLVector< TDomain, TValueType >::setValue ( Iterator it,
const ValueType aValue 
) [inline]

Set a value on an Image at a position specified by an Iterator.

Parameters:
it iterator on the location.
aValue the value.
template<typename TDomain, typename TValueType>
void DGtal::ImageContainerBySTLVector< TDomain, TValueType >::setValue ( const Point aPoint,
const ValueType aValue 
)

Set a value on an Image at aPoint.

Parameters:
aPoint location of the point to associate with aValue.
aValue the value.
template<typename TDomain, typename TValueType>
SpanIterator DGtal::ImageContainerBySTLVector< TDomain, TValueType >::spanBegin ( const Point aPoint,
const Dimension  aDimension 
) [inline]

Create a begin() SpanIterator at a given position in a given direction.

Parameters:
aPoint the starting point of the SpanIterator.
aDimension the dimension on which the iterator iterates.
Returns:
a SpanIterator
template<typename TDomain, typename TValueType>
SpanIterator DGtal::ImageContainerBySTLVector< TDomain, TValueType >::spanEnd ( const Point aPoint,
const Dimension  aDimension 
) [inline]

Create an end() SpanIterator at a given position in a given direction.

Parameters:
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.
Returns:
a SpanIterator
template<typename TDomain, typename TValueType>
std::string DGtal::ImageContainerBySTLVector< TDomain, TValueType >::styleName (  )  const
Returns:
the style name used for drawing this object.
template<typename TDomain, typename TValueType>
Point DGtal::ImageContainerBySTLVector< TDomain, TValueType >::upperBound (  )  const [inline]
Returns:
the image upper point.

Field Documentation

template<typename TDomain, typename TValueType>
Point DGtal::ImageContainerBySTLVector< TDomain, TValueType >::myLowerBound [private]
template<typename TDomain, typename TValueType>
Point DGtal::ImageContainerBySTLVector< TDomain, TValueType >::myUpperBound [private]
template<typename TDomain, typename TValueType>
const Domain::Dimension DGtal::ImageContainerBySTLVector< TDomain, TValueType >::staticDimension = Domain::staticDimension [static]

The documentation for this class was generated from the following file: