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

#include <mln/core/site_set/p_line2d.hh>

Public Member Functions

 p_line2d ()
 p_line2d (const point2d &beg, const point2d &end, bool is_end_excluded=false)
const box2dbbox () const
const point2dbegin () const
const point2dend () const
bool has (const psite &p) const
bool has (const util::index &i) const
bool is_empty () const
bool is_valid () const
std::size_t memory_size () const
unsigned nsites () const
const point2doperator[] (unsigned i) const
const std::vector< point2d > & std_vector () const
algebra::vec< 2, floatto_vec () const

Protected Member Functions

void compute_ (const point2d &beg, const point2d &end, bool is_end_excluded)

Protected Attributes

p_array< point2darr_
box2d bb_

Public Types

typedef p_indexed_bkd_piter
< self_
bkd_piter
typedef Site_Set< void > category
typedef point2d element
typedef p_line2d exact_t
typedef p_indexed_fwd_piter
< self_
fwd_piter
typedef p_indexed_fwd_piter
< self_
piter
typedef p_indexed_psite< self_psite
typedef const box2dq_box
typedef subject< point2d >::ret site

Detailed Description

2D discrete line of points.

It is based on p_array.

Definition at line 80 of file p_line2d.hh.

Constructor & Destructor Documentation

mln::p_line2d::p_line2d ( )

Constructor without argument.

mln::p_line2d::p_line2d ( const point2d beg,
const point2d end,
bool  is_end_excluded = false 
)

Constructor from point beg to point end.

Member Function Documentation

const box2d& mln::p_line2d::bbox ( ) const

Give the exact bounding box.

const point2d& mln::p_line2d::begin ( ) const

Give the point that begins the line.

void mln::p_line2d::compute_ ( const point2d beg,
const point2d end,
bool  is_end_excluded 
)
protected
const point2d& mln::p_line2d::end ( ) const

Give the point that ends the line.

bool mln::p_line2d::has ( const psite p) const

Test if p belongs to this point set.

bool mln::p_line2d::has ( const util::index i) const

Test if index i belongs to this point set.

bool mln::internal::site_set_base_< point2d , p_line2d >::is_empty ( ) const
inherited

Test if the site set is empty.

This final method dispatches to is_empty_ whose default implementation relies on the 'nsites' method.

bool mln::p_line2d::is_valid ( ) const

Test if this line is valid, i.e., initialized.

std::size_t mln::p_line2d::memory_size ( ) const

Return the size of this site set in memory.

unsigned mln::p_line2d::nsites ( ) const

Give the number of points.

const point2d& mln::p_line2d::operator[] ( unsigned  i) const

Return the i-th point of the line.

const std::vector<point2d>& mln::p_line2d::std_vector ( ) const

Return the corresponding std::vector of points.

algebra::vec<2, float> mln::p_line2d::to_vec ( ) const

Member Data Documentation

p_array<point2d> mln::p_line2d::arr_
protected

Definition at line 150 of file p_line2d.hh.

box2d mln::p_line2d::bb_
protected

Definition at line 151 of file p_line2d.hh.

Member Typedef Documentation

Backward Site_Iterator associated type.

Definition at line 98 of file p_line2d.hh.

typedef Site_Set<void> mln::Site_Set< p_line2d >::category
inherited

Definition at line 74 of file core/concept/site_set.hh.

Element associated type.

Definition at line 86 of file p_line2d.hh.

typedef p_line2d mln::Object< p_line2d >::exact_t
inherited

Definition at line 105 of file object.hh.

Forward Site_Iterator associated type.

Definition at line 95 of file p_line2d.hh.

Site_Iterator associated type.

Definition at line 92 of file p_line2d.hh.

Psite associated type.

Definition at line 89 of file p_line2d.hh.

typedef const box2d& mln::p_line2d::q_box

Box (qualified) associated type.

Definition at line 133 of file p_line2d.hh.

Site associated type.

Definition at line 58 of file site_set_base.hh.