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

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
enum  { dim = struct_elt_traits<Exact>::dim }

Public Member Functions

bool has (const abstract::dpoint< dpoint_type > &dp) const
 Test if the set of points contains this one.
  • dp a dpoint (deplacement point).


unsigned card () const
 Get the number of points.

bool is_centered () const
 Test if the structuring elements is centered.

exact_type & add (const abstract::dpoint< dpoint_type > &dp)
 Add a point to the structuring elements.

dpoint_type dp (unsigned i) const
 Get the nth structuring element.
  • i The nth.


bool operator== (const self_type &win) const
 Compare two sets of structuring elements.
  • win The structuring elements to compare.


coord delta () const
 Get the delta of the structuring elements.

const dpoint_type operator[] (unsigned i) const
 Get the nth structuring element.
  • i The nth.


exact_type operator- () const
 Set structuring elements to opposite.


Static Public Member Functions

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>
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>
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::convol::slow::convolve(), oln::abstract::w_windownd< w_window3d< T > >::get_weight(), oln::inter(), and oln::uni().

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

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(), oln::morpho::dilation(), oln::morpho::erosion(), and oln::morpho::fast_morpho().

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

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

Get the nth structuring element.

  • i The nth.

Returns:
The nth dpoint.

Definition at line 141 of file struct_elt.hh.

Referenced by oln::convol::slow::convolve(), oln::inter(), and oln::uni().

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

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.

  • dp a dpoint (deplacement point).

Returns:
True if the set of points contains this dpoint.

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>
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 >::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>
bool oln::abstract::struct_elt< Exact >::operator== const self_type win  )  const [inline]
 

Compare two sets of structuring elements.

  • win The structuring elements to compare.

Returns:
True if they are the same.

Definition at line 152 of file struct_elt.hh.

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

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

Get the nth structuring element.

  • i The nth.

Returns:
The nth dpoint.

Definition at line 175 of file struct_elt.hh.

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

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 Thu Apr 15 20:15:13 2004 for Olena by doxygen 1.3.6-20040222