Generic ball window defined on a given grid. More...
#include <ball.hh>
Public Types | |
typedef dpsites_fwd_piter < ball< G, C > > | bkd_qiter |
Backward site iterator associated type. | |
typedef Window< void > | category |
typedef dpoint< G, C > | dpsite |
DPsite associated type. | |
typedef ball< G, C > | exact_t |
typedef dpsites_fwd_piter < ball< G, C > > | fwd_qiter |
Forward site iterator associated type. | |
typedef dpoint< G, C >::psite | psite |
Psite associated type. | |
typedef fwd_qiter | qiter |
Site iterator associated type. | |
typedef window< dpoint< G, C > > | regular |
Regular window associated type. | |
typedef dpoint< G, C >::site | site |
Site associated type. | |
Public Member Functions | |
ball (unsigned diameter) | |
Constructor. | |
unsigned | delta () const |
Give the maximum coordinate gap between the window center and a window point. | |
unsigned | delta_ () const |
Give the maximum coordinate gap between the window center and a window point. | |
unsigned | diameter () const |
Give the ball diameter. | |
const dpoint< G, C > & | dp (unsigned i) const |
Give the i-th delta-point. | |
bool | has (const dpoint< G, C > &dp) const |
Test if the delta-point dp belongs to the window. | |
bool | is_centered () const |
Test if the window is centered; return true. | |
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 |
Test if the window is symmetric; return true. | |
bool | is_valid () const |
return true by default. | |
void | print (std::ostream &ostr) const |
Print into ostr the window definition. | |
void | print_ (std::ostream &ostr) const |
unsigned | size () const |
Give the number of delta-points. | |
const std::vector< dpoint< G, C > > & | std_vector () const |
Give the vector of delta-points. | |
void | sym () |
Apply a central symmetry to the target window; a no-op here. | |
const std::vector< dpoint< G, C > > & | vect () const |
Give the vector of delta-points. | |
Protected Member Functions | |
void | insert (const dpoint< G, C > &d) |
Protected Attributes | |
unsigned | diameter_ |
mln::window< dpoint< G, C > > | win_ |
Generic ball window defined on a given grid.
A ball is centered and symmetric; so its diameter is odd.
G is the given grid on which the ball is defined and C is the type of coordinates.
typedef dpsites_fwd_piter<ball< G, C > > mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::bkd_qiter [inherited] |
Backward site iterator associated type.
typedef Window<void> mln::Window< ball< G, C > >::category [inherited] |
Reimplemented from mln::Object< ball< G, C > >.
typedef dpoint< G, C > mln::internal::window_base< dpoint< G, C > , ball< G, C > >::dpsite [inherited] |
DPsite associated type.
typedef ball< G, C > mln::Object< ball< G, C > >::exact_t [inherited] |
typedef dpsites_fwd_piter<ball< G, C > > mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::fwd_qiter [inherited] |
Forward site iterator associated type.
typedef dpoint< G, C > ::psite mln::internal::window_base< dpoint< G, C > , ball< G, C > >::psite [inherited] |
Psite associated type.
typedef fwd_qiter mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::qiter [inherited] |
Site iterator associated type.
typedef window<dpoint< G, C > > mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::regular [inherited] |
Regular window associated type.
typedef dpoint< G, C > ::site mln::internal::window_base< dpoint< G, C > , ball< G, C > >::site [inherited] |
Site associated type.
mln::win::ball< G, C >::ball | ( | unsigned | diameter | ) | [inline] |
Constructor.
[in] | diameter | Diameter of the ball. |
diameter
is odd. References mln::all_to(), mln::internal::classical_window_base< dpoint< G, C >, ball< G, C > >::insert(), and mln::literal::origin.
unsigned mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::delta | ( | ) | const [inherited] |
Give the maximum coordinate gap between the window center and a window point.
unsigned mln::win::ball< G, C >::delta_ | ( | ) | const [inline] |
Give the maximum coordinate gap between the window center and a window point.
Reimplemented from mln::internal::classical_window_base< dpoint< G, C >, ball< G, C > >.
References mln::win::ball< G, C >::diameter_.
unsigned mln::win::ball< G, C >::diameter | ( | ) | const [inline] |
Give the ball diameter.
References mln::win::ball< G, C >::diameter_.
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().
const dpoint< G, C > & mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::dp | ( | unsigned | i | ) | const [inherited] |
Give the i-th
delta-point.
bool mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::has | ( | const dpoint< G, C > & | dp | ) | const [inherited] |
Test if the delta-point dp
belongs to the window.
void mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::insert | ( | const dpoint< G, C > & | d | ) | [protected, inherited] |
Referenced by mln::win::ball< G, C >::ball().
bool mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::is_centered | ( | ) | const [inherited] |
Test if the window is centered; return true.
bool mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::is_empty | ( | ) | const [inherited] |
Test if the window is empty (null size; no delta-point).
bool mln::internal::window_base< dpoint< G, C > , ball< G, C > >::is_neighbable_ | ( | ) | const [inherited] |
Test if this window can be a neighborhood.
bool mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::is_symmetric | ( | ) | const [inherited] |
Test if the window is symmetric; return true.
bool mln::internal::window_base< dpoint< G, C > , ball< G, C > >::is_valid | ( | ) | const [inherited] |
return true by default.
void mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::print | ( | std::ostream & | ostr | ) | const [inherited] |
Print into ostr
the window definition.
void mln::win::ball< G, C >::print_ | ( | std::ostream & | ostr | ) | const [inline] |
Reimplemented from mln::internal::classical_window_base< dpoint< G, C >, ball< G, C > >.
References mln::win::ball< G, C >::diameter_.
unsigned mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::size | ( | ) | const [inherited] |
Give the number of delta-points.
const std::vector<dpoint< G, C > >& mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::std_vector | ( | ) | const [inherited] |
Give the vector of delta-points.
void mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::sym | ( | ) | [inherited] |
Apply a central symmetry to the target window; a no-op here.
const std::vector<dpoint< G, C > >& mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::vect | ( | ) | const [inherited] |
Give the vector of delta-points.
unsigned mln::win::ball< G, C >::diameter_ [protected] |
mln::window<dpoint< G, C > > mln::internal::classical_window_base< dpoint< G, C > , ball< G, C > >::win_ [protected, inherited] |