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

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

#include <ImageContainerBySTLVector.h>

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

Data Structures

struct  DefaultDrawStyle
class  SpanIterator

Public Types

typedef TValue Value
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< Value >::iterator Iterator
typedef vector< Value >
::const_iterator 
ConstIterator

Public Member Functions

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

Static Public Attributes

static const Domain::Dimension dimension = Domain::dimension

Private Member Functions

Size linearized (const Point &aPoint) const

Private Attributes

Point myLowerBound
Point myUpperBound

Detailed Description

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

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:

3dBorderExtractionImg.cpp, digitalSetFromVol.cpp, distancetransform2D.cpp, and distancetransform3D.cpp.

Definition at line 71 of file ImageContainerBySTLVector.h.


Member Typedef Documentation

template<typename TDomain, typename TValue>
typedef vector<Value>::const_iterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::ConstIterator

Definition at line 90 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
typedef Domain::Dimension DGtal::ImageContainerBySTLVector< TDomain, TValue >::Dimension

Definition at line 86 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
typedef TDomain DGtal::ImageContainerBySTLVector< TDomain, TValue >::Domain

Definition at line 79 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
typedef Domain::Integer DGtal::ImageContainerBySTLVector< TDomain, TValue >::Integer

Definition at line 87 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
typedef vector<Value>::iterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::Iterator

Definition at line 89 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
typedef Domain::Point DGtal::ImageContainerBySTLVector< TDomain, TValue >::Point

Definition at line 84 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
typedef Domain::Size DGtal::ImageContainerBySTLVector< TDomain, TValue >::Size

Definition at line 88 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
typedef TValue DGtal::ImageContainerBySTLVector< TDomain, TValue >::Value

Definition at line 78 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
typedef Domain::Vector DGtal::ImageContainerBySTLVector< TDomain, TValue >::Vector

Definition at line 85 of file ImageContainerBySTLVector.h.


Constructor & Destructor Documentation

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

Member Function Documentation

template<typename TDomain, typename TValue>
DGtal::ImageContainerBySTLVector< TDomain, TValue >::BOOST_CONCEPT_ASSERT ( (CValue< TValue >)  )
template<typename TDomain, typename TValue>
DGtal::ImageContainerBySTLVector< TDomain, TValue >::BOOST_CONCEPT_ASSERT ( (CBoundedDomain< TDomain >)  )
template<typename TDomain, typename TValue>
DrawableWithDGtalBoard* DGtal::ImageContainerBySTLVector< TDomain, TValue >::defaultStyle ( ) const

Default drawing style object.

Returns:
the dyn. alloc. default style for this object.
template<typename TDomain, typename TValue>
Domain DGtal::ImageContainerBySTLVector< TDomain, TValue >::domain ( ) const [inline]
Returns:
the domain associated to the image.

Definition at line 190 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
Vector DGtal::ImageContainerBySTLVector< TDomain, TValue >::extent ( ) const

Returns the extent of an Image.

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

Definition at line 159 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
Size DGtal::ImageContainerBySTLVector< TDomain, TValue >::linearized ( const Point aPoint) const [private]

Linearized a point and return the vector position.

Parameters:
aPointthe point to convert to an index
Returns:
the index of
Parameters:
aPointin the container

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

template<typename TDomain, typename TValue>
Point DGtal::ImageContainerBySTLVector< TDomain, TValue >::lowerBound ( ) const [inline]
Returns:
the image lower point.

Definition at line 174 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
Value DGtal::ImageContainerBySTLVector< TDomain, TValue >::operator() ( SpanIterator it) [inline]

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

Parameters:
itposition given by a SpanIterator.
Returns:
an object of type Value.

Definition at line 412 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
Value DGtal::ImageContainerBySTLVector< TDomain, TValue >::operator() ( ConstIterator it) const [inline]

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

Parameters:
itposition in the image.
Returns:
the value at aPoint.

Definition at line 112 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
Value DGtal::ImageContainerBySTLVector< TDomain, TValue >::operator() ( Iterator it) const [inline]

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

Parameters:
itposition in the image.
Returns:
the value at aPoint.

Definition at line 125 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
Value DGtal::ImageContainerBySTLVector< TDomain, TValue >::operator() ( const Point aPoint) const

Get the value of an image at a given position.

Parameters:
aPointposition in the image.
Returns:
the value at aPoint.
template<typename TDomain, typename TValue>
void DGtal::ImageContainerBySTLVector< TDomain, TValue >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters:
outthe output stream where the object is written.
template<typename TDomain, typename TValue>
template<typename Colormap >
void DGtal::ImageContainerBySTLVector< TDomain, TValue >::selfDraw ( DGtalBoard board,
const Value minValue,
const Value maxValue 
) const

Draw the object on a DGtalBoard board.

Parameters:
boardthe output board where the object is drawn.
minValuethe minimum value contained in the image (used in the colormap settings)
maxValuethe maximum value contained in the image (used in the colormap settings)
Template Parameters:
Colorampany models of CColormap.
template<typename TDomain, typename TValue>
void DGtal::ImageContainerBySTLVector< TDomain, TValue >::setValue ( SpanIterator it,
const Value aValue 
) [inline]

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

Parameters:
ititerator on the location.
aValuethe value.

Definition at line 369 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
void DGtal::ImageContainerBySTLVector< TDomain, TValue >::setValue ( const Point aPoint,
const Value aValue 
)

Set a value on an Image at aPoint.

Parameters:
aPointlocation of the point to associate with aValue.
aValuethe value.
template<typename TDomain, typename TValue>
void DGtal::ImageContainerBySTLVector< TDomain, TValue >::setValue ( Iterator it,
const Value aValue 
) [inline]

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

Parameters:
ititerator on the location.
aValuethe value.

Definition at line 144 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
SpanIterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::spanBegin ( const Point aPoint,
const Dimension  aDimension 
) [inline]

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

Parameters:
aPointthe starting point of the SpanIterator.
aDimensionthe dimension on which the iterator iterates.
Returns:
a SpanIterator

Definition at line 384 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
SpanIterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::spanEnd ( const Point aPoint,
const Dimension  aDimension 
) [inline]

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

Parameters:
aPointa point belonging to the current image dimension (not necessarily the point used in the span_begin() method.
aDimensionthe dimension on which the iterator iterates.
Returns:
a SpanIterator

Definition at line 399 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
std::string DGtal::ImageContainerBySTLVector< TDomain, TValue >::styleName ( ) const
Returns:
the style name used for drawing this object.
template<typename TDomain, typename TValue>
Point DGtal::ImageContainerBySTLVector< TDomain, TValue >::upperBound ( ) const [inline]
Returns:
the image upper point.

Definition at line 182 of file ImageContainerBySTLVector.h.


Field Documentation

template<typename TDomain, typename TValue>
const Domain::Dimension DGtal::ImageContainerBySTLVector< TDomain, TValue >::dimension = Domain::dimension [static]

Definition at line 82 of file ImageContainerBySTLVector.h.

template<typename TDomain, typename TValue>
Point DGtal::ImageContainerBySTLVector< TDomain, TValue >::myLowerBound [private]
template<typename TDomain, typename TValue>
Point DGtal::ImageContainerBySTLVector< TDomain, TValue >::myUpperBound [private]

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines