Commit 2124e60a authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Make Olena compile with MLN_INCLUDE_ONLY and cleanup comments.

	* mln/arith/diff_abs.hh: Fix bad namespace closure.

	* mln/morpho/dilation_fast.hh,
	* mln/trait/image/print.hh,
	* mln/trait/op/ord.hh,
	* mln/level/median.hh,
	* mln/estim/mean.hh,
	* mln/estim/min_max.hh,
	* mln/estim/sum.hh,
	* mln/estim/all.hh,
	* mln/estim/essential.hh,
	* mln/arith/diff_abs.hh,
	* mln/arith/min.hh,
	* mln/arith/min.spe.hh,
	* mln/arith/minus.hh,
	* mln/arith/plus.hh,
	* mln/arith/revert.hh,
	* mln/arith/revert.spe.hh,
	* mln/arith/times.hh,
	* mln/arith/times.spe.hh: Cleanup comments.

	* mln/morpho/hit_or_miss.hh,
	* mln/display/save.hh,
	* mln/canvas/browsing/backdiagonal2d.hh,
	* mln/canvas/browsing/diagonal2d.hh,
	* mln/canvas/browsing/dir_struct_elt_incr_update.hh,
	* mln/canvas/browsing/directional.hh,
	* mln/canvas/browsing/essential.hh,
	* mln/canvas/browsing/fwd.hh,
	* mln/canvas/browsing/hyper_directional.hh,
	* mln/canvas/browsing/snake_fwd.hh,
	* mln/canvas/browsing/snake_generic.hh,
	* mln/canvas/browsing/snake_vert.hh: Fix wrong declaration of global
	variables.

	* mln/value/float01.hh,
	* mln/core/contract.hh: add missing inline.

	* mln/fun/p2b/chess.hh,
	* mln/fun/p2v/iota.hh: remove global variables.

	* mln/fun/v2v/rgb_to_hsi.hh: Split interface and implementation.

	* mln/geom/chamfer.hh: Fix compilation issue.

	* mln/make/win_chamfer.hh: Move implementation between
	MLN_INCLUDE_ONLY guards.

	* tests/Makefile.am,
	* tests/global_vars1.cc,
	* tests/global_vars2.cc: Add a new test to check whether global
	variables are declared correctly or not.

	* tests/border/find_full.cc,
	* tests/border/get_full.cc,
	* tests/convert/to_image.cc,
	* tests/core/image/cast_image.cc,
	* tests/core/image/image_if.cc,
	* tests/core/site_set/pset_if.cc,
	* tests/level/fill_with_image.cc,
	* tests/level/fill_with_value.cc,
	* tests/level/paste.cc,
	* tests/level/transform.cc,
	* tests/trait/image/images.cc: update according the new use of
	p2v::iota and p2b::chess.

	* tests/pw/image.cc: Make it a real test.

	* mln/level/compute.hh: Fix ambiguity.

	* tests/border/get.cc,
	* tests/border/resize_image_if.cc: Fix tests.

git-svn-id: https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008@2865 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent e3e0cce2
......@@ -29,6 +29,83 @@
* mln/logical/includes.hh: New.
* mln/logical/all.hh: Update.
 
2008-11-13 Guillaume Lazzara <z@lrde.epita.fr>
Make Olena compile with MLN_INCLUDE_ONLY and cleanup comments.
* mln/arith/diff_abs.hh: Fix bad namespace closure.
* mln/morpho/dilation_fast.hh,
* mln/trait/image/print.hh,
* mln/trait/op/ord.hh,
* mln/level/median.hh,
* mln/estim/mean.hh,
* mln/estim/min_max.hh,
* mln/estim/sum.hh,
* mln/estim/all.hh,
* mln/estim/essential.hh,
* mln/arith/diff_abs.hh,
* mln/arith/min.hh,
* mln/arith/min.spe.hh,
* mln/arith/minus.hh,
* mln/arith/plus.hh,
* mln/arith/revert.hh,
* mln/arith/revert.spe.hh,
* mln/arith/times.hh,
* mln/arith/times.spe.hh: Cleanup comments.
* mln/morpho/hit_or_miss.hh,
* mln/display/save.hh,
* mln/canvas/browsing/backdiagonal2d.hh,
* mln/canvas/browsing/diagonal2d.hh,
* mln/canvas/browsing/dir_struct_elt_incr_update.hh,
* mln/canvas/browsing/directional.hh,
* mln/canvas/browsing/essential.hh,
* mln/canvas/browsing/fwd.hh,
* mln/canvas/browsing/hyper_directional.hh,
* mln/canvas/browsing/snake_fwd.hh,
* mln/canvas/browsing/snake_generic.hh,
* mln/canvas/browsing/snake_vert.hh: Fix wrong declaration of global
variables.
* mln/value/float01.hh,
* mln/core/contract.hh: add missing inline.
* mln/fun/p2b/chess.hh,
* mln/fun/p2v/iota.hh: remove global variables.
* mln/fun/v2v/rgb_to_hsi.hh: Split interface and implementation.
* mln/geom/chamfer.hh: Fix compilation issue.
* mln/make/win_chamfer.hh: Move implementation between
MLN_INCLUDE_ONLY guards.
* tests/Makefile.am,
* tests/global_vars1.cc,
* tests/global_vars2.cc: Add a new test to check whether global
variables are declared correctly or not.
* tests/border/find_full.cc,
* tests/border/get_full.cc,
* tests/convert/to_image.cc,
* tests/core/image/cast_image.cc,
* tests/core/image/image_if.cc,
* tests/core/site_set/pset_if.cc,
* tests/level/fill_with_image.cc,
* tests/level/fill_with_value.cc,
* tests/level/paste.cc,
* tests/level/transform.cc,
* tests/trait/image/images.cc: update according the new use of
p2v::iota and p2b::chess.
* tests/pw/image.cc: Make it a real test.
* mln/level/compute.hh: Fix ambiguity.
* tests/border/get.cc,
* tests/border/resize_image_if.cc: Fix tests.
2008-11-13 Thierry Geraud <thierry.geraud@lrde.epita.fr>
 
