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

Neighborhood. More...

#include <neighborhood.hh>

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

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef Exact exact_type
 Set the exact type.

typedef neighborhood< Exact > self_type
 Set its type.

typedef struct_elt_traits<
Exact >::iter_type 
iter_type
 The associate image's type of iterator.

typedef struct_elt_traits<
Exact >::neighb_type 
neighb_type
 Set the neighborhood type.

typedef struct_elt_traits<
Exact >::win_type 
win_type
 Set the window type.

typedef struct_elt_traits<
Exact >::dpoint_type 
dpoint_type
 The associate image's type of dpoint (move point).

typedef struct_elt_traits<
Exact >::abstract_type 
abstract_type
 Set the abstract 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 neighborhood is centered.

const dpoint_type dp (unsigned i) const
 Get the nth element of the neighborhood.
  • 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 neighborhood.

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


exact_typeadd (const abstract::dpoint< dpoint_type > &dp)
 Add a point to the neighborhood.
  • dp The new point.



Static Public Member Functions

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


Protected Member Functions

void sym ()
 Set neighborhood to opposite.

 neighborhood ()
 Do nothing, used only by sub-classes.


Detailed Description

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

Neighborhood.

It looks like structuring elements but here, when you add an element, you add its opposite. This abstract class defines several virtual methods for his subclasses. Its goal is to deal with a set of deplacement points.

Definition at line 65 of file neighborhood.hh.


Member Typedef Documentation

template<class Exact>
typedef struct_elt_traits<Exact>::dpoint_type oln::abstract::neighborhood< Exact >::dpoint_type
 

The associate image's type of dpoint (move point).

Warning:
Prefer the macros oln_dpoint_type(Pointable) and oln_dpoint_type_(Pointable) (the same without the 'typename' keyword)

Reimplemented in oln::abstract::neighborhoodnd< Exact >, oln::neighborhood1d, oln::neighborhood2d, oln::neighborhood3d, oln::abstract::neighborhoodnd< neighborhood3d >, oln::abstract::neighborhoodnd< neighborhood2d >, oln::abstract::neighborhoodnd< neighborhood1d >, oln::abstract::window_base< neighborhood< neighborhood2d >, neighborhood2d >, oln::abstract::window_base< neighborhood< neighborhood3d >, neighborhood3d >, oln::abstract::window_base< neighborhood< neighborhood1d >, neighborhood1d >, and oln::abstract::window_base< neighborhood< Exact >, Exact >.

Definition at line 87 of file neighborhood.hh.

template<class Exact>
typedef struct_elt_traits<Exact>::iter_type oln::abstract::neighborhood< Exact >::iter_type
 

The associate image's type of iterator.

Warning:
Prefer the macros oln_iter_type(Iterable) and oln_iter_type_(Iterable) (the same without the 'typename' keyword)

Reimplemented in oln::neighborhood1d, oln::neighborhood2d, and oln::neighborhood3d.

Definition at line 75 of file neighborhood.hh.


Member Function Documentation

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

Add a point to the neighborhood.

  • dp The new point.

Add a new member to the neighborhood.

Definition at line 188 of file neighborhood.hh.

Referenced by oln::convert::ng_to_cse(), and oln::convert::ng_to_se().

00189       {
00190         this->exact().add_(dp.exact());
00191         return this->exact().add_(-dp.exact());
00192       }

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

Get the number of points.

Returns:
The number of points.

Definition at line 118 of file neighborhood.hh.

Referenced by oln::inter(), oln::mk_win_from_neighb(), and oln::uni().

00119       {
00120         return this->exact().card_();
00121       }

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

Get the delta of the neighborhood.

Returns:
Delta.
Delta is the biggest element of the neighborhood.

Definition at line 165 of file neighborhood.hh.

Referenced by oln::morpho::sure::geodesic_dilation(), oln::morpho::sure::geodesic_erosion(), oln::morpho::hybrid::geodesic_reconstruction_dilation(), oln::morpho::hybrid::geodesic_reconstruction_erosion(), oln::morpho::fast::tarjan::tarjan_set< T, ATTRIBUTE, Env >::get_comptute(), and oln::topo::tarjan::abstract::tarjan_with_attr< mlc::exact_vt< flat_zone< T, DestType, A, Exact >, Exact >::ret >::get_compute_impl().

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

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

Get the nth element of the neighborhood.

  • i The nth.

Returns:
The nth dpoint.

Definition at line 142 of file neighborhood.hh.

Referenced by oln::inter(), oln::mk_win_from_neighb(), and oln::uni().

00143       {
00144         return this->exact()[i];
00145       }

template<class Exact>
bool oln::abstract::neighborhood< 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 108 of file neighborhood.hh.

Referenced by oln::inter().

00109       {
00110         return this->exact().has_(dp.exact());
00111       }

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

Test if the neighborhood is centered.

Returns:
True if it's centered.
Neighborhood are centered when they contains at least one element.

Definition at line 131 of file neighborhood.hh.

00132       {
00133         return this->exact().is_centered_();
00134       }

template<class Exact>
bool oln::abstract::neighborhood< 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 153 of file neighborhood.hh.

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

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

Get the nth element of the neighborhood.

  • i The nth.

Returns:
The nth dpoint.

Definition at line 176 of file neighborhood.hh.

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

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

Set neighborhood to opposite.

Each point of neighborhood is assigned to its opposite.

Definition at line 211 of file neighborhood.hh.

00212       {
00213         this->exact().sym_();
00214       }


The documentation for this struct was generated from the following file:
Generated on Thu Apr 15 20:15:10 2004 for Olena by doxygen 1.3.6-20040222