* mln/core/image/graph_elt_window.hh
(mln::graph_elt_window<P>::point): Remove typedef.
(mln::graph_elt_window<P>::psite): New typedef.
(mln::graph_elt_window<P>::dpoint): Turn typedef into...
(mln::graph_elt_window<P>::dpsite): ...this.
(mln::graph_elt_window<P>::compute_sites_):
Catch up with the new interface of iterators on graph window.
---
milena/ChangeLog | 12 ++++++++++++
milena/mln/core/image/graph_elt_window.hh | 19 +++++++++++--------
2 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index a2e7ce6..65bbcef 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,17 @@
2008-09-22 Roland Levillain <roland(a)lrde.epita.fr>
+ Update elementary window on graph image.
+
+ * mln/core/image/graph_elt_window.hh
+ (mln::graph_elt_window<P>::point): Remove typedef.
+ (mln::graph_elt_window<P>::psite): New typedef.
+ (mln::graph_elt_window<P>::dpoint): Turn typedef into...
+ (mln::graph_elt_window<P>::dpsite): ...this.
+ (mln::graph_elt_window<P>::compute_sites_):
+ Catch up with the new interface of iterators on graph window.
+
+2008-09-22 Roland Levillain <roland(a)lrde.epita.fr>
+
Update graph neighborhood piters.
* mln/core/image/graph_neighborhood_piter.hh
diff --git a/milena/mln/core/image/graph_elt_window.hh
b/milena/mln/core/image/graph_elt_window.hh
index 9e936bd..c679afd 100644
--- a/milena/mln/core/image/graph_elt_window.hh
+++ b/milena/mln/core/image/graph_elt_window.hh
@@ -38,7 +38,9 @@
- mln::graph_elt_window
- mln::graph_elt_neighborhood
- mln::line_graph_elt_window
- - mln::line_graph_elt_neighborhood. */
+ - mln::line_graph_elt_neighborhood.
+
+ See
https://trac.lrde.org/olena/ticket/139. */
/* FIXME: Due to the poor interface of mln::p_line_graph and
mln::util::graph, we show to much implementation details here.
@@ -65,16 +67,16 @@ namespace mln
public:
/// Associated types.
/// \{
- /// The type of point corresponding to the window.
- typedef P point;
/// The type of psite corresponding to the window.
typedef graph_psite<P> psite;
+ /// The type of site corresponding to the window.
+ typedef mln_site(psite) site;
// The type of the set of window sites (vertex ids adjacent to the
// reference psite).
typedef std::set<util::vertex_id> sites_t;
// FIXME: This is a dummy value.
- typedef void dpoint;
+ typedef void dpsite;
/// \brief Site_Iterator type to browse the psites of the window
/// w.r.t. the ordering of vertices.
@@ -132,10 +134,11 @@ namespace mln
graph_elt_window<P>::compute_sites_(Site_Iterator<Piter>& piter_)
const
{
Piter& piter = exact(piter_);
- util::vertex_id ref_vertex_id = piter.p_ref().id();
- const util::vertex<P>& ref_vertex =
piter.pg().gr_->vertex(ref_vertex_id);
+ util::vertex_id ref_vertex_id = piter.center().vertex_id();
sites_t& sites = piter.sites();
sites.clear();
+ const util::vertex<P>& ref_vertex =
+ piter.center().site_set().gr_->vertex(ref_vertex_id);
/* FIXME: Move this computation out of the window. In fact,
this should be a service of the graph, also proposed by the
p_line_graph. */
@@ -149,9 +152,9 @@ namespace mln
ref_vertex.edges.begin();
e != ref_vertex.edges.end(); ++e)
{
- util::vertex_id v1 = piter.pg().gr_->edges()[*e]->v1();
+ util::vertex_id v1 = piter.center().site_set().gr_->edges()[*e]->v1();
sites.insert(v1);
- util::vertex_id v2 = piter.pg().gr_->edges()[*e]->v2();
+ util::vertex_id v2 = piter.center().site_set().gr_->edges()[*e]->v2();
sites.insert(v2);
}
}
--
1.5.6.5