
* canvas/browsing/dir_struct_elt_incr_update.hh, * core/image/image1d.hh, * core/image/image2d.hh, * core/internal/image_base.hh, * geom/max_col.hh, * geom/max_ind.hh, * geom/max_row.hh, * geom/max_sli.hh, * geom/min_col.hh, * geom/min_ind.hh, * geom/min_row.hh, * geom/min_sli.hh, * io/pbm/load.hh, * io/pfm/load.hh, * io/pfm/save.hh, * io/pnm/load.hh, * linear/gaussian.hh, * subsampling/gaussian_subsampling.hh, * subsampling/subsampling.hh: Use mln_deduce(I, site, coord) instead of mln_coord(I) which is not valid anymore. --- milena/ChangeLog | 25 +++++++++++++ .../canvas/browsing/dir_struct_elt_incr_update.hh | 2 +- milena/mln/core/image/image1d.hh | 3 -- milena/mln/core/image/image2d.hh | 15 +++----- milena/mln/core/internal/image_base.hh | 3 -- milena/mln/geom/max_col.hh | 12 +++--- milena/mln/geom/max_ind.hh | 14 ++++---- milena/mln/geom/max_row.hh | 18 +++++----- milena/mln/geom/max_sli.hh | 14 ++++---- milena/mln/geom/min_col.hh | 18 +++++----- milena/mln/geom/min_ind.hh | 14 ++++---- milena/mln/geom/min_row.hh | 12 +++--- milena/mln/geom/min_sli.hh | 14 ++++---- milena/mln/io/pbm/load.hh | 39 +++++++++----------- milena/mln/io/pfm/load.hh | 4 +- milena/mln/io/pfm/save.hh | 4 +- milena/mln/io/pnm/load.hh | 2 +- milena/mln/linear/gaussian.hh | 31 ++++++++-------- milena/mln/subsampling/gaussian_subsampling.hh | 19 ++++------ milena/mln/subsampling/subsampling.hh | 24 +++++------- 20 files changed, 146 insertions(+), 141 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 8fa2f02..c4ee716 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,30 @@ 2008-12-02 Guillaume Lazzara <z@lrde.epita.fr> + Fix wrong use of mln_coord(). + + * canvas/browsing/dir_struct_elt_incr_update.hh, + * core/image/image1d.hh, + * core/image/image2d.hh, + * core/internal/image_base.hh, + * geom/max_col.hh, + * geom/max_ind.hh, + * geom/max_row.hh, + * geom/max_sli.hh, + * geom/min_col.hh, + * geom/min_ind.hh, + * geom/min_row.hh, + * geom/min_sli.hh, + * io/pbm/load.hh, + * io/pfm/load.hh, + * io/pfm/save.hh, + * io/pnm/load.hh, + * linear/gaussian.hh, + * subsampling/gaussian_subsampling.hh, + * subsampling/subsampling.hh: Use mln_deduce(I, site, coord) instead + of mln_coord(I) which is not valid anymore. + +2008-12-02 Guillaume Lazzara <z@lrde.epita.fr> + Fix tutorial generation. * doc/Doxyfile.in: add a missing example path. diff --git a/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh b/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh index a5cc7fd..b62ddfe 100644 --- a/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh +++ b/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh @@ -110,7 +110,7 @@ namespace mln pmin = f.input.domain().pmin(), pmax = f.input.domain().pmax(); - const mln_coord(I) + const mln_deduce(I, site, coord) pmin_dir = pmin[f.dir], pmax_dir = pmax[f.dir], pmin_dir_plus_half_length = pmin_dir + f.length / 2, diff --git a/milena/mln/core/image/image1d.hh b/milena/mln/core/image/image1d.hh index 27f7d39..4e5bbf5 100644 --- a/milena/mln/core/image/image1d.hh +++ b/milena/mln/core/image/image1d.hh @@ -130,9 +130,6 @@ namespace mln { typedef internal::image_primary< T, mln::box1d, image1d<T> > super_; - /// Coordinate associated type. - typedef int coord; - /// Value associated type. typedef T value; diff --git a/milena/mln/core/image/image2d.hh b/milena/mln/core/image/image2d.hh index e1a6e5a..b58dfed 100644 --- a/milena/mln/core/image/image2d.hh +++ b/milena/mln/core/image/image2d.hh @@ -123,21 +123,18 @@ namespace mln - /*! \brief Basic 2D image class. - * - * The parameter \c T is the type of pixel values. This image class - * stores data in memory and has a virtual border with constant - * thickness around data. - */ + /// Basic 2D image class. + /// + /// The parameter \c T is the type of pixel values. This image class + /// stores data in memory and has a virtual border with constant + /// thickness around data. + /// template <typename T> class image2d : public internal::image_primary< T, mln::box2d, image2d<T> > { typedef internal::image_primary< T, mln::box2d, image2d<T> > super_; public: - /// Coordinate associated type. - typedef int coord; - /// Value associated type. typedef T value; diff --git a/milena/mln/core/internal/image_base.hh b/milena/mln/core/internal/image_base.hh index 20eb39b..d940291 100644 --- a/milena/mln/core/internal/image_base.hh +++ b/milena/mln/core/internal/image_base.hh @@ -84,9 +84,6 @@ namespace mln public image_checked_<E> { - /// Coordinate associated type. - typedef mln_deduce(S, site, coord) coord; - /// Value associated type. typedef T value; diff --git a/milena/mln/geom/max_col.hh b/milena/mln/geom/max_col.hh index 31cbb9a..ca7c305 100644 --- a/milena/mln/geom/max_col.hh +++ b/milena/mln/geom/max_col.hh @@ -1,4 +1,5 @@ // Copyright (C) 2007, 2008 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 @@ -28,10 +29,9 @@ #ifndef MLN_GEOM_MAX_COL_HH # define MLN_GEOM_MAX_COL_HH -/*! \file mln/geom/max_col.hh - * - * \brief Give the maximum column of an image. - */ +/// \file mln/geom/max_col.hh +/// +/// Give the maximum column of an image. # include <mln/core/concept/image.hh> # include <mln/geom/bbox.hh> @@ -49,7 +49,7 @@ namespace mln /// Give the maximum col of an box 2d or 3d. template <typename B> - mln_coord(B::point) max_col(const Box<B>& b); + mln_deduce(B, point, coord) max_col(const Box<B>& b); # ifndef MLN_INCLUDE_ONLY @@ -64,7 +64,7 @@ namespace mln template <typename B> inline - mln_coord(B::point) max_col(const Box<B>& b) + mln_deduce(B, point, coord) max_col(const Box<B>& b) { metal::not_<metal::equal<metal::int_<B::dim>, metal::int_<1> > >::check(); return exact(b).pmax().col(); diff --git a/milena/mln/geom/max_ind.hh b/milena/mln/geom/max_ind.hh index 4ff4303..9a794e0 100644 --- a/milena/mln/geom/max_ind.hh +++ b/milena/mln/geom/max_ind.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2008 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 @@ -28,10 +29,9 @@ #ifndef MLN_GEOM_MAX_IND_HH # define MLN_GEOM_MAX_IND_HH -/*! \file mln/geom/max_ind.hh - * - * \brief Give the maximum ind of an image. - */ +/// \file mln/geom/max_ind.hh +/// +/// Give the maximum ind of an image. # include <mln/core/concept/image.hh> @@ -44,14 +44,14 @@ namespace mln /// Give the maximum ind of an image. template <typename I> - mln_coord(I) max_ind(const Image<I>& ima); + mln_deduce(I, site, coord) max_ind(const Image<I>& ima); # ifndef MLN_INCLUDE_ONLY template <typename I> inline - mln_coord(I) max_ind(const Image<I>& ima) + mln_deduce(I, site, coord) max_ind(const Image<I>& ima) { mln_precondition(exact(ima).has_data()); return exact(ima).bbox().pmax().ind(); diff --git a/milena/mln/geom/max_row.hh b/milena/mln/geom/max_row.hh index 5697a4a..ba6bc00 100644 --- a/milena/mln/geom/max_row.hh +++ b/milena/mln/geom/max_row.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2008 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 @@ -28,10 +29,9 @@ #ifndef MLN_GEOM_MAX_ROW_HH # define MLN_GEOM_MAX_ROW_HH -/*! \file mln/geom/max_row.hh - * - * \brief Give the maximum row of an image. - */ +/// \file mln/geom/max_row.hh +/// +/// Give the maximum row of an image. # include <mln/core/concept/image.hh> # include <mln/geom/bbox.hh> @@ -45,18 +45,18 @@ namespace mln /// Give the maximum row of an image. template <typename I> - mln_coord(I) max_row(const Image<I>& ima); + mln_deduce(I, site, coord) max_row(const Image<I>& ima); /// Give the maximum row of an box 2d or 3d. template <typename B> - mln_coord(B::point) max_row(const Box<B>& b); + mln_deduce(B, point, coord) max_row(const Box<B>& b); # ifndef MLN_INCLUDE_ONLY template <typename I> inline - mln_coord(I) max_row(const Image<I>& ima) + mln_deduce(I, site, coord) max_row(const Image<I>& ima) { mln_precondition(exact(ima).has_data()); return geom::bbox(ima).pmax().row(); @@ -65,7 +65,7 @@ namespace mln template <typename B> inline - mln_coord(B::point) max_row(const Box<B>& b) + mln_deduce(B, point, coord) max_row(const Box<B>& b) { metal::not_<metal::equal<metal::int_<B::dim>, metal::int_<1> > >::check(); return exact(b).pmax().row(); diff --git a/milena/mln/geom/max_sli.hh b/milena/mln/geom/max_sli.hh index 86deba5..2556d78 100644 --- a/milena/mln/geom/max_sli.hh +++ b/milena/mln/geom/max_sli.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2008 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 @@ -28,10 +29,9 @@ #ifndef MLN_GEOM_MAX_SLI_HH # define MLN_GEOM_MAX_SLI_HH -/*! \file mln/geom/max_sli.hh - * - * \brief Give the maximum sli of an image. - */ +/// \file mln/geom/max_sli.hh +/// +/// Give the maximum sli of an image. # include <mln/core/concept/image.hh> @@ -44,14 +44,14 @@ namespace mln /// Give the maximum sli of an image. template <typename I> - mln_coord(I) max_sli(const Image<I>& ima); + mln_deduce(I, site, coord) max_sli(const Image<I>& ima); # ifndef MLN_INCLUDE_ONLY template <typename I> inline - mln_coord(I) max_sli(const Image<I>& ima) + mln_deduce(I, site, coord) max_sli(const Image<I>& ima) { mln_precondition(exact(ima).has_data()); return exact(ima).bbox().pmax().sli(); diff --git a/milena/mln/geom/min_col.hh b/milena/mln/geom/min_col.hh index 6993d6f..1e01a93 100644 --- a/milena/mln/geom/min_col.hh +++ b/milena/mln/geom/min_col.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2008 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 @@ -28,10 +29,9 @@ #ifndef MLN_GEOM_MIN_COL_HH # define MLN_GEOM_MIN_COL_HH -/*! \file mln/geom/min_col.hh - * - * \brief Give the minimum column of an image. - */ +/// \file mln/geom/min_col.hh +/// +/// Give the minimum column of an image. # include <mln/core/concept/image.hh> # include <mln/geom/bbox.hh> @@ -45,18 +45,18 @@ namespace mln /// Give the minimum column of an image. template <typename I> - mln_coord(I) min_col(const Image<I>& ima); + mln_deduce(I, site, coord) min_col(const Image<I>& ima); /// Give the minimum column of an box 2d or 3d. template <typename B> - mln_coord(B::point) min_col(const Box<B>& b); + mln_deduce(B, point, coord) min_col(const Box<B>& b); # ifndef MLN_INCLUDE_ONLY template <typename I> inline - mln_coord(I) min_col(const Image<I>& ima) + mln_deduce(I, site, coord) min_col(const Image<I>& ima) { mln_precondition(exact(ima).has_data()); return geom::bbox(ima).pmin().col(); @@ -65,7 +65,7 @@ namespace mln template <typename B> inline - mln_coord(B::point) min_col(const Box<B>& b) + mln_deduce(B, point, coord) min_col(const Box<B>& b) { metal::not_<metal::equal<metal::int_<B::dim>, metal::int_<1> > >::check(); return exact(b).pmin().col(); diff --git a/milena/mln/geom/min_ind.hh b/milena/mln/geom/min_ind.hh index ce84967..abf4ecd 100644 --- a/milena/mln/geom/min_ind.hh +++ b/milena/mln/geom/min_ind.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2008 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 @@ -28,10 +29,9 @@ #ifndef MLN_GEOM_MIN_IND_HH # define MLN_GEOM_MIN_IND_HH -/*! \file mln/geom/min_ind.hh - * - * \brief Give the minimum ind of an image. - */ +/// \file mln/geom/min_ind.hh +/// +/// Give the minimum ind of an image. # include <mln/core/concept/image.hh> @@ -44,14 +44,14 @@ namespace mln /// Give the minimum ind of an image. template <typename I> - mln_coord(I) min_ind(const Image<I>& ima); + mln_deduce(I, site, coord) min_ind(const Image<I>& ima); # ifndef MLN_INCLUDE_ONLY template <typename I> inline - mln_coord(I) min_ind(const Image<I>& ima) + mln_deduce(I, site, coord) min_ind(const Image<I>& ima) { mln_precondition(exact(ima).has_data()); return exact(ima).bbox().pmin().ind(); diff --git a/milena/mln/geom/min_row.hh b/milena/mln/geom/min_row.hh index 5f2c191..e0878de 100644 --- a/milena/mln/geom/min_row.hh +++ b/milena/mln/geom/min_row.hh @@ -1,4 +1,5 @@ // Copyright (C) 2007, 2008 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 @@ -28,10 +29,9 @@ #ifndef MLN_GEOM_MIN_ROW_HH # define MLN_GEOM_MIN_ROW_HH -/*! \file mln/geom/min_row.hh - * - * \brief Give the minimum row of an image. - */ +/// \file mln/geom/min_row.hh +/// +/// Give the minimum row of an image. # include <mln/core/concept/image.hh> # include <mln/geom/bbox.hh> @@ -52,7 +52,7 @@ namespace mln /// Give the minimum row of an box 2d or 3d. template <typename B> - mln_coord(B::point) min_row(const Box<B>& b); + mln_deduce(B, point, coord) min_row(const Box<B>& b); # ifndef MLN_INCLUDE_ONLY @@ -68,7 +68,7 @@ namespace mln template <typename B> inline - mln_coord(B::point) min_row(const Box<B>& b) + mln_deduce(B, point, coord) min_row(const Box<B>& b) { metal::not_<metal::equal<metal::int_<B::dim>, metal::int_<1> > >::check(); return exact(b).pmin().row(); diff --git a/milena/mln/geom/min_sli.hh b/milena/mln/geom/min_sli.hh index 303117d..a01de7d 100644 --- a/milena/mln/geom/min_sli.hh +++ b/milena/mln/geom/min_sli.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2008 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 @@ -28,10 +29,9 @@ #ifndef MLN_GEOM_MIN_SLI_HH # define MLN_GEOM_MIN_SLI_HH -/*! \file mln/geom/min_sli.hh - * - * \brief Give the minimum sli of an image. - */ +/// \file mln/geom/min_sli.hh +/// +/// Give the minimum sli of an image. # include <mln/core/concept/image.hh> @@ -44,14 +44,14 @@ namespace mln /// Give the minimum sli of an image. template <typename I> - mln_coord(I) min_sli(const Image<I>& ima); + mln_deduce(I, site, coord) min_sli(const Image<I>& ima); # ifndef MLN_INCLUDE_ONLY template <typename I> inline - mln_coord(I) min_sli(const Image<I>& ima) + mln_deduce(I, site, coord) min_sli(const Image<I>& ima) { mln_precondition(exact(ima).has_data()); return exact(ima).bbox().pmin().sli(); diff --git a/milena/mln/io/pbm/load.hh b/milena/mln/io/pbm/load.hh index b2ba586..9a16638 100644 --- a/milena/mln/io/pbm/load.hh +++ b/milena/mln/io/pbm/load.hh @@ -1,5 +1,5 @@ // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 EPITA -// Research and Development Laboratory +// 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 @@ -29,13 +29,10 @@ #ifndef MLN_IO_PBM_LOAD_HH # define MLN_IO_PBM_LOAD_HH -/*! - * \file mln/io/pbm/load.hh - * - * \brief Define a function which loads an image of kind pbm with - * given path. - * - */ +/// \file mln/io/pbm/load.hh +/// +/// Define a function which loads an image of kind pbm with +/// given path. # include <iostream> @@ -55,21 +52,21 @@ namespace mln { - /*! Load a pbm image in a Milena image. - * - * \param[out] ima A reference to the image2d<bool> which will receive - * data. - * \param[in] filename The source. - */ + /// Load a pbm image in a Milena image. + /// + /// \param[out] ima A reference to the image2d<bool> which will receive + /// data. + /// \param[in] filename The source. + /// void load(image2d<bool>& ima, const std::string& filename); - /*! Load a pbm image in a image2d<float>. - * - * \param[in] filename The image source. - * - * \return An image2d<float> which contains loaded data. - */ + /// Load a pbm image in a image2d<float>. + /// + /// \param[in] filename The image source. + /// + /// \return An image2d<float> which contains loaded data. + /// image2d<bool> load(const std::string& filename); # ifndef MLN_INCLUDE_ONLY @@ -102,7 +99,7 @@ namespace mln { point2d p = point2d(0, ima.domain().pmin().col()); typedef mln_value(I) V; - const mln_coord(I) + const mln_deduce(I, site, coord) min_row = geom::min_row(ima), max_row = geom::max_row(ima), min_col = geom::min_col(ima), diff --git a/milena/mln/io/pfm/load.hh b/milena/mln/io/pfm/load.hh index 96bc20d..5ea3a23 100644 --- a/milena/mln/io/pfm/load.hh +++ b/milena/mln/io/pfm/load.hh @@ -1,5 +1,5 @@ // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 EPITA -// Research and Development Laboratory +// 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 @@ -124,7 +124,7 @@ namespace mln { point2d p = point2d(0, 0); - const mln_coord(I) + const mln_deduce(I, site, coord) min_row = geom::min_row(ima), max_row = geom::max_row(ima); diff --git a/milena/mln/io/pfm/save.hh b/milena/mln/io/pfm/save.hh index 53f18e6..1743e20 100644 --- a/milena/mln/io/pfm/save.hh +++ b/milena/mln/io/pfm/save.hh @@ -1,5 +1,5 @@ // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 EPITA -// Research and Development Laboratory +// 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 @@ -89,7 +89,7 @@ namespace mln unsigned int ncols = geom::ncols(ima); - const mln_coord(I) + const mln_deduce(I, site, coord) min_row = geom::min_row(ima), max_row = geom::max_row(ima); diff --git a/milena/mln/io/pnm/load.hh b/milena/mln/io/pnm/load.hh index d2c2f6b..ed5e3c5 100644 --- a/milena/mln/io/pnm/load.hh +++ b/milena/mln/io/pnm/load.hh @@ -123,7 +123,7 @@ namespace mln { point2d p = point2d(0, ima.domain().pmin().col()); typedef mln_value(I) V; - const mln_coord(I) + const mln_deduce(I, site, coord) min_row = geom::min_row(ima), max_row = geom::max_row(ima); diff --git a/milena/mln/linear/gaussian.hh b/milena/mln/linear/gaussian.hh index 70efc64..88f30a2 100644 --- a/milena/mln/linear/gaussian.hh +++ b/milena/mln/linear/gaussian.hh @@ -1,5 +1,5 @@ // Copyright (C) 2001, 2002, 2003, 2004, 2008 EPITA Research and -// Laboratory +// 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 @@ -29,13 +29,12 @@ #ifndef MLN_LINEAR_GAUSSIAN_HH # define MLN_LINEAR_GAUSSIAN_HH -/*! \file mln/linear/gaussian.hh - * - * \brief Gaussian filter. - * - * \todo Add a clean reference David Deriche - * Recursively implementing the gaussian and its derivatives (1993) - */ +/// \file mln/linear/gaussian.hh +/// +/// Gaussian filter. +/// +/// \todo Add a clean reference David Deriche +/// Recursively implementing the gaussian and its derivatives (1993) # include <mln/core/concept/image.hh> # include <mln/core/alias/point2d.hh> @@ -61,10 +60,10 @@ namespace mln namespace linear { - /*! Gaussian filter of an image \p input - * - * \pre output.domain = input.domain - */ + /// Gaussian filter of an image \p input + /// + /// \pre output.domain = input.domain + /// template <class I> mln_concrete(I) gaussian(const Image<I>& input, float sigma); @@ -84,9 +83,9 @@ namespace mln struct recursivefilter_coef_ { - /*! - ** \brief Constructor. - */ + /// + /// Constructor. + /// recursivefilter_coef_(float a0, float a1, float b0, float b1, float c0, float c1, @@ -205,7 +204,7 @@ namespace mln - c.d[3] * tmp1[0]; mln_psite(I) current(start + d + d + d + d); - for (mln_coord(I) i = 4; i < len; ++i) + for (mln_deduce(I, site, coord) i = 4; i < len; ++i) { tmp1[i] = c.n[0] * ima(current) diff --git a/milena/mln/subsampling/gaussian_subsampling.hh b/milena/mln/subsampling/gaussian_subsampling.hh index 09d8e53..b4aa2e0 100644 --- a/milena/mln/subsampling/gaussian_subsampling.hh +++ b/milena/mln/subsampling/gaussian_subsampling.hh @@ -1,4 +1,5 @@ // Copyright (C) 2008 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 @@ -28,10 +29,9 @@ #ifndef MLN_SUBSAMPLING_GAUSSIAN_SUBSAMPLING_HH # define MLN_SUBSAMPLING_GAUSSIAN_SUBSAMPLING_HH -/*! \file mln/binarization/threshold.hh - * - * \brief Produce a subsampled image - */ +/// \file mln/binarization/threshold.hh +/// +/// Produce a subsampled image # include <mln/geom/ncols.hh> # include <mln/geom/nrows.hh> @@ -46,18 +46,15 @@ namespace mln { namespace subsampling - { + { - /*! Gaussian subsampling FIXME : doxy - * - * - */ + /// Gaussian subsampling FIXME : doxy template <typename I> inline mln_concrete(I) gaussian_subsampling(const Image<I>& input, float sigma const mln_dpsite(I)& first_p, - const mln_coord(I)& gap); + const mln_deduce(I, site, coord)& gap); # ifndef MLN_INCLUDE_ONLY @@ -67,7 +64,7 @@ namespace mln mln_concrete(I) gaussian_subsampling(const Image<I>& input, float sigma, const mln_dpsite(I)& first_p, - const mln_coord(I)& gap) + const mln_deduce(I, site, coord)& gap) { trace::entering("subsampling::gaussian_subsampling"); mln_precondition(exact(input).has_data()); diff --git a/milena/mln/subsampling/subsampling.hh b/milena/mln/subsampling/subsampling.hh index cc36334..11a5944 100644 --- a/milena/mln/subsampling/subsampling.hh +++ b/milena/mln/subsampling/subsampling.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2008 EPITA Research and Development Laboratory +// Copyright (C) 2008 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 @@ -28,10 +28,9 @@ #ifndef MLN_SUBSAMPLING_SUBSAMPLING_HH # define MLN_SUBSAMPLING_SUBSAMPLING_HH -/*! \file mln/binarization/threshold.hh - * - * \brief Produce a subsampled image - */ +/// \file mln/binarization/threshold.hh +/// +/// Produce a subsampled image # include <mln/geom/ncols.hh> # include <mln/geom/nrows.hh> @@ -41,18 +40,15 @@ namespace mln { namespace subsampling - { + { - /*! Subsampling FIXME : doxy - * - * - */ + /// Subsampling FIXME : doxy template <typename I> inline mln_concrete(I) subsampling(const Image<I>& input, const mln_deduce(I, site, delta)& first_p, - const mln_coord(I)& gap); + const mln_deduce(I, site, coord)& gap); # ifndef MLN_INCLUDE_ONLY @@ -77,7 +73,7 @@ namespace mln { point2d p1(i, j); point2d p2(first_p[0] + i * gap, first_p[1] + j * gap); - + output(p1) = input(p2); } @@ -93,14 +89,14 @@ namespace mln mln_concrete(I) subsampling(const Image<I>& input, const mln_deduce(I, site, delta)& first_p, - const mln_coord(I)& gap) + const mln_deduce(I, site, coord)& gap) { trace::entering("subsampling::subsampling"); mln_precondition(exact(input).has_data()); mln_concrete(I) output(geom::nrows(input) / gap, geom::ncols(input) / gap); // FIXME: only 2d here - + output = impl::subsampling_(exact(input), first_p, gap); trace::exiting("subsampling::subsampling"); -- 1.5.6.5