* apps/morphers/mask+recorder.cc,
* apps/morphers/mask+channel.cc:
Here.
---
milena/ChangeLog | 8 ++++++++
milena/apps/morphers/mask+channel.cc | 5 +++--
milena/apps/morphers/mask+recorder.cc | 4 ++--
3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 554d827..21db4fd 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,13 @@
2011-11-18 Roland Levillain <roland(a)lrde.epita.fr>
+ Simplify some apps/morpher programs using mln::make::box2d.
+
+ * apps/morphers/mask+recorder.cc,
+ * apps/morphers/mask+channel.cc:
+ Here.
+
+2011-11-18 Roland Levillain <roland(a)lrde.epita.fr>
+
Refactor apps/morphers.
* apps/morphers/recorder.cc,
diff --git a/milena/apps/morphers/mask+channel.cc b/milena/apps/morphers/mask+channel.cc
index ffbe023..2e170a2 100644
--- a/milena/apps/morphers/mask+channel.cc
+++ b/milena/apps/morphers/mask+channel.cc
@@ -33,11 +33,12 @@
#include <string>
#include <mln/core/image/image2d.hh>
+#include <mln/make/box2d.hh>
#include <mln/core/image/dmorph/image_if.hh>
-#include <mln/fun/component/green.hh>
#include <mln/value/rgb8.hh>
+#include <mln/fun/component/green.hh>
/* FIXME: We wanted to use `fun_image' and `operator<<' from
<mln/core/image/vmorph/fun_image.hh, but they only create read-only
images. Use `thru_image' instead. */
@@ -63,7 +64,7 @@ int main()
/* FIXME: Cheat: use generic fill as mln::decorated_image does not
define properly its properties. */
data::impl::generic::fill_with_value((thru(green, lena).rw() |
- box2d(point2d(5,5), point2d(10,10))).rw(),
+ make::box2d(5,5, 10,10)).rw(),
255);
io::ppm::save(lena, "lena-mask-channel.ppm");
}
diff --git a/milena/apps/morphers/mask+recorder.cc
b/milena/apps/morphers/mask+recorder.cc
index 4689a99..2693dbc 100644
--- a/milena/apps/morphers/mask+recorder.cc
+++ b/milena/apps/morphers/mask+recorder.cc
@@ -37,6 +37,7 @@
#include <string>
#include <mln/core/image/image2d.hh>
+#include <mln/make/box2d.hh>
#include <mln/core/image/dmorph/image_if.hh>
#include <mln/value/rgb8.hh>
@@ -60,8 +61,7 @@ int main()
decorated_image< I, recorder<I> > lena_rec = record(lena);
/* FIXME: Cheat: use generic fill as mln::decorated_image does not
define properly its properties. */
- data::impl::generic::fill_with_value((lena_rec | box2d(point2d(5,5),
- point2d(10,10))).rw(),
+ data::impl::generic::fill_with_value((lena_rec | make::box2d(5,5, 10,10)).rw(),
literal::green);
ppm::save(lena_rec, "lena-roi-fill");
}
--
1.7.2.5