4151: Implement mln::extract moophers over mln::thru_image.

* mln/extract/blue.hh, * mln/extract/green.hh, * mln/extract/hue.hh, * mln/extract/lum.hh, * mln/extract/red.hh, * mln/extract/sat.hh: Use mln::thru_image instead of mln::fun_image. --- milena/ChangeLog | 12 ++++++++++++ milena/mln/extract/blue.hh | 10 +++++----- milena/mln/extract/green.hh | 10 +++++----- milena/mln/extract/hue.hh | 10 +++++----- milena/mln/extract/lum.hh | 10 +++++----- milena/mln/extract/red.hh | 10 +++++----- milena/mln/extract/sat.hh | 10 +++++----- 7 files changed, 42 insertions(+), 30 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 7289e4b..f1582fa 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,3 +1,15 @@ +2009-06-15 Roland Levillain <roland@lrde.epita.fr> + + Implement mln::extract moophers over mln::thru_image. + + * mln/extract/blue.hh, + * mln/extract/green.hh, + * mln/extract/hue.hh, + * mln/extract/lum.hh, + * mln/extract/red.hh, + * mln/extract/sat.hh: + Use mln::thru_image instead of mln::fun_image. + 2009-06-16 Guillaume Lazzara <guillaume.lazzara@lrde.epita.fr> Small fixes. diff --git a/milena/mln/extract/blue.hh b/milena/mln/extract/blue.hh index d839b51..e7214fd 100644 --- a/milena/mln/extract/blue.hh +++ b/milena/mln/extract/blue.hh @@ -30,8 +30,7 @@ /// /// Extract the blue component of an image. - -# include <mln/core/image/vmorph/fun_image.hh> +# include <mln/core/image/vmorph/thru_image.hh> # include <mln/fun/meta/blue.hh> namespace mln @@ -41,16 +40,17 @@ namespace mln { template <typename I> - fun_image<meta::blue<mln_value(I)>,I> + thru_image< I, meta::blue<mln_value(I)> > blue(Image<I>& ima); # ifndef MLN_INCLUDE_ONLY template <typename I> - fun_image<meta::blue<mln_value(I)>,I> + thru_image< I, meta::blue<mln_value(I)> > blue(Image<I>& ima) { - fun_image<meta::blue<mln_value(I)>,I> result(ima); + typedef meta::blue<mln_value(I)> blue_t; + thru_image<I, blue_t> result(exact(ima), blue_t()); return result; } diff --git a/milena/mln/extract/green.hh b/milena/mln/extract/green.hh index a7858cc..59cf2d9 100644 --- a/milena/mln/extract/green.hh +++ b/milena/mln/extract/green.hh @@ -30,8 +30,7 @@ /// /// Extract the green component of an image. - -# include <mln/core/image/vmorph/fun_image.hh> +# include <mln/core/image/vmorph/thru_image.hh> # include <mln/fun/meta/green.hh> namespace mln @@ -41,16 +40,17 @@ namespace mln { template <typename I> - fun_image<meta::green<mln_value(I)>,I> + thru_image< I, meta::green<mln_value(I)> > green(Image<I>& ima); # ifndef MLN_INCLUDE_ONLY template <typename I> - fun_image<meta::green<mln_value(I)>,I> + thru_image< I, meta::green<mln_value(I)> > green(Image<I>& ima) { - fun_image<meta::green<mln_value(I)>,I> result(ima); + typedef meta::green<mln_value(I)> green_t; + thru_image<I, green_t> result(exact(ima), green_t()); return result; } diff --git a/milena/mln/extract/hue.hh b/milena/mln/extract/hue.hh index f5a8049..66c2cbd 100644 --- a/milena/mln/extract/hue.hh +++ b/milena/mln/extract/hue.hh @@ -30,8 +30,7 @@ /// /// Extract the hue component of an image. - -# include <mln/core/image/vmorph/fun_image.hh> +# include <mln/core/image/vmorph/thru_image.hh> # include <mln/fun/meta/hue.hh> namespace mln @@ -41,16 +40,17 @@ namespace mln { template <typename I> - fun_image<meta::hue<mln_value(I)>,I> + thru_image< I, meta::hue<mln_value(I)> > hue(Image<I>& ima); # ifndef MLN_INCLUDE_ONLY template <typename I> - fun_image<meta::hue<mln_value(I)>,I> + thru_image< I, meta::hue<mln_value(I)> > hue(Image<I>& ima) { - fun_image<meta::hue<mln_value(I)>,I> result(ima); + typedef meta::hue<mln_value(I)> hue_t; + thru_image<I, hue_t> result(exact(ima), hue_t()); return result; } diff --git a/milena/mln/extract/lum.hh b/milena/mln/extract/lum.hh index b073ab4..6299dd7 100644 --- a/milena/mln/extract/lum.hh +++ b/milena/mln/extract/lum.hh @@ -30,8 +30,7 @@ /// /// Extract the lum component of an image. - -# include <mln/core/image/vmorph/fun_image.hh> +# include <mln/core/image/vmorph/thru_image.hh> # include <mln/fun/meta/lum.hh> namespace mln @@ -41,16 +40,17 @@ namespace mln { template <typename I> - fun_image<meta::lum<mln_value(I)>,I> + thru_image< I, meta::lum<mln_value(I)> > lum(Image<I>& ima); # ifndef MLN_INCLUDE_ONLY template <typename I> - fun_image<meta::lum<mln_value(I)>,I> + thru_image< I, meta::lum<mln_value(I)> > lum(Image<I>& ima) { - fun_image<meta::lum<mln_value(I)>,I> result(ima); + typedef meta::lum<mln_value(I)> lum_t; + thru_image<I, lum_t> result(exact(ima), lum_t()); return result; } diff --git a/milena/mln/extract/red.hh b/milena/mln/extract/red.hh index ccf1d96..6be28a9 100644 --- a/milena/mln/extract/red.hh +++ b/milena/mln/extract/red.hh @@ -30,8 +30,7 @@ /// /// Extract the red component of an image. - -# include <mln/core/image/vmorph/fun_image.hh> +# include <mln/core/image/vmorph/thru_image.hh> # include <mln/fun/meta/red.hh> namespace mln @@ -41,16 +40,17 @@ namespace mln { template <typename I> - fun_image<meta::red<mln_value(I)>,I> + thru_image< I, meta::red<mln_value(I)> > red(Image<I>& ima); # ifndef MLN_INCLUDE_ONLY template <typename I> - fun_image<meta::red<mln_value(I)>,I> + thru_image< I, meta::red<mln_value(I)> > red(Image<I>& ima) { - fun_image<meta::red<mln_value(I)>,I> result(ima); + typedef meta::red<mln_value(I)> red_t; + thru_image<I, red_t> result(exact(ima), red_t()); return result; } diff --git a/milena/mln/extract/sat.hh b/milena/mln/extract/sat.hh index 22f4205..b45b1b7 100644 --- a/milena/mln/extract/sat.hh +++ b/milena/mln/extract/sat.hh @@ -30,8 +30,7 @@ /// /// Extract the sat component of an image. - -# include <mln/core/image/vmorph/fun_image.hh> +# include <mln/core/image/vmorph/thru_image.hh> # include <mln/fun/meta/sat.hh> namespace mln @@ -41,16 +40,17 @@ namespace mln { template <typename I> - fun_image<meta::sat<mln_value(I)>,I> + thru_image< I, meta::sat<mln_value(I)> > sat(Image<I>& ima); # ifndef MLN_INCLUDE_ONLY template <typename I> - fun_image<meta::sat<mln_value(I)>,I> + thru_image< I, meta::sat<mln_value(I)> > sat(Image<I>& ima) { - fun_image<meta::sat<mln_value(I)>,I> result(ima); + typedef meta::sat<mln_value(I)> sat_t; + thru_image<I, sat_t> result(exact(ima), sat_t()); return result; } -- 1.6.1.2
participants (1)
-
Roland Levillain