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

#include <mln/win/line.hh>

Public Member Functions

 line (unsigned length)
unsigned delta () const
unsigned delta_ () const
const dpoint< M, C > & dp (unsigned i) const
bool has (const dpoint< M, C > &dp) const
bool is_centered () const
bool is_empty () const
bool is_symmetric () const
bool is_valid () const
unsigned length () const
void print (std::ostream &ostr) const
void print_ (std::ostream &ostr) const
unsigned size () const
const std::vector< dpoint< M,
C > > & 
std_vector () const
void sym ()
const std::vector< dpoint< M,
C > > & 
vect () const

Protected Member Functions

void insert (const dpoint< M, C > &d)

Protected Attributes

unsigned length_
mln::window< dpoint< M, C > > win_

Public Types

enum  { dir = i }
typedef dpsites_fwd_piter
< line< M, i, C > > 
bkd_qiter
typedef Window< void > category
typedef psite center_t
typedef dpoint< M, C > dpsite
typedef line< M, i, C > exact_t
typedef dpsites_fwd_piter
< line< M, i, C > > 
fwd_qiter
typedef dpoint< M, C >::psite psite
typedef fwd_qiter qiter
typedef window< dpoint< M, C > > regular
typedef dpoint< M, C >::site site

Detailed Description

template<typename M, unsigned i, typename C>
struct mln::win::line< M, i, C >

Generic line window defined on a given grid in the given dimension.

An line is centered and symmetric; so its length is odd.

M is the given grid on which the line is defined, i is the given dimension of the line end C is the type of the coordinates.

See Also
mln::win::hline2d for an exemple of his use.

Definition at line 73 of file win/line.hh.

Constructor & Destructor Documentation

template<typename M, unsigned i, typename C>
mln::win::line< M, i, C >::line ( unsigned  length)

Constructor.

Parameters
[in]lengthLength of the line.
Precondition
length is odd.

Member Function Documentation

unsigned mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::delta ( ) const
inherited

Give the maximum coordinate gap between the window center and a window point.

template<typename M, unsigned i, typename C>
unsigned mln::win::line< M, i, C >::delta_ ( ) const

Give the maximum coordinate gap between the window center and a window point.

Reimplemented from mln::internal::classical_window_base< dpoint< M, C >, line< M, i, C > >.

const dpoint< M, C > & mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::dp ( unsigned  i) const
inherited

Give the i-th delta-point.

bool mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::has ( const dpoint< M, C > &  dp) const
inherited

Test if the delta-point dp belongs to the window.

void mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::insert ( const dpoint< M, C > &  d)
protectedinherited
bool mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::is_centered ( ) const
inherited

Test if the window is centered; return true.

bool mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::is_empty ( ) const
inherited

Test if the window is empty (null size; no delta-point).

bool mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::is_symmetric ( ) const
inherited

Test if the window is symmetric; return true.

bool mln::internal::window_base< dpoint< M, C > , line< M, i, C > >::is_valid ( ) const
inherited

return true by default.

template<typename M, unsigned i, typename C>
unsigned mln::win::line< M, i, C >::length ( ) const

Give the line length.

void mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::print ( std::ostream &  ostr) const
inherited

Print into ostr the window definition.

template<typename M, unsigned i, typename C>
void mln::win::line< M, i, C >::print_ ( std::ostream &  ostr) const
template<typename M, unsigned i, typename C>
unsigned mln::win::line< M, i, C >::size ( ) const

Give the line size, that is, its length.

Reimplemented from mln::internal::classical_window_base< dpoint< M, C >, line< M, i, C > >.

const std::vector<dpoint< M, C > >& mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::std_vector ( ) const
inherited

Give the vector of delta-points.

void mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::sym ( )
inherited

Apply a central symmetry to the target window; a no-op here.

const std::vector<dpoint< M, C > >& mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::vect ( ) const
inherited

Give the vector of delta-points.

Member Data Documentation

template<typename M, unsigned i, typename C>
unsigned mln::win::line< M, i, C >::length_
protected

Definition at line 96 of file win/line.hh.

mln::window<dpoint< M, C > > mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::win_
protectedinherited

Definition at line 119 of file classical_window_base.hh.

Member Typedef Documentation

typedef dpsites_fwd_piter<line< M, i, C > > mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::bkd_qiter
inherited

Backward site iterator associated type.

Definition at line 68 of file classical_window_base.hh.

typedef Window<void> mln::Window< line< M, i, C > >::category
inherited

Definition at line 95 of file concept/window.hh.

typedef psite mln::internal::window_base< dpoint< M, C > , line< M, i, C > >::center_t
inherited

Type of the window center.

Definition at line 64 of file window_base.hh.

typedef dpoint< M, C > mln::internal::window_base< dpoint< M, C > , line< M, i, C > >::dpsite
inherited

DPsite associated type.

Definition at line 55 of file window_base.hh.

typedef line< M, i, C > mln::Object< line< M, i, C > >::exact_t
inherited

Definition at line 105 of file object.hh.

typedef dpsites_fwd_piter<line< M, i, C > > mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::fwd_qiter
inherited

Forward site iterator associated type.

Definition at line 65 of file classical_window_base.hh.

typedef dpoint< M, C > ::psite mln::internal::window_base< dpoint< M, C > , line< M, i, C > >::psite
inherited

Psite associated type.

Definition at line 58 of file window_base.hh.

typedef fwd_qiter mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::qiter
inherited

Site iterator associated type.

Definition at line 71 of file classical_window_base.hh.

typedef window<dpoint< M, C > > mln::internal::classical_window_base< dpoint< M, C > , line< M, i, C > >::regular
inherited

Regular window associated type.

Definition at line 61 of file classical_window_base.hh.

typedef dpoint< M, C > ::site mln::internal::window_base< dpoint< M, C > , line< M, i, C > >::site
inherited

Site associated type.

Definition at line 61 of file window_base.hh.

Member Enumeration Documentation

template<typename M, unsigned i, typename C>
anonymous enum

Direction.

Enumerator:
dir 

Definition at line 76 of file win/line.hh.