#include <window.hh>
Public Types | |
typedef dpsites_bkd_piter < window< D > > | bkd_qiter |
Site_Iterator type to browse the points of a basic window w.r.t. the reverse ordering of delta-points. | |
typedef Window< void > | category |
typedef psite | center_t |
Type of the window center. | |
typedef D | dpsite |
DPsite associated type. | |
typedef E | exact_t |
typedef dpsites_fwd_piter < window< D > > | fwd_qiter |
Site_Iterator type to browse the points of a basic window w.r.t. the ordering of delta-points. | |
typedef D::psite | psite |
Psite associated type. | |
typedef fwd_qiter | qiter |
Site_Iterator type to browse the points of a basic window whatever the ordering of delta-points. | |
typedef window< D > | regular |
Regular window associated type. | |
typedef D::site | site |
Site associated type. | |
Public Member Functions | |
void | clear () |
Clear the window. | |
unsigned | delta () const |
Give the maximum coordinate gap between the window center and a window point. | |
const D & | dp (unsigned i) const |
Give the i-th delta-point. | |
const mln::util::set< D > & | dps_hook_ () const |
Hook to the set of D. | |
bool | has (const D &dp) const |
Test if dp is in this window definition. | |
template<typename W> | |
window< D > & | insert (const Window< W > &win) |
Insert another window win . | |
window< D > & | insert (const D &dp) |
Insert a delta-point dp . | |
bool | is_centered () const |
Test if the window is centered. | |
bool | is_empty () const |
Test if the window is empty (null size; no delta-point). | |
bool | is_neighbable_ () const |
Test if this window can be a neighborhood. | |
bool | is_symmetric () const |
bool | is_valid () const |
return true by default. | |
void | print (std::ostream &ostr) const |
Print the window definition into ostr . | |
unsigned | size () const |
Give the window size, i.e., the number of delta-sites. | |
const std::vector< D > & | std_vector () const |
Give the std vector of delta-points. | |
void | sym () |
Apply a central symmetry to the target window. | |
window () | |
Constructor without argument. | |
window< D > & | insert (const typename D::coord &dsli, const typename D::coord &drow, const typename D::coord &dcol) |
window< D > & | insert (const typename D::coord &drow, const typename D::coord &dcol) |
window< D > & | insert (const typename D::coord &dind) |
Private Member Functions | |
unsigned | delta_ (const Gdpoint< D > &dp) const |
unsigned | delta_ (int i) const |
Private Attributes | |
util::set< D > | dps_ |
Related Functions | |
(Note that these are not member functions.) | |
template<typename D> | |
bool | operator== (const window< D > &lhs, const window< D > &rhs) |
Equality comparison between windows lhs and rhs . |
This type of window is just like a set of delta-points. The parameter is D
, type of delta-point.
Definition at line 85 of file window.hh.
typedef dpsites_bkd_piter< window<D> > mln::window< D >::bkd_qiter |
Site_Iterator type to browse the points of a basic window w.r.t. the reverse ordering of delta-points.
typedef Window<void> mln::Window< E >::category [inherited] |
typedef psite mln::internal::window_base< D, E >::center_t [inherited] |
typedef D mln::internal::window_base< D, E >::dpsite [inherited] |
DPsite associated type.
Reimplemented in mln::win::multiple< W, F >, and mln::win::multiple_size< n, W, F >.
Definition at line 53 of file window_base.hh.
typedef E mln::Object< E >::exact_t [inherited] |
typedef dpsites_fwd_piter< window<D> > mln::window< D >::fwd_qiter |
Site_Iterator type to browse the points of a basic window w.r.t. the ordering of delta-points.
typedef D ::psite mln::internal::window_base< D, E >::psite [inherited] |
Psite associated type.
Reimplemented in mln::win::multiple< W, F >, and mln::win::multiple_size< n, W, F >.
Definition at line 56 of file window_base.hh.
typedef fwd_qiter mln::window< D >::qiter |
Site_Iterator type to browse the points of a basic window whatever the ordering of delta-points.
typedef window<D> mln::window< D >::regular |
typedef D ::site mln::internal::window_base< D, E >::site [inherited] |
Site associated type.
Reimplemented in mln::win::multiple< W, F >, and mln::win::multiple_size< n, W, F >.
Definition at line 59 of file window_base.hh.
mln::window< D >::window | ( | ) | [inline] |
void mln::window< D >::clear | ( | ) | [inline] |
Clear the window.
Definition at line 254 of file window.hh.
References mln::util::set< T >::clear(), and mln::window< D >::dps_.
Referenced by mln::convert::over_load::from_to_().
unsigned mln::window< D >::delta | ( | ) | const [inline] |
Give the maximum coordinate gap between the window center and a window point.
Definition at line 262 of file window.hh.
References mln::window< D >::delta_(), mln::window< D >::dp(), and mln::window< D >::size().
unsigned mln::window< D >::delta_ | ( | const Gdpoint< D > & | dp | ) | const [inline, private] |
unsigned mln::window< D >::delta_ | ( | int | i | ) | const [inline, private] |
const D & mln::window< D >::dp | ( | unsigned | i | ) | const [inline] |
Give the i-th
delta-point.
Definition at line 302 of file window.hh.
References mln::window< D >::dps_, and mln::window< D >::size().
Referenced by mln::window< D >::delta(), and mln::window< D >::insert().
const util::set< D > & mln::window< D >::dps_hook_ | ( | ) | const [inline] |
Hook to the set of D.
Definition at line 382 of file window.hh.
References mln::window< D >::dps_.
Referenced by mln::operator==().
bool mln::window< D >::has | ( | const D & | dp | ) | const [inline] |
Test if dp
is in this window definition.
Definition at line 311 of file window.hh.
References mln::window< D >::dps_, and mln::util::set< T >::has().
window< D > & mln::window< D >::insert | ( | const typename D::coord & | dsli, | |
const typename D::coord & | drow, | |||
const typename D::coord & | dcol | |||
) | [inline] |
Definition at line 370 of file window.hh.
References mln::window< D >::dp(), and mln::window< D >::insert().
window< D > & mln::window< D >::insert | ( | const typename D::coord & | drow, | |
const typename D::coord & | dcol | |||
) | [inline] |
Definition at line 359 of file window.hh.
References mln::window< D >::dp(), and mln::window< D >::insert().
window< D > & mln::window< D >::insert | ( | const typename D::coord & | dind | ) | [inline] |
Insertion of a delta-point with different numbers of arguments (coordinates) w.r.t. the dimension.
Definition at line 349 of file window.hh.
References mln::window< D >::dp(), and mln::window< D >::insert().
window< D > & mln::window< D >::insert | ( | const Window< W > & | win | ) | [inline] |
Definition at line 337 of file window.hh.
References mln::window< D >::dps_, mln::exact(), and mln::util::set< T >::insert().
window< D > & mln::window< D >::insert | ( | const D & | dp | ) | [inline] |
Insert a delta-point dp
.
Definition at line 327 of file window.hh.
References mln::window< D >::dps_, and mln::util::set< T >::insert().
Referenced by mln::c18(), mln::c26(), mln::c4_3d(), mln::c6(), mln::convert::over_load::from_to_(), mln::window< D >::insert(), mln::morpho::line_gradient(), mln::window< D >::sym(), mln::convert::to_upper_window(), mln::convert::to_window(), mln::win_c4p(), mln::win_c4p_3d(), mln::win_c8p(), and mln::win_c8p_3d().
bool mln::window< D >::is_centered | ( | ) | const [inline] |
Test if the window is centered.
Definition at line 226 of file window.hh.
References mln::window< D >::dps_, mln::util::set< T >::has(), and mln::literal::zero.
bool mln::window< D >::is_empty | ( | ) | const [inline] |
Test if the window is empty (null size; no delta-point).
Definition at line 246 of file window.hh.
References mln::window< D >::dps_, and mln::util::set< T >::is_empty().
bool mln::internal::window_base< D, E >::is_neighbable_ | ( | ) | const [inline, inherited] |
Test if this window can be a neighborhood.
Definition at line 95 of file window_base.hh.
References mln::exact().
Referenced by mln::convert::over_load::from_to_().
bool mln::window< D >::is_symmetric | ( | ) | const [inline] |
bool mln::internal::window_base< D, E >::is_valid | ( | ) | const [inline, inherited] |
return true by default.
Definition at line 87 of file window_base.hh.
Referenced by mln::morpho::approx::impl::dilation_by_distance_thresholding_2d(), mln::morpho::approx::impl::dilation_by_distance_thresholding_3d(), mln::morpho::approx::impl::erosion_by_distance_thresholding_2d(), and mln::morpho::approx::impl::erosion_by_distance_thresholding_3d().
void mln::window< D >::print | ( | std::ostream & | ostr | ) | const [inline] |
Print the window definition into ostr
.
Definition at line 390 of file window.hh.
References mln::window< D >::dps_.
unsigned mln::window< D >::size | ( | ) | const [inline] |
Give the window size, i.e., the number of delta-sites.
Definition at line 294 of file window.hh.
References mln::window< D >::dps_, and mln::util::set< T >::nelements().
Referenced by mln::window< D >::delta(), mln::window< D >::dp(), mln::window< D >::sym(), mln::win_c4p(), mln::win_c4p_3d(), mln::win_c8p(), and mln::win_c8p_3d().
const std::vector< D > & mln::window< D >::std_vector | ( | ) | const [inline] |
Give the std vector of delta-points.
Definition at line 319 of file window.hh.
References mln::window< D >::dps_, and mln::util::set< T >::std_vector().
void mln::window< D >::sym | ( | ) | [inline] |
Apply a central symmetry to the target window.
Definition at line 234 of file window.hh.
References mln::window< D >::insert(), and mln::window< D >::size().
Referenced by mln::window< D >::is_symmetric().
util::set<D> mln::window< D >::dps_ [private] |
Definition at line 184 of file window.hh.
Referenced by mln::window< D >::clear(), mln::window< D >::dp(), mln::window< D >::dps_hook_(), mln::window< D >::has(), mln::window< D >::insert(), mln::window< D >::is_centered(), mln::window< D >::is_empty(), mln::window< D >::print(), mln::window< D >::size(), and mln::window< D >::std_vector().