* apps/graph-morpho/morpho.hh: Here.
* apps/graph-morpho/make_complex2d.hh (unmake_complex2d):
Adjust as well.
* apps/graph-morpho/cplx2d.hh: Remove symlink.
---
milena/ChangeLog | 9 +++++++
milena/apps/graph-morpho/cplx2d.hh | 1 -
milena/apps/graph-morpho/make_complex2d.hh | 5 ++-
milena/apps/graph-morpho/morpho.hh | 34 +++++++++++++++------------
4 files changed, 31 insertions(+), 18 deletions(-)
delete mode 120000 milena/apps/graph-morpho/cplx2d.hh
diff --git a/milena/ChangeLog b/milena/ChangeLog
index c3cf6b5..6c649f8 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,14 @@
2009-09-24 Roland Levillain <roland(a)lrde.epita.fr>
+ Use mln::world::inter_pixel instead of cplx2d.hh.
+
+ * apps/graph-morpho/morpho.hh: Here.
+ * apps/graph-morpho/make_complex2d.hh (unmake_complex2d):
+ Adjust as well.
+ * apps/graph-morpho/cplx2d.hh: Remove symlink.
+
+2009-09-24 Roland Levillain <roland(a)lrde.epita.fr>
+
Rename 2D inter-pixel neighborhoods.
* mln/world/inter_pixel/neighb2d.hh
diff --git a/milena/apps/graph-morpho/cplx2d.hh b/milena/apps/graph-morpho/cplx2d.hh
deleted file mode 120000
index c08d52c..0000000
--- a/milena/apps/graph-morpho/cplx2d.hh
+++ /dev/null
@@ -1 +0,0 @@
-../../sandbox/theo/esiee/laurent/ismm09/cplx2d.hh
\ No newline at end of file
diff --git a/milena/apps/graph-morpho/make_complex2d.hh
b/milena/apps/graph-morpho/make_complex2d.hh
index a79c798..e1c0c20 100644
--- a/milena/apps/graph-morpho/make_complex2d.hh
+++ b/milena/apps/graph-morpho/make_complex2d.hh
@@ -30,6 +30,7 @@
/// \brief Cubical 2-complex creation from a 2D image of pixels.
# include <mln/core/image/image2d.hh>
+# include <mln/world/inter_pixel/dim2/is_pixel.hh>
/** \brief Create an binary 2D image representing a cubical 2-complex
by doubling the resolution of the image \a input images to insert
@@ -109,8 +110,8 @@ unmake_complex2d(const mln::Image<I>& input_)
mln_precondition(input.ncols() % 2 == 1);
// Create a (morpher) image of the pixels of INPUT.
- typedef image_if< const I, cplx2d::predicate_t > J;
- J input_pixels = input | cplx2d::is_pixel;
+ typedef image_if< const I, world::inter_pixel::dim2::is_pixel > J;
+ J input_pixels = input | world::inter_pixel::dim2::is_pixel();
/* FIXME: The construction of OUTPUT is obvioulsy not generic, since
it expects I's domain to provide the interface of an mln::box2d.
diff --git a/milena/apps/graph-morpho/morpho.hh b/milena/apps/graph-morpho/morpho.hh
index d0c1a1d..9a786da 100644
--- a/milena/apps/graph-morpho/morpho.hh
+++ b/milena/apps/graph-morpho/morpho.hh
@@ -27,7 +27,7 @@
# define APPS_GRAPH_MORPHO_MORPHO_HH
/** \file apps/graph-morpho/morpho.hh
- \brief Morphological operators on graphs (1-complexes).
+ \brief Morphological operators on graphs.
Reference:
@@ -39,20 +39,22 @@
# include <mln/core/alias/complex_image.hh>
# include <mln/core/image/image2d.hh>
+# include <mln/core/image/dmorph/image_if.hh>
+
# include <mln/core/routine/duplicate.hh>
# include <mln/core/site_set/p_n_faces_piter.hh>
# include <mln/core/image/complex_neighborhoods.hh>
# include <mln/core/image/complex_neighborhood_piter.hh>
+# include <mln/world/inter_pixel/dim2/is_pixel.hh>
+# include <mln/world/inter_pixel/dim2/is_edge.hh>
+# include <mln/world/inter_pixel/neighb2d.hh>
+
# include <mln/data/paste.hh>
# include "apps/graph-morpho/image_if_large.hh"
-// FIXME: Careful, cplx2d.hh is a symlink to a file in Théo's sandbox,
-// and might be changed.
-# include "apps/graph-morpho/cplx2d.hh"
-
// FIXME: Instead of providing several implementation, move specific
// parts (neighborhoods, etc.) to a graph_traits class, and write
// generic version of combine, dilation_e2v, erosion_v2e, etc.
@@ -107,8 +109,10 @@ namespace impl
mln::image2d<T> output;
mln::initialize(output, vertices);
mln::data::fill(output, false);
- mln::data::paste(vertices | mln::cplx2d::is_pixel, output);
- mln::data::paste(edges | mln::cplx2d::is_edge, output);
+ mln::data::paste(vertices | mln::world::inter_pixel::dim2::is_pixel(),
+ output);
+ mln::data::paste(edges | mln::world::inter_pixel::dim2::is_edge(),
+ output);
return output;
}
}
@@ -351,8 +355,8 @@ namespace impl
{
mln::image2d<T> output(input.domain());
mln::data::fill(output, false);
- mln::data::paste(dilation(input || mln::cplx2d::is_pixel,
- mln::cplx2d::p2e()),
+ mln::data::paste(dilation(input || mln::world::inter_pixel::dim2::is_pixel(),
+ mln::world::inter_pixel::v2e()),
output);
return output;
}
@@ -366,8 +370,8 @@ namespace impl
{
mln::image2d<T> output(input.domain());
mln::data::fill(output, false);
- mln::data::paste(erosion(input || mln::cplx2d::is_edge,
- mln::cplx2d::e2p()),
+ mln::data::paste(erosion(input || mln::world::inter_pixel::dim2::is_edge(),
+ mln::world::inter_pixel::e2v()),
output);
return output;
}
@@ -381,8 +385,8 @@ namespace impl
{
mln::image2d<T> output(input.domain());
mln::data::fill(output, false);
- mln::data::paste(erosion(input || mln::cplx2d::is_pixel,
- mln::cplx2d::p2e()),
+ mln::data::paste(erosion(input || mln::world::inter_pixel::dim2::is_pixel(),
+ mln::world::inter_pixel::v2e()),
output);
return output;
}
@@ -396,8 +400,8 @@ namespace impl
{
mln::image2d<T> output(input.domain());
mln::data::fill(output, false);
- mln::data::paste(dilation(input || mln::cplx2d::is_edge,
- mln::cplx2d::e2p()),
+ mln::data::paste(dilation(input || mln::world::inter_pixel::dim2::is_edge(),
+ mln::world::inter_pixel::e2v()),
output);
return output;
}
--
1.6.4.4