3333: Fix missing specialization for bkd_pixter in image1d and image3d.

https://svn.lrde.epita.fr/svn/oln/trunk/milena Index: ChangeLog from Thierry Geraud <thierry.geraud@lrde.epita.fr> Fix missing specialization for bkd_pixter in image1d and image3d. * mln/core/image/image1d.hh (bkd_pixter): Fix missing specialization. * mln/core/image/image3d.hh (bkd_pixter): Fix missing specialization. * mln/morpho/attribute/card.hh: Fix missing using. * mln/canvas/morpho/algebraic_filter.hh: Layout. * tests/morpho/closing_algebraic.cc: Remove dead code. mln/core/image/image1d.hh | 10 ++++++++-- mln/core/image/image3d.hh | 10 ++++++++-- mln/morpho/attribute/card.hh | 9 ++++++--- tests/morpho/closing_algebraic.cc | 2 +- 4 files changed, 23 insertions(+), 8 deletions(-) Index: mln/core/image/image1d.hh --- mln/core/image/image1d.hh (revision 3332) +++ mln/core/image/image1d.hh (working copy) @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory -// (LRDE) +// Copyright (C) 2007, 2008, 2009 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of the Olena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -543,6 +543,12 @@ template <typename T> struct bkd_pixter< image1d<T> > { + typedef bkd_pixter1d< image1d<T> > ret; + }; + + template <typename T> + struct bkd_pixter< const image1d<T> > + { typedef bkd_pixter1d< const image1d<T> > ret; }; Index: mln/core/image/image3d.hh --- mln/core/image/image3d.hh (revision 3332) +++ mln/core/image/image3d.hh (working copy) @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory -// (LRDE) +// Copyright (C) 2007, 2008, 2009 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of the Olena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -623,6 +623,12 @@ template <typename T> struct bkd_pixter< image3d<T> > { + typedef bkd_pixter3d< image3d<T> > ret; + }; + + template <typename T> + struct bkd_pixter< const image3d<T> > + { typedef bkd_pixter3d< const image3d<T> > ret; }; Index: mln/morpho/attribute/card.hh --- mln/morpho/attribute/card.hh (revision 3332) +++ mln/morpho/attribute/card.hh (working copy) @@ -44,7 +44,7 @@ namespace morpho { namespace attribute { - template <typename I> struct card; + template <typename I> class card; } } @@ -61,7 +61,6 @@ typedef accumulator::has_set_value::no has_set_value; typedef accumulator::has_stop::no has_stop; typedef accumulator::when_pix::use_none when_pix; - }; } // end of namespace mln::trait @@ -76,8 +75,11 @@ /// Cardinality accumulator class. template <typename I> - struct card : public mln::accu::internal::base< unsigned, card<I> > + class card : public mln::accu::internal::base< unsigned, card<I> > { + typedef mln::accu::internal::base< unsigned, card<I> > super_; + public: + typedef mln_psite(I) argument; card(); @@ -93,6 +95,7 @@ void take(); void take_as_init(); + using super_::take_as_init; /// \} /// Get the value of the accumulator. Index: mln/canvas/morpho/algebraic_filter.hh Index: tests/morpho/closing_algebraic.cc --- tests/morpho/closing_algebraic.cc (revision 3332) +++ tests/morpho/closing_algebraic.cc (working copy) @@ -53,7 +53,7 @@ typedef image2d<int_u8> I; I lena; - io::pgm::load(lena, MLN_IMG_DIR "/tiny.pgm");//lena.pgm"); + io::pgm::load(lena, MLN_IMG_DIR "/tiny.pgm"); { accu::count<point2d> a; io::pgm::save(morpho::closing_algebraic(lena, c4(), a, 10),
participants (1)
-
Thierry Geraud