$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::point< G, C > Struct Template Reference

#include <mln/core/point.hh>

Public Member Functions

 point ()
template<typename C2 >
 point (const mln::algebra::vec< dim, C2 > &v)
 point (const mln::algebra::vec< dim, C > &v)
template<typename F >
 point (const Function_v2v< F > &f)
mln::algebra::vec< G::dim, C > & hook_coord_ ()
const C & last_coord () const
C & last_coord ()
 operator typename internal::vec_of_point< G, C >::ret () const
point< G, C > & operator+= (const delta &dp)
point< G, C > & operator-= (const delta &dp)
const C & operator[] (unsigned i) const
C & operator[] (unsigned i)
void set_all (C c)
h_vec to_h_vec () const
vec to_vec () const
 point (C ind)
 point (C row, C col)
 point (C sli, C row, C col)
 point (const literal::origin_t &)
point< G, C > & operator= (const literal::origin_t &)
 point (const literal::zero_t &)
point< G, C > & operator= (const literal::zero_t &)
 point (const literal::one_t &)
point< G, C > & operator= (const literal::one_t &)

Static Public Member Functions

static const point< G, C > & minus_infty ()
static const point< G, C > & plus_infty ()

Static Public Attributes

static const point< G, C > origin

Protected Attributes

mln::algebra::vec< G::dim, C > coord_

Public Types

enum  { dim = G::dim }
typedef Gpoint< void > category
typedef C coord
typedef dpoint< G, C > delta
typedef dpoint< G, C > dpsite
typedef point< G, C > exact_t
typedef G grid
typedef mln::algebra::h_vec
< G::dim, float
h_vec
typedef point psite
typedef point site
typedef mln::algebra::vec
< G::dim, float
vec

Detailed Description

template<typename G, typename C>
struct mln::point< G, C >

Generic point class.

Parameters are G the grid of the space and C the coordinate type in this space.

Definition at line 84 of file point.hh.

Constructor & Destructor Documentation

template<typename G, typename C>
mln::point< G, C >::point ( )

Constructor without argument.

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

Constructor from an algebra vector.

template<typename G, typename C>
mln::point< G, C >::point ( const mln::algebra::vec< dim, C > &  v)
template<typename G, typename C>
mln::point< G, C >::point ( ind)
explicit

Constructors with different numbers of arguments (coordinates) w.r.t. the dimension.

template<typename G, typename C>
mln::point< G, C >::point ( row,
col 
)
template<typename G, typename C>
mln::point< G, C >::point ( sli,
row,
col 
)
template<typename G, typename C>
mln::point< G, C >::point ( const literal::origin_t )

Constructors/assignments with literals.

template<typename G, typename C>
mln::point< G, C >::point ( const literal::zero_t )
template<typename G, typename C>
mln::point< G, C >::point ( const literal::one_t )
template<typename G, typename C>
template<typename F >
mln::point< G, C >::point ( const Function_v2v< F > &  f)

Constructor; coordinates are set by function f.

Member Function Documentation

template<typename G, typename C>
mln::algebra::vec<G::dim, C>& mln::point< G, C >::hook_coord_ ( )

Return the underlying vector storing the coordinates.

template<typename G, typename C>
const C& mln::point< G, C >::last_coord ( ) const

Read-only access to the last coordinate.

template<typename G, typename C>
C& mln::point< G, C >::last_coord ( )

Read-write access to the last coordinate.

template<typename G, typename C>
static const point<G,C>& mln::point< G, C >::minus_infty ( )
static

Point with all coordinates set to the mininum value.

template<typename G, typename C>
mln::point< G, C >::operator typename internal::vec_of_point< G, C >::ret ( ) const
template<typename G, typename C>
point<G,C>& mln::point< G, C >::operator+= ( const delta dp)

Shifting by dp.

template<typename G, typename C>
point<G,C>& mln::point< G, C >::operator-= ( const delta dp)

Shifting by the inverse of dp.

template<typename G, typename C>
point<G,C>& mln::point< G, C >::operator= ( const literal::origin_t )
template<typename G, typename C>
point<G,C>& mln::point< G, C >::operator= ( const literal::zero_t )
template<typename G, typename C>
point<G,C>& mln::point< G, C >::operator= ( const literal::one_t )
template<typename G, typename C>
const C& mln::point< G, C >::operator[] ( unsigned  i) const

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

Parameters
[in]iThe coordinate index.
Precondition
i < dim
template<typename G, typename C>
C& mln::point< G, C >::operator[] ( unsigned  i)

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

Parameters
[in]iThe coordinate index.
Precondition
i < dim
template<typename G, typename C>
static const point<G,C>& mln::point< G, C >::plus_infty ( )
static

Point with all coordinates set to the maximum value.

template<typename G, typename C>
void mln::point< G, C >::set_all ( c)

Set all coordinates to the value c.

template<typename G, typename C>
h_vec mln::point< G, C >::to_h_vec ( ) const

Transform to point in homogene coordinate system.

template<typename G, typename C>
vec mln::point< G, C >::to_vec ( ) const

Explicit conversion towards mln::algebra::vec.

Member Data Documentation

template<typename G, typename C>
mln::algebra::vec<G::dim, C> mln::point< G, C >::coord_
protected

Definition at line 200 of file point.hh.

template<typename G, typename C>
const point<G,C> mln::point< G, C >::origin
static

Origin point (all coordinates are 0).

Definition at line 168 of file point.hh.

Member Typedef Documentation

typedef Gpoint<void> mln::Gpoint< point< G, C > >::category
inherited

Definition at line 124 of file gpoint.hh.

template<typename G, typename C>
typedef C mln::point< G, C >::coord

Coordinate associated type.

Definition at line 107 of file point.hh.

template<typename G, typename C>
typedef dpoint<G,C> mln::point< G, C >::delta

Delta associated type.

Definition at line 101 of file point.hh.

template<typename G, typename C>
typedef dpoint<G,C> mln::point< G, C >::dpsite

DPsite associated type.

Definition at line 104 of file point.hh.

typedef point< G, C > mln::Object< point< G, C > >::exact_t
inherited

Definition at line 105 of file object.hh.

template<typename G, typename C>
typedef G mln::point< G, C >::grid

Grid associated type.

Definition at line 98 of file point.hh.

template<typename G, typename C>
typedef mln::algebra::h_vec<G::dim, float> mln::point< G, C >::h_vec

Algebra hexagonal vector (hvec) associated type.

Definition at line 113 of file point.hh.

template<typename G, typename C>
typedef point mln::point< G, C >::psite

Definition at line 89 of file point.hh.

template<typename G, typename C>
typedef point mln::point< G, C >::site

Definition at line 88 of file point.hh.

template<typename G, typename C>
typedef mln::algebra::vec<G::dim, float> mln::point< G, C >::vec

Algebra vector (vec) associated type.

Definition at line 110 of file point.hh.

Member Enumeration Documentation

template<typename G, typename C>
anonymous enum
Enumerator:
dim 

Dimension of the space.

Invariant
dim > 0

Definition at line 95 of file point.hh.