oln::abstract::struct_elt< Exact > Struct Template Reference

#include <struct_elt.hh>

Inheritance diagram for oln::abstract::struct_elt< Exact >:

Inheritance graph
[legend]
Collaboration diagram for oln::abstract::struct_elt< Exact >:

Collaboration graph
[legend]
List of all members.

Public Types

enum  { dim = struct_elt_traits<Exact>::dim }
typedef struct_elt< Exact > self_type
 Set the exact self type of the class.
typedef struct_elt_traits<
Exact >::abstract_type 
abstract_type
 Set the abstract type of hisself.
typedef struct_elt_traits<
Exact >::point_type 
point_type
 Set the point type of the image from which points come.
typedef struct_elt_traits<
Exact >::dpoint_type 
dpoint_type
 Set the dpoint type.
typedef Exact exact_type

Public Member Functions

bool has (const abstract::dpoint< dpoint_type > &dp) const
 Test if the set of points contains this one.
unsigned card () const
 Get the number of points.
bool is_centered () const
 Test if the structuring elements is centered.
exact_typeadd (const abstract::dpoint< dpoint_type > &dp)
 Add a point to the structuring elements.
dpoint_type dp (unsigned i) const
 Get the nth structuring element.
bool operator== (const self_type &win) const
 Compare two sets of structuring elements.
coord delta () const
 Get the delta of the structuring elements.
const dpoint_type operator[] (unsigned i) const
 Get the nth structuring element.
exact_type operator- () const
 Set structuring elements to opposite.

Static Public Member Functions

static std::string name ()
 Return the name of the type.

Protected Member Functions

void sym ()
 Set structuring elements to opposite.
 struct_elt ()
 Do nothing, used only by sub-classes.

Detailed Description

template<class Exact>
struct oln::abstract::struct_elt< Exact >

Structuring elements (set of dpoints).

This abstract class defines several virtual methods for its subclasses. Its goal is to deal with a set of 'move' points.

Definition at line 65 of file struct_elt.hh.


Member Function Documentation

template<class Exact>
bool oln::abstract::struct_elt< Exact >::has ( const abstract::dpoint< dpoint_type > &  dp  )  const [inline]

Test if the set of points contains this one.

Definition at line 94 of file struct_elt.hh.

Referenced by oln::inter().

00095       {
00096         return this->exact().has_(dp.exact());
00097       }

template<class Exact>
unsigned oln::abstract::struct_elt< Exact >::card (  )  const [inline]

Get the number of points.

Returns:
The number of points.

Definition at line 104 of file struct_elt.hh.

Referenced by oln::utils::se_stat< Sum, Var >::compute(), oln::convol::slow::convolve(), oln::inter(), oln::morpho::sort_dimensions< E >::operator()(), and oln::uni().

00105       {
00106         return this->exact().card_();
00107       }

template<class Exact>
bool oln::abstract::struct_elt< Exact >::is_centered ( void   )  const [inline]

Test if the structuring elements is centered.

Returns:
True if it's centered.
Structuring elements are centered when they contains 0.

Definition at line 116 of file struct_elt.hh.

00117       {
00118         return this->exact().is_centered_();
00119       }

template<class Exact>
exact_type& oln::abstract::struct_elt< Exact >::add ( const abstract::dpoint< dpoint_type > &  dp  )  [inline]

Add a point to the structuring elements.

Add a new member to the structuring elements.

Warning:
Here for convenience (see morpho algorithms). Work with w_windows (associate a default weight set to 1).

Definition at line 130 of file struct_elt.hh.

00131       {
00132         return this->exact().add_dp(dp);
00133       }

template<class Exact>
dpoint_type oln::abstract::struct_elt< Exact >::dp ( unsigned  i  )  const [inline]

Get the nth structuring element.

Definition at line 141 of file struct_elt.hh.

Referenced by oln::abstract::w_window< oln::w_window1d< T > >::add(), oln::abstract::struct_elt< oln::w_window1d< T > >::add(), oln::abstract::window< oln::window2d >::add_dp(), oln::abstract::w_window< oln::w_window1d< T > >::add_dp(), oln::convol::slow::convolve(), oln::abstract::struct_elt< oln::w_window1d< T > >::has(), oln::inter(), oln::abstract::w_window< oln::w_window1d< T > >::set(), and oln::uni().

00142       {
00143         return this->exact().at(i);
00144       }

template<class Exact>
bool oln::abstract::struct_elt< Exact >::operator== ( const self_type win  )  const [inline]

Compare two sets of structuring elements.

Definition at line 152 of file struct_elt.hh.

00153       {
00154         return this->exact().is_equal(win.exact());
00155       }

template<class Exact>
coord oln::abstract::struct_elt< Exact >::delta (  )  const [inline]

Get the delta of the structuring elements.

Returns:
Delta.
Delta is the biggest element of the structuring elements.

Definition at line 164 of file struct_elt.hh.

Referenced by oln::convol::slow::convolve().

00165       {
00166         return this->exact().get_delta();
00167       }

template<class Exact>
const dpoint_type oln::abstract::struct_elt< Exact >::operator[] ( unsigned  i  )  const [inline]

Get the nth structuring element.

Definition at line 175 of file struct_elt.hh.

00176       {
00177         return this->exact().at(i);
00178       }

template<class Exact>
exact_type oln::abstract::struct_elt< Exact >::operator- (  )  const [inline]

Set structuring elements to opposite.

Each point of structuring elements is assigned to its opposite.

Definition at line 186 of file struct_elt.hh.

00187       {
00188         exact_type win(this->exact());
00189         win.sym();
00190         return win;
00191       }

template<class Exact>
void oln::abstract::struct_elt< Exact >::sym (  )  [inline, protected]

Set structuring elements to opposite.

Each point of structuring elements is assigned to its opposite.

Definition at line 201 of file struct_elt.hh.

00202       {
00203         return this->exact().sym_();
00204       }


The documentation for this struct was generated from the following file:
Generated on Tue Feb 20 20:25:21 2007 for Olena by  doxygen 1.5.1