$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::dpoint2d Class Reference

#include <mln/core/alias/dpoint2d.hh>

Public Member Functions

 dpoint2d ()
template<typename C2 >
 dpoint2d (const algebra::vec< dim, C2 > &v)
 dpoint2d (def::coord row, def::coord col)
 dpoint2d (const literal::zero_t &)
template<typename F >
 dpoint2d (const Function_v2v< F > &f)
 operator mln::algebra::vec< dpoint< mln::grid::square, def::coord >::dim, Q > () const
def::coord operator[] (unsigned i) const
def::coordoperator[] (unsigned i)
void set_all (def::coordc)
vec to_vec () const

Protected Attributes

mln::algebra::vec
< mln::grid::square::dim,
def::coord
coord_

Public Types

enum  
typedef Gdpoint< void > category
typedef def::coord coord
typedef E exact_t
typedef mln::grid::square grid
typedef point
< mln::grid::square,
def::coord
psite
typedef point
< mln::grid::square,
def::coord
site
typedef algebra::vec
< mln::grid::square::dim,
def::coord
vec

Detailed Description

Type alias for a delta-point defined on the 2D square grid with integer coordinates.

This class stored relative positions of a site. It is meant to be used with point2d to compute a new point2d.

point2d p(2,2);
dpoint2d up(-1,0);
dpoint2d p_up = p + up;
// p_up = point2d(1,2);

dpoint2d are also used in window2d to store the relative neighboors.

See Also
point2d, window2d

Definition at line 6 of file dpoint2d.dox.

Constructor & Destructor Documentation

mln::dpoint2d::dpoint2d ( )

Constructor without argument.

template<typename C2 >
mln::dpoint2d::dpoint2d ( const algebra::vec< dim, C2 > &  v)

Constructor from an algebra vector.

mln::dpoint2d::dpoint2d ( def::coord  row,
def::coord  col 
)

Constructor from coordinates.

mln::dpoint2d::dpoint2d ( const literal::zero_t )

Construct a dpoint with coordinates (0,0).

template<typename F >
mln::dpoint2d::dpoint2d ( const Function_v2v< F > &  f)

Constructor; coordinates are set by function f.

Member Function Documentation

Conversion towards a algebra::vec.

def::coord mln::dpoint< mln::grid::square , def::coord >::operator[] ( unsigned  i) const
inherited

Read-only access to the i-th coordinate value.

Parameters
[in]iThe coordinate index.
Precondition
i < dim
def::coord & mln::dpoint< mln::grid::square , def::coord >::operator[] ( unsigned  i)
inherited

Read-write access to the i-th coordinate value.

Parameters
[in]iThe coordinate index.
Precondition
i < dim
void mln::dpoint< mln::grid::square , def::coord >::set_all ( def::coord  c)
inherited

Set all coordinates to the value c.

vec mln::dpoint< mln::grid::square , def::coord >::to_vec ( ) const
inherited

Explicit conversion.

Member Data Documentation

Definition at line 127 of file dpoint.hh.

Member Typedef Documentation

template<typename E>
typedef Gdpoint<void> mln::Gdpoint< E >::category
inherited

Definition at line 103 of file gdpoint.hh.

Coordinate associated type.

Definition at line 75 of file dpoint.hh.

template<typename E>
typedef E mln::Object< E >::exact_t
inherited

Definition at line 105 of file object.hh.

Grid associated type.

Definition at line 66 of file dpoint.hh.

Psite associated type.

Definition at line 69 of file dpoint.hh.

Site associated type.

Definition at line 72 of file dpoint.hh.

Algebra vector (vec) associated type.

Definition at line 78 of file dpoint.hh.

Member Enumeration Documentation

anonymous enum
inherited

Definition at line 63 of file dpoint.hh.