Commit 45baf217 authored by Roland Levillain's avatar Roland Levillain
Browse files

Small adaptations of Milena to fix Swilena.

	* mln/core/concept/image.hh (mln::Image<E>::Image): Add concept
	checks for typedef piter.
	Update documentation.
	Aesthetic changes.
	* mln/core/alias/point2d.hh (mln::point2d, mln::point2df)
	* mln/core/alias/dpoint2d.hh (mln::dpoint2d)
	* mln/core/image/image2d.hh (mln::image2d<T>::at_)
	* mln/core/window.hh (mln::window<D>::dps_hook_):
	Use fully qualified type names.

git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@3820 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent 585cd01d
2009-05-14 Roland Levillain <roland@lrde.epita.fr>
Small adaptations of Milena to fix Swilena.
* mln/core/concept/image.hh (mln::Image<E>::Image): Add concept
checks for typedef piter.
Update documentation.
Aesthetic changes.
* mln/core/alias/point2d.hh (mln::point2d, mln::point2df)
* mln/core/alias/dpoint2d.hh (mln::dpoint2d)
* mln/core/image/image2d.hh (mln::image2d<T>::at_)
* mln/core/window.hh (mln::window<D>::dps_hook_):
Use fully qualified type names.
2009-05-14 Roland Levillain <roland@lrde.epita.fr>
 
Have uniform signatures for watershed transforms.
// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of the Olena Library. This library is free
......@@ -43,7 +43,7 @@ namespace mln
/// Type alias for a delta-point defined on the 2D square
/// grid with integer coordinates.
typedef dpoint<mln::grid::square, def::coord> dpoint2d;
typedef dpoint<mln::grid::square, mln::def::coord> dpoint2d;
} // end of namespace mln
......
......@@ -45,8 +45,8 @@ namespace mln
/// Type alias for a point defined on the 2D square grid with
/// integer coordinates.
///
typedef point<grid::square, def::coord> point2d;
typedef point<grid::square, def::coordf> point2df;
typedef point<mln::grid::square, mln::def::coord> point2d;
typedef point<mln::grid::square, mln::def::coordf> point2df;
namespace internal
......
......@@ -84,6 +84,7 @@ namespace mln
typedef site;
typedef psite;
typedef piter;
typedef fwd_piter;
typedef bkd_piter;
......@@ -92,10 +93,16 @@ namespace mln
bool is_valid() const;
// to be provided in concrete image classes:
typedef t_eligible_values_set;
const t_eligible_values_set& values_eligible() const;
typedef t_values_space;
const t_values_space& values_space() const;
typedef value;
// to be provided in concrete image classes:
typedef vset;
const vset& values() const;
......@@ -200,10 +207,11 @@ namespace mln
{
// provided by internal::image_base:
typedef mln_domain(E) domain_t;
typedef mln_site(E) site;
typedef mln_psite(E) psite;
typedef mln_domain(E) domain_t;
typedef mln_site(E) site;
typedef mln_psite(E) psite;
typedef mln_piter(E) piter;
typedef mln_fwd_piter(E) fwd_piter;
typedef mln_bkd_piter(E) bkd_piter;
......@@ -217,14 +225,21 @@ namespace mln
bool (E::*m3)() const = & E::is_valid;
m3 = 0;
typedef typename E::t_eligible_values_set t_eligible_values_set;
const t_eligible_values_set& (E::*m4)() const = & E::values_eligible;
m4 = 0;
typedef typename E::t_values_space t_values_space;
const t_values_space& (E::*m5)() const = & E::values_space;
m5 = 0;
// to be provided in concrete image classes:
typedef mln_value(E) value;
typedef mln_rvalue(E) rvalue;
typedef mln_lvalue(E) lvalue;
typedef typename E::t_eligible_values_set t_eligible_values_set;
typedef typename E::t_values_space t_values_space;
// FIXME Doc
//typedef mln_vset(E) vset;
......@@ -239,12 +254,6 @@ namespace mln
const domain_t& (E::*m8)() const = & E::domain;
m8 = 0;
const t_eligible_values_set& (E::*m9)() const = & E::values_eligible;
m9 = 0;
const t_values_space& (E::*m10)() const = & E::values_space;
m10 = 0;
typedef typename E::skeleton skeleton;
// Check E::init_ presence. Since its signature varies from an
......
......@@ -209,10 +209,10 @@ namespace mln
// -----------------
/// Read-only access to the image value located at (\p row, \p col).
const T& at_(def::coord row, def::coord col) const;
const T& at_(mln::def::coord row, mln::def::coord col) const;
/// Read-write access to the image value located at (\p row, \p col).
T& at_(def::coord row, def::coord col);
T& at_(mln::def::coord row, mln::def::coord col);
/// Give the number of rows.
unsigned nrows() const;
......@@ -467,7 +467,7 @@ namespace mln
template <typename T>
inline
const T&
image2d<T>::at_(def::coord row, def::coord col) const
image2d<T>::at_(mln::def::coord row, mln::def::coord col) const
{
mln_precondition(this->has(point2d(row, col)));
return this->data_->array_[row][col];
......@@ -476,7 +476,7 @@ namespace mln
template <typename T>
inline
T&
image2d<T>::at_(def::coord row, def::coord col)
image2d<T>::at_(mln::def::coord row, mln::def::coord col)
{
mln_precondition(this->has(point2d(row, col)));
return this->data_->array_[row][col];
......
// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of the Olena Library. This library is free
......@@ -176,7 +176,7 @@ namespace mln
const std::vector<D>& std_vector() const;
/// Hook to the set of D.
const util::set<D>& dps_hook_() const;
const mln::util::set<D>& dps_hook_() const;
/// Print the window definition into \p ostr.
void print(std::ostream& ostr) const;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment