Olena-patches
Threads by month
- ----- 2025 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 9625 discussions
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2009-07-07 Edwin Carlinet <carlinet(a)lrde.epita.fr>
Labeling computation with direct image output.
* labeling/compute_image.hh: New routines to computes
accumulators on labels and output an image that contains the
results of the accumulator.
---
compute_image.hh | 203 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 203 insertions(+)
Index: trunk/milena/mln/labeling/compute_image.hh
===================================================================
--- trunk/milena/mln/labeling/compute_image.hh (revision 0)
+++ trunk/milena/mln/labeling/compute_image.hh (revision 4251)
@@ -0,0 +1,203 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+#ifndef MLN_LABELING_COMPUTE_IMAGE_HH
+# define MLN_LABELING_COMPUTE_IMAGE_HH
+
+///
+/// \file
+///
+/// \brief Compute accumulators onto sites/values of each labeled
+/// component of an image and return a new image where labels are
+/// replaced by the result of the accumulator.
+///
+///
+///
+
+# include <mln/core/concept/image.hh>
+# include <mln/core/concept/accumulator.hh>
+# include <mln/core/concept/meta_accumulator.hh>
+
+# include <mln/labeling/compute.hh>
+
+
+namespace mln
+{
+
+ namespace labeling
+ {
+
+ /// Compute an accumulator onto the pixel values of the image \p input.
+ /// for each component of the image \p label.
+ ///
+ /// \param[in] a The mln::p_array of accumulator result.
+ /// \param[in] input The input image (values).
+ /// \param[in] labels The label image.
+ /// \param[in] nlabels The count of labels.
+ ///
+ /// \return The image where labels are replaced by the result of
+ /// the accumulator.
+ template <typename A, typename I, typename L>
+ mln_ch_value(L, mln_result(A))
+ compute_image(const util::array<mln_result(A)>& a,
+ const Image<I>& input,
+ const Image<L>& labels,
+ const mln_value(L)& nlabels);
+
+ /// Compute an accumulator onto the pixel values of the image \p input.
+ /// for each component of the image \p label.
+ ///
+ /// \param[in] accu The accumulator.
+ /// \param[in] input The input image (values).
+ /// \param[in] labels The label image.
+ /// \param[in] nlabels The count of labels.
+ ///
+ /// \return The image where labels are replaced by the result of
+ /// the accumulator.
+ ///
+ template <typename A, typename I, typename L>
+ inline
+ mln_ch_value(L, mln_result(A))
+ compute_image(const Accumulator<A>& accu,
+ const Image<I>& input,
+ const Image<L>& labels,
+ const mln_value(L)& nlabels);
+
+
+ /// Compute an accumulator onto the pixel values of the image \p input.
+ /// for each component of the image \p label.
+ ///
+ /// \param[in] accu The meta-accumulator.
+ /// \param[in] input The input image (values).
+ /// \param[in] labels The label image.
+ /// \param[in] nlabels The count of labels.
+ ///
+ /// \return The image where labels are replaced by the result of
+ /// the accumulator.
+ ///
+ template <typename A, typename I, typename L>
+ inline
+ mln_ch_value(L, mln_accu_result(A, mln_value(I)))
+ compute_image(const Meta_Accumulator<A>& accu,
+ const Image<I>& input,
+ const Image<L>& labels,
+ const mln_value(L)& nlabels);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ namespace internal
+ {
+
+ template <typename A, typename L>
+ mln_ch_value(L, A)
+ compute_image(const util::array<A>& a,
+ const Image<L>& labels_,
+ const mln_value(L)& nlabels)
+ {
+ const L& labels = exact(labels_);
+
+ typedef mln_ch_value(L, A) O;
+ O output;
+ initialize(output, labels);
+
+ mln_piter(L) p(labels.domain());
+ for_all(p)
+ {
+ mln_assertion(labels(p) < nlabels);
+ output(p) = a[labels(p)];
+ }
+
+ return output;
+ }
+
+ } // end of namespace mln::labeling::internal
+
+
+ template <typename A, typename I, typename L>
+ inline
+ mln_ch_value(L, mln_result(A))
+ compute_image(const util::array<mln_result(A)>& a,
+ const Image<L>& labels,
+ const mln_value(L)& nlabels)
+ {
+ (void) nlabels;
+
+ trace::entering("labeling::compute_image");
+
+ mln_ch_value(L, mln_result(A)) output =
+ labeling::internal::compute_image(a, labels, nlabels);
+
+ trace::exiting("labeling::compute_image");
+ return output;
+ }
+
+ template <typename A, typename I, typename L>
+ inline
+ mln_ch_value(L, mln_result(A))
+ compute_image(const Accumulator<A>& accu,
+ const Image<I>& input,
+ const Image<L>& labels,
+ const mln_value(L)& nlabels)
+ {
+ trace::entering("labeling::compute_image");
+
+ util::array<mln_result(A)> res =
+ compute(accu, input, labels, nlabels);
+
+ mln_ch_value(L, mln_result(A)) output =
+ internal::compute_image(res, labels, nlabels);
+
+ trace::exiting("labeling::compute_image");
+ return output;
+ }
+
+ template <typename A, typename I, typename L>
+ inline
+ mln_ch_value(L, mln_accu_result(A, mln_value(I)))
+ compute_image(const Meta_Accumulator<A>& accu,
+ const Image<I>& input,
+ const Image<L>& labels,
+ const mln_value(L)& nlabels)
+ {
+ trace::entering("labeling::compute_image");
+
+ util::array<mln_accu_result(A, mln_value(I))> res =
+ compute(accu, input, labels, nlabels);
+
+ mln_ch_value(L, mln_accu_result(A, mln_value(I))) output =
+ labeling::internal::compute_image(res, labels, nlabels);
+
+ trace::exiting("labeling::compute_image");
+ return output;
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::labeling
+
+} // end of namespace mln
+
+#endif // ! MLN_LABELING_COMPUTE_IMAGE_HH
1
0
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2009-07-07 Edwin Carlinet <carlinet(a)lrde.epita.fr>
Add traits to mean accumulator.
* accu/stat/mean.hh: Add traits to mean accu.
---
mean.hh | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
Index: trunk/milena/mln/accu/stat/mean.hh
===================================================================
--- trunk/milena/mln/accu/stat/mean.hh (revision 4249)
+++ trunk/milena/mln/accu/stat/mean.hh (revision 4250)
@@ -52,6 +52,9 @@
} // end of namespace mln::accu::stat
+
+ // Meta.
+
namespace meta
{
@@ -74,6 +77,29 @@
} // end of namespace mln::accu::meta
+ } // end of namespace mln::accu
+
+
+ // Traits.
+
+ namespace trait
+ {
+
+ template <typename T, typename S, typename M>
+ struct accumulator_< accu::stat::mean<T, S, M> >
+ {
+ typedef accumulator::has_untake::no has_untake;
+ typedef accumulator::has_set_value::no has_set_value;
+ typedef accumulator::has_stop::no has_stop;
+ typedef accumulator::when_pix::use_v when_pix;
+ };
+
+ } // end of namespace mln::trait
+
+
+ namespace accu
+ {
+
namespace stat
{
1
0
---
milena/ChangeLog | 4 +++
milena/doc/Doxyfile.in | 69 ++++++++++++++++++++++++-----------------------
2 files changed, 39 insertions(+), 34 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index a4bf034..83385a8 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,7 @@
+2009-07-07 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+
+ * doc/Doxyfile.in: Set INPUT_ENCODING.
+
2009-07-07 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix errors with icc.
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index 3fb38d3..6afa13f 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -10,13 +10,13 @@ CREATE_SUBDIRS = YES
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF =
+ABBREVIATE_BRIEF =
ALWAYS_DETAILED_SEC = YES
INLINE_INHERITED_MEMB = YES
FULL_PATH_NAMES = NO
STRIP_FROM_PATH = @top_srcdir@/milena \
@top_builddir@/milena
-STRIP_FROM_INC_PATH =
+STRIP_FROM_INC_PATH =
SHORT_NAMES = YES
JAVADOC_AUTOBRIEF = YES
MULTILINE_CPP_IS_BRIEF = NO
@@ -24,7 +24,7 @@ DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
-ALIASES =
+ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
BUILTIN_STL_SUPPORT = YES
@@ -55,13 +55,13 @@ GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
+ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = NO # Disabled for light doc
SHOW_DIRECTORIES = NO # Disabled for light doc
SHOW_FILES = NO # Disabled for light doc
SHOW_NAMESPACES = YES
-FILE_VERSION_FILTER =
+FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
@@ -71,7 +71,7 @@ WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
@@ -89,19 +89,20 @@ EXCLUDE = @top_srcdir@/milena/sandbox \
@top_srcdir@/milena/doc/examples/split
EXCLUDE_SYMLINKS = YES
EXCLUDE_PATTERNS = *spe.hh
-EXCLUDE_SYMBOLS =
+EXCLUDE_SYMBOLS =
EXAMPLE_PATH = @top_srcdir@/milena/doc/examples \
@top_srcdir@/milena/doc/outputs \
@top_srcdir@/milena/doc/examples/split \
@top_srcdir@/milena/doc/outputs/split
-EXAMPLE_PATTERNS =
+EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH = @top_srcdir@/milena/doc/img \
@top_srcdir@/milena/doc/figures \
@top_builddir@/milena/doc/figures
-INPUT_FILTER =
-FILTER_PATTERNS =
+INPUT_FILTER =
+FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
+INPUT_ENCODING = ISO-8859-1
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
@@ -125,13 +126,13 @@ IGNORE_PREFIX = mln::
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
+CHM_FILE =
+HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
@@ -148,8 +149,8 @@ LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
+EXTRA_PACKAGES =
+LATEX_HEADER =
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = YES
@@ -161,8 +162,8 @@ GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
@@ -175,8 +176,8 @@ MAN_LINKS = NO
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
+XML_SCHEMA =
+XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
@@ -188,16 +189,16 @@ GENERATE_AUTOGEN_DEF = NO
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
+# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
PREDEFINED = "for_all(x)=for(x.start(); x.is_valid(); x.next())" \
"for_all_2(x1, x2)=for(x1.start(), x2.start(); x1.is_valid(); x1.next(), x2.next())" \
"for_all_3(x1, x2, x3)=for(x1.start(), x2.start(), x3.start(); x1.is_valid(); x1.next(), x2.next(), x3.next())" \
@@ -274,7 +275,7 @@ PREDEFINED = "for_all(x)=for(x.start(); x.is_valid(); x.next())" \
"mln_trait_op_mod_(L, R)=mln::trait::op::mod< L , R >::ret" \
"mln_trait_op_uminus_(T)=mln::trait::op::uminus< T >::ret" \
"mln_ch_value_(I, V)=typename mln::trait::ch_value< I, V >::ret" \
- "mln_ch_value(I, V)_=mln::trait::ch_value< I, V >::ret" \
+ "mln_ch_value(I, V)_=mln::trait::ch_value< I, V >::ret" \
"mln_morpher_lvalue(I)=typename internal::morpher_lvalue_<I>::ret" \
"mln_concrete(I)=typename mln::trait::concrete< I >::ret" \
"mln_concrete_ch_value(I, V)=typename mln::trait::ch_value< typename mln::trait::concrete< I >::ret, V >::ret" \
@@ -302,18 +303,18 @@ PREDEFINED = "for_all(x)=for(x.start(); x.is_valid(); x.next())" \
-EXPAND_AS_DEFINED =
+EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
-# Configuration::additions related to external references
+# Configuration::additions related to external references
#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE =
+TAGFILES =
+GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
+# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
@@ -330,14 +331,14 @@ CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = NO # Disabled for light doc
DOT_IMAGE_FORMAT = png
-DOT_PATH =
-DOTFILE_DIRS =
+DOT_PATH =
+DOTFILE_DIRS =
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = NO # Disabled for light doc
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
+# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
--
1.5.6.5
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix errors with icc.
* mln/core/internal/neighb_niter_impl.hh (element): Return a cpy.
* mln/make/h_mat.hh: Remove overloading; it is disambiguation for
icc.
* tests/make/h_mat.cc: Update.
mln/core/internal/neighb_niter_impl.hh | 6 +++-
mln/make/h_mat.hh | 47 +--------------------------------
tests/make/h_mat.cc | 13 ---------
3 files changed, 7 insertions(+), 59 deletions(-)
Index: mln/core/internal/neighb_niter_impl.hh
--- mln/core/internal/neighb_niter_impl.hh (revision 4246)
+++ mln/core/internal/neighb_niter_impl.hh (working copy)
@@ -33,6 +33,7 @@
# include <mln/core/macros.hh>
# include <mln/core/internal/force_exact.hh>
+
namespace mln
{
@@ -109,7 +110,10 @@
{
typedef typename T::target S;
- const mln_graph_element(S)& element() const
+ // Tech. note: A copy is returned since it actually is a
+ // temporary object; we cannot return a "const&" here for some
+ // compilers badly kills the temporary object...
+ mln_graph_element(S) element() const
{
return internal::force_exact<E>(*this).compute_p_().element();
}
Index: mln/make/h_mat.hh
--- mln/make/h_mat.hh (revision 4246)
+++ mln/make/h_mat.hh (working copy)
@@ -40,27 +40,8 @@
namespace make
{
- /// Create an mln::algebra::h_mat<d,T>.
- /*
- * \param[in] tab Array of values.
- *
- * \pre The array dimension has to be d * d.
- */
- template <typename T, unsigned d>
- algebra::h_mat<d,T> h_mat(const T (&tab)[(d+1)*(d+1)]);
-
- /// Create an mln::algebra::h_mat<d,T>.
- /*
- * \param[in] tab Array of values.
- *
- * \pre The array dimension has to be d * d.
- */
- template <typename T, unsigned d>
- algebra::h_mat<d,T> h_mat(const T (&tab)[d+1][d+1]);
-
-
- /// reate an mln::algebra::mat<n,n,T>.
+ /// Create an mln::algebra::mat<n,n,T>.
/*
* \param[in] tab C-array of values.
*
@@ -73,31 +54,6 @@
# ifndef MLN_INCLUDE_ONLY
- template <typename T, unsigned d>
- inline
- algebra::h_mat<d,T>
- h_mat(const T (&tab)[(d)*(d)])
- {
- std::cout << "plap" << std::endl;
- algebra::h_mat<d,T> tmp;
- for (unsigned i = 0; i < d; ++i)
- tmp(i / (d), i % (d)) = tab[i];
- return tmp;
- }
-
-
- template <typename T, unsigned d>
- algebra::h_mat<d,T>
- h_mat(const T (&tab)[d][d])
- {
- algebra::h_mat<d,T> tmp;
- for (unsigned i = 0; i < d; ++i)
- for (unsigned j = 0; j < d; ++j)
- tmp(i, j) = tab[i][j];
- return tmp;
- }
-
-
template <typename T, unsigned N>
inline
algebra::h_mat<mlc_sqrt_int(N), T>
@@ -117,4 +73,5 @@
} // end of namespace mln
+
#endif // ! MLN_MAKE_H_MAT_HH
Index: tests/make/h_mat.cc
--- tests/make/h_mat.cc (revision 4246)
+++ tests/make/h_mat.cc (working copy)
@@ -35,7 +35,6 @@
{
using namespace mln;
- {
int vals[9] = { 2, 3, 4,
5, 6, 7,
8, 9, 10 };
@@ -45,15 +44,3 @@
for (unsigned j = 0; j < 4; ++j)
mln_assertion(m(i,j) == result[i][j]);
}
-
- {
- int vals[3][3] = { { 2, 3, 4 },
- { 5, 6, 7 },
- { 8, 9, 10 } };
- algebra::h_mat<3,int> m = make::h_mat(vals);
-
- for (unsigned i = 0; i < 4; ++i)
- for (unsigned j = 0; j < 4; ++j)
- mln_assertion(m(i,j) == result[i][j]);
- }
-}
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
New directories for icdar code release.
* modules,
* modules/icdar: New directories.
0 files changed
1
0
* mln/accu/compute.hh,
* mln/accu/transform.hh,
* mln/accu/transform_diagonal.hh,
* mln/accu/transform_directional.hh,
* mln/accu/transform_line.hh,
* mln/accu/transform_snake.hh,
* mln/accu/transform_stop.hh,
* mln/core/concept/meta_accumulator.hh,
* mln/data/compute.hh,
* mln/labeling/compute.hh,
* mln/set/compute.hh,
* mln/set/compute_with_weights.hh: use a helper to deduce the
accumulator type from a meta accumulator.
* mln/core/image/dmorph/extended.hh: define 'value'.
---
milena/ChangeLog | 20 ++++++++++++++++++++
milena/mln/accu/compute.hh | 4 ++--
milena/mln/accu/transform.hh | 4 ++--
milena/mln/accu/transform_diagonal.hh | 4 ++--
milena/mln/accu/transform_directional.hh | 4 ++--
milena/mln/accu/transform_line.hh | 4 ++--
milena/mln/accu/transform_snake.hh | 4 ++--
milena/mln/accu/transform_stop.hh | 4 ++--
milena/mln/core/concept/meta_accumulator.hh | 25 ++++++++++++++++++-------
milena/mln/core/image/dmorph/extended.hh | 5 ++++-
milena/mln/data/compute.hh | 4 ++--
milena/mln/labeling/compute.hh | 8 ++++----
milena/mln/set/compute.hh | 4 ++--
milena/mln/set/compute_with_weights.hh | 4 ++--
14 files changed, 66 insertions(+), 32 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index b311841..c842b8c 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,23 @@
+2009-07-07 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+
+ Fix compilation issues with ICC.
+
+ * mln/accu/compute.hh,
+ * mln/accu/transform.hh,
+ * mln/accu/transform_diagonal.hh,
+ * mln/accu/transform_directional.hh,
+ * mln/accu/transform_line.hh,
+ * mln/accu/transform_snake.hh,
+ * mln/accu/transform_stop.hh,
+ * mln/core/concept/meta_accumulator.hh,
+ * mln/data/compute.hh,
+ * mln/labeling/compute.hh,
+ * mln/set/compute.hh,
+ * mln/set/compute_with_weights.hh: use a helper to deduce the
+ accumulator type from a meta accumulator.
+
+ * mln/core/image/dmorph/extended.hh: define 'value'.
+
2009-07-06 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
Fix ambiguous typedef 'value'.
diff --git a/milena/mln/accu/compute.hh b/milena/mln/accu/compute.hh
index 56413ac..aeb86e2 100644
--- a/milena/mln/accu/compute.hh
+++ b/milena/mln/accu/compute.hh
@@ -72,7 +72,7 @@ namespace mln
/// \warning This routine does not perform a.init().
///
template <typename A, typename I>
- mln_accu_result(A, util::pix<I>)
+ mln_meta_accu_result(A, util::pix<I>)
compute(const Meta_Accumulator<A>& a, const Image<I>& input);
@@ -140,7 +140,7 @@ namespace mln
template <typename A, typename I>
inline
- mln_accu_result(A, util::pix<I>)
+ mln_meta_accu_result(A, util::pix<I>)
compute(const Meta_Accumulator<A>& a, const Image<I>& input)
{
trace::entering("accu::compute");
diff --git a/milena/mln/accu/transform.hh b/milena/mln/accu/transform.hh
index 7c0fbf9..eeae247 100644
--- a/milena/mln/accu/transform.hh
+++ b/milena/mln/accu/transform.hh
@@ -50,7 +50,7 @@ namespace mln
const Window<W>& win);
template <typename I, typename A, typename W>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform(const Image<I>& input,
const Meta_Accumulator<A>& a,
const Window<W>& win);
@@ -197,7 +197,7 @@ namespace mln
}
template <typename I, typename A, typename W>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform(const Image<I>& input, const Meta_Accumulator<A>& a, const Window<W>& win)
{
trace::entering("accu::transform");
diff --git a/milena/mln/accu/transform_diagonal.hh b/milena/mln/accu/transform_diagonal.hh
index 99000f4..2c73c8a 100644
--- a/milena/mln/accu/transform_diagonal.hh
+++ b/milena/mln/accu/transform_diagonal.hh
@@ -65,7 +65,7 @@ namespace mln
template <typename A, typename I, typename W>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_diagonal(const Meta_Accumulator<A>& a,
const Image<I>& input, const Window<W>& win);
@@ -444,7 +444,7 @@ namespace mln
template <typename A, typename I, typename W>
inline
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_diagonal(const Meta_Accumulator<A>& a,
const Image<I>& input, const Window<W>& win)
{
diff --git a/milena/mln/accu/transform_directional.hh b/milena/mln/accu/transform_directional.hh
index 46863cc..5534a56 100644
--- a/milena/mln/accu/transform_directional.hh
+++ b/milena/mln/accu/transform_directional.hh
@@ -63,7 +63,7 @@ namespace mln
template <typename A, typename I, typename W>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_directional(const Meta_Accumulator<A>& a,
const Image<I>& input, const Window<W>& win,
unsigned dir);
@@ -318,7 +318,7 @@ namespace mln
template <typename A, typename I, typename W>
inline
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_directional(const Meta_Accumulator<A>& a,
const Image<I>& input, const Window<W>& win,
unsigned dir)
diff --git a/milena/mln/accu/transform_line.hh b/milena/mln/accu/transform_line.hh
index 604853d..42daf31 100644
--- a/milena/mln/accu/transform_line.hh
+++ b/milena/mln/accu/transform_line.hh
@@ -56,7 +56,7 @@ namespace mln
unsigned length, unsigned dir);
template <typename A, typename I>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_line(const Meta_Accumulator<A>& a,
const Image<I>& input,
unsigned length, unsigned dir);
@@ -360,7 +360,7 @@ namespace mln
template <typename A, typename I>
inline
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_line(const Meta_Accumulator<A>& a,
const Image<I>& input,
unsigned length, unsigned dir)
diff --git a/milena/mln/accu/transform_snake.hh b/milena/mln/accu/transform_snake.hh
index 62140d4..3890eb4 100644
--- a/milena/mln/accu/transform_snake.hh
+++ b/milena/mln/accu/transform_snake.hh
@@ -62,7 +62,7 @@ namespace mln
template <typename A, typename I, typename W>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_snake(const Meta_Accumulator<A>& a, const Image<I>& input, const Window<W>& win);
@@ -452,7 +452,7 @@ namespace mln
template <typename A, typename I, typename W>
inline
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_snake(const Meta_Accumulator<A>& a,
const Image<I>& input, const Window<W>& win)
{
diff --git a/milena/mln/accu/transform_stop.hh b/milena/mln/accu/transform_stop.hh
index e9c62e6..b694042 100644
--- a/milena/mln/accu/transform_stop.hh
+++ b/milena/mln/accu/transform_stop.hh
@@ -48,7 +48,7 @@ namespace mln
transform_stop(const Image<I>& input, const Accumulator<A>& a, const Window<W>& win);
template <typename I, typename A, typename W>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_stop(const Image<I>& input, const Meta_Accumulator<A>& a, const Window<W>& win);
@@ -201,7 +201,7 @@ namespace mln
}
template <typename I, typename A, typename W>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_stop(const Image<I>& input, const Meta_Accumulator<A>& a, const Window<W>& win)
{
trace::entering("accu::transform_stop");
diff --git a/milena/mln/core/concept/meta_accumulator.hh b/milena/mln/core/concept/meta_accumulator.hh
index 013826a..f00a0c6 100644
--- a/milena/mln/core/concept/meta_accumulator.hh
+++ b/milena/mln/core/concept/meta_accumulator.hh
@@ -36,18 +36,18 @@
# define mln_accu_with(A, T) \
-typename A::template with< T >::ret
+typename mln::internal::accu_with_helper<A,T>::ret
# define mln_accu_with_(A, T) \
-A::with< T >::ret
+mln::internal::accu_with_helper<A,T>::ret
-# define mln_accu_result(A, T) \
-typename mln::internal::accu_ret_result_helper<A,T>::result
+# define mln_meta_accu_result(A, T) \
+typename mln::internal::meta_accu_ret_result_helper<A,T>::result
-# define mln_accu_result_(A, T) \
-mln::internal::accu_ret_result_helper<A,T>::result
+# define mln_meta_accu_result_(A, T) \
+mln::internal::meta_accu_ret_result_helper<A,T>::result
@@ -66,11 +66,22 @@ namespace mln
/// Introduced for ICC compatibility.
//
template <typename A, typename T>
- struct accu_ret_result_helper
+ struct meta_accu_ret_result_helper
{
typedef typename A::template with< T >::ret::result result;
};
+
+ /// Make the type resolution easier for the compiler.
+ /// Introduced for ICC compatibility.
+ //
+ template <typename A, typename T>
+ struct accu_with_helper
+ {
+ typedef typename A::template with< T >::ret ret;
+ };
+
+
} // end of namespace mln::internal
diff --git a/milena/mln/core/image/dmorph/extended.hh b/milena/mln/core/image/dmorph/extended.hh
index 581359f..588f95a 100644
--- a/milena/mln/core/image/dmorph/extended.hh
+++ b/milena/mln/core/image/dmorph/extended.hh
@@ -95,6 +95,9 @@ namespace mln
private mlc_not_equal(mln_trait_image_ext_domain(I),
trait::image::ext_domain::none)::check_t
{
+ /// Value type.
+ typedef mln_value(I) value;
+
/// Skeleton.
typedef tag::image_<I> skeleton; // This property is lost!
@@ -124,7 +127,7 @@ namespace mln
template <typename I, typename B>
extended<I>
extended_to(Image<I>& ima, const Box<B>& b);
-
+
# ifndef MLN_INCLUDE_ONLY
diff --git a/milena/mln/data/compute.hh b/milena/mln/data/compute.hh
index 63942cd..c0d87cc 100644
--- a/milena/mln/data/compute.hh
+++ b/milena/mln/data/compute.hh
@@ -61,7 +61,7 @@ namespace mln
/// \return The accumulator result.
///
template <typename A, typename I>
- mln_accu_result(A, mln_value(I))
+ mln_meta_accu_result(A, mln_value(I))
compute(const Meta_Accumulator<A>& a, const Image<I>& input);
@@ -90,7 +90,7 @@ namespace mln
template <typename A, typename I>
inline
- mln_accu_result(A, mln_value(I))
+ mln_meta_accu_result(A, mln_value(I))
compute(const Meta_Accumulator<A>& a, const Image<I>& input)
{
typedef mln_accu_with(A, mln_value(I)) A_;
diff --git a/milena/mln/labeling/compute.hh b/milena/mln/labeling/compute.hh
index eeede38..0e74fd7 100644
--- a/milena/mln/labeling/compute.hh
+++ b/milena/mln/labeling/compute.hh
@@ -101,7 +101,7 @@ namespace mln
/// \return A mln::p_array of accumulator result (one result per label).
//
template <typename A, typename I, typename L>
- util::array<mln_accu_result(A, mln_value(I))>
+ util::array<mln_meta_accu_result(A, mln_value(I))>
compute(const Meta_Accumulator<A>& a,
const Image<I>& input,
const Image<L>& label,
@@ -132,7 +132,7 @@ namespace mln
/// \return A mln::p_array of accumulator result (one result per label).
//
template <typename A, typename L>
- util::array<mln_accu_result(A, mln_psite(L))>
+ util::array<mln_meta_accu_result(A, mln_psite(L))>
compute(const Meta_Accumulator<A>& a,
const Image<L>& label,
const mln_value(L)& nlabels);
@@ -390,7 +390,7 @@ namespace mln
template <typename A, typename I, typename L>
inline
- util::array<mln_accu_result(A, mln_value(I))>
+ util::array<mln_meta_accu_result(A, mln_value(I))>
compute(const Meta_Accumulator<A>& a,
const Image<I>& input,
const Image<L>& label,
@@ -426,7 +426,7 @@ namespace mln
template <typename A, typename L>
inline
- util::array<mln_accu_result(A, mln_psite(L))>
+ util::array<mln_meta_accu_result(A, mln_psite(L))>
compute(const Meta_Accumulator<A>& a,
const Image<L>& label,
const mln_value(L)& nlabels)
diff --git a/milena/mln/set/compute.hh b/milena/mln/set/compute.hh
index 1828a8e..39c0164 100644
--- a/milena/mln/set/compute.hh
+++ b/milena/mln/set/compute.hh
@@ -59,7 +59,7 @@ namespace mln
// \return The accumulator result.
//
template <typename A, typename S>
- mln_accu_result(A, mln_site(S))
+ mln_meta_accu_result(A, mln_site(S))
compute(const Meta_Accumulator<A>& a, const Site_Set<S>& s);
@@ -123,7 +123,7 @@ namespace mln
template <typename A, typename S>
- mln_accu_result(A, mln_site(S))
+ mln_meta_accu_result(A, mln_site(S))
compute(const Meta_Accumulator<A>& a, const Site_Set<S>& s)
{
trace::entering("set::compute");
diff --git a/milena/mln/set/compute_with_weights.hh b/milena/mln/set/compute_with_weights.hh
index de9c17b..b2ae04d 100644
--- a/milena/mln/set/compute_with_weights.hh
+++ b/milena/mln/set/compute_with_weights.hh
@@ -80,7 +80,7 @@ namespace mln
/// \return The accumulator result.
//
template <typename A, typename I>
- mln_accu_result(A, mln_site(I))
+ mln_meta_accu_result(A, mln_site(I))
compute_with_weights(const Meta_Accumulator<A>& a, const Image<I>& w);
@@ -252,7 +252,7 @@ namespace mln
template <typename A, typename I>
inline
- mln_accu_result(A, mln_site(I))
+ mln_meta_accu_result(A, mln_site(I))
compute_with_weights(const Meta_Accumulator<A>& a, const Image<I>& w)
{
trace::entering("set::compute_with_weights");
--
1.5.6.5
1
0
* mln/core/image/dmorph/extension_fun.hh,
* mln/core/image/dmorph/extension_ima.hh,
* mln/core/image/dmorph/extension_val.hh: typedef 'value' in
concrete classes.
---
milena/ChangeLog | 12 +++++++++++-
milena/mln/core/image/dmorph/extension_fun.hh | 2 ++
milena/mln/core/image/dmorph/extension_ima.hh | 6 ++++--
milena/mln/core/image/dmorph/extension_val.hh | 2 ++
4 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 493a76c..b311841 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,15 @@
2009-07-06 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+ Fix ambiguous typedef 'value'.
+
+ * mln/core/image/dmorph/extension_fun.hh,
+ * mln/core/image/dmorph/extension_ima.hh,
+ * mln/core/image/dmorph/extension_val.hh: typedef 'value' in
+ concrete classes.
+
+
+2009-07-06 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+
Fix compilation issues with icc and meta accumulators.
* mln/core/concept/meta_accumulator.hh: introduce a helper to help
@@ -149,7 +159,7 @@
* mln/transformation/all.hh,
* mln/transformation/essential.hh,
* tests/transformation/Makefile.am: Remove.
-
+
* tests/geom/Makefile.am: add rotate.
2009-06-29 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
diff --git a/milena/mln/core/image/dmorph/extension_fun.hh b/milena/mln/core/image/dmorph/extension_fun.hh
index aea8dac..a8731c2 100644
--- a/milena/mln/core/image/dmorph/extension_fun.hh
+++ b/milena/mln/core/image/dmorph/extension_fun.hh
@@ -105,6 +105,8 @@ namespace mln
/// Skeleton.
typedef extension_fun< tag::image_<I>, tag::function_<F> > skeleton;
+ /// Image value type.
+ typedef mln_value(I) value;
/// Return type of read-only access.
typedef mln_value(I) rvalue;
diff --git a/milena/mln/core/image/dmorph/extension_ima.hh b/milena/mln/core/image/dmorph/extension_ima.hh
index 269a0e7..a0bc9ca 100644
--- a/milena/mln/core/image/dmorph/extension_ima.hh
+++ b/milena/mln/core/image/dmorph/extension_ima.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -103,11 +104,12 @@ namespace mln
/// Skeleton.
typedef extension_ima< tag::image_<I>, tag::ext_<J> > skeleton;
+ /// Image value type.
+ typedef mln_value(I) value;
/// Return type of read-only access.
typedef mln_value(I) rvalue;
-
/// Constructor without argument.
extension_ima();
diff --git a/milena/mln/core/image/dmorph/extension_val.hh b/milena/mln/core/image/dmorph/extension_val.hh
index cf2fc29..c104eba 100644
--- a/milena/mln/core/image/dmorph/extension_val.hh
+++ b/milena/mln/core/image/dmorph/extension_val.hh
@@ -103,6 +103,8 @@ namespace mln
/// Skeleton.
typedef extension_val< tag::image_<I> > skeleton;
+ /// Image value type.
+ typedef mln_value(I) value;
/// Return type of read-only access.
typedef mln_value(I) rvalue;
--
1.5.6.5
1
0
06 Jul '09
* mln/core/concept/meta_accumulator.hh: introduce a helper to help
icc resolving routine return types.
---
milena/ChangeLog | 7 ++++++
milena/mln/core/concept/meta_accumulator.hh | 29 +++++++++++++++++++++-----
2 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 7138445..493a76c 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,12 @@
2009-07-06 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+ Fix compilation issues with icc and meta accumulators.
+
+ * mln/core/concept/meta_accumulator.hh: introduce a helper to help
+ icc resolving routine return types.
+
+2009-07-06 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+
Use mln_accu_result() instead of mln_accu_with()::result.
* mln/accu/compute.hh,
diff --git a/milena/mln/core/concept/meta_accumulator.hh b/milena/mln/core/concept/meta_accumulator.hh
index 7b6ac6a..013826a 100644
--- a/milena/mln/core/concept/meta_accumulator.hh
+++ b/milena/mln/core/concept/meta_accumulator.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -42,20 +43,37 @@ A::with< T >::ret
# define mln_accu_result(A, T) \
-typename A::template with< T >::ret::result
+typename mln::internal::accu_ret_result_helper<A,T>::result
-# define mln_accu_result_(A, T) \
-A::with< T >::ret::result
+# define mln_accu_result_(A, T) \
+mln::internal::accu_ret_result_helper<A,T>::result
+
namespace mln
{
- // Fwd decl.
+ // Forward declaration.
template <typename E> struct Meta_Accumulator;
+
+ namespace internal
+ {
+
+ /// Make the type resolution easier for the compiler.
+ /// Introduced for ICC compatibility.
+ //
+ template <typename A, typename T>
+ struct accu_ret_result_helper
+ {
+ typedef typename A::template with< T >::ret::result result;
+ };
+
+ } // end of namespace mln::internal
+
+
// Meta_Accumulator category flag type.
template <>
struct Meta_Accumulator<void>
@@ -63,7 +81,6 @@ namespace mln
typedef Object<void> super;
};
-
/*! \brief Base class for implementation of meta accumulators.
*
* The parameter \a E is the exact type.
--
1.5.6.5
1
0
06 Jul '09
* mln/accu/compute.hh,
* mln/accu/transform.hh,
* mln/accu/transform_diagonal.hh,
* mln/accu/transform_directional.hh,
* mln/accu/transform_line.hh,
* mln/accu/transform_snake.hh,
* mln/accu/transform_stop.hh,
* mln/data/compute.hh,
* mln/labeling/compute.hh,
* mln/set/compute.hh,
* mln/set/compute_with_weights.hh: update.
---
milena/ChangeLog | 16 +++++++++
milena/mln/accu/compute.hh | 4 +-
milena/mln/accu/transform.hh | 4 +-
milena/mln/accu/transform_diagonal.hh | 10 +++---
milena/mln/accu/transform_directional.hh | 11 +++---
milena/mln/accu/transform_line.hh | 55 +++++++++++++++--------------
milena/mln/accu/transform_snake.hh | 8 ++--
milena/mln/accu/transform_stop.hh | 4 +-
milena/mln/data/compute.hh | 4 +-
milena/mln/labeling/compute.hh | 8 ++--
milena/mln/set/compute.hh | 6 ++--
milena/mln/set/compute_with_weights.hh | 6 ++--
12 files changed, 77 insertions(+), 59 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 99015ff..7138445 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,21 @@
2009-07-06 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+ Use mln_accu_result() instead of mln_accu_with()::result.
+
+ * mln/accu/compute.hh,
+ * mln/accu/transform.hh,
+ * mln/accu/transform_diagonal.hh,
+ * mln/accu/transform_directional.hh,
+ * mln/accu/transform_line.hh,
+ * mln/accu/transform_snake.hh,
+ * mln/accu/transform_stop.hh,
+ * mln/data/compute.hh,
+ * mln/labeling/compute.hh,
+ * mln/set/compute.hh,
+ * mln/set/compute_with_weights.hh: update.
+
+2009-07-06 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+
Small fixes.
* demos/graph/region_adjacency_graph.cc: do not draw the vertex
diff --git a/milena/mln/accu/compute.hh b/milena/mln/accu/compute.hh
index 896e549..56413ac 100644
--- a/milena/mln/accu/compute.hh
+++ b/milena/mln/accu/compute.hh
@@ -72,7 +72,7 @@ namespace mln
/// \warning This routine does not perform a.init().
///
template <typename A, typename I>
- mln_accu_with(A, util::pix<I>)::result
+ mln_accu_result(A, util::pix<I>)
compute(const Meta_Accumulator<A>& a, const Image<I>& input);
@@ -140,7 +140,7 @@ namespace mln
template <typename A, typename I>
inline
- mln_accu_with(A, util::pix<I>)::result
+ mln_accu_result(A, util::pix<I>)
compute(const Meta_Accumulator<A>& a, const Image<I>& input)
{
trace::entering("accu::compute");
diff --git a/milena/mln/accu/transform.hh b/milena/mln/accu/transform.hh
index 7ffdc98..7c0fbf9 100644
--- a/milena/mln/accu/transform.hh
+++ b/milena/mln/accu/transform.hh
@@ -50,7 +50,7 @@ namespace mln
const Window<W>& win);
template <typename I, typename A, typename W>
- mln_ch_value(I, mln_accu_with(A, mln_value(I))::result)
+ mln_ch_value(I, mln_accu_result(A, mln_value(I)))
transform(const Image<I>& input,
const Meta_Accumulator<A>& a,
const Window<W>& win);
@@ -197,7 +197,7 @@ namespace mln
}
template <typename I, typename A, typename W>
- mln_ch_value(I, mln_accu_with(A, mln_value(I))::result)
+ mln_ch_value(I, mln_accu_result(A, mln_value(I)))
transform(const Image<I>& input, const Meta_Accumulator<A>& a, const Window<W>& win)
{
trace::entering("accu::transform");
diff --git a/milena/mln/accu/transform_diagonal.hh b/milena/mln/accu/transform_diagonal.hh
index e705944..99000f4 100644
--- a/milena/mln/accu/transform_diagonal.hh
+++ b/milena/mln/accu/transform_diagonal.hh
@@ -65,7 +65,7 @@ namespace mln
template <typename A, typename I, typename W>
- mln_ch_value(I, mln_accu_with(A, mln_value(I))::result)
+ mln_ch_value(I, mln_accu_result(A, mln_value(I)))
transform_diagonal(const Meta_Accumulator<A>& a,
const Image<I>& input, const Window<W>& win);
@@ -381,7 +381,7 @@ namespace mln
canvas::browsing::backdiagonal2d(f);
return f.output;
}
-
+
template <typename A, typename I>
inline
mln_ch_value(I, mln_result(A))
@@ -394,7 +394,7 @@ namespace mln
canvas::browsing::diagonal2d(f);
return f.output;
}
-
+
template <typename A, typename I>
inline
mln_ch_value(I, mln_result(A))
@@ -407,7 +407,7 @@ namespace mln
canvas::browsing::backdiagonal2d(f);
return f.output;
}
-
+
template <typename A, typename I, typename W>
inline
mln_ch_value(I, mln_result(A))
@@ -444,7 +444,7 @@ namespace mln
template <typename A, typename I, typename W>
inline
- mln_ch_value(I, mln_accu_with(A, mln_value(I))::result)
+ mln_ch_value(I, mln_accu_result(A, mln_value(I)))
transform_diagonal(const Meta_Accumulator<A>& a,
const Image<I>& input, const Window<W>& win)
{
diff --git a/milena/mln/accu/transform_directional.hh b/milena/mln/accu/transform_directional.hh
index 60ff537..46863cc 100644
--- a/milena/mln/accu/transform_directional.hh
+++ b/milena/mln/accu/transform_directional.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -62,7 +63,7 @@ namespace mln
template <typename A, typename I, typename W>
- mln_ch_value(I, mln_accu_with(A, mln_value(I))::result)
+ mln_ch_value(I, mln_accu_result(A, mln_value(I)))
transform_directional(const Meta_Accumulator<A>& a,
const Image<I>& input, const Window<W>& win,
unsigned dir);
@@ -264,7 +265,7 @@ namespace mln
canvas::browsing::directional(f);
return f.output;
}
-
+
template <typename A, typename I, typename W>
inline
mln_ch_value(I, mln_result(A))
@@ -278,7 +279,7 @@ namespace mln
canvas::browsing::directional(f);
return f.output;
}
-
+
template <typename A, typename I, typename W>
inline
mln_ch_value(I, mln_result(A))
@@ -317,7 +318,7 @@ namespace mln
template <typename A, typename I, typename W>
inline
- mln_ch_value(I, mln_accu_with(A, mln_value(I))::result)
+ mln_ch_value(I, mln_accu_result(A, mln_value(I)))
transform_directional(const Meta_Accumulator<A>& a,
const Image<I>& input, const Window<W>& win,
unsigned dir)
diff --git a/milena/mln/accu/transform_line.hh b/milena/mln/accu/transform_line.hh
index f77bd21..604853d 100644
--- a/milena/mln/accu/transform_line.hh
+++ b/milena/mln/accu/transform_line.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -50,15 +51,15 @@ namespace mln
template <typename A, typename I>
mln_ch_value(I, mln_result(A))
- transform_line(const Accumulator<A>& a,
- const Image<I>& input,
- unsigned length, unsigned dir);
+ transform_line(const Accumulator<A>& a,
+ const Image<I>& input,
+ unsigned length, unsigned dir);
template <typename A, typename I>
- mln_ch_value(I, mln_accu_with(A, mln_value(I))::result)
- transform_line(const Meta_Accumulator<A>& a,
- const Image<I>& input,
- unsigned length, unsigned dir);
+ mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ transform_line(const Meta_Accumulator<A>& a,
+ const Image<I>& input,
+ unsigned length, unsigned dir);
@@ -102,9 +103,9 @@ namespace mln
template <typename A, typename I>
inline
mln_ch_value(I, mln_result(A))
- transform_line(const Accumulator<A>& a_,
- const Image<I>& input_,
- unsigned length, unsigned dir)
+ transform_line(const Accumulator<A>& a_,
+ const Image<I>& input_,
+ unsigned length, unsigned dir)
{
trace::entering("accu::impl::transform_line");
@@ -165,7 +166,7 @@ namespace mln
qt_dir++;
qu_dir++;
}
-
+
p_dir = pmin_dir;
@@ -197,9 +198,9 @@ namespace mln
template <typename A, typename I>
inline
mln_ch_value(I, mln_result(A))
- transform_line_fastest(const Accumulator<A>& a_,
- const Image<I>& input_,
- unsigned length, unsigned dir)
+ transform_line_fastest(const Accumulator<A>& a_,
+ const Image<I>& input_,
+ unsigned length, unsigned dir)
{
trace::entering("accu::impl::transform_line_fastest");
@@ -265,7 +266,7 @@ namespace mln
output.element(o_p) = a.to_result();
}
-
+
p_dir = pmin_dir;
// Go to the next line.
@@ -304,10 +305,10 @@ namespace mln
template <typename A, typename I>
inline
mln_ch_value(I, mln_result(A))
- transform_line_dispatch(trait::image::speed::any,
- const Accumulator<A>& a,
- const Image<I>& input,
- unsigned length, unsigned dir)
+ transform_line_dispatch(trait::image::speed::any,
+ const Accumulator<A>& a,
+ const Image<I>& input,
+ unsigned length, unsigned dir)
{
return impl::generic::transform_line(a,
input,
@@ -339,9 +340,9 @@ namespace mln
template <typename A, typename I>
inline
mln_ch_value(I, mln_result(A))
- transform_line(const Accumulator<A>& a,
- const Image<I>& input,
- unsigned length, unsigned dir)
+ transform_line(const Accumulator<A>& a,
+ const Image<I>& input,
+ unsigned length, unsigned dir)
{
trace::entering("accu::transform_line");
@@ -359,10 +360,10 @@ namespace mln
template <typename A, typename I>
inline
- mln_ch_value(I, mln_accu_with(A, mln_value(I))::result)
- transform_line(const Meta_Accumulator<A>& a,
- const Image<I>& input,
- unsigned length, unsigned dir)
+ mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ transform_line(const Meta_Accumulator<A>& a,
+ const Image<I>& input,
+ unsigned length, unsigned dir)
{
trace::entering("accu::transform_line");
diff --git a/milena/mln/accu/transform_snake.hh b/milena/mln/accu/transform_snake.hh
index e04eaca..62140d4 100644
--- a/milena/mln/accu/transform_snake.hh
+++ b/milena/mln/accu/transform_snake.hh
@@ -62,7 +62,7 @@ namespace mln
template <typename A, typename I, typename W>
- mln_ch_value(I, mln_accu_with(A, mln_value(I))::result)
+ mln_ch_value(I, mln_accu_result(A, mln_value(I)))
transform_snake(const Meta_Accumulator<A>& a, const Image<I>& input, const Window<W>& win);
@@ -402,7 +402,7 @@ namespace mln
canvas::browsing::snake_generic(f);
return f.output;
}
-
+
template <typename A, typename I, typename W>
inline
mln_ch_value(I, mln_result(A))
@@ -415,7 +415,7 @@ namespace mln
canvas::browsing::snake_generic(f);
return f.output;
}
-
+
template <typename A, typename I, typename W>
inline
mln_ch_value(I, mln_result(A))
@@ -452,7 +452,7 @@ namespace mln
template <typename A, typename I, typename W>
inline
- mln_ch_value(I, mln_accu_with(A, mln_value(I))::result)
+ mln_ch_value(I, mln_accu_result(A, mln_value(I)))
transform_snake(const Meta_Accumulator<A>& a,
const Image<I>& input, const Window<W>& win)
{
diff --git a/milena/mln/accu/transform_stop.hh b/milena/mln/accu/transform_stop.hh
index a0853b5..e9c62e6 100644
--- a/milena/mln/accu/transform_stop.hh
+++ b/milena/mln/accu/transform_stop.hh
@@ -48,7 +48,7 @@ namespace mln
transform_stop(const Image<I>& input, const Accumulator<A>& a, const Window<W>& win);
template <typename I, typename A, typename W>
- mln_ch_value(I, mln_accu_with(A, mln_value(I))::result)
+ mln_ch_value(I, mln_accu_result(A, mln_value(I)))
transform_stop(const Image<I>& input, const Meta_Accumulator<A>& a, const Window<W>& win);
@@ -201,7 +201,7 @@ namespace mln
}
template <typename I, typename A, typename W>
- mln_ch_value(I, mln_accu_with(A, mln_value(I))::result)
+ mln_ch_value(I, mln_accu_result(A, mln_value(I)))
transform_stop(const Image<I>& input, const Meta_Accumulator<A>& a, const Window<W>& win)
{
trace::entering("accu::transform_stop");
diff --git a/milena/mln/data/compute.hh b/milena/mln/data/compute.hh
index bca7a38..63942cd 100644
--- a/milena/mln/data/compute.hh
+++ b/milena/mln/data/compute.hh
@@ -61,7 +61,7 @@ namespace mln
/// \return The accumulator result.
///
template <typename A, typename I>
- mln_accu_with(A, mln_value(I))::result
+ mln_accu_result(A, mln_value(I))
compute(const Meta_Accumulator<A>& a, const Image<I>& input);
@@ -90,7 +90,7 @@ namespace mln
template <typename A, typename I>
inline
- mln_accu_with(A, mln_value(I))::result
+ mln_accu_result(A, mln_value(I))
compute(const Meta_Accumulator<A>& a, const Image<I>& input)
{
typedef mln_accu_with(A, mln_value(I)) A_;
diff --git a/milena/mln/labeling/compute.hh b/milena/mln/labeling/compute.hh
index 61f9829..eeede38 100644
--- a/milena/mln/labeling/compute.hh
+++ b/milena/mln/labeling/compute.hh
@@ -101,7 +101,7 @@ namespace mln
/// \return A mln::p_array of accumulator result (one result per label).
//
template <typename A, typename I, typename L>
- util::array<mln_accu_with(A, mln_value(I))::result>
+ util::array<mln_accu_result(A, mln_value(I))>
compute(const Meta_Accumulator<A>& a,
const Image<I>& input,
const Image<L>& label,
@@ -132,7 +132,7 @@ namespace mln
/// \return A mln::p_array of accumulator result (one result per label).
//
template <typename A, typename L>
- util::array<mln_accu_with(A, mln_psite(L))::result>
+ util::array<mln_accu_result(A, mln_psite(L))>
compute(const Meta_Accumulator<A>& a,
const Image<L>& label,
const mln_value(L)& nlabels);
@@ -390,7 +390,7 @@ namespace mln
template <typename A, typename I, typename L>
inline
- util::array<mln_accu_with(A, mln_value(I))::result>
+ util::array<mln_accu_result(A, mln_value(I))>
compute(const Meta_Accumulator<A>& a,
const Image<I>& input,
const Image<L>& label,
@@ -426,7 +426,7 @@ namespace mln
template <typename A, typename L>
inline
- util::array<mln_accu_with(A, mln_psite(L))::result>
+ util::array<mln_accu_result(A, mln_psite(L))>
compute(const Meta_Accumulator<A>& a,
const Image<L>& label,
const mln_value(L)& nlabels)
diff --git a/milena/mln/set/compute.hh b/milena/mln/set/compute.hh
index 8ab5cbd..1828a8e 100644
--- a/milena/mln/set/compute.hh
+++ b/milena/mln/set/compute.hh
@@ -59,7 +59,7 @@ namespace mln
// \return The accumulator result.
//
template <typename A, typename S>
- mln_accu_with(A, mln_site(S))::result
+ mln_accu_result(A, mln_site(S))
compute(const Meta_Accumulator<A>& a, const Site_Set<S>& s);
@@ -123,7 +123,7 @@ namespace mln
template <typename A, typename S>
- mln_accu_with(A, mln_site(S))::result
+ mln_accu_result(A, mln_site(S))
compute(const Meta_Accumulator<A>& a, const Site_Set<S>& s)
{
trace::entering("set::compute");
@@ -132,7 +132,7 @@ namespace mln
A_ a_ = accu::unmeta(exact(a), mln_site(S)());
mln_result(A_) r = impl::generic::compute(a_, s);
-
+
trace::exiting("set::compute");
return r;
}
diff --git a/milena/mln/set/compute_with_weights.hh b/milena/mln/set/compute_with_weights.hh
index 39b0a29..de9c17b 100644
--- a/milena/mln/set/compute_with_weights.hh
+++ b/milena/mln/set/compute_with_weights.hh
@@ -80,7 +80,7 @@ namespace mln
/// \return The accumulator result.
//
template <typename A, typename I>
- mln_accu_with(A, mln_site(I))::result
+ mln_accu_result(A, mln_site(I))
compute_with_weights(const Meta_Accumulator<A>& a, const Image<I>& w);
@@ -252,7 +252,7 @@ namespace mln
template <typename A, typename I>
inline
- mln_accu_with(A, mln_site(I))::result
+ mln_accu_result(A, mln_site(I))
compute_with_weights(const Meta_Accumulator<A>& a, const Image<I>& w)
{
trace::entering("set::compute_with_weights");
@@ -266,7 +266,7 @@ namespace mln
A_ a_ = accu::unmeta(exact(a), P());
mln_result(A_) r = impl::generic::compute_with_weights(a_, w);
-
+
trace::exiting("set::compute_with_weights");
return r;
}
--
1.5.6.5
1
0
* demos/graph/region_adjacency_graph.cc: do not draw the vertex
associted to the background.
* doc/Makefile.am: Add borders to documentation images.
* doc/ref_guide/ref_guide.tex,
* doc/tutorial/tutorial.tex: Fix typos.
* mln/make/box2d.hh,
* mln/estim/min_max.hh.
* mln/accu/stat/min_max.hh,
* mln/core/concept/image.hh,
* mln/core/routine/exact.hh: Reheader.
* mln/data/compute.hh: Update doc.
* mln/transform/hough.hh: Fix an unused variable.
* mln/world/inter_pixel/is_separator.hh: Fix indentation add doc.
* mln/world/inter_pixel/separator_to_pixels.hh: move debug code
between NDEBUG guards.
---
milena/ChangeLog | 27 +++++++
milena/demos/graph/region_adjacency_graph.cc | 13 ++--
milena/doc/Makefile.am | 2 +-
milena/doc/ref_guide/ref_guide.tex | 74 +++++++++-----------
milena/doc/tutorial/tutorial.tex | 70 ++++++++-----------
milena/mln/accu/stat/min_max.hh | 3 +-
milena/mln/core/concept/image.hh | 3 +-
milena/mln/core/routine/exact.hh | 3 +-
milena/mln/data/compute.hh | 4 +-
milena/mln/estim/min_max.hh | 3 +-
milena/mln/make/box2d.hh | 3 +-
milena/mln/transform/hough.hh | 16 +++--
milena/mln/world/inter_pixel/is_separator.hh | 39 ++++++-----
.../mln/world/inter_pixel/separator_to_pixels.hh | 8 ++
14 files changed, 148 insertions(+), 120 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 2689703..99015ff 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,32 @@
2009-07-06 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+ Small fixes.
+
+ * demos/graph/region_adjacency_graph.cc: do not draw the vertex
+ associted to the background.
+
+ * doc/Makefile.am: Add borders to documentation images.
+
+ * doc/ref_guide/ref_guide.tex,
+ * doc/tutorial/tutorial.tex: Fix typos.
+
+ * mln/make/box2d.hh,
+ * mln/estim/min_max.hh.
+ * mln/accu/stat/min_max.hh,
+ * mln/core/concept/image.hh,
+ * mln/core/routine/exact.hh: Reheader.
+
+ * mln/data/compute.hh: Update doc.
+
+ * mln/transform/hough.hh: Fix an unused variable.
+
+ * mln/world/inter_pixel/is_separator.hh: Fix indentation add doc.
+
+ * mln/world/inter_pixel/separator_to_pixels.hh: move debug code
+ between NDEBUG guards.
+
+2009-07-06 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+
* mln/transform/internal/distance_functor.hh: Split declaration and
implementation.
diff --git a/milena/demos/graph/region_adjacency_graph.cc b/milena/demos/graph/region_adjacency_graph.cc
index 80ecd4b..44a2f17 100644
--- a/milena/demos/graph/region_adjacency_graph.cc
+++ b/milena/demos/graph/region_adjacency_graph.cc
@@ -137,11 +137,12 @@ namespace mln
dpoint2d br(3,3);
mln_piter(V) p(ima_v.domain());
for_all(p)
- {
- box2d b(p + tl, p + br);
- b.crop_wrt(ima.domain());
- data::fill((ima | b).rw(), convert::to<mln_value(I)>(ima_v(p)));
- }
+ if (p.id() != 0)
+ {
+ box2d b(p + tl, p + br);
+ b.crop_wrt(ima.domain());
+ data::fill((ima | b).rw(), convert::to<mln_value(I)>(ima_v(p)));
+ }
return ima;
}
@@ -205,7 +206,7 @@ int main()
/// Construct a vertex image.
mln_VAR(ima_v, make::vertex_image(g, basin_centers, mean_values));
- /// Construct a edge image.
+ /// Construct an edge image.
mln_VAR(ima_e, make::edge_image(ima_v, dist()));
io::ppm::save(make_debug_graph_image(input_ppm, ima_v, ima_e, literal::white),
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index e837ea2..57c3810 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -160,7 +160,7 @@ $(srcdir)/figures.stamp: $(FIGURES_SRCDIR)/*.p*m
echo "Converting $$img to PNG"; \
name=`basename $$img` \
ext=`echo $$name | cut -d '.' -f 2`; \
- convert -scale 250 $$img \
+ convert -scale 250 -bordercolor black -border 2x2 $$img \
$(FIGURES_SRCDIR)/`basename $$img $$ext`png \
|| eval $$failcom; \
done
diff --git a/milena/doc/ref_guide/ref_guide.tex b/milena/doc/ref_guide/ref_guide.tex
index 3bfb50e..dec1885 100644
--- a/milena/doc/ref_guide/ref_guide.tex
+++ b/milena/doc/ref_guide/ref_guide.tex
@@ -83,16 +83,6 @@
\begin{latexonly}
\maketitle
-\section*{Copying this document}
-Copyright \copyright{} 2008, 2009 LRDE.
-
-Permission is granted to copy, distribute and/or modify this document under
-the terms of the GNU Free Documentation License, Version 1.2 or any later
-version published by the Free Software Foundation; with the Invariant Sections
-being just ``Copying this document'', no Front-Cover Texts, and no Back-Cover
-Texts.
-
-A copy of the license is provided in the file COPYING.DOC.
\tableofcontents
\end{latexonly}
@@ -173,7 +163,7 @@ $ sudo make install
%**************************
\doxysection{generality}{Generality}
-The following tutorial explains the basic concepts behind Olena and how to use
+The following tutorial explains the basic concepts behind Olena and how to use
the most common objects and routines.
This tutorial includes many code examples and figures. In order to make this
tutorial easier to understand, we will mainly talk about 2D images. This is
@@ -222,11 +212,11 @@ Olena's tarball is structured as follow:
\item technical: technical doc.
\item tutorial: code sample and tutorial.
\end{itemize}
- \item img: a set of sample images.
+ \item img: a set of sample images.
\item mesh: a full example which uses Olena.
\item mln: the library. Contains only headers.
\item tests: test suite.
-% \item tools :
+% \item tools :
\end{itemize}
\item swilena: Python bindings for Olena.
\end{itemize}
@@ -393,7 +383,7 @@ is it's own bounding box.
Output:
\doxyoutput{box2d-bbox}
-A \type{p\_array} does not have the bbox
+A \type{p\_array} does not have the bbox
method since its sites do not have to be adjacent. Maintaining such information, in
order to keep getting the bbox in constant time, would be time and memory
consuming. Instead of providing a method directly in \type{p\_array}, an algorithm is
@@ -466,7 +456,7 @@ The value type can be one of the builtins one:
Other data types are also available:
\begin{tabular}{l|l}
-Value type & underlying data type \\
+Value type & underlying data type \\
\hline
\type{float01\_8} & \type{unsigned long} \\
\type{float01\_16} & \type{unsigned long} \\
@@ -498,7 +488,7 @@ types is actually ``type\_name.hh". For instance, for \type{rgb8} the header wil
%**************************
\doxysection{imadomain}{Domain}
The site set contains the sites which compose the image. Sites are based on a
-grid so the image depends on that grid as well.
+grid so the image depends on that grid as well.
It means that a 2D images can only be defined by sites based on a 2D grid.
Likewise, an \type{image2d} will always have its bouding box defined by a \type{box2d}.
@@ -564,7 +554,7 @@ Some operations can be performed on the border. The functions are located in
\bigskip
%
\begin{tabular}{l|p{8cm}}
-Routine & Description \\
+Routine & Description \\
\hline
adjust & Increase the border thickness if it is inferior to a minimum. \\
duplicate & Assign the border with the duplicate of the edges of this image.\\
@@ -597,12 +587,12 @@ The extension supports the following operations. These functions are located in
\bigskip
%
\begin{tabular}{l|p{10cm}}
-Routine & Description \\
+Routine & Description \\
\hline
adjust & Adjust the extension given a structural element.\\
adjust\_duplicate & Adjust the size of the extension given a structural element and duplicate the image inner boundary.\\
adjust\_fill & Adjust the size of the extension given a structural element and fill it with a value.\\
-duplicate & Duplicate the values of the image inner boundary in the extension.\\
+duplicate & Duplicate the values of the image inner boundary in the extension.\\
fill & Fill the extension with a given value.\\
\end{tabular} \\
@@ -750,7 +740,7 @@ Currently, Olena supports the following input image formats:
\item PFM
\item PGM
\item PNM
- \item PPM
+ \item PPM
\end{itemize}
This support is provided through two headers for each type, \header{save.hh} and
@@ -817,7 +807,7 @@ There are several ways to access/modify an image ``\var{ima}'':
\end{itemize}
Most of the time, images can be modified and these two methods can be used both
-to read a value and modify it. Both methods are equivalent.
+to read a value and modify it. Both methods are equivalent.
\doxycode{ima2d-3}
Output:
\doxyoutput{ima2d-3}
@@ -873,7 +863,7 @@ In Olena, there are both the window and neighborhood concept. A window can be
defined on any site around a central site which may also be included.
A neighborhood is more restrictive and \must not include the central site.
Therefore these two concepts are really similar and are detailed together in
-this section.
+this section.
By default, structural elements are centered. The central site is located at the
origin of the grid: ``\var{literal::origin}''. With \type{image2d}, the central site is
@@ -895,7 +885,7 @@ win\_c8p & 8-connectivity & \winceight \\
\end{tabular}
%
\bigskip
-%
+%
\subsubsection*{1D Predefined windows}
@@ -1078,7 +1068,7 @@ constant-time.
\doxysection{sitespsitensite}{From psite to site}
In the last example there was an image of type \type{I} such as \type{I::site}
-!= \type{I::psite}.
+!= \type{I::psite}.
In that case, an object of type \type{I::psite} is actually convertible towards an
object of type \type{I::site}. Furthermore, a \type{psite} shall behave as if it was a
\type{site}.
@@ -1187,7 +1177,7 @@ use the \code{for\_all()} loop: \code{data::fill()} and \code{data::paste()}.
Important note: macros for iterators exist in two versions:
``\code{mln\_*iter}'' and ``\code{mln\_*iter\_}''. The difference is that the
first version \must be used in templated function whereas the second one \must be
-used in non templated functions.
+used in non templated functions.
If you want a list of all the macros available in Olena, please refert to
section \doxyref{macros}.
@@ -1207,12 +1197,12 @@ In the Olena library, all image types behave like image2d:
the user never has to use "new / delete" (the C++ equivalent for the C
"malloc / free") so she does not have to manipulate pointers or to directly
access memory.
-
+
$\rightarrow$ Olena prevents the user from making mistakes;
\item Image data/values can be shared between several variables and the memory
used for image data is handled by the library.
-
+
$\rightarrow$ Memory management is automatic.
\end{itemize}
@@ -1245,11 +1235,11 @@ Output:
\hline
Routine name & Description \\ \hline
duplicate() & creates a deep copy of an object. Any shared data is
-duplicated. \\
+duplicated. \\
-data::fill() & fill an object with a value. \\
+data::fill() & fill an object with a value. \\
-data::paste() & paste object data to another object. \\
+data::paste() & paste object data to another object. \\
labeling::blobs() & find and label the different components of an image. \\
@@ -1292,7 +1282,7 @@ val)}. When forgetting the \code{rw()} call, it does not compile.
%**************************
\doxysection{pasteop}{Paste}
We then define below a second image to play with. As you can see this image has
-data for the sites (5, 5) to (14, 14) (so it has 100 sites).
+data for the sites (5, 5) to (14, 14) (so it has 100 sites).
\doxycode{paste-call-1}
Output:
@@ -1342,7 +1332,7 @@ Output: \\
Then label this image thanks to \code{labeling::blobs()}:
\doxycode[2]{labeling-compute}
-
+
Output: \\
\begin{center}
@@ -1362,7 +1352,7 @@ This parameter \must be of the same type as the returned image value.
\textbf{Full namespace} & mln::logical \\
- \textbf{Routine(s)} & not\_(),
+ \textbf{Routine(s)} & not\_(),
not\_inplace() \\
\hline
\end{tabular}
@@ -1495,7 +1485,7 @@ Then, use \code{labeling::compute()} with the bbox accumulator:
\code{labeling::compute()} hold an accumulator for each component, which means it
returns an array of accumulator results.
-In this case, it returns an array of \type{box2d}.
+In this case, it returns an array of \type{box2d}.
\textbf{Important note:} since \code{labeling::blobs()} labels the component from 1 and
set the background to 0, we will want to iterate from 1 to nlabels included.
@@ -1506,7 +1496,7 @@ Output:
\subsection{Routines based on accumulators and *::compute()}
In order to make the code cleaner, small routines are available for the
-most used accumulators.
+most used accumulators.
Currently there are the following routines:\\
@@ -1551,7 +1541,7 @@ boolean. These functions are actually a sort of predicate. A common
point to value function used in the given image. C functions can also be used as
predicate by passing the function pointer.
-You can easily get a \type{Function\_p2b} by comparing the value returned
+You can easily get a \type{Function\_p2b} by comparing the value returned
by a \type{Function\_p2v} to another Value.
The following sample codes illustrate this feature.
@@ -1580,7 +1570,7 @@ Output:
\doxysubsection{restrictpred}{Restrict an image with a predicate}
In the following example, we aim at extracting a component from an image and
-create a new image with it.
+create a new image with it.
First, find and label the components.
\doxycode[2]{fill-subdomain}
@@ -1672,7 +1662,7 @@ You can extend the range of supported files by installing third-parties librarie
\begin{itemize}
\item ImageMagick: support for usual images (PNG, TIFF, JPEG, ...)
- \item GDCM: support for DICOM medical images
+ \item GDCM: support for DICOM medical images
\end{itemize}
\doxysection{ioim}{ImageMagick}
@@ -1708,14 +1698,14 @@ You can extend the range of supported files by installing third-parties librarie
%\begin{htmlonly}
%\doxychapter{2}{}
%\end{htmlonly}
-\doxychapter{graphandima}{Graphes and images}
+\doxychapter{graphandima}{Graphs and images}
%FIXME: REWRITE
%**************************
\doxysection{graphdesc}{Description}
-Olena enables the possibility of using graphes with images.
-Graphes can help you to handle directly parts of an image and represent their
+Olena enables the possibility of using graphs with images.
+Graphs can help you to handle directly parts of an image and represent their
relationship.
Specific data can be associated to each vertex and/or edges.
@@ -1770,7 +1760,7 @@ Output:
\doxymoutput[1]{graph-iter}
Graphs have iterators like any other site sets and also provide
-specific iterators in order to iterate over graphes in a more intuitive way.
+specific iterators in order to iterate over graphs in a more intuitive way.
Iteration over the adjacent edges of all the vertices:
\doxycode[2]{graph-iter}
diff --git a/milena/doc/tutorial/tutorial.tex b/milena/doc/tutorial/tutorial.tex
index 168160f..3d2e847 100644
--- a/milena/doc/tutorial/tutorial.tex
+++ b/milena/doc/tutorial/tutorial.tex
@@ -80,16 +80,6 @@
\begin{latexonly}
\maketitle
-\section*{Copying this document}
-Copyright \copyright{} 2008, 2009 LRDE.
-
-Permission is granted to copy, distribute and/or modify this document under
-the terms of the GNU Free Documentation License, Version 1.2 or any later
-version published by the Free Software Foundation; with the Invariant Sections
-being just ``Copying this document'', no Front-Cover Texts, and no Back-Cover
-Texts.
-
-A copy of the license is provided in the file COPYING.DOC.
\tableofcontents
\end{latexonly}
@@ -154,7 +144,7 @@ There are two ways of getting Milena on the web:
\end{itemize}
Downloading a package or a tarball is the best choice for a new user. Except
-for nightly builds which are packages generated every night from the SVN repository,
+for nightly builds which are packages generated every night from the SVN repository,
packages and tarballs contain only a released version of Milena. It guaranties a
certain quality: no building issues, no bugs (ok, maybe some...), \ldots
@@ -202,7 +192,7 @@ $ sudo apt-get install subversion
For other distributions, please refer to the user documentation of your system.
-Once you have SVN installed, go to the directory where you would like to
+Once you have SVN installed, go to the directory where you would like to
download Olena and create a new directory.
\begin{verbatim}
@@ -210,7 +200,7 @@ $ cd $HOME
$ mkdir olena
$ cd olena
\end{verbatim}
-
+
Then 'checkout' (download) the repository with the following command.
\begin{verbatim}
@@ -223,7 +213,7 @@ Enter the 'trunk' directory.
$ cd trunk
\end{verbatim}
-You are now ready to configure the directory and install Milena as described
+You are now ready to configure the directory and install Milena as described
in section \ref{tuto2}.
We invite you to take a look at the description of the directory structure
(section \ref{tuto1dirstruct}).
@@ -265,7 +255,7 @@ $ cd olena-1.0
\end{verbatim}
-You are now ready to configure the directory and install Milena as described
+You are now ready to configure the directory and install Milena as described
in section \ref{tuto2}.
We invite you to take a look at the description of the directory structure
(section \ref{tuto1dirstruct}).
@@ -334,7 +324,7 @@ List of \hpath{milena}'s subdirectories:
\item \dir{mln} --- The core of the library. Contains all the library headers.
\item \dir{tests} --- The test suite. Is it subdivided in sub directories.
- The directory hierarchy respects \hpath{milena/mln}'s.
+ The directory hierarchy respects \hpath{milena/mln}'s.
\item \dir{tools} --- Small tools written with milena. They can be used as examples.
@@ -433,17 +423,17 @@ This tutorial is not the only documentation of Milena. Other documents are avail
\item \dir{Quick reference guide} --- Presents in details all the main
functionalities of Milena.
Hints and full examples are also provided. The sample codes are commented
- and each concept in the library is detailed. This is the reference document for any
+ and each concept in the library is detailed. This is the reference document for any
\textit{end user} and \textit{algorithm designer}.
\item \dir{HTML user doc} --- The full documentation of the library. The full
API is described in details. Each part of the library is classified by
categories and the source code is directly accessible from the documentation.
- This is the reference document for any \textit{algorithm designer} and/or
+ This is the reference document for any \textit{algorithm designer} and/or
\textit{provider of data structures}.
\item \dir{Header files} --- Every object or algorithm is declared in a '.hh' file.
- The documentation is provided as comments in these file.
+ The documentation is provided as comments in these file.
\end{itemize}
@@ -505,10 +495,10 @@ There are other ways to get to know what is the status of the project.
\doxysection{tuto1briefhistory}{A brief history of Milena}
The Olena project aims at building a scientific computation platform oriented
-towards image processing, image recognition, and artificial vision.
+towards image processing, image recognition, and artificial vision.
This environment is composed of a high performance generic library (Milena),
a set of tools for shell scripts, together with, in the more distant future,
-an interpreter (a la Octave, MatLab etc.) and a visual programming environment.
+an interpreter (a la Octave, MatLab etc.) and a visual programming environment.
The Olena project started in 2000 from a small prototype on 2-D images.
From November 2001 to April 2004, this prototype evolved from version 0.1 to 0.10.
@@ -522,7 +512,7 @@ was too long.
Since June 2007 up to now, The library of the Olena platform is called Milena
and the library has been rewritten. The programming paradigm has been
simplified: the code is more readable and the compilation time is acceptable.
-The level of genericity still meets our objectives though.
+The level of genericity still meets our objectives though.
Milena is now getting ready for being considered as stable and distributable.
The core of the library is getting frozen and we aim at enriching the library,
@@ -553,7 +543,7 @@ If you want to reach us directly, you can contact one of the following people:
%pre-requis/compatibility
This section describes the installation process of Milena.
Do not forget that Milena is a library, not a program. Therefore, no program
-will be installed.
+will be installed.
Milena's examples and tests are compiled on the following platforms:
\begin{itemize}
@@ -594,7 +584,7 @@ If you got the sources from a package/tarball, you can skip this section. Go
to section \ref{tuto2configure}.
If you downloaded the sources from the SVN repository, you must launch a
-script before configuring the build directory.
+script before configuring the build directory.
Run the following:
\begin{verbatim}
@@ -666,13 +656,13 @@ The build directory is now configured, the library can be installed.
\doxysection{tuto2install}{Install}
First, be sure to be in the build directory. If you followed the previous
-steps, the build directory should be in the Milena sources root directory.
+steps, the build directory should be in the Milena sources root directory.
\begin{verbatim}
$ cd /my/path/to/olena-1.0/build
\end{verbatim}
-If you did not change the default install path prefix, set to
+If you did not change the default install path prefix, set to
\hpath{/usr/local}, you will need to have administrator privileges to
perform the installation. Then, you may type:
\begin{verbatim}
@@ -701,13 +691,13 @@ A description of the installation content is also available in section
The library itself does not need to be compiled, therefore installing
Milena does not require compilation.
-Though, some examples and tools are provided with the library and must be
+Though, some examples and tools are provided with the library and must be
compiled if you want to use them.
\doxysubsection{tuto2examples}{Examples}
Examples are part of the documentation. The sources are located in
-\hpath{milena/doc/examples}.
+\hpath{milena/doc/examples}.
To compile the examples simply run:
\begin{verbatim}
@@ -938,11 +928,11 @@ compiler.
With g++ and MinGW, the option is \B{-I$<$path$>$}.
\begin{verbatim}
-$ g++ -Ipath/to/mln my_program.cc
+$ g++ -Ipath/to/mln my_program.cc
\end{verbatim}
For other compilers, please look at the documentation and search for ``include
-path''.
+path''.
\doxysubsection{tuto3liblink}{Library linking}
@@ -962,7 +952,7 @@ this is a useful feature and it should be enabled. It can heavily slow down a
program though and these tests can be disabled by compiling using -DNDEBUG:
\begin{verbatim}
-$ g++ -DNDEBUG -Ipath/to/mln my_program.cc
+$ g++ -DNDEBUG -Ipath/to/mln my_program.cc
\end{verbatim}
\doxysubsection{tuto3compoptimflags}{Compiler optimization flags}
@@ -976,7 +966,7 @@ their impact on the compilation and execution time.
\begin{itemize}
\item \B{-O0}, combined with -DNDEBUG, it leads to the fastest compilation
time. The execution is somewhat slow though since dispatch functions and one
- line members are not inlined by the compiler.
+ line members are not inlined by the compiler.
\item \B{-O1}, best compromise between compilation time and execution time.
\item \B{-O2}, \B{-O3}, combined with -DNDEBUG, it leads to the best execution
time. However these optimizations dramatically slow down the compilation and
@@ -1000,7 +990,7 @@ will be detected at run time. If an assertion fails, we advice you to compile
with the following options:
\begin{verbatim}
-$ g++ -ggdb -Ipath/to/mln my_program.cc
+$ g++ -ggdb -Ipath/to/mln my_program.cc
\end{verbatim}
Note that you \B{MUST NOT} compile with \var{-DNDEBUG} since assertions will be
@@ -1008,7 +998,7 @@ disabled.
Once compiled, restart the program with GDB.
\begin{verbatim}
-$ gdb ./my_program
+$ gdb ./my_program
\end{verbatim}
In the GDB console, run it again.
@@ -1018,7 +1008,7 @@ In the GDB console, run it again.
When an assertion fails, in the GDB console simply type:
\begin{verbatim}
-(gdb) bt
+(gdb) bt
\end{verbatim}
The full backtrace will be printed out and you will be able to find from where
@@ -1041,7 +1031,7 @@ are printed out in the backtrace as you can see in the following example:
\doxysubsection{tuto3traces}{Traces}
Sometimes, compiling for GDB without optimization flags and with debug
-assertions enabled could lead to execution time dramatically high.
+assertions enabled could lead to execution time dramatically high.
If the function parameter values are not necessary for debugging,
a good alternative is the trace system provided in Milena.
Each time a routine is called, a trace log is written.
@@ -1147,7 +1137,7 @@ then the image itself which stores the values.
A pixel is an element having both information, localization and
value. In Milena, we make a difference between a pixel, a pixel value and a pixel
location. Thus, in order to refer to a pixel location, we have the site concept.
-A site can be any kind of localization element.
+A site can be any kind of localization element.
For instance, in an image defined on a 2D regular grid, it is a 2D point with
\var{row} and \var{col} coordinates.
@@ -1224,7 +1214,7 @@ Currently, Olena supports the following input image formats:
\item PFM
\item PGM
\item PNM
- \item PPM
+ \item PPM
\end{itemize}
This support is provided through two headers for each type, \header{save.hh} and
@@ -1404,7 +1394,7 @@ First, we just need to declare this square which is actually a site set, a
\doxycode[2]{tuto4_genericity_and_algorithms}
Then, we just need to tell \code{data::fill} that we would like to fill the
-image \var{lena} but only in this restricted part of the image domain.
+image \var{lena} but only in this restricted part of the image domain.
\doxycode[3]{tuto4_genericity_and_algorithms}
Operator '$|$' can be read 'restricted to'. So below, we wrote 'image \var{lena}
restricted to the region of interest \var{roi}'. Actually this is not directly
@@ -1513,7 +1503,7 @@ The two routines are :
be compared.
\end{itemize}
-Let's see a common use case.
+Let's see a common use case.
First, we binarize lena according to specific criterions, only site values with
specific colors are set to true in \var{lena\_bw}. Others are set to false. This
image will be used in order to label the components.
diff --git a/milena/mln/accu/stat/min_max.hh b/milena/mln/accu/stat/min_max.hh
index a0032b8..edc43dd 100644
--- a/milena/mln/accu/stat/min_max.hh
+++ b/milena/mln/accu/stat/min_max.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
diff --git a/milena/mln/core/concept/image.hh b/milena/mln/core/concept/image.hh
index 6f8d123..9340a17 100644
--- a/milena/mln/core/concept/image.hh
+++ b/milena/mln/core/concept/image.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
diff --git a/milena/mln/core/routine/exact.hh b/milena/mln/core/routine/exact.hh
index e45490b..30e03e1 100644
--- a/milena/mln/core/routine/exact.hh
+++ b/milena/mln/core/routine/exact.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
diff --git a/milena/mln/data/compute.hh b/milena/mln/data/compute.hh
index 3ddac78..bca7a38 100644
--- a/milena/mln/data/compute.hh
+++ b/milena/mln/data/compute.hh
@@ -43,7 +43,7 @@ namespace mln
/// Compute an accumulator onto the pixel values of the image \p input.
///
- /// \param[in] a_ An accumulator.
+ /// \param[in] a An accumulator.
/// \param[in] input The input image.
/// \return The accumulator result.
///
@@ -51,7 +51,7 @@ namespace mln
//
template <typename A, typename I>
mln_result(A)
- compute(const Accumulator<A>& a_, const Image<I>& input);
+ compute(const Accumulator<A>& a, const Image<I>& input);
/// Compute an accumulator onto the pixel values of the image \p input.
diff --git a/milena/mln/estim/min_max.hh b/milena/mln/estim/min_max.hh
index 84f45cb..6f72715 100644
--- a/milena/mln/estim/min_max.hh
+++ b/milena/mln/estim/min_max.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
diff --git a/milena/mln/make/box2d.hh b/milena/mln/make/box2d.hh
index f9f242f..b417f42 100644
--- a/milena/mln/make/box2d.hh
+++ b/milena/mln/make/box2d.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
diff --git a/milena/mln/transform/hough.hh b/milena/mln/transform/hough.hh
index 19ed1b0..61d1b4d 100644
--- a/milena/mln/transform/hough.hh
+++ b/milena/mln/transform/hough.hh
@@ -30,6 +30,7 @@
///
/// Compute the hough transform.
+
# include <mln/core/image/image2d.hh>
# include <mln/data/fill.hh>
@@ -61,12 +62,12 @@ namespace mln
///
/// \param[in] input_ A binary image.
///
- /// \return A 2D image of float. Rows are used for the distance and
- /// columns are used for the angles. Angles go from 0 to 359.
- /// Distance goes from 0 to the maximum distance between the center and a
- /// corner.
- /// The site having the maximum value indicates through its column index
- /// the document inclination.
+ /// \return A 2D image of float. Rows are used for the distance
+ /// and columns are used for the angles. Angles go from 0 to 359.
+ /// Distance goes from 0 to the maximum distance between the
+ /// center and a corner.
+ /// The site having the maximum value indicates through its column
+ /// index the document inclination.
//
template <typename I>
image2d<float>
@@ -76,6 +77,7 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
+
namespace internal
{
@@ -90,6 +92,7 @@ namespace mln
} // end of namespace mln::transform::internal
+
template <typename I>
image2d<float>
hough(const Image<I>& input_)
@@ -106,7 +109,6 @@ namespace mln
unsigned
ncols = geom::ncols(input),
nrows = geom::nrows(input);
- int compt = 0;
int maxRho = (int)(sqrt((ncols * nrows)
+ (ncols * nrows))
+ 0.5);
diff --git a/milena/mln/world/inter_pixel/is_separator.hh b/milena/mln/world/inter_pixel/is_separator.hh
index deddae3..e168c8e 100644
--- a/milena/mln/world/inter_pixel/is_separator.hh
+++ b/milena/mln/world/inter_pixel/is_separator.hh
@@ -46,8 +46,12 @@ namespace mln
namespace inter_pixel
{
+
+ /// Functor returning whether a site is a separator in an
+ /// inter-pixel image.
struct is_separator : public Function_v2b< is_separator >
{
+
typedef bool result;
template <typename P>
@@ -55,28 +59,29 @@ namespace mln
template <typename P>
bool operator()(const Site_Proxy<P>& p) const;
+
};
# ifndef MLN_INCLUDE_ONLY
- template <typename P>
- inline
- bool
- is_separator::operator()(const Gpoint<P>& p_) const
- {
- const P& p = exact(p_);
- return p.row() % 2 + p.col() % 2 == 1;
- }
-
- template <typename P>
- inline
- bool
- is_separator::operator()(const Site_Proxy<P>& p) const
- {
- mlc_is_a(mln_site(P), Gpoint)::check();
- return this->operator()(exact(p).to_site());
- }
+ template <typename P>
+ inline
+ bool
+ is_separator::operator()(const Gpoint<P>& p_) const
+ {
+ const P& p = exact(p_);
+ return p.row() % 2 + p.col() % 2 == 1;
+ }
+
+ template <typename P>
+ inline
+ bool
+ is_separator::operator()(const Site_Proxy<P>& p) const
+ {
+ mlc_is_a(mln_site(P), Gpoint)::check();
+ return this->operator()(exact(p).to_site());
+ }
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/world/inter_pixel/separator_to_pixels.hh b/milena/mln/world/inter_pixel/separator_to_pixels.hh
index f1f1bea..12b9c8d 100644
--- a/milena/mln/world/inter_pixel/separator_to_pixels.hh
+++ b/milena/mln/world/inter_pixel/separator_to_pixels.hh
@@ -72,12 +72,14 @@ namespace mln
P& p1 = exact(p1_);
P& p2 = exact(p2_);
+# ifndef NDEBUG
{
// Pre-condition.
is_separator is_separator_;
mln_precondition(is_separator_(s));
(void) is_separator_;
}
+# endif // ! NDEBUG
// FIXME: 2D only.
if (s.row() % 2)
@@ -93,6 +95,7 @@ namespace mln
p2 = point2d(s.row(), s.col() + 1);
}
+# ifndef NDEBUG
{
// Post-conditions.
is_pixel is_pixel_;
@@ -100,6 +103,7 @@ namespace mln
mln_postcondition(is_pixel_(p2));
(void) is_pixel_;
}
+# endif // ! NDEBUG
}
template <typename Ps, typename P>
@@ -112,15 +116,18 @@ namespace mln
P& p1 = exact(p1_);
P& p2 = exact(p2_);
+# ifndef NDEBUG
{
// Pre-condition.
is_separator is_separator_;
mln_precondition(is_separator_(s));
(void) is_separator_;
}
+# endif // ! NDEBUG
separator_to_pixels(s.to_site(), p1, p2);
+# ifndef NDEBUG
{
// Post-conditions.
is_pixel is_pixel_;
@@ -128,6 +135,7 @@ namespace mln
mln_postcondition(is_pixel_(p2));
(void) is_pixel_;
}
+# endif // ! NDEBUG
}
# endif // ! MLN_INCLUDE_ONLY
--
1.5.6.5
1
0