Specialize accu tranform for fastest images.
......
// 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,12 +29,11 @@
#ifndef MLN_ARITH_DIFF_ABS_HH
# define MLN_ARITH_DIFF_ABS_HH
/*! \file mln/arith/diff_abs.hh
*
* \brief Point-wise addition between images.
*
* \todo Speedup; some versions are not optimal.
*/
/// \file mln/arith/diff_abs.hh
///
/// Point-wise addition between images.
///
/// \todo Speedup; some versions are not optimal.
# include <mln/arith/includes.hh>
# include <mln/fun/vv2v/diff_abs.hh>
......@@ -45,8 +45,8 @@ namespace mln
namespace arith
{
/*! Point-wise absolute difference of images \p lhs and \p rhs.
*
/// Point-wise absolute difference of images \p lhs and \p rhs.
/*!
* \param[in] lhs First operand image.
* \param[in] rhs Second operand image.
* \result The result image.
......@@ -76,10 +76,10 @@ namespace mln
return output;
}
} // end of namespace mln::arith
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::arith
} // end of namespace mln
......
// 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_ARITH_MIN_HH
# define MLN_ARITH_MIN_HH
/*! \file mln/arith/min.hh
*
* \brief Point-wise min between images.
*/
/// \file mln/arith/min.hh
///
/// Point-wise min between images.
# include <mln/core/concept/image.hh>
......@@ -45,8 +45,8 @@ namespace mln
namespace arith
{
/*! Point-wise min of images \p lhs and \p rhs.
*
/// Point-wise min of images \p lhs and \p rhs.
/*!
* \param[in] lhs First operand image.
* \param[in] rhs Second operand image.
* \result The result image.
......@@ -58,8 +58,8 @@ namespace mln
min(const Image<L>& lhs, const Image<R>& rhs);
/*! Point-wise min of image \p lhs in image \p rhs.
*
/// Point-wise min of image \p lhs in image \p rhs.
/*!
* \param[in,out] lhs First operand image.
* \param[in] rhs Second operand image.
*
......
// 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_ARITH_MIN_SPE_HH
# define MLN_ARITH_MIN_SPE_HH
/*! \file mln/arith/min.spe.hh
*
* \brief Specializations for mln::arith::min.
*/
/// \file mln/arith/min.spe.hh
///
/// Specializations for mln::arith::min.
# ifndef MLN_ARITH_MIN_HH
# error "Forbidden inclusion of *.spe.hh"
......
// 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,12 +29,11 @@
#ifndef MLN_ARITH_MINUS_HH
# define MLN_ARITH_MINUS_HH
/*! \file mln/arith/minus.hh
*
* \brief Point-wise substraction between images.
*
* \todo Speedup; some versions are not optimal.
*/
/// \file mln/arith/minus.hh
///
/// Point-wise substraction between images.
///
/// \todo Speedup; some versions are not optimal.
# include <mln/arith/includes.hh>
......@@ -87,8 +87,8 @@ namespace mln
namespace arith
{
/*! Point-wise addition of images \p lhs and \p rhs.
*
/// Point-wise addition of images \p lhs and \p rhs.
/*!
* \param[in] lhs First operand image.
* \param[in] rhs Second operand image.
* \result The result image.
......@@ -100,8 +100,8 @@ namespace mln
minus(const Image<L>& lhs, const Image<R>& rhs);
/*! Point-wise addition of images \p lhs and \p rhs.
*
/// Point-wise addition of images \p lhs and \p rhs.
/*!
* \param[in] lhs First operand image.
* \param[in] rhs Second operand image.
* \param[in] f Function.
......@@ -114,8 +114,8 @@ namespace mln
minus(const Image<L>& lhs, const Image<R>& rhs, const Function_v2v<F>& f);
/*! Point-wise addition of images \p lhs and \p rhs.
*
/// Point-wise addition of images \p lhs and \p rhs.
/*!
* \param[in] lhs First operand image.
* \param[in] rhs Second operand image.
* \result The result image.
......@@ -129,8 +129,8 @@ namespace mln
minus(const Image<L>& lhs, const Image<R>& rhs);
/*! Point-wise addition of image \p rhs in image \p lhs.
*
/// Point-wise addition of image \p rhs in image \p lhs.
/*!
* \param[in,out] lhs First operand image (subject to addition).
* \param[in] rhs Second operand image (to be added to \p lhs).
*
......@@ -145,8 +145,8 @@ namespace mln
minus_inplace(Image<L>& lhs, const Image<R>& rhs);
/*! Point-wise addition of the value \p val to image \p input.
*
/// Point-wise addition of the value \p val to image \p input.
/*!
* \param[in] input The image.
* \param[in] val The value.
* \result The result image.
......@@ -158,8 +158,8 @@ namespace mln
minus_cst(const Image<I>& input, const V& val);
/*! Point-wise addition of the value \p val to image \p input.
*
/// Point-wise addition of the value \p val to image \p input.
/*!
* \param[in] input The image.
* \param[in] val The value.
* \param[in] f Function.
......@@ -172,8 +172,8 @@ namespace mln
minus_cst(const Image<I>& input, const V& val, const Function_v2v<F>& f);
/*! Point-wise addition of the value \p val to image \p input.
*
/// Point-wise addition of the value \p val to image \p input.
/*!
* \param[in,out] input The image.
* \param[in] val The value.
*
......
// 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,12 +29,11 @@
#ifndef MLN_ARITH_PLUS_HH
# define MLN_ARITH_PLUS_HH
/*! \file mln/arith/plus.hh
*
* \brief Point-wise addition between images.
*
* \todo Speedup; some versions are not optimal.
*/
/// \file mln/arith/plus.hh
///
/// Point-wise addition between images.
///
/// \todo Speedup; some versions are not optimal.
# include <mln/arith/includes.hh>
......@@ -87,8 +87,8 @@ namespace mln
namespace arith
{
/*! Point-wise addition of images \p lhs and \p rhs.
*
/// Point-wise addition of images \p lhs and \p rhs.
/*!
* \param[in] lhs First operand image.
* \param[in] rhs Second operand image.
* \result The result image.
......@@ -100,8 +100,8 @@ namespace mln
plus(const Image<L>& lhs, const Image<R>& rhs);
/*! Point-wise addition of images \p lhs and \p rhs.
*
/// Point-wise addition of images \p lhs and \p rhs.
/*!
* \param[in] lhs First operand image.
* \param[in] rhs Second operand image.
* \param[in] f Function.
......@@ -114,8 +114,8 @@ namespace mln
plus(const Image<L>& lhs, const Image<R>& rhs, const Function_v2v<F>& f);
/*! Point-wise addition of images \p lhs and \p rhs.
*
/// Point-wise addition of images \p lhs and \p rhs.
/*!
* \param[in] lhs First operand image.
* \param[in] rhs Second operand image.
* \result The result image.
......@@ -129,8 +129,8 @@ namespace mln
plus(const Image<L>& lhs, const Image<R>& rhs);
/*! Point-wise addition of image \p rhs in image \p lhs.
*
/// Point-wise addition of image \p rhs in image \p lhs.
/*!
* \param[in,out] lhs First operand image (subject to addition).
* \param[in] rhs Second operand image (to be added to \p lhs).
*
......@@ -145,8 +145,8 @@ namespace mln
plus_inplace(Image<L>& lhs, const Image<R>& rhs);
/*! Point-wise addition of the value \p val to image \p input.
*
/// Point-wise addition of the value \p val to image \p input.
/*!
* \param[in] input The image.
* \param[in] val The value.
* \result The result image.
......@@ -158,8 +158,8 @@ namespace mln
plus_cst(const Image<I>& input, const V& val);
/*! Point-wise addition of the value \p val to image \p input.
*
/// Point-wise addition of the value \p val to image \p input.
/*!
* \param[in] input The image.
* \param[in] val The value.
* \param[in] f Function.
......@@ -172,8 +172,8 @@ namespace mln
plus_cst(const Image<I>& input, const V& val, const Function_v2v<F>& f);
/*! Point-wise addition of the value \p val to image \p input.
*
/// Point-wise addition of the value \p val to image \p input.
/*!
* \param[in] input The image.
* \param[in] val The value.
* \result The result image.
......@@ -185,8 +185,8 @@ namespace mln
plus_cst(const Image<I>& input, const V& val);
/*! Point-wise addition of the value \p val to image \p input.
*
/// Point-wise addition of the value \p val to image \p input.
/*!
* \param[in,out] input The image.
* \param[in] val The value.
*
......
// 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,12 +29,11 @@
#ifndef MLN_ARITH_REVERT_HH
# define MLN_ARITH_REVERT_HH
/*! \file mln/arith/revert.hh
*
* \brief Point-wise revert (min -> max and max -> min) of images.
*
* \todo Add static assertion and save one iterator in in-place version.
*/
/// \file mln/arith/revert.hh
///
/// Point-wise revert (min -> max and max -> min) of images.
///
/// \todo Add static assertion and save one iterator in in-place version.
# include <mln/core/concept/image.hh>
# include <mln/trait/value_.hh>
......@@ -52,8 +52,8 @@ namespace mln
namespace arith
{
/*! Point-wise reversion of image \p input.
*
/// Point-wise reversion of image \p input.
/*!
* \param[in] input the input image.
* \result The result image.
*
......@@ -67,8 +67,8 @@ namespace mln
mln_concrete(I) revert(const Image<I>& input);
/*! Point-wise in-place reversion of image \p input.
*
/// Point-wise in-place reversion of image \p input.
/*!
* \param[in,out] input The target image.
*
* \pre \p input.has_data
......
// 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,11 +29,9 @@
#ifndef MLN_ARITH_REVERT_SPE_HH
# define MLN_ARITH_REVERT_SPE_HH
/*! \file mln/arith/revert.spe.hh
*
* \brief Specializations for mln::arith::revert.
*
*/
/// \file mln/arith/revert.spe.hh
///
/// Specializations for mln::arith::revert.
# ifndef MLN_ARITH_REVERT_HH
# error "Forbidden inclusion of *.spe.hh"
......
// 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,12 +29,11 @@
#ifndef MLN_ARITH_TIMES_HH
# define MLN_ARITH_TIMES_HH
/*! \file mln/arith/times.hh
*
* \brief Point-wise multiplication between images.
*
* \todo Speedup; some versions are not optimal.
*/
/// \file mln/arith/times.hh
///
/// Point-wise multiplication between images.
///
/// \todo Speedup; some versions are not optimal.
# include <mln/arith/includes.hh>
......@@ -88,8 +88,8 @@ namespace mln
namespace arith
{
/*! Point-wise addition of images \p lhs and \p rhs.
*
/// Point-wise addition of images \p lhs and \p rhs.
/*!
* \param[in] lhs First operand image.
* \param[in] rhs Second operand image.
* \param[out] output The result image.
......@@ -100,8 +100,8 @@ namespace mln
void times(const Image<L>& lhs, const Image<R>& rhs, Image<O>& output);
/*! Point-wise addition of the value \p val to image \p input.
*
/// Point-wise addition of the value \p val to image \p input.
/*!
* \param[in] input The image.
* \param[in] val The value.
* \param[out] output The result image.
......@@ -112,8 +112,8 @@ namespace mln
void times_cst(const Image<I>& input, const V& val, Image<O>& output);
/*! Point-wise addition of image \p rhs in image \p lhs.
*
/// Point-wise addition of image \p rhs in image \p lhs.
/*!
* \param[in] lhs First operand image (subject to addition).
* \param[in,out] rhs Second operand image (to be added to \p lhs).
*
......
// 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,11 +29,9 @@
#ifndef MLN_ARITH_TIMES_SPE_HH
# define MLN_ARITH_TIMES_SPE_HH
/*! \file mln/arith/times.spe.hh
*
* \brief Specializations for mln::arith::times.
*
*/
/// \file mln/arith/times.spe.hh
///
/// Specializations for mln::arith::times.
# ifndef MLN_ARITH_TIMES_HH
# error "Forbidden inclusion of *.spe.hh"
......
// 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_CANVAS_BROWSING_BACKDIAGONAL2D_HH
# define MLN_CANVAS_BROWSING_BACKDIAGONAL2D_HH
/*! \file mln/canvas/browsing/backdiagonal2d.hh
*
* \brief Backdiagonal2d browsing of an image.
*/
/// \file mln/canvas/browsing/backdiagonal2d.hh
///
/// Backdiagonal2d browsing of an image.
# include <mln/core/concept/browsing.hh>
# include <mln/core/concept/image.hh>
......@@ -45,9 +45,8 @@ namespace mln
namespace browsing
{
/// Browsing in a certain direction.
/*!
* \brief Browsing in a certain direction.
*
* This canvas browse all the point of an image 'input' of type
* 'I' and of dimension 'dim' in the direction 'dir'.
*
......@@ -86,12 +85,14 @@ namespace mln
{
template <typename F>
void operator()(F& f) const;
}
};
backdiagonal2d;
extern const backdiagonal2d_t backdiagonal2d;
# ifndef MLN_INCLUDE_ONLY
const backdiagonal2d_t backdiagonal2d;
template <typename F>
inline
void
......@@ -118,10 +119,7 @@ namespace mln
f.p[0] = pmax[0];
f.p[1] = pmin[1];
trace::entering("canvas::browsing::backdiagonal2d::init");
f.init();
trace::exiting("canvas::browsing::backdiagonal2d::init");
while (f.input.domain().has(f.p))
{
......@@ -157,9 +155,7 @@ namespace mln
f.p = start_diag + dp_second;
}
trace::entering("canvas::browsing::backdiagonal2d::final");
f.final();
trace::exiting("canvas::browsing::backdiagonal2d::final");
trace::exiting("canvas::browsing::backdiagonal2d");
}
......
// 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_CANVAS_BROWSING_DIAGONAL2D_HH
# define MLN_CANVAS_BROWSING_DIAGONAL2D_HH
/*! \file mln/canvas/browsing/diagonal2d.hh
*
* \brief Diagonal2d browsing of an image.
*/
/// \file mln/canvas/browsing/diagonal2d.hh
///
/// Diagonal2d browsing of an image.
# include <mln/core/concept/browsing.hh>
# include <mln/core/concept/image.hh>
......@@ -45,9 +45,8 @@ namespace mln
namespace browsing
{
/// Browsing in a certain direction.
/*!
* \brief Browsing in a certain direction.
*
* This canvas browse all the point of an image 'input' of type
* 'I' and of dimension 'dim' in the direction 'dir'.
*
......@@ -86,12 +85,14 @@ namespace mln
{
template <typename F>
void operator()(F& f) const;