#include <neighborhood.hh>
Inheritance diagram for oln::abstract::neighborhood< Exact >:
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.
| |
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.
| |
bool | operator== (const self_type &win) const |
Compare two sets of structuring elements.
| |
coord | delta () const |
Get the delta of the neighborhood. | |
const dpoint_type | operator[] (unsigned i) const |
Get the nth element of the neighborhood.
| |
exact_type & | add (const abstract::dpoint< dpoint_type > &dp) |
Add a point to the neighborhood.
| |
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. |
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.
|
The associate image's type of dpoint (move point).
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. |
|
The associate image's type of iterator.
Reimplemented in oln::neighborhood1d, oln::neighborhood2d, and oln::neighborhood3d. Definition at line 75 of file neighborhood.hh. |
|
Add a point to the neighborhood.
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 }
|
|
Get 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 }
|
|
Get the delta 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 }
|
|
Get the nth element of the neighborhood.
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 }
|
|
Test if the set of points contains this one.
Definition at line 108 of file neighborhood.hh. Referenced by oln::inter().
00109 {
00110 return this->exact().has_(dp.exact());
00111 }
|
|
Test if the neighborhood is centered.
Definition at line 131 of file neighborhood.hh.
00132 {
00133 return this->exact().is_centered_();
00134 }
|
|
Compare two sets of structuring elements.
Definition at line 153 of file neighborhood.hh.
00154 {
00155 return this->exact().is_equal(win.exact());
00156 }
|
|
Get the nth element of the neighborhood.
Definition at line 176 of file neighborhood.hh.
00177 {
00178 return this->exact().at(i);
00179 }
|
|
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 } |