URL:
https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2007-10-26 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
Fix use of tree.
* mln/util/tree.hh,
* mln/util/tree_to_image.hh,
* sandbox/garrigues/fllt.hh: Fix.
---
mln/util/tree.hh | 11 ++++-------
mln/util/tree_to_image.hh | 10 +++++-----
sandbox/garrigues/fllt.hh | 2 +-
3 files changed, 10 insertions(+), 13 deletions(-)
Index: trunk/milena/mln/util/tree_to_image.hh
===================================================================
--- trunk/milena/mln/util/tree_to_image.hh (revision 1393)
+++ trunk/milena/mln/util/tree_to_image.hh (revision 1394)
@@ -62,15 +62,15 @@
I& output = exact(output_);
- mln_piter(set_p<point2d>) p(node->elt_.points);
+ mln_piter(set_p<point2d>) p(node->elt().points);
for_all(p)
- output(p) = node->elt_.value;
+ output(p) = node->elt().value;
- typename std::vector< util::node<T>* >::const_iterator it =
node->child_.begin();
+ typename std::vector< util::node<T>* >::const_iterator it =
node->children().begin();
for (int i = 0;
- it != node->child_.end();
+ it != node->children().end();
++it, ++i)
{
if (*it)
@@ -84,7 +84,7 @@
tree_to_image (tree<T>& tree, Image<I>& output_)
{
I& output = exact(output_);
- tree_to_image_rec(tree.root_, output);
+ tree_to_image_rec(tree.root(), output);
}
# endif // ! MLN_INCLUDE_ONLY
Index: trunk/milena/mln/util/tree.hh
===================================================================
--- trunk/milena/mln/util/tree.hh (revision 1393)
+++ trunk/milena/mln/util/tree.hh (revision 1394)
@@ -95,7 +95,7 @@
tree();
tree(node<T>* root);
- tree<T>* tree_get(T& elt);
+ node<T>* root();
void add_tree_up (T& elt);
void add_tree_down (T& elt);
@@ -135,13 +135,10 @@
}
template <typename T>
- tree<T>*
- tree<T>::tree_get(T& elt)
+ node<T>*
+ tree<T>::root()
{
- node<T>* n = root_->search(elt);
- tree<T>* res = new tree (n);
-
- return res;
+ return root_;
}
template <typename T>
Index: trunk/milena/sandbox/garrigues/fllt.hh
===================================================================
--- trunk/milena/sandbox/garrigues/fllt.hh (revision 1393)
+++ trunk/milena/sandbox/garrigues/fllt.hh (revision 1394)
@@ -576,7 +576,7 @@
lower_tree = compute_level_set<V, lower<V> >(ima);
upper_tree = compute_level_set<V, upper<V> >(ima);
- merge_trees(lower_tree, upper_tree);
+ //merge_trees(lower_tree, upper_tree);
}
} // end of namespace mln::fllt