LRE
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
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
List overview
Download
Olena-patches
June 2009
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
olena-patches@lrde.epita.fr
9 participants
356 discussions
Start a n
N
ew thread
4003: tests/tools/pretty_check.sh: Fix syntax error.
by Guillaume Lazzara
--- milena/ChangeLog | 4 ++++ milena/tests/tools/pretty_check.sh | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 90ac090..2dd92e1 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,9 @@ 2009-06-05 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr> + * tests/tools/pretty_check.sh: Fix syntax error. + +2009-06-05 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr> + More fixes for documentation build system. * doc/Makefile.am: diff --git a/milena/tests/tools/pretty_check.sh b/milena/tests/tools/pretty_check.sh index b2dea8f..765d53b 100755 --- a/milena/tests/tools/pretty_check.sh +++ b/milena/tests/tools/pretty_check.sh @@ -409,7 +409,7 @@ main() cleanup_tmp_files cleanup_gcc_wrapper - return rvalue + exit $rvalue } -return main +main -- 1.5.6.5
15 years, 6 months
1
0
0
0
4002: More fixes for documentation build system.
by Guillaume Lazzara
* doc/Makefile.am: - Fix invalid replacement in doxyfile. - Fix invalid rule names. - Fix invalid dist files. * tests/tools/pretty_check.sh: return the make check return value. --- milena/ChangeLog | 11 +++++++++++ milena/doc/Makefile.am | 11 ++++++++--- milena/tests/tools/pretty_check.sh | 5 ++++- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 3b282d2..90ac090 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,16 @@ 2009-06-05 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr> + More fixes for documentation build system. + + * doc/Makefile.am: + - Fix invalid replacement in doxyfile. + - Fix invalid rule names. + - Fix invalid dist files. + + * tests/tools/pretty_check.sh: return the make check return value. + +2009-06-05 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr> + Small fixes. * milena/doc/Doxyfile.in: fix missing backspace. diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am index 3e23eab..9e5b840 100644 --- a/milena/doc/Makefile.am +++ b/milena/doc/Makefile.am @@ -18,7 +18,9 @@ DOXYGEN = doxygen # Doxygen documentation output directory. -user: user-doc-html user-doc +user/html: ref-doc-html + +user/latex/refman.pdf: ref-doc doc-all: doc doc-html doc-dev doc-dev-html @@ -36,6 +38,7 @@ doc-dev-html: tutorial-html ref-guide-html white-paper-html ref-doc-dev-html ref-doc-dev: Doxyfile examples $(DOXYGEN) Doxyfile_complete_pdf + cd complete/latex && make $(AM_MAKEFLAGS) ref-doc-dev-html: Doxyfile examples $(DOXYGEN) Doxyfile_complete @@ -43,6 +46,7 @@ ref-doc-dev-html: Doxyfile examples ref-doc: Doxyfile examples $(DOXYGEN) Doxyfile_user_pdf + cd user/latex && make $(AM_MAKEFLAGS) ref-doc-html: Doxyfile examples $(DOXYGEN) Doxyfile_user @@ -100,7 +104,7 @@ edit_pdf = sed -e 's,GENERATE_LATEX = NO,GENERATE_LATEX = YES,g' \ # documentation (complete and user) using @VARIABLES@. Don't generate # Doxyfile_user from Doxyfile_complete! Both should be a product # derived from a single source, Doxyfile.in. -edit_user = sed -e 's,OUTPUT_DIRECTORY = ./complete/,OUTPUT_DIRECTORY = ./user/,g' \ +edit_user = sed -e 's,OUTPUT_DIRECTORY = ./complete/,OUTPUT_DIRECTORY = ./user/,g' \ -e 's,EXTRACT_ALL = YES,EXTRACT_ALL = NO,g' \ -e 's,EXTRACT_PRIVATE = YES,EXTRACT_PRIVATE = NO,g' \ -e 's,EXTRACT_STATIC = YES,EXTRACT_STATIC = NO,g' \ @@ -138,7 +142,8 @@ include $(srcdir)/outputs/outputs.mk EXTRA_DIST += \ Doxyfile.in \ groups \ - user \ + user/html \ + user/latex/refman.pdf \ tools/clearbanner.sh \ tools/sample_utils.hh \ tools/split_sample.sh \ diff --git a/milena/tests/tools/pretty_check.sh b/milena/tests/tools/pretty_check.sh index 738342e..b2dea8f 100755 --- a/milena/tests/tools/pretty_check.sh +++ b/milena/tests/tools/pretty_check.sh @@ -346,6 +346,7 @@ main() make_gcc_wrapper make CXX="$gcc_wrapper" -C $base_make_path check -k 1>$check_log 2>&1 + rvalue=$? cd $output_directory begin_tmp_files @@ -407,6 +408,8 @@ main() # Cleanup temporary files. cleanup_tmp_files cleanup_gcc_wrapper + + return rvalue } -main +return main -- 1.5.6.5
15 years, 6 months
1
0
0
0
4001: Small fixes.
by Guillaume Lazzara
* milena/doc/Doxyfile.in: fix missing backspace. * milena/doc/examples/extend.cc: add missing include. * milena/doc/ref_guide/ref_guide.tex: fix typo. * milena/doc/tools/clearbanner.sh: new tool to remove hevea banner. * milena/doc/tutorial/tutorial.tex: add navigation links. * milena/doc/white_paper/white_paper.tex: do not use pgf. * milena/tests/unit_test/unit-tests.mk, * milena/headers.mk: update. * milena/mln/metal/equal.hh, * milena/mln/metal/is.hh, * milena/mln/metal/is_a.hh: add comments. * milena/mln/transform/influence_zone_geodesic.hh, * milena/mln/transform/internal/influence_zone_functor.hh: allow to set a different value for the background. * milena/mln/value/shell.hh: temporary re-enable the commented overload of set_ and comment the other one. * milena/tests/Makefile.am: fix pretty-check rule. * milena/tests/extract/blue.cc, * milena/tests/extract/green.cc, * milena/tests/extract/red.cc: improve tests. * milena/tests/extract/Makefile.am, * milena/tests/extract/hue.cc, * milena/tests/extract/lum.cc, * milena/tests/extract/sat.cc: new tests. --- milena/ChangeLog | 41 ++++++++ milena/doc/Doxyfile.in | 2 +- milena/doc/examples/extend.cc | 1 + milena/doc/ref_guide/ref_guide.tex | 2 +- milena/doc/tools/clearbanner.sh | 5 + milena/doc/tutorial/tutorial.tex | 5 + milena/doc/white_paper/white_paper.tex | 12 +-- milena/headers.mk | 11 ++- milena/mln/metal/equal.hh | 14 ++- milena/mln/metal/is.hh | 23 ++--- milena/mln/metal/is_a.hh | 8 +- milena/mln/transform/influence_zone_geodesic.hh | 35 ++++++- .../transform/internal/influence_zone_functor.hh | 97 +++++++++++++++++-- milena/mln/value/shell.hh | 26 +++--- milena/tests/Makefile.am | 4 +- milena/tests/extract/Makefile.am | 14 ++- milena/tests/extract/blue.cc | 4 + milena/tests/extract/green.cc | 4 + milena/tests/extract/{red.cc => hue.cc} | 18 ++-- milena/tests/extract/{red.cc => lum.cc} | 18 ++-- milena/tests/extract/red.cc | 4 + milena/tests/extract/{red.cc => sat.cc} | 18 ++-- milena/tests/unit_test/unit-tests.mk | 22 ++++- 23 files changed, 299 insertions(+), 89 deletions(-) create mode 100755 milena/doc/tools/clearbanner.sh copy milena/tests/extract/{red.cc => hue.cc} (82%) copy milena/tests/extract/{red.cc => lum.cc} (82%) copy milena/tests/extract/{red.cc => sat.cc} (82%) diff --git a/milena/ChangeLog b/milena/ChangeLog index 8d7d5a3..3b282d2 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,46 @@ 2009-06-05 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr> + Small fixes. + + * milena/doc/Doxyfile.in: fix missing backspace. + + * milena/doc/examples/extend.cc: add missing include. + + * milena/doc/ref_guide/ref_guide.tex: fix typo. + + * milena/doc/tools/clearbanner.sh: new tool to remove hevea banner. + + * milena/doc/tutorial/tutorial.tex: add navigation links. + + * milena/doc/white_paper/white_paper.tex: do not use pgf. + + * milena/tests/unit_test/unit-tests.mk, + * milena/headers.mk: update. + + * milena/mln/metal/equal.hh, + * milena/mln/metal/is.hh, + * milena/mln/metal/is_a.hh: add comments. + + * milena/mln/transform/influence_zone_geodesic.hh, + * milena/mln/transform/internal/influence_zone_functor.hh: allow to + set a different value for the background. + + * milena/mln/value/shell.hh: temporary re-enable the commented + overload of set_ and comment the other one. + + * milena/tests/Makefile.am: fix pretty-check rule. + + * milena/tests/extract/blue.cc, + * milena/tests/extract/green.cc, + * milena/tests/extract/red.cc: improve tests. + + * milena/tests/extract/Makefile.am, + * milena/tests/extract/hue.cc, + * milena/tests/extract/lum.cc, + * milena/tests/extract/sat.cc: new tests. + +2009-06-05 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr> + Cleanup tests io::p*m tests and add new tests for io::p*ms. * mln/io/pgms/load.hh, diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in index 0abb0fc..1f2e17b 100644 --- a/milena/doc/Doxyfile.in +++ b/milena/doc/Doxyfile.in @@ -288,7 +288,7 @@ PREDEFINED = "mlc_unqualif(T)=typename mln::metal::unqualif<T>::ret" "mln_sum_product(T, U)=typename mln::trait::value_< mln_trait_op_times(T,U) >::sum" \ "mln_deduce(T, A1, A2)=typename T::A1::A2" \ "mln_graph_element(T)=typename T::graph_element" \ - "mln_graph_element_(T)=T::graph_element" + "mln_graph_element_(T)=T::graph_element" \ "mln_fun_vv2v(F, L, R)=mln::fun::vv2v::F< mln_value(L), mln_value(R) >" \ "mln_fun_vv2v_result(F, L, R)=typename mln_fun_vv2v(F, L, R)::result" \ "mln_ch_fun_vv2v(F, L, R)=typename mln::trait::ch_value< L, typename mln_fun_vv2v(F, L, R)::result >::ret" diff --git a/milena/doc/examples/extend.cc b/milena/doc/examples/extend.cc index 4e8e1bb..bf4dbc7 100644 --- a/milena/doc/examples/extend.cc +++ b/milena/doc/examples/extend.cc @@ -4,6 +4,7 @@ #include <mln/core/var.hh> #include <mln/data/transform.hh> +#include <mln/data/paste.hh> #include <mln/fun/p2b/big_chess.hh> diff --git a/milena/doc/ref_guide/ref_guide.tex b/milena/doc/ref_guide/ref_guide.tex index efe7f2e..578e22d 100644 --- a/milena/doc/ref_guide/ref_guide.tex +++ b/milena/doc/ref_guide/ref_guide.tex @@ -1833,7 +1833,7 @@ util::vec, dpoint\dots & n.a.\\ & & \\ literal::origin & Generic value for the origin point on a grid.& n.a.\\ & & \\ -border::thickness & Set the default border thickness of images & $[0-UINT_MAX]$\\ +border::thickness & Set the default border thickness of images & $[0-UINT\_MAX]$\\ & & \\ trace::quiet & Enable trace printing & true/false \\ \end{tabular} diff --git a/milena/doc/tools/clearbanner.sh b/milena/doc/tools/clearbanner.sh new file mode 100755 index 0000000..3095457 --- /dev/null +++ b/milena/doc/tools/clearbanner.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +sed -i -e 's,<HR SIZE=2><BLOCKQUOTE CLASS="quote"><EM>This document was translated from L<sup>A</sup>T<sub>E</sub>X by,,g' $1 +sed -i -e 's,<A HREF="
http://hevea.inria.fr/index.html
">H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A</A>.</EM></BLOCKQUOTE></BODY>,,g' $1 + diff --git a/milena/doc/tutorial/tutorial.tex b/milena/doc/tutorial/tutorial.tex index e36fce7..e9b0062 100644 --- a/milena/doc/tutorial/tutorial.tex +++ b/milena/doc/tutorial/tutorial.tex @@ -66,6 +66,7 @@ - \backslash subpage tuto5 - \backslash subpage tuto6 - \backslash subpage tuto7 +- \backslash subpage tuto8 \backslash htmlonly \end{htmlonly} @@ -1194,6 +1195,10 @@ In this section, we will detail how to create common images. %-------------------------- \doxysubsection{tuto4accessdata}{Accessing data} +\vspace{2cm} +\begin{center} + \tutotoc{tuto3}{tuto5} +\end{center} diff --git a/milena/doc/white_paper/white_paper.tex b/milena/doc/white_paper/white_paper.tex index 2f48a9b..02467ca 100644 --- a/milena/doc/white_paper/white_paper.tex +++ b/milena/doc/white_paper/white_paper.tex @@ -8,10 +8,6 @@ \usepackage{makeidx} \usepackage{xcolor} \usepackage{color} -\usepackage{pgf} -\usepackage{doxyfuns} -\usepackage{milena} - \title{Milena\\ \large{Generic image processing library} } @@ -118,10 +114,10 @@ images, that can be used as \end{itemize} \begin{center} - \doxyimg{house}{2.5cm} - \doxyimg{house_wshed}{2.5cm} - \doxyimg{house_wshed_mean_colors}{2.5cm} - \doxyimg{house_rag}{2.5cm} + \includegraphics[width=2.5cm]{house}% + \includegraphics[width=2.5cm]{house_wshed}% + \includegraphics[width=2.5cm]{house_wshed_mean_colors}% + \includegraphics[width=2.5cm]{house_rag}% \end{center} %================================================================= diff --git a/milena/headers.mk b/milena/headers.mk index 161b4d1..334cf50 100644 --- a/milena/headers.mk +++ b/milena/headers.mk @@ -679,12 +679,16 @@ mln/io/off/save.hh \ mln/io/pbm/all.hh \ mln/io/pbm/load.hh \ mln/io/pbm/save.hh \ +mln/io/pbms/all.hh \ +mln/io/pbms/load.hh \ mln/io/pfm/all.hh \ mln/io/pfm/load.hh \ mln/io/pfm/save.hh \ mln/io/pgm/all.hh \ mln/io/pgm/load.hh \ mln/io/pgm/save.hh \ +mln/io/pgms/all.hh \ +mln/io/pgms/load.hh \ mln/io/plot/all.hh \ mln/io/plot/load.hh \ mln/io/plot/save.hh \ @@ -695,11 +699,16 @@ mln/io/pnm/macros.hh \ mln/io/pnm/max_component.hh \ mln/io/pnm/save.hh \ mln/io/pnm/save_header.hh \ +mln/io/pnms/all.hh \ +mln/io/pnms/load.hh \ mln/io/ppm/all.hh \ mln/io/ppm/load.hh \ mln/io/ppm/save.hh \ +mln/io/ppms/all.hh \ +mln/io/ppms/load.hh \ mln/io/tiff/all.hh \ mln/io/tiff/load.hh \ +mln/io/tiff/save.hh \ mln/io/txt/all.hh \ mln/io/txt/save.hh \ mln/labeling/all.hh \ @@ -1248,7 +1257,6 @@ mln/value/sign.hh \ mln/value/stack.hh \ mln/value/super_value.hh \ mln/value/viter.hh \ -mln/version.hh \ mln/win/all.hh \ mln/win/backdiag2d.hh \ mln/win/ball.hh \ @@ -1273,6 +1281,7 @@ mln/win/vline2d.hh \ mln/world/all.hh \ mln/world/binary_2d/all.hh \ mln/world/binary_2d/enlarge.hh \ +mln/world/binary_2d/enlarge_hq2x.hh \ mln/world/binary_2d/projected_histo.hh \ mln/world/binary_2d/subsample.hh \ mln/world/inter_pixel/all.hh \ diff --git a/milena/mln/metal/equal.hh b/milena/mln/metal/equal.hh index d206897..06030bc 100644 --- a/milena/mln/metal/equal.hh +++ b/milena/mln/metal/equal.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2009 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of the Milena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -28,11 +29,9 @@ #ifndef MLN_METAL_EQUAL_HH # define MLN_METAL_EQUAL_HH -/*! - * \file mln/metal/equal.hh - * - * \brief FIXME. - */ +/// \file mln/metal/equal.hh +/// +/// Definition of a static 'equal' test. # include <mln/metal/bool.hh> @@ -46,6 +45,9 @@ namespace mln namespace metal { + /// Definition of a static 'equal' test. + /// Check whether type T1 is exactly type T2. + // template <typename T1, typename T2> struct equal : false_ {}; diff --git a/milena/mln/metal/is.hh b/milena/mln/metal/is.hh index 917f222..079638e 100644 --- a/milena/mln/metal/is.hh +++ b/milena/mln/metal/is.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2008, 2009 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of the Milena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -28,10 +29,9 @@ #ifndef MLN_METAL_IS_HH # define MLN_METAL_IS_HH -/*! \file mln/metal/is.hh - * - * \brief Definition of a type that means "is". - */ +/// \file mln/metal/is.hh +/// +/// \brief Definition of a type that means "is". # include <mln/metal/is_a.hh> @@ -60,10 +60,9 @@ namespace mln - /*! \brief "is" check. - * - * FIXME: Doc! - */ + /// \brief "is" check. + /// Check whether T inherits from U. + // template <typename T, typename U> struct is : bool_<( sizeof(internal::helper_is_<T, U>::selector(internal::make_<T>::ptr())) == @@ -74,15 +73,15 @@ namespace mln template <typename T, typename U> struct is< const T, const U > : is<T, U>::eval {}; - + template <typename T, typename U> struct is< T*, U* > : is<T, U>::eval {}; - + template <typename T, typename U> struct is< T&, U& > : is<T, U>::eval {}; - + template <typename T, typename U> struct is< T**, U** > : false_ {}; diff --git a/milena/mln/metal/is_a.hh b/milena/mln/metal/is_a.hh index 395fde9..9faad2d 100644 --- a/milena/mln/metal/is_a.hh +++ b/milena/mln/metal/is_a.hh @@ -90,10 +90,10 @@ namespace mln - /*! \brief "is_a" check. - * - * FIXME: Doc! - */ + /// \brief "is_a" check. + /// + /// Check whether T inherits from _CONCEPT_ M. + // template <typename T, template <class> class M> struct is_a : bool_<( sizeof( internal::helper_is_a_< T, M >::selector(internal::make_< T >::ptr()) ) == diff --git a/milena/mln/transform/influence_zone_geodesic.hh b/milena/mln/transform/influence_zone_geodesic.hh index fee1d7f..31b4417 100644 --- a/milena/mln/transform/influence_zone_geodesic.hh +++ b/milena/mln/transform/influence_zone_geodesic.hh @@ -43,13 +43,29 @@ namespace mln { /// Geodesic influence zone transform. + /// + /// \param[in] input An image. + /// \param[in] nbh A neighborhood. + /// \param[in] max The maximum influence zone distance. + /// \param[in] background_value The value used as background (i.e. + /// not propagated). + /// + /// \return An image of influence zone. + // template <typename I, typename N, typename D> mln_concrete(I) influence_zone_geodesic(const Image<I>& input, - const Neighborhood<N>& nbh, D max); + const Neighborhood<N>& nbh, + const D& max, const mln_value(I)& background_value); + /// \overload + template <typename I, typename N, typename D> + mln_concrete(I) + influence_zone_geodesic(const Image<I>& input, + const Neighborhood<N>& nbh, const D& max); - /// Geodesic influence zone transform. + + /// \overload template <typename I, typename N> mln_concrete(I) influence_zone_geodesic(const Image<I>& input, const Neighborhood<N>& nbh); @@ -58,23 +74,34 @@ namespace mln # ifndef MLN_INCLUDE_ONLY + template <typename I, typename N, typename D> mln_concrete(I) influence_zone_geodesic(const Image<I>& input, const Neighborhood<N>& nbh, - D max) + const D& max, const mln_value(I)& background_value) { trace::entering("transform::influence_zone_geodesic"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); - internal::influence_zone_functor<I> f; + internal::influence_zone_functor<I> f(background_value); (void) mln::canvas::distance_geodesic(input, nbh, max, f); trace::exiting("transform::influence_zone_geodesic"); return f.output; } + + template <typename I, typename N, typename D> + mln_concrete(I) + influence_zone_geodesic(const Image<I>& input, const Neighborhood<N>& nbh, + const D& max) + { + return influence_zone_geodesic(input, nbh, max, literal::zero); + } + + template <typename I, typename N> mln_concrete(I) influence_zone_geodesic(const Image<I>& input, const Neighborhood<N>& nbh) diff --git a/milena/mln/transform/internal/influence_zone_functor.hh b/milena/mln/transform/internal/influence_zone_functor.hh index 7d8f846..414418b 100644 --- a/milena/mln/transform/internal/influence_zone_functor.hh +++ b/milena/mln/transform/internal/influence_zone_functor.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of the Milena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -30,7 +31,7 @@ /// \file mln/transform/internal/influence_zone_functor.hh /// -/// Influence zone functor. +/// \brief Influence zone functor. # include <mln/core/routine/duplicate.hh> @@ -41,7 +42,7 @@ namespace mln namespace transform { - + namespace internal { @@ -51,24 +52,48 @@ namespace mln typedef mln_value(I) V; typedef mln_psite(I) P; + influence_zone_functor(); + influence_zone_functor(const V& background_value); + mln_concrete(I) output; void init(const I& input); bool inqueue_p_wrt_input_p(const V& input_p); bool inqueue_p_wrt_input_n(const V& input_n); - void init_p(const P&) {} // FIXME: move def below. + void init_p(const P&); void process(const P& p, const P& n); - void init_(const I& input) { output = duplicate(input); } - bool inqueue_p_wrt_input_p_(const V& input_p) { return input_p != 0u; } - bool inqueue_p_wrt_input_n_(const V& input_n) { return input_n == 0u; } - void init_p_(unsigned) {} - void process_(unsigned p, unsigned n) { output.element(n) = output.element(p); } + void init_(const I& input); + bool inqueue_p_wrt_input_p_(const V& input_p); + bool inqueue_p_wrt_input_n_(const V& input_n); + void init_p_(unsigned); + void process_(unsigned p, unsigned n); + + V background_value_; }; # ifndef MLN_INCLUDE_ONLY + + template <typename I> + inline + influence_zone_functor<I>::influence_zone_functor() + { + background_value_ = literal::zero; + } + + + template <typename I> + inline + influence_zone_functor<I>::influence_zone_functor(const V& background_value) + { + background_value_ = background_value; + } + + + // Generic implementation. + template <typename I> inline void @@ -82,7 +107,7 @@ namespace mln bool influence_zone_functor<I>::inqueue_p_wrt_input_p(const V& input_p) { - return input_p != 0u; + return input_p != background_value_; } template <typename I> @@ -90,7 +115,14 @@ namespace mln bool influence_zone_functor<I>::inqueue_p_wrt_input_n(const V& input_n) { - return input_n == 0u; + return input_n == background_value_; + } + + template <typename I> + inline + void + influence_zone_functor<I>::init_p(const P&) + { } template <typename I> @@ -100,6 +132,49 @@ namespace mln output(n) = output(p); } + + + // Fastest implementation. + + template <typename I> + inline + void + influence_zone_functor<I>::init_(const I& input) + { + output = duplicate(input); + } + + template <typename I> + inline + bool + influence_zone_functor<I>::inqueue_p_wrt_input_p_(const V& input_p) + { + return input_p != background_value_; + } + + template <typename I> + inline + bool + influence_zone_functor<I>::inqueue_p_wrt_input_n_(const V& input_n) + { + return input_n == background_value_; + } + + template <typename I> + inline + void + influence_zone_functor<I>::init_p_(unsigned) + { + } + + template <typename I> + inline + void influence_zone_functor<I>::process_(unsigned p, unsigned n) + { + output.element(n) = output.element(p); + } + + # endif // ! MLN_INCLUDE_ONLY } // end of namespace mln::transform::internal diff --git a/milena/mln/value/shell.hh b/milena/mln/value/shell.hh index af04cf3..3d1306c 100644 --- a/milena/mln/value/shell.hh +++ b/milena/mln/value/shell.hh @@ -141,26 +141,26 @@ namespace mln namespace impl { +// template <typename F, typename I> +// const mln_value(I)& +// shell_<F, I, Function_v2v<void> >::set_(I& ima, +// const mln_site(I)& s, +// mln_result(F) v) +// { +// ima(s) = F().f_1(v); +// return ima(s); +// } + template <typename F, typename I> const mln_value(I)& shell_<F, I, Function_v2v<void> >::set_(I& ima, - const mln_site(I)& s, - mln_result(F) v) + const mln_site(I)& s, + mln_result(F) v) { - ima(s) = F().f_1(v); + ima(s) = F().f_1(v, ima(s)); return ima(s); } -// template <typename F, typename I> -// const mln_value(I)& -// shell_<F, I, Function_v2v<void> >::set_(I& ima, -// const mln_site(I)& s, -// mln_result(F) v) -// { -// ima(s) = F().f_1(v, ima(s)); -// return ima(s); -// } - } // end of namespace mln::value::impl diff --git a/milena/tests/Makefile.am b/milena/tests/Makefile.am index 540232b..19a9e31 100644 --- a/milena/tests/Makefile.am +++ b/milena/tests/Makefile.am @@ -2,6 +2,8 @@ include $(top_srcdir)/milena/tests/tests.mk +.PHONY: pretty-check + SUBDIRS = \ accu \ algebra \ @@ -61,7 +63,7 @@ global_vars_SOURCES = global_vars1.cc global_vars2.cc TESTS = $(check_PROGRAMS) -pretty_check: +pretty-check: $(top_srcdir)/milena/tests/tools/pretty_check.sh diff --git a/milena/tests/extract/Makefile.am b/milena/tests/extract/Makefile.am index 62bbd0c..4f3146c 100644 --- a/milena/tests/extract/Makefile.am +++ b/milena/tests/extract/Makefile.am @@ -3,12 +3,18 @@ include $(top_srcdir)/milena/tests/tests.mk check_PROGRAMS = \ - red \ + blue \ green \ - blue + hue \ + lum \ + red \ + sat -red_SOURCES = red.cc -green_SOURCES = green.cc blue_SOURCES = blue.cc +green_SOURCES = green.cc +hue_SOURCES = hue.cc +lum_SOURCES = lum.cc +red_SOURCES = red.cc +sat_SOURCES = sat.cc TESTS = $(check_PROGRAMS) diff --git a/milena/tests/extract/blue.cc b/milena/tests/extract/blue.cc index 965954a..fe838ea 100644 --- a/milena/tests/extract/blue.cc +++ b/milena/tests/extract/blue.cc @@ -43,5 +43,9 @@ int main() fun_image<meta::blue<rgb8>,I> ima_blue = extract::blue(ima); mln_assertion(ima(p).blue() == ima_blue(p)); + + ima_blue(p) = 0; + + mln_assertion(ima_blue(p) == 0u); } diff --git a/milena/tests/extract/green.cc b/milena/tests/extract/green.cc index cf38302..c5052e4 100644 --- a/milena/tests/extract/green.cc +++ b/milena/tests/extract/green.cc @@ -43,5 +43,9 @@ int main() fun_image<meta::green<rgb8>,I> ima_green = extract::green(ima); mln_assertion(ima(p).green() == ima_green(p)); + + ima_green(p) = 0; + + mln_assertion(ima_green(p) == 0u); } diff --git a/milena/tests/extract/red.cc b/milena/tests/extract/hue.cc similarity index 82% copy from milena/tests/extract/red.cc copy to milena/tests/extract/hue.cc index 7a87b42..8362793 100644 --- a/milena/tests/extract/red.cc +++ b/milena/tests/extract/hue.cc @@ -26,22 +26,26 @@ // Public License. # include <mln/core/image/image2d.hh> -# include <mln/extract/red.hh> -# include <mln/value/rgb8.hh> +# include <mln/extract/hue.hh> +# include <mln/value/hsl.hh> # include <mln/core/var.hh> int main() { using namespace mln; - using value::rgb8; + using value::hsl_f; - typedef image2d<rgb8> I; + typedef image2d<hsl_f> I; I ima(2,2); point2d p(1,1); - ima(p) = value::rgb8(200, 230, 240); + ima(p) = value::hsl_f(200, 230, 240); - fun_image<meta::red<rgb8>,I> ima_red = extract::red(ima); + fun_image< meta::hue<hsl_f>, I > ima_hue = extract::hue(ima); - mln_assertion(ima(p).red() == ima_red(p)); + mln_assertion(ima(p).hue() == ima_hue(p)); + + ima_hue(p) = 0; + + mln_assertion(ima_hue(p) == 0u); } diff --git a/milena/tests/extract/red.cc b/milena/tests/extract/lum.cc similarity index 82% copy from milena/tests/extract/red.cc copy to milena/tests/extract/lum.cc index 7a87b42..6fc3e4c 100644 --- a/milena/tests/extract/red.cc +++ b/milena/tests/extract/lum.cc @@ -26,22 +26,26 @@ // Public License. # include <mln/core/image/image2d.hh> -# include <mln/extract/red.hh> -# include <mln/value/rgb8.hh> +# include <mln/extract/lum.hh> +# include <mln/value/hsl.hh> # include <mln/core/var.hh> int main() { using namespace mln; - using value::rgb8; + using value::hsl_f; - typedef image2d<rgb8> I; + typedef image2d<hsl_f> I; I ima(2,2); point2d p(1,1); - ima(p) = value::rgb8(200, 230, 240); + ima(p) = value::hsl_f(200, 230, 240); - fun_image<meta::red<rgb8>,I> ima_red = extract::red(ima); + fun_image< meta::lum<hsl_f>, I > ima_lum = extract::lum(ima); - mln_assertion(ima(p).red() == ima_red(p)); + mln_assertion(ima(p).lum() == ima_lum(p)); + + ima_lum(p) = 0; + + mln_assertion(ima_lum(p) == 0u); } diff --git a/milena/tests/extract/red.cc b/milena/tests/extract/red.cc index 7a87b42..e730986 100644 --- a/milena/tests/extract/red.cc +++ b/milena/tests/extract/red.cc @@ -43,5 +43,9 @@ int main() fun_image<meta::red<rgb8>,I> ima_red = extract::red(ima); mln_assertion(ima(p).red() == ima_red(p)); + + ima_red(p) = 0; + + mln_assertion(ima_red(p) == 0u); } diff --git a/milena/tests/extract/red.cc b/milena/tests/extract/sat.cc similarity index 82% copy from milena/tests/extract/red.cc copy to milena/tests/extract/sat.cc index 7a87b42..8d588da 100644 --- a/milena/tests/extract/red.cc +++ b/milena/tests/extract/sat.cc @@ -26,22 +26,26 @@ // Public License. # include <mln/core/image/image2d.hh> -# include <mln/extract/red.hh> -# include <mln/value/rgb8.hh> +# include <mln/extract/sat.hh> +# include <mln/value/hsl.hh> # include <mln/core/var.hh> int main() { using namespace mln; - using value::rgb8; + using value::hsl_f; - typedef image2d<rgb8> I; + typedef image2d<hsl_f> I; I ima(2,2); point2d p(1,1); - ima(p) = value::rgb8(200, 230, 240); + ima(p) = value::hsl_f(200, 230, 240); - fun_image<meta::red<rgb8>,I> ima_red = extract::red(ima); + fun_image< meta::sat<hsl_f>, I > ima_sat = extract::sat(ima); - mln_assertion(ima(p).red() == ima_red(p)); + mln_assertion(ima(p).sat() == ima_sat(p)); + + ima_sat(p) = 0; + + mln_assertion(ima_sat(p) == 0u); } diff --git a/milena/tests/unit_test/unit-tests.mk b/milena/tests/unit_test/unit-tests.mk index 290b74b..c7ae9a1 100644 --- a/milena/tests/unit_test/unit-tests.mk +++ b/milena/tests/unit_test/unit-tests.mk @@ -648,12 +648,16 @@ mln_io_off_save \ mln_io_pbm_all \ mln_io_pbm_load \ mln_io_pbm_save \ +mln_io_pbms_all \ +mln_io_pbms_load \ mln_io_pfm_all \ mln_io_pfm_load \ mln_io_pfm_save \ mln_io_pgm_all \ mln_io_pgm_load \ mln_io_pgm_save \ +mln_io_pgms_all \ +mln_io_pgms_load \ mln_io_plot_all \ mln_io_plot_load \ mln_io_plot_save \ @@ -664,11 +668,16 @@ mln_io_pnm_macros \ mln_io_pnm_max_component \ mln_io_pnm_save \ mln_io_pnm_save_header \ +mln_io_pnms_all \ +mln_io_pnms_load \ mln_io_ppm_all \ mln_io_ppm_load \ mln_io_ppm_save \ +mln_io_ppms_all \ +mln_io_ppms_load \ mln_io_tiff_all \ mln_io_tiff_load \ +mln_io_tiff_save \ mln_io_txt_all \ mln_io_txt_save \ mln_labeling_all \ @@ -1214,7 +1223,6 @@ mln_value_sign \ mln_value_stack \ mln_value_super_value \ mln_value_viter \ -mln_version \ mln_win_all \ mln_win_backdiag2d \ mln_win_ball \ @@ -1239,6 +1247,7 @@ mln_win_vline2d \ mln_world_all \ mln_world_binary_2d_all \ mln_world_binary_2d_enlarge \ +mln_world_binary_2d_enlarge_hq2x \ mln_world_binary_2d_projected_histo \ mln_world_binary_2d_subsample \ mln_world_inter_pixel_all \ @@ -1904,12 +1913,16 @@ mln_io_off_save_SOURCES = mln_io_off_save.cc mln_io_pbm_all_SOURCES = mln_io_pbm_all.cc mln_io_pbm_load_SOURCES = mln_io_pbm_load.cc mln_io_pbm_save_SOURCES = mln_io_pbm_save.cc +mln_io_pbms_all_SOURCES = mln_io_pbms_all.cc +mln_io_pbms_load_SOURCES = mln_io_pbms_load.cc mln_io_pfm_all_SOURCES = mln_io_pfm_all.cc mln_io_pfm_load_SOURCES = mln_io_pfm_load.cc mln_io_pfm_save_SOURCES = mln_io_pfm_save.cc mln_io_pgm_all_SOURCES = mln_io_pgm_all.cc mln_io_pgm_load_SOURCES = mln_io_pgm_load.cc mln_io_pgm_save_SOURCES = mln_io_pgm_save.cc +mln_io_pgms_all_SOURCES = mln_io_pgms_all.cc +mln_io_pgms_load_SOURCES = mln_io_pgms_load.cc mln_io_plot_all_SOURCES = mln_io_plot_all.cc mln_io_plot_load_SOURCES = mln_io_plot_load.cc mln_io_plot_save_SOURCES = mln_io_plot_save.cc @@ -1920,11 +1933,16 @@ mln_io_pnm_macros_SOURCES = mln_io_pnm_macros.cc mln_io_pnm_max_component_SOURCES = mln_io_pnm_max_component.cc mln_io_pnm_save_SOURCES = mln_io_pnm_save.cc mln_io_pnm_save_header_SOURCES = mln_io_pnm_save_header.cc +mln_io_pnms_all_SOURCES = mln_io_pnms_all.cc +mln_io_pnms_load_SOURCES = mln_io_pnms_load.cc mln_io_ppm_all_SOURCES = mln_io_ppm_all.cc mln_io_ppm_load_SOURCES = mln_io_ppm_load.cc mln_io_ppm_save_SOURCES = mln_io_ppm_save.cc +mln_io_ppms_all_SOURCES = mln_io_ppms_all.cc +mln_io_ppms_load_SOURCES = mln_io_ppms_load.cc mln_io_tiff_all_SOURCES = mln_io_tiff_all.cc mln_io_tiff_load_SOURCES = mln_io_tiff_load.cc +mln_io_tiff_save_SOURCES = mln_io_tiff_save.cc mln_io_txt_all_SOURCES = mln_io_txt_all.cc mln_io_txt_save_SOURCES = mln_io_txt_save.cc mln_labeling_all_SOURCES = mln_labeling_all.cc @@ -2470,7 +2488,6 @@ mln_value_sign_SOURCES = mln_value_sign.cc mln_value_stack_SOURCES = mln_value_stack.cc mln_value_super_value_SOURCES = mln_value_super_value.cc mln_value_viter_SOURCES = mln_value_viter.cc -mln_version_SOURCES = mln_version.cc mln_win_all_SOURCES = mln_win_all.cc mln_win_backdiag2d_SOURCES = mln_win_backdiag2d.cc mln_win_ball_SOURCES = mln_win_ball.cc @@ -2495,6 +2512,7 @@ mln_win_vline2d_SOURCES = mln_win_vline2d.cc mln_world_all_SOURCES = mln_world_all.cc mln_world_binary_2d_all_SOURCES = mln_world_binary_2d_all.cc mln_world_binary_2d_enlarge_SOURCES = mln_world_binary_2d_enlarge.cc +mln_world_binary_2d_enlarge_hq2x_SOURCES = mln_world_binary_2d_enlarge_hq2x.cc mln_world_binary_2d_projected_histo_SOURCES = mln_world_binary_2d_projected_histo.cc mln_world_binary_2d_subsample_SOURCES = mln_world_binary_2d_subsample.cc mln_world_inter_pixel_all_SOURCES = mln_world_inter_pixel_all.cc -- 1.5.6.5
15 years, 6 months
1
0
0
0
4000: Makefile.am: Fix invalid rule name.
by Guillaume Lazzara
--- ChangeLog | 4 ++++ Makefile.am | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c13919..bf482e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-06-05 Guillaume Lazzara <lazzara(a)lrde.epita.fr> + * Makefile.am: fix invalid rule name. + +2009-06-05 Guillaume Lazzara <lazzara(a)lrde.epita.fr> + * configure.ac: Configure milena/tests/io/p*ms directories. 2009-06-04 Fabien Freling <fabien.freling(a)lrde.epita.fr> diff --git a/Makefile.am b/Makefile.am index 4df773e..9b222b6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,11 +8,13 @@ if ENABLE_SWILENA SUBDIRS += swilena endif ENABLE_SWILENA +.PHONY: doc pretty-check + # Shortcut to generate the documentation from the top level. -.PHONY: doc doc: cd milena && $(MAKE) $(AM_MAKEFLAGS) $@ -pretty_check: - $(MAKE) -C milena/tests pretty_check +# Shortcut to launch the pretty check from the top level. +pretty-check: + cd milena/tests && $(MAKE) $(AM_MAKEFLAGS) $@ -- 1.5.6.5
15 years, 6 months
1
0
0
0
3999: configure.ac: Configure milena/tests/io/p*ms directories.
by Guillaume Lazzara
--- ChangeLog | 4 ++++ configure.ac | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index f661efd..8c13919 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-06-05 Guillaume Lazzara <lazzara(a)lrde.epita.fr> + + * configure.ac: Configure milena/tests/io/p*ms directories. + 2009-06-04 Fabien Freling <fabien.freling(a)lrde.epita.fr> Exclude some files during checking. diff --git a/configure.ac b/configure.ac index ce0af7f..7bcd9bb 100644 --- a/configure.ac +++ b/configure.ac @@ -296,10 +296,13 @@ AC_CONFIG_FILES([ milena/tests/io/magick/Makefile milena/tests/io/off/Makefile milena/tests/io/pbm/Makefile + milena/tests/io/pbms/Makefile milena/tests/io/pfm/Makefile milena/tests/io/pgm/Makefile + milena/tests/io/pgms/Makefile milena/tests/io/pnm/Makefile milena/tests/io/ppm/Makefile + milena/tests/io/ppms/Makefile milena/tests/io/tiff/Makefile milena/tests/labeling/Makefile milena/tests/linear/Makefile -- 1.5.6.5
15 years, 6 months
1
0
0
0
3998: Cleanup tests io::p*m tests and add new tests for io::p*ms.
by Guillaume Lazzara
* mln/io/pgms/load.hh, * mln/io/pnms/load.hh, * mln/io/ppms/load.hh: fix invalid calls to pnm::load. * tests/io/pbm/pbm.cc, * tests/io/pgm/pgm.cc, * tests/io/ppm/ppm.cc: remove tests related to routines located in namespace p*ms. * tests/io/Makefile.am, * tests/io/pbms/Makefile.am, * tests/io/pgms/Makefile.am, * tests/io/ppms/Makefile.am, * tests/io/pbms/load.cc, * tests/io/pgms/load.cc, * tests/io/ppms/load.cc: new tests. --- milena/ChangeLog | 22 ++++++++++++++++ milena/mln/io/pgms/load.hh | 2 +- milena/mln/io/pnms/load.hh | 35 +++++++++++++++++++++++++- milena/mln/io/ppms/load.hh | 2 +- milena/tests/io/Makefile.am | 5 +++- milena/tests/io/pbm/pbm.cc | 16 ------------ milena/tests/io/pbms/Makefile.am | 10 +++++++ milena/tests/io/{pbm/pbm.cc => pbms/load.cc} | 28 ++++++-------------- milena/tests/io/pgm/pgm.cc | 20 -------------- milena/tests/io/pgms/Makefile.am | 10 +++++++ milena/tests/io/{pgm/pgm.cc => pgms/load.cc} | 32 ++++------------------- milena/tests/io/ppm/ppm.cc | 17 ------------ milena/tests/io/ppms/Makefile.am | 10 +++++++ milena/tests/io/{ppm/ppm.cc => ppms/load.cc} | 31 ++++++++++------------ 14 files changed, 120 insertions(+), 120 deletions(-) create mode 100644 milena/tests/io/pbms/Makefile.am copy milena/tests/io/{pbm/pbm.cc => pbms/load.cc} (77%) create mode 100644 milena/tests/io/pgms/Makefile.am copy milena/tests/io/{pgm/pgm.cc => pgms/load.cc} (74%) create mode 100644 milena/tests/io/ppms/Makefile.am copy milena/tests/io/{ppm/ppm.cc => ppms/load.cc} (76%) diff --git a/milena/ChangeLog b/milena/ChangeLog index 3887983..8d7d5a3 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,27 @@ 2009-06-05 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr> + Cleanup tests io::p*m tests and add new tests for io::p*ms. + + * mln/io/pgms/load.hh, + * mln/io/pnms/load.hh, + * mln/io/ppms/load.hh: fix invalid calls to pnm::load. + + + * tests/io/pbm/pbm.cc, + * tests/io/pgm/pgm.cc, + * tests/io/ppm/ppm.cc: remove tests related to routines located in + namespace p*ms. + + * tests/io/Makefile.am, + * tests/io/pbms/Makefile.am, + * tests/io/pgms/Makefile.am, + * tests/io/ppms/Makefile.am, + * tests/io/pbms/load.cc, + * tests/io/pgms/load.cc, + * tests/io/ppms/load.cc: new tests. + +2009-06-05 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr> + Improve documentation build system. * doc/Makefile.am, diff --git a/milena/mln/io/pgms/load.hh b/milena/mln/io/pgms/load.hh index d0240b7..362c9c2 100644 --- a/milena/mln/io/pgms/load.hh +++ b/milena/mln/io/pgms/load.hh @@ -74,7 +74,7 @@ namespace mln { trace::entering("mln::io::pgms::load"); - io::pnms::load<image2d<V> >(PGM, ima, filenames); + io::pnms::load<V>(PGM, ima, filenames); trace::exiting("mln::io::pgms::load"); } diff --git a/milena/mln/io/pnms/load.hh b/milena/mln/io/pnms/load.hh index d494039..117f586 100644 --- a/milena/mln/io/pnms/load.hh +++ b/milena/mln/io/pnms/load.hh @@ -42,6 +42,7 @@ # include <mln/core/image/image3d.hh> # include <mln/value/int_u8.hh> # include <mln/io/pnm/load.hh> +# include <mln/io/pbm/load.hh> # include <mln/make/image3d.hh> @@ -60,12 +61,19 @@ namespace mln /// \param[out] ima A reference to the 3D image which will receive /// data. /// \param[in] filenames The list of 2D images to load.. - /// + // template <typename V> void load(char type, image3d<V>& ima, const util::array<std::string>& filenames); + /// \overload + // + void load(char type, + image3d<bool>& ima, + const util::array<std::string>& filenames); + + # ifndef MLN_INCLUDE_ONLY @@ -92,6 +100,31 @@ namespace mln trace::exiting("mln::io::pnms::load"); } + + inline + void load(char type, + image3d<bool>& ima, + const util::array<std::string>& filenames) + { + trace::entering("mln::io::pnms::load"); + mln_precondition(!filenames.is_empty()); + (void) type; + + util::array< image2d<bool> > slices; + + for (unsigned i = 0; i < filenames.nelements(); ++i) + { + image2d<bool> tmp; + io::pbm::load(tmp, filenames[i]); + slices.append(tmp); + } + + ima = make::image3d(slices); + + trace::exiting("mln::io::pnms::load"); + } + + # endif // ! MLN_INCLUDE_ONLY } // end of namespace mln::io::pnms diff --git a/milena/mln/io/ppms/load.hh b/milena/mln/io/ppms/load.hh index f2500c5..e7964d0 100644 --- a/milena/mln/io/ppms/load.hh +++ b/milena/mln/io/ppms/load.hh @@ -72,7 +72,7 @@ namespace mln { trace::entering("mln::io::ppms::load"); - io::pnms::load<image2d<V> >(PPM, ima, filenames); + io::pnms::load<V>(PPM, ima, filenames); trace::exiting("mln::io::ppms::load"); } diff --git a/milena/tests/io/Makefile.am b/milena/tests/io/Makefile.am index 6f91495..c4d5cc3 100644 --- a/milena/tests/io/Makefile.am +++ b/milena/tests/io/Makefile.am @@ -10,10 +10,13 @@ SUBDIRS = \ dump \ off \ pbm \ + pbms \ pfm \ pgm \ + pgms \ pnm \ - ppm + ppm \ + ppms ## ------------------------------------------------- ## ## I/O routines depending on a third-party library. ## diff --git a/milena/tests/io/pbm/pbm.cc b/milena/tests/io/pbm/pbm.cc index 1a90eae..7bc7214 100644 --- a/milena/tests/io/pbm/pbm.cc +++ b/milena/tests/io/pbm/pbm.cc @@ -36,7 +36,6 @@ #include <mln/io/pbm/load.hh> #include <mln/io/pbm/save.hh> -#include <mln/io/pbms/load.hh> #include <mln/data/compare.hh> @@ -53,21 +52,6 @@ int main() mln_assertion(pic == pic2); - - pic2(point2d(0,0)) = true; - io::pbm::save(pic2, "out.pbm"); - - util::array<std::string> files(2); - files[0] = MLN_IMG_DIR "/picasso.pbm"; - files[1] = "out.pbm"; - - image3d<bool> ima3d; - io::pbms::load(ima3d, files); - - mln_assertion(ima3d.nslices() == 2); - mln_assertion(slice(ima3d, 0) == pic); - mln_assertion(slice(ima3d, 1) == pic2); - } diff --git a/milena/tests/io/pbms/Makefile.am b/milena/tests/io/pbms/Makefile.am new file mode 100644 index 0000000..3dbd00b --- /dev/null +++ b/milena/tests/io/pbms/Makefile.am @@ -0,0 +1,10 @@ +## Process this file through Automake to create Makefile.in. + +include $(top_srcdir)/milena/tests/tests.mk + +check_PROGRAMS = \ + load + +load_SOURCES = load.cc + +TESTS = $(check_PROGRAMS) diff --git a/milena/tests/io/pbm/pbm.cc b/milena/tests/io/pbms/load.cc similarity index 77% copy from milena/tests/io/pbm/pbm.cc copy to milena/tests/io/pbms/load.cc index 1a90eae..3e53523 100644 --- a/milena/tests/io/pbm/pbm.cc +++ b/milena/tests/io/pbms/load.cc @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2009 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of the Milena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -26,13 +26,14 @@ // reasons why the executable file might be covered by the GNU General // Public License. -/// \file tests/io/pbm/pbm.cc +/// \file tests/io/pbms/load.cc /// -/// Test on mln::io::pbm::. +/// Test on mln::io::pbms::load.cc #include <mln/core/image/image2d.hh> #include <mln/core/image/image3d.hh> #include <mln/core/image/dmorph/slice_image.hh> +#include <mln/core/routine/duplicate.hh> #include <mln/io/pbm/load.hh> #include <mln/io/pbm/save.hh> @@ -47,18 +48,14 @@ int main() { using namespace mln; - image2d<bool> pic = io::pbm::load(MLN_IMG_DIR "/picasso.pbm"); - io::pbm::save(pic, "out.pbm"); - image2d<bool> pic2 = io::pbm::load("out.pbm"); - - mln_assertion(pic == pic2); - + image2d<bool> pic = io::pbm::load(MLN_IMG_DIR "/tiny.pbm"); + image2d<bool> pic2 = duplicate(pic); pic2(point2d(0,0)) = true; io::pbm::save(pic2, "out.pbm"); util::array<std::string> files(2); - files[0] = MLN_IMG_DIR "/picasso.pbm"; + files[0] = MLN_IMG_DIR "/tiny.pbm"; files[1] = "out.pbm"; image3d<bool> ima3d; @@ -71,12 +68,3 @@ int main() } -// sample binary image to test with xv, imview, and display -// to bring into the fore the binary image bug with raw pbm. - -// | | | | - -// | | - - - -// | - - - - -// - - - - - -// - - - - - -// - - - - - diff --git a/milena/tests/io/pgm/pgm.cc b/milena/tests/io/pgm/pgm.cc index 2d93006..0838cb9 100644 --- a/milena/tests/io/pgm/pgm.cc +++ b/milena/tests/io/pgm/pgm.cc @@ -41,7 +41,6 @@ #include <mln/io/pgm/load.hh> #include <mln/io/pgm/save.hh> -#include <mln/io/pgms/load.hh> #include <mln/data/compare.hh> @@ -73,23 +72,4 @@ int main() mln_assertion(lena2 == lena); } - { - image2d<int_u8> lena = io::pgm::load<int_u8>(MLN_IMG_DIR "/lena.pgm"); - - image2d<int_u8> lena2 = duplicate(lena); - lena2(point2d(0,0)) = 200; - - io::pgm::save(lena2, "out.pgm"); - - util::array<std::string> files(2); - files[0] = MLN_IMG_DIR "/lena.pgm"; - files[1] = "out.pgm"; - - image3d<int_u8> ima3d; - io::pgms::load(ima3d, files); - - mln_assertion(ima3d.nslices() == 2); - mln_assertion(slice(ima3d, 0) == lena); - mln_assertion(slice(ima3d, 1) == lena2); - } } diff --git a/milena/tests/io/pgms/Makefile.am b/milena/tests/io/pgms/Makefile.am new file mode 100644 index 0000000..3dbd00b --- /dev/null +++ b/milena/tests/io/pgms/Makefile.am @@ -0,0 +1,10 @@ +## Process this file through Automake to create Makefile.in. + +include $(top_srcdir)/milena/tests/tests.mk + +check_PROGRAMS = \ + load + +load_SOURCES = load.cc + +TESTS = $(check_PROGRAMS) diff --git a/milena/tests/io/pgm/pgm.cc b/milena/tests/io/pgms/load.cc similarity index 74% copy from milena/tests/io/pgm/pgm.cc copy to milena/tests/io/pgms/load.cc index 2d93006..9913077 100644 --- a/milena/tests/io/pgm/pgm.cc +++ b/milena/tests/io/pgms/load.cc @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2009 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of the Milena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -26,11 +26,9 @@ // reasons why the executable file might be covered by the GNU General // Public License. -/// \file tests/io/pgm/pgm.cc +/// \file tests/io/pgms/load.cc /// -/// Test on mln::io::pgm::load and mln::io::pgm::save. - - +/// Test on mln::io::pgms::load. #include <mln/core/image/image2d.hh> #include <mln/core/image/image3d.hh> @@ -56,25 +54,7 @@ int main() using value::int_u8; { - image2d<int_u8> lena = io::pgm::load<int_u8>(MLN_IMG_DIR "/lena.pgm"); - io::pgm::save(lena, "out.pgm"); - - image2d<int_u8> lena2 = io::pgm::load<int_u8>("out.pgm"); - mln_assertion(lena2 == lena); - } - - { - image2d< value::int_u<8> > lena, lena2; - io::pgm::load(lena, MLN_IMG_DIR "/lena.pgm"); - - io::pgm::save(lena, "out.pgm"); - - io::pgm::load(lena2, "out.pgm"); - mln_assertion(lena2 == lena); - } - - { - image2d<int_u8> lena = io::pgm::load<int_u8>(MLN_IMG_DIR "/lena.pgm"); + image2d<int_u8> lena = io::pgm::load<int_u8>(MLN_IMG_DIR "/tiny.pgm"); image2d<int_u8> lena2 = duplicate(lena); lena2(point2d(0,0)) = 200; @@ -82,7 +62,7 @@ int main() io::pgm::save(lena2, "out.pgm"); util::array<std::string> files(2); - files[0] = MLN_IMG_DIR "/lena.pgm"; + files[0] = MLN_IMG_DIR "/tiny.pgm"; files[1] = "out.pgm"; image3d<int_u8> ima3d; diff --git a/milena/tests/io/ppm/ppm.cc b/milena/tests/io/ppm/ppm.cc index bde91f4..8820ebf 100644 --- a/milena/tests/io/ppm/ppm.cc +++ b/milena/tests/io/ppm/ppm.cc @@ -38,7 +38,6 @@ #include <mln/io/ppm/load.hh> #include <mln/io/ppm/save.hh> -#include <mln/io/ppms/load.hh> #include <mln/data/compare.hh> @@ -60,21 +59,5 @@ int main() image2d<rgb8> lena2; io::ppm::load(lena2, "out.ppm"); mln_assertion(lena2 == lena); - - - - lena2(point2d(0,0)) = literal::green; - io::ppm::save(lena2, "out.ppm"); - - util::array<std::string> files(2); - files[0] = MLN_IMG_DIR "/lena.ppm"; - files[1] = "out.ppm"; - - image3d<rgb8> ima3d; - io::ppms::load(ima3d, files); - - mln_assertion(ima3d.nslices() == 2); - mln_assertion(slice(ima3d, 0) == lena); - mln_assertion(slice(ima3d, 1) == lena2); } diff --git a/milena/tests/io/ppms/Makefile.am b/milena/tests/io/ppms/Makefile.am new file mode 100644 index 0000000..3dbd00b --- /dev/null +++ b/milena/tests/io/ppms/Makefile.am @@ -0,0 +1,10 @@ +## Process this file through Automake to create Makefile.in. + +include $(top_srcdir)/milena/tests/tests.mk + +check_PROGRAMS = \ + load + +load_SOURCES = load.cc + +TESTS = $(check_PROGRAMS) diff --git a/milena/tests/io/ppm/ppm.cc b/milena/tests/io/ppms/load.cc similarity index 76% copy from milena/tests/io/ppm/ppm.cc copy to milena/tests/io/ppms/load.cc index bde91f4..b510853 100644 --- a/milena/tests/io/ppm/ppm.cc +++ b/milena/tests/io/ppms/load.cc @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2009 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of the Milena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -26,14 +26,15 @@ // reasons why the executable file might be covered by the GNU General // Public License. -/// \file tests/io/ppm/ppm.cc +/// \file tests/io/ppms/load.cc /// -/// Test on mln::io::ppm::load and mln::io::ppm::save. - +/// Test on mln::io::ppms::load.cc #include <mln/core/image/image2d.hh> #include <mln/core/image/image3d.hh> #include <mln/core/image/dmorph/slice_image.hh> +#include <mln/core/routine/duplicate.hh> + #include <mln/value/rgb8.hh> #include <mln/io/ppm/load.hh> @@ -54,27 +55,23 @@ int main() using namespace mln; using value::rgb8; - image2d<rgb8> lena = io::ppm::load<rgb8>(MLN_IMG_DIR "/lena.ppm"); - io::ppm::save(lena, "out.ppm"); - - image2d<rgb8> lena2; - io::ppm::load(lena2, "out.ppm"); - mln_assertion(lena2 == lena); - + image2d<rgb8> ima = io::ppm::load<rgb8>(MLN_IMG_DIR "/fly.ppm"); + io::ppm::save(ima, "out.ppm"); + image2d<rgb8> ima2 = duplicate(ima); - lena2(point2d(0,0)) = literal::green; - io::ppm::save(lena2, "out.ppm"); + ima2(point2d(0,0)) = literal::green; + io::ppm::save(ima2, "out.ppm"); util::array<std::string> files(2); - files[0] = MLN_IMG_DIR "/lena.ppm"; + files[0] = MLN_IMG_DIR "/fly.ppm"; files[1] = "out.ppm"; image3d<rgb8> ima3d; io::ppms::load(ima3d, files); mln_assertion(ima3d.nslices() == 2); - mln_assertion(slice(ima3d, 0) == lena); - mln_assertion(slice(ima3d, 1) == lena2); + mln_assertion(slice(ima3d, 0) == ima); + mln_assertion(slice(ima3d, 1) == ima2); } -- 1.5.6.5
15 years, 6 months
1
0
0
0
3997: Improve documentation build system.
by Guillaume Lazzara
* doc/Makefile.am, * doc/ref_guide/Makefile.am, * doc/tutorial/Makefile.am, * doc/white_paper/Makefile.am: Fix invalid rule names, revamp and update .PHONY. --- milena/ChangeLog | 10 ++++ milena/doc/Makefile.am | 95 +++++++++++++++++++++++++---------- milena/doc/ref_guide/Makefile.am | 10 +++- milena/doc/tutorial/Makefile.am | 15 ++++-- milena/doc/white_paper/Makefile.am | 33 ++++++++++++- 5 files changed, 129 insertions(+), 34 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index f39897a..3887983 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,3 +1,13 @@ +2009-06-05 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr> + + Improve documentation build system. + + * doc/Makefile.am, + * doc/ref_guide/Makefile.am, + * doc/tutorial/Makefile.am, + * doc/white_paper/Makefile.am: Fix invalid rule names, revamp and + update .PHONY. + 2009-06-05 Thierry Geraud <thierry.geraud(a)lrde.epita.fr> Some fixes. diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am index f1025b3..3e23eab 100644 --- a/milena/doc/Makefile.am +++ b/milena/doc/Makefile.am @@ -2,45 +2,80 @@ include $(top_srcdir)/milena/doc/doc.mk -SUBDIRS = tutorial white_paper +SUBDIRS = \ + tutorial \ + white_paper + DOXYGEN = doxygen -.PHONY: doc user-doc complete-doc html-complete html-user tutorial white-paper regen-dist examples -doc: user-doc tutorial white_paper ref-guide -complete-doc: html-complete +.PHONY: doc-all doc doc-html doc-dev doc-dev-html ref-doc-dev ref-doc-dev-html\ + ref-doc ref-doc-html tutorial tutorial-html white-paper \ + white-paper-html ref-guide ref-guide-html examples fix-refdata \ + fig-convert regen-dist + + +# Doxygen documentation output directory. +user: user-doc-html user-doc + + +doc-all: doc doc-html doc-dev doc-dev-html + + +doc: tutorial white-paper ref-guide ref-doc + +doc-html: tutorial-html white-paper-html ref-guide-html ref-doc-html + +doc-dev: tutorial ref-guide white-paper ref-doc-dev + +doc-dev-html: tutorial-html ref-guide-html white-paper-html ref-doc-dev-html + -user-doc: html-user -html-complete: Doxyfile tuto-html ref-guide-html +ref-doc-dev: Doxyfile examples + $(DOXYGEN) Doxyfile_complete_pdf + +ref-doc-dev-html: Doxyfile examples $(DOXYGEN) Doxyfile_complete -html-user: Doxyfile tuto-html ref-guide-html + +ref-doc: Doxyfile examples + $(DOXYGEN) Doxyfile_user_pdf + +ref-doc-html: Doxyfile examples $(DOXYGEN) Doxyfile_user -tuto-html: examples fig-convert - $(MAKE) -C tutorial tuto-html + tutorial: examples fig-convert - $(MAKE) -C tutorial tutorial + cd tutorial && $(MAKE) $(AM_MAKEFLAGS) $@ + +tutorial-html: examples fig-convert + cd tutorial && $(MAKE) $(AM_MAKEFLAGS) $@ + white-paper: - $(MAKE) -C white_paper white-paper + cd white_paper && $(MAKE) $(AM_MAKEFLAGS) $@ + +white-paper-html: + cd white_paper && $(MAKE) $(AM_MAKEFLAGS) $@ + -ref-guide: - $(MAKE) -C ref_guide ref-guide +ref-guide: examples + cd ref_guide && $(MAKE) $(AM_MAKEFLAGS) $@ -ref-guide-html: - $(MAKE) -C ref_guide ref-guide-html +ref-guide-html: examples + cd ref_guide && $(MAKE) $(AM_MAKEFLAGS) $@ examples: - make -C examples examples + cd examples && $(MAKE) $(AM_MAKEFLAGS) $@ + fix-refdata: - make -C examples fix-refdata + cd examples && $(MAKE) $(AM_MAKEFLAGS) $@ fig-convert: @failcom='exit 1'; \ @@ -58,11 +93,14 @@ edit = sed -e "s|@ID@|$$Id|" \ -e 's,@top_builddir\@,$(top_builddir),g' \ -e 's,@top_srcdir\@,$(top_srcdir),g' +edit_pdf = sed -e 's,GENERATE_LATEX = NO,GENERATE_LATEX = YES,g' \ + -e 's,GENERATE_HTML = YES,GENERATE_HTML = NO,g' + # FIXME: This is not good. We should set these parameters for both # documentation (complete and user) using @VARIABLES@. Don't generate # Doxyfile_user from Doxyfile_complete! Both should be a product # derived from a single source, Doxyfile.in. -edit_user = sed -e 's,OUTPUT_DIRECTORY = ./complete/,OUTPUT_DIRECTORY = ./user/,g' \ +edit_user = sed -e 's,OUTPUT_DIRECTORY = ./complete/,OUTPUT_DIRECTORY = ./user/,g' \ -e 's,EXTRACT_ALL = YES,EXTRACT_ALL = NO,g' \ -e 's,EXTRACT_PRIVATE = YES,EXTRACT_PRIVATE = NO,g' \ -e 's,EXTRACT_STATIC = YES,EXTRACT_STATIC = NO,g' \ @@ -98,12 +136,13 @@ include $(srcdir)/outputs/outputs.mk EXTRA_DIST += \ -Doxyfile.in \ -groups \ -user \ -tools/sample_utils.hh \ -tools/split_sample.sh \ -tools/todoxygen.sh + Doxyfile.in \ + groups \ + user \ + tools/clearbanner.sh \ + tools/sample_utils.hh \ + tools/split_sample.sh \ + tools/todoxygen.sh CLEANFILES = \ Doxyfile_complete \ @@ -114,9 +153,11 @@ Doxyfile_user # Moreover, this file is updated whenever ChangeLog is touched: using # sed instead of configure saves us a lot of time. Doxyfile: $(top_srcdir)/milena/ChangeLog $(srcdir)/Doxyfile.in - Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog`; \ - $(edit) $(srcdir)/Doxyfile.in >Doxyfile_complete && \ - $(edit_user) Doxyfile_complete >Doxyfile_user + Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog`; \ + $(edit) $(srcdir)/Doxyfile.in >Doxyfile_complete && \ + $(edit_pdf) Doxyfile_complete > Doxyfile_complete_pdf && \ + $(edit_user) Doxyfile_complete >Doxyfile_user && \ + $(edit_pdf) Doxyfile_user > Doxyfile_user_pdf clean-local: rm -rf complete user diff --git a/milena/doc/ref_guide/Makefile.am b/milena/doc/ref_guide/Makefile.am index 774d69f..82f0051 100644 --- a/milena/doc/ref_guide/Makefile.am +++ b/milena/doc/ref_guide/Makefile.am @@ -3,15 +3,21 @@ include $(top_srcdir)/milena/doc/doc.mk TEXINPUTS = $(DOC_SRCDIR):$(DOC_BUILDDIR):$(OUTPUTS_SRCDIR):$(IMG_SRCDIR): + ref-guide: TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/ref_guide.tex TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/ref_guide.tex TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/ref_guide.tex + +ref_guide.pdf: ref-guide + + ref-guide-html: chmod u+x $(DOC_SRCDIR)/tools/todoxygen.sh $(DOC_SRCDIR)/tools/todoxygen.sh $(srcdir)/ref_guide.tex $(DOC_BUILDDIR)/ref_guide $(DOC_SRCDIR) + clean-local: rm -f ref_guide.aux ref_guide.toc ref_guide.log ref_guide.bbl ref_guide.out rm -f *~ *blg *.lot @@ -19,6 +25,6 @@ clean-local: rm -f *.haux *.hh *.html *.htoc EXTRA_DIST = \ -ref_guide.tex \ -ref_guide.pdf + ref_guide.tex \ + ref_guide.pdf diff --git a/milena/doc/tutorial/Makefile.am b/milena/doc/tutorial/Makefile.am index ceeae75..eb53a0a 100644 --- a/milena/doc/tutorial/Makefile.am +++ b/milena/doc/tutorial/Makefile.am @@ -1,6 +1,7 @@ -.PHONY: tutorial tuto-html +.PHONY: tutorial tutorial-html include $(top_srcdir)/milena/doc/doc.mk + TEXINPUTS = $(DOC_SRCDIR):$(DOC_BUILDDIR):$(OUTPUTS_SRCDIR):$(IMG_SRCDIR): tutorial: @@ -8,17 +9,23 @@ tutorial: TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/tutorial.tex TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/tutorial.tex -tuto-html: + +tutorial.pdf: tutorial + + +tutorial-html: chmod u+x $(DOC_SRCDIR)/tools/todoxygen.sh $(DOC_SRCDIR)/tools/todoxygen.sh $(srcdir)/tutorial.tex $(DOC_BUILDDIR)/tutorial $(DOC_SRCDIR) + clean-local: rm -f tutorial.aux tutorial.toc tutorial.log tutorial.bbl tutorial.out rm -f *~ *blg *.lot rm -f tutorial.pdf rm -f *.haux *.hh *.html *.htoc + EXTRA_DIST = \ -tutorial.tex \ -tutorial.pdf + tutorial.tex \ + tutorial.pdf diff --git a/milena/doc/white_paper/Makefile.am b/milena/doc/white_paper/Makefile.am index e5d0986..cd44e29 100644 --- a/milena/doc/white_paper/Makefile.am +++ b/milena/doc/white_paper/Makefile.am @@ -1,8 +1,39 @@ include $(top_srcdir)/milena/doc/doc.mk -TEXINPUTS = $(DOC_SRCDIR):$(top_srcdir)/milena/doc/white_paper/figures: +TEXINPUTS = $(DOC_SRCDIR):$(srcdir)/figures: + +PNGS = \ + figures/house.png \ + figures/house_rag.png \ + figures/house_wshed.png \ + figures/house_wshed_mean_colors.png + +.png.eps: + convert $< $@ + +.PHONY: white-paper white-paper-html white-paper: TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/white_paper.tex TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/white_paper.tex TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/white_paper.tex +white-paper.pdf: white-paper + +white-paper-html: $(PNGS:png=eps) + mkdir -p white_paper_html + TEXINPUTS=$(TEXINPUTS) hevea -O -fix -I $(srcdir)/figures $(srcdir)/white_paper.tex -o white_paper_html/index.html + chmod +x $(top_srcdir)/milena/doc/tools/clearbanner.sh + $(top_srcdir)/milena/doc/tools/clearbanner.sh white_paper_html/index.html + +clean-local: + rm -Rf white_paper_html + rm -f *.eps + rm -f white_paper_image.* + rm -f white_paper.pdf + rm -f *.log *.idx *.out *.aux + +EXTRA_DIST = \ + white_paper.tex \ + white_paper.pdf \ + $(PNGS) + -- 1.5.6.5
15 years, 6 months
1
0
0
0
r3996: Tests around projected histograms for the report
by Etienne FOLIO
URL:
https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
ChangeLog: 2009-06-05 Etienne FOLIO <folio(a)lrde.epita.fr> Tests around projected histograms for the report. * folio/test/histo/classify_with_histo_rgb.cc: . * folio/test/histo/project_histo_add.cc: New. * folio/test/histo/project_screen.cc: New. * folio/test/histo/projected3d.cc: . * folio/test/value/comp.cc: New. --- histo/classify_with_histo_rgb.cc | 13 +++ histo/project_histo_add.cc | 138 ++++++++++++++++++++++++++++++++++++ histo/project_screen.cc | 149 +++++++++++++++++++++++++++++++++++++++ histo/projected3d.cc | 50 ++++++------- value/comp.cc | 9 ++ 5 files changed, 334 insertions(+), 25 deletions(-) Index: trunk/milena/sandbox/folio/test/histo/project_histo_add.cc =================================================================== --- trunk/milena/sandbox/folio/test/histo/project_histo_add.cc (revision 0) +++ trunk/milena/sandbox/folio/test/histo/project_histo_add.cc (revision 3996) @@ -0,0 +1,138 @@ +#include <mln/core/var.hh> + +#include <mln/core/image/image1d.hh> +#include <mln/core/image/image2d.hh> +#include <mln/core/image/dmorph/unproject_image.hh> +#include <mln/fun/v2v/projection.hh> + +#include <mln/core/image/dmorph/image_if.hh> +#include <mln/pw/value.hh> +#include <mln/data/transform.hh> +#include <mln/data/stretch.hh> + +#include <mln/arith/revert.hh> +#include <mln/core/alias/neighb3d.hh> +#include <mln/value/label_8.hh> + +#include <mln/morpho/closing/volume.hh> +#include <mln/morpho/watershed/flooding.hh> +#include <mln/morpho/elementary/dilation.hh> + +#include "../../mln/histo/compute_histo_rgb.hh" +#include "../../mln/histo/classify_with_histo_rgb.hh" + +#include <mln/accu/count.hh> +#include <mln/accu/mean.hh> +#include <mln/accu/sum.hh> +#include <mln/accu/image/init.hh> +#include <mln/accu/image/take.hh> +#include <mln/accu/image/to_result.hh> + +#include <mln/io/ppm/load.hh> +#include <mln/io/ppm/save.hh> +#include <mln/io/pgm/save.hh> +#include <mln/debug/println.hh> + + +namespace mln +{ + + struct rgb8to6 : Function_v2v< rgb8to6 > + { + typedef value::rgb<6> result; + value::rgb<6> operator()(const value::rgb<8>& c) const + { + value::rgb<6> res(c.red() / 4, c.green() / 4, c.blue() / 4); + return res; + } + }; + + struct take_log : Function_v2v< take_log > + { + typedef float result; + float operator()(float f) const + { + mln_precondition(f > 0); + return std::log(f + 1); + } + }; + + template <typename A, unsigned direction, typename V> + image2d<mln_result(A)> + project_histo(const image3d<V>& h) + { + image2d<A> h_2d_a(h.nrows(), h.ncols()); + accu::image::init(h_2d_a); + + accu::image::take( unproject( h_2d_a, + h.domain(), + fun::v2v::projection<point3d, direction>() ).rw(), + h ); + + return accu::image::to_result(h_2d_a); + } + +} + + +int main(int argc, char* argv[]) +{ + if (argc != 3) + { + std::cout << "Usage:" << std::endl + << "./a.out <ima_in> <ima_out>" << std::endl; + } + + using namespace mln; + + using value::int_u8; + typedef value::rgb<6> rgb6; + typedef value::int_u<6> int_u6; + + std::cout << " => loading " << argv[1] << "..." << std::endl; + image2d<value::rgb8> ima; + io::ppm::load(ima, argv[1]); +// image2d<rgb6> ima6 = data::transform(ima, rgb8to6()); + + std::cout << " => computing histogram..." << std::endl; + image3d<unsigned> histo = histo::compute_histo_rgb<unsigned>(ima); + + image2d<unsigned> proj = project_histo<accu::sum<unsigned, unsigned>, 2>(histo); + image2d<value::int_u8> proj_int = data::stretch( value::int_u8(), + data::transform( proj, + take_log() ) ); + io::pgm::save(proj_int, argv[2]); + +// std::cout << " => computing reverted histogram..." << std::endl; +// image3d<unsigned> reverted = arith::revert(histo); + +// std::cout << " => computing closure..." << std::endl; +// image3d<unsigned> closed = +// morpho::closing::volume(reverted, c6(), atoi(argv[2])); + +// std::cout << " => computing watershed..." << std::endl; +// value::label_8 nbasin; +// image3d<value::label_8> labels = +// morpho::watershed::flooding(closed, c6(), nbasin); +// std::cout << "found " << nbasin << " labels" << std::endl; + +// labels = morpho::elementary::dilation(labels, c18()); + +// std::cout << " => computing output labelized image..." << std::endl; +// image2d<value::label_8> lab = histo::classify_with_histo_rgb(ima, labels); + +// std::cout << " => computing projection..." << std::endl; + +// typedef accu::mean<int_u8, unsigned, int_u8> A; +// image2d<A> vmean(lab.nrows(), lab.ncols()); +// accu::image::init(vmean); +// { +// fun::v2v::projection<point3d, 0> vproj; +// mln_VAR( vmean_, unproject(vmean, lab.domain(), vproj) ); +// accu::image::take(vmean_, lab); +// } + +// std::cout << " => saving " << argv[2] << "..." << std::endl; +// io::ppm::save(vmean, argv[2]); + +} Index: trunk/milena/sandbox/folio/test/histo/project_screen.cc =================================================================== --- trunk/milena/sandbox/folio/test/histo/project_screen.cc (revision 0) +++ trunk/milena/sandbox/folio/test/histo/project_screen.cc (revision 3996) @@ -0,0 +1,149 @@ +#include <mln/core/var.hh> + +#include <mln/core/image/image1d.hh> +#include <mln/core/image/image2d.hh> +#include <mln/core/image/dmorph/unproject_image.hh> +#include <mln/fun/v2v/projection.hh> + +#include <mln/core/image/dmorph/image_if.hh> +#include <mln/pw/value.hh> +#include <mln/data/transform.hh> +#include <mln/data/stretch.hh> + +#include <mln/arith/revert.hh> +#include <mln/core/alias/neighb3d.hh> +#include <mln/value/label_8.hh> + +#include <mln/morpho/closing/volume.hh> +#include <mln/morpho/watershed/flooding.hh> +#include <mln/morpho/elementary/dilation.hh> + +#include "../../mln/histo/compute_histo_rgb.hh" +#include "../../mln/histo/classify_with_histo_rgb.hh" + +#include <mln/accu/count.hh> +#include <mln/accu/mean.hh> +#include <mln/accu/sum.hh> +#include <mln/accu/image/init.hh> +#include <mln/accu/image/take.hh> +#include <mln/accu/image/to_result.hh> + +#include <mln/io/ppm/load.hh> +#include <mln/io/ppm/save.hh> +#include <mln/io/pgm/save.hh> +#include <mln/debug/println.hh> + + +namespace mln +{ + + struct rgb8to6 : Function_v2v< rgb8to6 > + { + typedef value::rgb<6> result; + value::rgb<6> operator()(const value::rgb<8>& c) const + { + value::rgb<6> res(c.red() / 4, c.green() / 4, c.blue() / 4); + return res; + } + }; + + struct take_log : Function_v2v< take_log > + { + typedef float result; + float operator()(float f) const + { + mln_precondition(f > 0); + return std::log(f + 1); + } + }; + + template <typename A, unsigned direction, typename V> + image2d<mln_result(A)> + project_histo(const image3d<V>& h) + { + image2d<A> h_2d_a(h.nrows(), h.ncols()); + accu::image::init(h_2d_a); + + accu::image::take( unproject( h_2d_a, + h.domain(), + fun::v2v::projection<point3d, direction>() ).rw(), + h ); + + return accu::image::to_result(h_2d_a); + } + +void +save_proj_histo(image3d<unsigned> histo, char* name) +{ + std::cout << " => save..." << std::endl; + image2d<unsigned> proj = project_histo<accu::sum<unsigned, unsigned>, 2>(histo); + image2d<value::int_u8> proj_int = data::stretch( value::int_u8(), + data::transform( proj, + take_log() ) ); + io::pgm::save(proj_int, name); +} + +} + + +int main(int argc, char* argv[]) +{ + if (argc != 3) + { + std::cout << "Usage:" << std::endl + << "./a.out <ima_in> <ima_out>" << std::endl; + } + + using namespace mln; + + using value::int_u8; + typedef value::rgb<6> rgb6; + typedef value::int_u<6> int_u6; + + std::cout << " => loading " << argv[1] << "..." << std::endl; + image2d<value::rgb8> ima; + io::ppm::load(ima, argv[1]); + image2d<rgb6> ima6 = data::transform(ima, rgb8to6()); + + std::cout << " => computing histogram..." << std::endl; + image3d<unsigned> histo = histo::compute_histo_rgb<unsigned>(ima6); +// save_proj_histo(histo, argv[2]); + + std::cout << " => computing reverted histogram..." << std::endl; + image3d<unsigned> reverted = arith::revert(histo); + + std::cout << " => computing closure..." << std::endl; + image3d<unsigned> closed = + morpho::closing::volume(reverted, c6(), atoi(argv[3])); + + // std::cout << " => computing rereverted histo..." << std::endl; + // image3d<unsigned> reverted2 = arith::revert(closed); +// save_proj_histo(reverted2, argv[4]); + + std::cout << " => computing watershed..." << std::endl; + value::label_8 nbasin; + image3d<value::label_8> labels = + morpho::watershed::flooding(closed, c6(), nbasin); + std::cout << "found " << nbasin << " labels" << std::endl; + + labels = morpho::elementary::dilation(labels, c18()); + + std::cout << " => computing output labelized image..." << std::endl; + image2d<value::label_8> lab = histo::classify_with_histo_rgb(ima, labels); + io::pgm::save(lab, "labelized.pgm"); + +// std::cout << " => computing projection..." << std::endl; + +// typedef accu::mean<int_u8, unsigned, int_u8> A; +// image2d<A> vmean(lab.nrows(), lab.ncols()); +// accu::image::init(vmean); +// { +// fun::v2v::projection<point3d, 0> vproj; +// mln_VAR( vmean_, unproject(vmean, lab.domain(), vproj) ); +// accu::image::take(vmean_, lab); +// } + +// std::cout << " => saving " << argv[2] << "..." << std::endl; +// io::ppm::save(vmean, argv[2]); + +} Index: trunk/milena/sandbox/folio/test/histo/projected3d.cc =================================================================== --- trunk/milena/sandbox/folio/test/histo/projected3d.cc (revision 3995) +++ trunk/milena/sandbox/folio/test/histo/projected3d.cc (revision 3996) @@ -58,7 +58,7 @@ }; template <typename A, unsigned direction, typename V> - image2d<float> + image2d<mln_result(A)> project_histo(const image3d<V>& h) { image2d<A> h_2d_a(h.nrows(), h.ncols()); @@ -97,31 +97,31 @@ std::cout << " => computing histogram..." << std::endl; image3d<unsigned> histo = histo::compute_histo_rgb<unsigned>(ima); - image2d<float> proj = project_histo<accu::sum<unsigned>, 2>(histo); - image2d<value::int_u8> proj_int = data::stretch( value::int_u8(), - data::transform( proj, - take_log() ) ); - io::pgm::save(proj_int, argv[2]); - -// std::cout << " => computing reverted histogram..." << std::endl; -// image3d<unsigned> reverted = arith::revert(histo); - -// std::cout << " => computing closure..." << std::endl; -// image3d<unsigned> closed = -// morpho::closing::volume(reverted, c6(), atoi(argv[2])); - -// std::cout << " => computing watershed..." << std::endl; -// value::label_8 nbasin; -// image3d<value::label_8> labels = -// morpho::watershed::flooding(closed, c6(), nbasin); -// std::cout << "found " << nbasin << " labels" << std::endl; + // image2d<unsigned> proj = project_histo<accu::sum<unsigned, unsigned>, 2>(histo); + // image2d<value::int_u8> proj_int = data::stretch( value::int_u8(), + // data::transform( proj, + // take_log() ) ); + // io::pgm::save(proj_int, argv[2]); + + std::cout << " => computing reverted histogram..." << std::endl; + image3d<unsigned> reverted = arith::revert(histo); + + std::cout << " => computing closure..." << std::endl; + image3d<unsigned> closed = + morpho::closing::volume(reverted, c6(), atoi(argv[2])); + + std::cout << " => computing watershed..." << std::endl; + value::label_8 nbasin; + image3d<value::label_8> labels = + morpho::watershed::flooding(closed, c6(), nbasin); + std::cout << "found " << nbasin << " labels" << std::endl; -// labels = morpho::elementary::dilation(labels, c18()); + labels = morpho::elementary::dilation(labels, c18()); -// std::cout << " => computing output labelized image..." << std::endl; -// image2d<value::label_8> lab = histo::classify_with_histo_rgb(ima, labels); + std::cout << " => computing output labelized image..." << std::endl; + image2d<value::label_8> lab = histo::classify_with_histo_rgb(ima, labels); -// std::cout << " => computing projection..." << std::endl; + std::cout << " => computing projection..." << std::endl; // typedef accu::mean<int_u8, unsigned, int_u8> A; // image2d<A> vmean(lab.nrows(), lab.ncols()); @@ -132,7 +132,7 @@ // accu::image::take(vmean_, lab); // } -// std::cout << " => saving " << argv[2] << "..." << std::endl; -// io::ppm::save(vmean, argv[2]); + std::cout << " => saving " << argv[2] << "..." << std::endl; + io::ppm::save(vmean, argv[2]); } Index: trunk/milena/sandbox/folio/test/histo/classify_with_histo_rgb.cc =================================================================== --- trunk/milena/sandbox/folio/test/histo/classify_with_histo_rgb.cc (revision 3995) +++ trunk/milena/sandbox/folio/test/histo/classify_with_histo_rgb.cc (revision 3996) @@ -81,6 +81,19 @@ image3d<value::label_8> labels = morpho::watershed::flooding(closed, c6(), nbasin); std::cout << "found " << nbasin << " labels" << std::endl; + // // Create output image + // image2d<value::label_8> out; + // initialize(out, ima); + + // // Fill output image + // mln_fwd_piter_(image2d<rgb6>) p(ima.domain()); + // for_all(p) + // { + // // get 3d point in regions image. + // point3d p3 = point3d(ima(p).red(), ima(p).green(), ima(p).blue()); + // out(p) = labels(p3); + // } + labels = morpho::elementary::dilation(labels, c18()); std::cout << " => computing output labelized image..." << std::endl; Index: trunk/milena/sandbox/folio/test/value/comp.cc =================================================================== --- trunk/milena/sandbox/folio/test/value/comp.cc (revision 0) +++ trunk/milena/sandbox/folio/test/value/comp.cc (revision 3996) @@ -0,0 +1,9 @@ +#include <iostream> +#include <mln/value/rgb8.hh> + +int main() +{ + using namespace mln; + value::rgb8 v(1, 2, 3); + std::cout << v.comp(0); // Prints `1' +}
15 years, 6 months
1
0
0
0
3995: Some fixes.
by Thierry Geraud
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog from Thierry Geraud <thierry.geraud(a)lrde.epita.fr> Some fixes. * mln/core/routine/exact.hh: Add doc; remove FIXME. * mln/core/internal/exact.hh: Layout. * mln/core/internal/exact_gcc_2_95.hh: Fix missing include. (mln_exact): Change to its definition. * mln/pw/cst.hh: Fix missing includes. Add documentation. * mln/fun/v2v/hsl_to_rgb.hh (todo): New; for Etienne. * tests/fun/v2v/hsl_to_rgb.cc (todo): New; for Etienne. (using): Move inside main. (main): De-activate erroneous test. mln/core/internal/exact.hh | 1 + mln/core/internal/exact_gcc_2_95.hh | 21 ++++++++++++--------- mln/core/routine/exact.hh | 10 ++++++++-- mln/fun/v2v/hsl_to_rgb.hh | 6 ++++-- mln/pw/cst.hh | 10 ++++++---- tests/fun/v2v/hsl_to_rgb.cc | 19 +++++++++---------- 6 files changed, 40 insertions(+), 27 deletions(-) Index: mln/core/routine/exact.hh --- mln/core/routine/exact.hh (revision 3994) +++ mln/core/routine/exact.hh (working copy) @@ -33,12 +33,17 @@ /// /// \brief Definition of the mln::exact downcast routines. -/// FIXME: Doc! + +/// \brief Access to the exact type of type \a T. +// +// Tech note: These macros have to be defined just here! Do not +// move them elsewhere. +// #define mln_exact(T) typename mln::internal::exact_<T>::ret #define mln_exact_(T) mln::internal::exact_<T>::ret -#include <mln/core/internal/exact.hh> +#include <mln/core/internal/exact.hh> # if defined(__GNUC__) && __GNUC__ < 3 @@ -46,6 +51,7 @@ # else + namespace mln { Index: mln/core/internal/exact.hh --- mln/core/internal/exact.hh (revision 3994) +++ mln/core/internal/exact.hh (working copy) @@ -34,6 +34,7 @@ /// \brief Meta-code for the mln::exact downcast routines. + /// Forward declaration. namespace mln { Index: mln/core/internal/exact_gcc_2_95.hh --- mln/core/internal/exact_gcc_2_95.hh (revision 3994) +++ mln/core/internal/exact_gcc_2_95.hh (working copy) @@ -33,6 +33,9 @@ /// \brief Definition of the mln::exact downcast routines /// for g++-2.95. +# include <mln/core/internal/exact.hh> + + namespace mln { @@ -45,7 +48,7 @@ template <typename T> struct exact_gcc_2_95 { - typedef mln_exact(T) E; + typedef typename mln::internal::exact_<T>::ret E; typedef E& ret; static ret run(T& t) { @@ -56,7 +59,7 @@ template <typename T> struct exact_gcc_2_95< const T > { - typedef mln_exact(T) E; + typedef typename mln::internal::exact_<T>::ret E; typedef const E& ret; static ret run(T& t) { @@ -67,7 +70,7 @@ template <typename T> struct exact_gcc_2_95< T* > { - typedef mln_exact(T) E; + typedef typename mln::internal::exact_<T>::ret E; typedef E* ret; static ret run(T* t) { @@ -78,7 +81,7 @@ template <typename T> struct exact_gcc_2_95< const T* > { - typedef mln_exact(T) E; + typedef typename mln::internal::exact_<T>::ret E; typedef const E* ret; static ret run(const T* t) { @@ -93,7 +96,7 @@ template <typename T> struct exact_const_gcc_2_95 { - typedef mln_exact(T) E; + typedef typename mln::internal::exact_<T>::ret E; typedef const E& ret; static ret run(T& t) { @@ -104,7 +107,7 @@ template <typename T> struct exact_const_gcc_2_95< const T > { - typedef mln_exact(T) E; + typedef typename mln::internal::exact_<T>::ret E; typedef const E& ret; static ret run(T& t) { @@ -115,7 +118,7 @@ template <typename T> struct exact_const_gcc_2_95< T* > { - typedef mln_exact(T) E; + typedef typename mln::internal::exact_<T>::ret E; typedef E* ret; static ret run(T* t) { @@ -126,7 +129,7 @@ template <typename T> struct exact_const_gcc_2_95< const T*const > { - typedef mln_exact(T) E; + typedef typename mln::internal::exact_<T>::ret E; typedef const E* ret; static ret run(T* t) { @@ -137,7 +140,7 @@ template <typename T> struct exact_const_gcc_2_95< const T* > { - typedef mln_exact(T) E; + typedef typename mln::internal::exact_<T>::ret E; typedef const E* ret; static ret run(const T* t) { Index: mln/pw/cst.hh --- mln/pw/cst.hh (revision 3994) +++ mln/pw/cst.hh (working copy) @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory -// (LRDE) +// Copyright (C) 2007, 2008, 2009 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of the Milena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -31,15 +31,17 @@ /// \file mln/pw/cst.hh /// -/// FIXME. +/// \brief Definition of a constant function. # include <mln/fun/internal/selector.hh> +# include <mln/value/equiv.hh> +# include <mln/value/concept/scalar.hh> namespace mln { - // Forward declaration + // Forward declarations namespace pw { Index: mln/fun/v2v/hsl_to_rgb.hh --- mln/fun/v2v/hsl_to_rgb.hh (revision 3994) +++ mln/fun/v2v/hsl_to_rgb.hh (working copy) @@ -31,8 +31,9 @@ /// \file mln/fun/v2v/hsl_to_rgb.hh /// -/// Convert hsl values to rgb. - +/// \brief Convert HSL values to RGB. +/// +/// \todo Etienne: Remove the global variables! # include <cmath> @@ -137,4 +138,5 @@ } // end of namespace mln + #endif // ! MLN_FUN_V2V_HSL_TO_RGB_HH Index: tests/fun/v2v/hsl_to_rgb.cc --- tests/fun/v2v/hsl_to_rgb.cc (revision 3994) +++ tests/fun/v2v/hsl_to_rgb.cc (working copy) @@ -27,19 +27,21 @@ /// \file tests/fun/v2v/hsl_to_rgb.cc /// -/// Test HSL-to-RGB conversion. +/// \brief Test HSL-to-RGB conversion. +/// +/// \todo Etienne: Have it work! (Test has been de-activated.) #include <mln/core/image/image2d.hh> - #include <mln/fun/v2v/hsl_to_rgb.hh> - #include <mln/data/compare.hh> #include <mln/data/transform.hh> - #include <mln/value/hsl.hh> #include <mln/value/rgb8.hh> -#include <mln/debug/println.hh> + +int main() +{ + using namespace mln; using mln::value::rgb8; using mln::value::hsl_f; @@ -50,16 +52,13 @@ hsl_f dat[][2] = { { hsl_f(0,0,0), hsl_f(0,0,255) }, { hsl_f(0,0,128), hsl_f(0,0,90) } }; -int main() -{ - using namespace mln; - image2d<rgb8> ref_ima = make::image(ref); image2d<hsl_f> ima = make::image(dat); image2d<value::rgb8> ima_rgb = data::transform(ima, fun::v2v::f_hsl_to_rgb_3x8); - mln_assertion(ima_rgb == ref_ima); + // mln_assertion(ima_rgb == ref_ima); + (void) ima_rgb; }
15 years, 6 months
1
0
0
0
milena r3994: Update headers for pnm test files
by Fabien Freling
URL:
https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog: 2009-06-05 Fabien Freling <fabien.freling(a)lrde.epita.fr> Update headers for pnm test files. * mln/io/pbms/load.hh: Update load() call. * tests/io/pbm/pbm.cc: Update headers. * tests/io/pgm/pgm.cc: Update headers. * tests/io/ppm/ppm.cc: Update headers. --- 0 files changed
15 years, 6 months
1
0
0
0
← Newer
1
...
27
28
29
30
31
32
33
...
36
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Results per page:
10
25
50
100
200