#include <window_base.hh>
Inheritance diagram for oln::abstract::window_base< Sup, Exact >:
Public Types | |
enum | { dim = struct_elt_traits<Exact >::dim } |
typedef window_base< Sup, Exact > | self_type |
Set self type. | |
typedef struct_elt_traits< Exact >::point_type | point_type |
The associate image's type of point. | |
typedef struct_elt_traits< Exact >::dpoint_type | dpoint_type |
The associate image's type of dpoint (move point). | |
typedef Exact | exact_type |
Set exact type. | |
typedef Sup | super_type |
Set type of class inherited. | |
Static Public Member Functions | |
static std::string | name () |
Return the name of the type. | |
Protected Member Functions | |
bool | has_ (const 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 set of points is centered. | |
bool | is_equal (const exact_type &win) const |
Compare two sets of points. | |
coord | get_delta () const |
Get the delta of the set of points. | |
coord | delta_update (const dpoint_type &dp) |
Update delta. | |
void | sym_ () |
Set a set of point to opposite. | |
const dpoint_type | at (unsigned i) const |
Get the nth structuring element. | |
window_base () | |
CTor. | |
window_base (unsigned size) | |
Used only by sub-classes. | |
Protected Attributes | |
std::vector< dpoint_type > | dp_ |
The list of point. | |
max_accumulator< coord > | delta_ |
Delta : the maximale point of the list. | |
bool | centered_ |
Is the set of point centered ? | |
Friends | |
class | struct_elt< Exact > |
class | neighborhood< Exact > |
A window is a set of points and this class defines how to deal with. This class regroups common things for window, w_window (weight window) and neighborhood. Here, a set of point is a window or a weigh window or a neighborhood.
Definition at line 103 of file window_base.hh.
typedef struct_elt_traits<Exact>::point_type oln::abstract::window_base< Sup, Exact >::point_type |
The associate image's type of point.
Definition at line 115 of file window_base.hh.
typedef struct_elt_traits<Exact>::dpoint_type oln::abstract::window_base< Sup, Exact >::dpoint_type |
The associate image's type of dpoint (move point).
Reimplemented in oln::abstract::neighborhoodnd< Exact >, oln::abstract::w_windownd< Exact >, oln::abstract::windownd< Exact >, oln::neighborhood1d, oln::neighborhood2d, oln::neighborhood3d, oln::w_window1d< T >, oln::w_window2d< T >, oln::w_window3d< T >, oln::window1d, oln::window2d, oln::window3d, oln::abstract::neighborhoodnd< oln::neighborhood1d >, oln::abstract::neighborhoodnd< oln::neighborhood2d >, oln::abstract::neighborhoodnd< oln::neighborhood3d >, oln::abstract::w_windownd< oln::w_window2d< T > >, oln::abstract::w_windownd< oln::w_window2d< T2 > >, oln::abstract::w_windownd< oln::w_window3d< T > >, oln::abstract::w_windownd< oln::w_window1d< T > >, oln::abstract::windownd< oln::window1d >, oln::abstract::windownd< oln::window3d >, oln::abstract::windownd< oln::window2d >, and oln::w_window2d< T2 >.
Definition at line 122 of file window_base.hh.
oln::abstract::window_base< Sup, Exact >::window_base | ( | ) | [inline, protected] |
CTor.
Used only by sub-classes
Definition at line 251 of file window_base.hh.
00251 : super_type(), dp_(), delta_(0) 00252 { 00253 centered_ = false; 00254 }
oln::abstract::window_base< Sup, Exact >::window_base | ( | unsigned | size | ) | [inline, protected] |
Used only by sub-classes.
Definition at line 263 of file window_base.hh.
00263 : super_type(), dp_(), delta_(0) 00264 { 00265 dp_.reserve(size); 00266 centered_ = false; 00267 }
bool oln::abstract::window_base< Sup, Exact >::has_ | ( | const dpoint_type & | dp | ) | const [inline, protected] |
Test if the set of points contains this one.
Definition at line 152 of file window_base.hh.
Referenced by oln::abstract::windownd< oln::window2d >::add_(), oln::abstract::w_windownd< oln::w_window1d< T > >::add_(), and oln::abstract::neighborhoodnd< oln::neighborhood3d >::add_().
unsigned oln::abstract::window_base< Sup, Exact >::card_ | ( | ) | const [inline, protected] |
Get the number of points.
Definition at line 162 of file window_base.hh.
Referenced by oln::abstract::w_windownd< oln::w_window1d< T > >::set_().
00163 { 00164 return dp_.size(); 00165 }
bool oln::abstract::window_base< Sup, Exact >::is_centered_ | ( | ) | const [inline, protected] |
Test if the set of points is centered.
Definition at line 176 of file window_base.hh.
00177 { 00178 return centered_; 00179 }
bool oln::abstract::window_base< Sup, Exact >::is_equal | ( | const exact_type & | win | ) | const [inline, protected] |
Compare two sets of points.
Definition at line 187 of file window_base.hh.
00188 { 00189 for (typename std::vector<dpoint_type>::const_iterator it = dp_.begin(); it != dp_.end(); ++it) 00190 if (std::find(win.dp_.begin(), win.dp_.end(), *it) == win.dp_.end()) 00191 return false; 00192 return true; 00193 }
coord oln::abstract::window_base< Sup, Exact >::get_delta | ( | ) | const [inline, protected] |
Get the delta of the set of points.
Definition at line 202 of file window_base.hh.
00203 { 00204 return delta_; 00205 }
coord oln::abstract::window_base< Sup, Exact >::delta_update | ( | const dpoint_type & | dp | ) | [inline, protected] |
Update delta.
Definition at line 216 of file window_base.hh.
Referenced by oln::abstract::windownd< oln::window2d >::add_(), oln::abstract::w_windownd< oln::w_window1d< T > >::add_(), and oln::abstract::neighborhoodnd< oln::neighborhood3d >::add_().
void oln::abstract::window_base< Sup, Exact >::sym_ | ( | ) | [inline, protected] |
Set a set of point to opposite.
Each point of the set of point is assigned to its opposite.
Definition at line 227 of file window_base.hh.
const dpoint_type oln::abstract::window_base< Sup, Exact >::at | ( | unsigned | i | ) | const [inline, protected] |
Get the nth structuring element.
Definition at line 240 of file window_base.hh.
00241 { 00242 precondition(i < this->card()); 00243 return dp_[i]; 00244 }
friend class struct_elt< Exact > [friend] |
Definition at line 133 of file window_base.hh.