Olena-patches
Threads by month
- ----- 2025 -----
- 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
April 2013
- 7 participants
- 363 discussions

olena: olena-2.0-556-g0df5023 Create sub-modules in image geometry module.
by Guillaume Lazzara 19 Apr '13
by Guillaume Lazzara 19 Apr '13
19 Apr '13
* doc/mln/geom/geom.dox: Add cropping sub-module.
* doc/mln/transformation.dox: Add new sub-modules.
* mln/binarization/threshold.hh: Move to conversion module.
* mln/geom/crop.hh,
* mln/geom/crop_without_localization.hh,
* mln/geom/horizontal_symmetry.hh,
* mln/geom/rotate.hh,
* mln/geom/translate.hh,
* mln/geom/vertical_symmetry.hh,
* mln/registration/icp.hh,
* mln/subsampling/antialiased.hh,
* mln/upscaling/art/scale2x.hh,
* mln/upscaling/art/scale3x.hh: Move to newly created sub-modules.
---
milena/ChangeLog | 21 +++++++++++++
milena/doc/mln/geom/geom.dox | 7 ++++
milena/doc/mln/transformation.dox | 41 ++++++++++++++++++++++++++
milena/mln/binarization/threshold.hh | 2 +-
milena/mln/geom/crop.hh | 2 +-
milena/mln/geom/crop_without_localization.hh | 2 +-
milena/mln/geom/horizontal_symmetry.hh | 2 +-
milena/mln/geom/rotate.hh | 10 +++---
milena/mln/geom/translate.hh | 10 +++---
milena/mln/geom/vertical_symmetry.hh | 2 +-
milena/mln/registration/icp.hh | 4 +-
milena/mln/subsampling/antialiased.hh | 4 +-
milena/mln/upscaling/art/scale2x.hh | 2 +-
milena/mln/upscaling/art/scale3x.hh | 2 +-
14 files changed, 90 insertions(+), 21 deletions(-)
create mode 100644 milena/doc/mln/geom/geom.dox
create mode 100644 milena/doc/mln/transformation.dox
diff --git a/milena/ChangeLog b/milena/ChangeLog
index bd4a0d2..334f804 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,26 @@
2013-04-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Create sub-modules in image geometry module.
+
+ * doc/mln/geom/geom.dox: Add cropping sub-module.
+
+ * doc/mln/transformation.dox: Add new sub-modules.
+
+ * mln/binarization/threshold.hh: Move to conversion module.
+
+ * mln/geom/crop.hh,
+ * mln/geom/crop_without_localization.hh,
+ * mln/geom/horizontal_symmetry.hh,
+ * mln/geom/rotate.hh,
+ * mln/geom/translate.hh,
+ * mln/geom/vertical_symmetry.hh,
+ * mln/registration/icp.hh,
+ * mln/subsampling/antialiased.hh,
+ * mln/upscaling/art/scale2x.hh,
+ * mln/upscaling/art/scale3x.hh: Move to newly created sub-modules.
+
+2013-04-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+
* doc/mln/convert.dox: Fix typos.
2013-04-19 Guillaume Lazzara <z(a)lrde.epita.fr>
diff --git a/milena/doc/mln/geom/geom.dox b/milena/doc/mln/geom/geom.dox
new file mode 100644
index 0000000..fae82c5
--- /dev/null
+++ b/milena/doc/mln/geom/geom.dox
@@ -0,0 +1,7 @@
+/*! \defgroup geomcrop Cropping
+ *
+ * \brief All crop algorithms.
+ *
+ * \ingroup mlngeom
+*/
+
diff --git a/milena/doc/mln/transformation.dox b/milena/doc/mln/transformation.dox
new file mode 100644
index 0000000..6b005e4
--- /dev/null
+++ b/milena/doc/mln/transformation.dox
@@ -0,0 +1,41 @@
+/*! \defgroup transformationrotate Rotation
+ *
+ * \brief All Rotation algorithms.
+ *
+ * \ingroup mlntransformation
+ */
+
+/*! \defgroup transformationtranslate Translation
+ *
+ * \brief All translation algorithms.
+ *
+ * \ingroup mlntransformation
+ */
+
+/*! \defgroup transformationupscaling Upscaling
+ *
+ * \brief All upscaling algorithms.
+ *
+ * \ingroup mlntransformation
+ */
+
+/*! \defgroup transformationsubsampling Subsampling
+ *
+ * \brief All subsampling algorithms.
+ *
+ * \ingroup mlntransformation
+ */
+
+/*! \defgroup transformationregistration Registration
+ *
+ * \brief All registration algorithms.
+ *
+ * \ingroup mlntransformation
+ */
+
+/*! \defgroup transformationsymmetry Symmetry
+ *
+ * \brief All symmetry algorithms.
+ *
+ * \ingroup mlntransformation
+ */
diff --git a/milena/mln/binarization/threshold.hh b/milena/mln/binarization/threshold.hh
index f2b1996..80dbd06 100644
--- a/milena/mln/binarization/threshold.hh
+++ b/milena/mln/binarization/threshold.hh
@@ -51,7 +51,7 @@ namespace mln
If input(p) is greater or equal than the threshold, the
value in the output image in the same point will be TRUE, else FALSE.
- \ingroup mlngeom
+ \ingroup convert
*/
template <typename I>
mln_ch_value(I, bool)
diff --git a/milena/mln/geom/crop.hh b/milena/mln/geom/crop.hh
index 7f557be..328fbe4 100644
--- a/milena/mln/geom/crop.hh
+++ b/milena/mln/geom/crop.hh
@@ -43,7 +43,7 @@ namespace mln
/*! \brief Crop an image
- \ingroup mlntransformation
+ \ingroup transformationcrop
*/
template <typename I, typename B>
mln_concrete(I) crop(const Image<I>& input, const Box<B>& b);
diff --git a/milena/mln/geom/crop_without_localization.hh b/milena/mln/geom/crop_without_localization.hh
index b2a5858..6c5a395 100644
--- a/milena/mln/geom/crop_without_localization.hh
+++ b/milena/mln/geom/crop_without_localization.hh
@@ -45,7 +45,7 @@ namespace mln
/*! \brief Crop an image. Localization between input and output
* may not be preserved.
- \ingroup mlntransformation
+ \ingroup transformationcrop
*/
template <typename I, typename B>
mln_concrete(I) crop_without_localization(const Image<I>& input,
diff --git a/milena/mln/geom/horizontal_symmetry.hh b/milena/mln/geom/horizontal_symmetry.hh
index 558c26d..d5b075b 100644
--- a/milena/mln/geom/horizontal_symmetry.hh
+++ b/milena/mln/geom/horizontal_symmetry.hh
@@ -43,7 +43,7 @@ namespace mln
/*! \brief Perfoms a horizontal symmetry.
- \ingroup mlntransformation
+ \ingroup transformationsymmetry
*/
template <typename I>
mln_concrete(I)
diff --git a/milena/mln/geom/rotate.hh b/milena/mln/geom/rotate.hh
index ce0dbef..e9e8f64 100644
--- a/milena/mln/geom/rotate.hh
+++ b/milena/mln/geom/rotate.hh
@@ -79,7 +79,7 @@ namespace mln
\return An image with the same domain as \p input.
- \ingroup mlntransformation
+ \ingroup transformationrotate
*/
template <typename I, typename Ext, typename S>
mln_concrete(I)
@@ -89,7 +89,7 @@ namespace mln
/*! \overload
- \ingroup mlntransformation
+ \ingroup transformationrotate
*/
template <typename I, typename Ext>
mln_concrete(I)
@@ -99,7 +99,7 @@ namespace mln
/*! \overload
Use literal::zero as default value for the extension.
- \ingroup mlntransformation
+ \ingroup transformationrotate
*/
template <typename I>
mln_concrete(I)
@@ -111,7 +111,7 @@ namespace mln
FIXME: the return type may be too generic and may lead to
invalid covariance.
- \ingroup mlntransformation
+ \ingroup transformationrotate
*/
template <typename B>
B
@@ -121,7 +121,7 @@ namespace mln
The rotation center \p ref is set to box.pcenter().
- \ingroup mlntransformation
+ \ingroup transformationrotate
*/
template <typename B>
B
diff --git a/milena/mln/geom/translate.hh b/milena/mln/geom/translate.hh
index 73a0f72..52b5431 100644
--- a/milena/mln/geom/translate.hh
+++ b/milena/mln/geom/translate.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2012 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2012, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -68,7 +68,7 @@ namespace mln
\return An image with the same domain as \p input.
- \ingroup mlntransformation
+ \ingroup transformationtranslate
*/
template <typename I, typename V, typename Ext, typename S>
mln_concrete(I)
@@ -79,7 +79,7 @@ namespace mln
/*! \overload
- \ingroup mlntransformation
+ \ingroup transformationtranslate
*/
template <typename I, typename V, typename Ext>
mln_concrete(I)
@@ -91,7 +91,7 @@ namespace mln
/*! \overload
Use literal::zero as default value for the extension.
- \ingroup mlntransformation
+ \ingroup transformationtranslate
*/
template <typename I, typename V>
mln_concrete(I)
diff --git a/milena/mln/geom/vertical_symmetry.hh b/milena/mln/geom/vertical_symmetry.hh
index 9ae2885..9dd4017 100644
--- a/milena/mln/geom/vertical_symmetry.hh
+++ b/milena/mln/geom/vertical_symmetry.hh
@@ -43,7 +43,7 @@ namespace mln
/*! \brief Perfoms a vertical symmetry.
- \ingroup mlntransformation
+ \ingroup transformationsymmetry
*/
template <typename I>
mln_concrete(I)
diff --git a/milena/mln/registration/icp.hh b/milena/mln/registration/icp.hh
index 1176802..12ce306 100644
--- a/milena/mln/registration/icp.hh
+++ b/milena/mln/registration/icp.hh
@@ -109,7 +109,7 @@ namespace mln
*
* This implementation is based on \cite besl1992pami.
*
- * \ingroup mlntransformation
+ * \ingroup transformationregistration
*/
template <typename P, typename F>
std::pair<algebra::quat,mln_vec(P)>
@@ -130,7 +130,7 @@ namespace mln
* \return the rigid transformation which may be use later to create
* a registered image.
*
- * \ingroup mlntransformation
+ * \ingroup transformationregistration
*/
template <typename P, typename F>
composed< translation<P::dim,float>,rotation<P::dim,float> >
diff --git a/milena/mln/subsampling/antialiased.hh b/milena/mln/subsampling/antialiased.hh
index 1bf5f57..8a811f4 100644
--- a/milena/mln/subsampling/antialiased.hh
+++ b/milena/mln/subsampling/antialiased.hh
@@ -55,7 +55,7 @@ namespace mln
values. It can be larger than the minimum size required to store
all the image values.
- \ingroup mlntransformation
+ \ingroup transformationsubsampling
*/
template <typename I>
inline
@@ -71,7 +71,7 @@ namespace mln
The output_domain is set to the minimum domain size required to
store all the image values. This is the common use case.
- \ingroup mlntransformation
+ \ingroup transformationsubsampling
*/
template <typename I>
mln_concrete(I)
diff --git a/milena/mln/upscaling/art/scale2x.hh b/milena/mln/upscaling/art/scale2x.hh
index 2d50bee..59c5efe 100644
--- a/milena/mln/upscaling/art/scale2x.hh
+++ b/milena/mln/upscaling/art/scale2x.hh
@@ -59,7 +59,7 @@ namespace mln
Source:
http://en.wikipedia.org/wiki/Pixel_art_scaling_algorithms
- \ingroup mlntransformation
+ \ingroup transformationupscaling
*/
template <typename I>
mln_concrete(I)
diff --git a/milena/mln/upscaling/art/scale3x.hh b/milena/mln/upscaling/art/scale3x.hh
index 4400a79..3c55592 100644
--- a/milena/mln/upscaling/art/scale3x.hh
+++ b/milena/mln/upscaling/art/scale3x.hh
@@ -59,7 +59,7 @@ namespace mln
Source:
http://en.wikipedia.org/wiki/Pixel_art_scaling_algorithms
- \ingroup mlntransformation
+ \ingroup transformationupscaling
*/
template <typename I>
mln_concrete(I)
--
1.7.2.5
1
0

19 Apr '13
---
milena/ChangeLog | 4 ++++
milena/doc/mln/convert.dox | 6 +++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 86129ef..6c8c7c7 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,9 @@
2013-04-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+ * doc/mln/convert.dox: Fix typos.
+
+2013-04-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Add documentation about image conversions.
* doc/mln/convert.dox: Add examples and explanations.
diff --git a/milena/doc/mln/convert.dox b/milena/doc/mln/convert.dox
index 158fb43..60319fd 100644
--- a/milena/doc/mln/convert.dox
+++ b/milena/doc/mln/convert.dox
@@ -5,7 +5,7 @@
Type conversions in Olena mainly relies on convert::from_to(). This
routine works on a single value only.
- Type conversion of image value types relies on data::convert. This
+ Type conversion of image value types relies on data::convert(). This
routine relies on convert::from_to(). For each pixel value,
convert::from_to() is called.
@@ -47,7 +47,7 @@
\code
$ g++ -I$OLN/milena main.cc
...
- /my/path/to/oln/milena/mln/convert/from_to.hh:152:5: error: ‘check’ is not a member of ‘mln::metal::abort_<mln::value::rgb<8u> >’
+ /my/path/to/oln/milena/mln/convert/from_to.hh:152:5: error: 'check' is not a member of 'mln::metal::abort_<mln::value::rgb<8u> >'
\endcode
Missing conversion is sometimes due to non-trivial
@@ -114,7 +114,7 @@
\endcode
- If a program requires conversions that are not provided by default
+ If a program requires conversions that are not provided by default,
they can be defined manually by declaring a from_to_()
overload. Default overloads are listed in module \ref fromto.
--
1.7.2.5
1
0

19 Apr '13
---
milena/ChangeLog | 4 ++++
milena/doc/mln/convert.dox | 6 +++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index b1cba37..bd4a0d2 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,9 @@
2013-04-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+ * doc/mln/convert.dox: Fix typos.
+
+2013-04-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Add documentation about image conversions.
* doc/mln/convert.dox: Add examples and explanations.
diff --git a/milena/doc/mln/convert.dox b/milena/doc/mln/convert.dox
index 158fb43..60319fd 100644
--- a/milena/doc/mln/convert.dox
+++ b/milena/doc/mln/convert.dox
@@ -5,7 +5,7 @@
Type conversions in Olena mainly relies on convert::from_to(). This
routine works on a single value only.
- Type conversion of image value types relies on data::convert. This
+ Type conversion of image value types relies on data::convert(). This
routine relies on convert::from_to(). For each pixel value,
convert::from_to() is called.
@@ -47,7 +47,7 @@
\code
$ g++ -I$OLN/milena main.cc
...
- /my/path/to/oln/milena/mln/convert/from_to.hh:152:5: error: ‘check’ is not a member of ‘mln::metal::abort_<mln::value::rgb<8u> >’
+ /my/path/to/oln/milena/mln/convert/from_to.hh:152:5: error: 'check' is not a member of 'mln::metal::abort_<mln::value::rgb<8u> >'
\endcode
Missing conversion is sometimes due to non-trivial
@@ -114,7 +114,7 @@
\endcode
- If a program requires conversions that are not provided by default
+ If a program requires conversions that are not provided by default,
they can be defined manually by declaring a from_to_()
overload. Default overloads are listed in module \ref fromto.
--
1.7.2.5
1
0
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch exp/newdoc has been updated
via 64752940c947d09ef82306107adde7e9d6f33cda (commit)
from a8d117672fb512482f7a098499a41e99a53fa445 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
6475294 Add documentation about image conversions.
-----------------------------------------------------------------------
Summary of changes:
milena/ChangeLog | 24 +++++
milena/doc/mln/convert.dox | 165 +++++++++++++++++++++++++++++++-
milena/mln/convert/from_to.hh | 2 +-
milena/mln/convert/to.hh | 19 ++++-
milena/mln/convert/to_image.hh | 28 ++++-
milena/mln/convert/to_p_array.hh | 21 +++-
milena/mln/convert/to_p_set.hh | 35 ++++++--
milena/mln/convert/to_qimage.hh | 18 +++-
milena/mln/convert/to_qimage_nocopy.hh | 24 +++++-
milena/mln/convert/to_upper_window.hh | 14 ++-
milena/mln/convert/to_window.hh | 23 ++++-
milena/mln/data/convert.hh | 38 +++++++-
milena/mln/fun/v2v/convert.hh | 16 +++-
milena/mln/fun/v2v/hsl_to_rgb.hh | 13 ++-
milena/mln/fun/v2v/qt_rgb_to_int_u.hh | 8 ++-
milena/mln/fun/v2v/rgb8_to_rgbn.hh | 31 +++---
milena/mln/fun/v2v/rgb_to_hsl.hh | 27 +++++-
milena/mln/fun/v2v/rgb_to_int_u.hh | 15 +++-
milena/mln/fun/v2v/rgb_to_luma.hh | 13 +++-
19 files changed, 460 insertions(+), 74 deletions(-)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0

olena: olena-2.0-554-g6475294 Add documentation about image conversions.
by Guillaume Lazzara 19 Apr '13
by Guillaume Lazzara 19 Apr '13
19 Apr '13
* doc/mln/convert.dox: Add examples and explanations.
* mln/convert/from_to.hh,
* mln/convert/to.hh,
* mln/convert/to_image.hh,
* mln/convert/to_p_array.hh,
* mln/convert/to_p_set.hh,
* mln/convert/to_qimage.hh,
* mln/convert/to_qimage_nocopy.hh,
* mln/convert/to_upper_window.hh,
* mln/convert/to_window.hh,
* mln/data/convert.hh,
* mln/fun/v2v/convert.hh,
* mln/fun/v2v/hsl_to_rgb.hh,
* mln/fun/v2v/qt_rgb_to_int_u.hh,
* mln/fun/v2v/rgb8_to_rgbn.hh,
* mln/fun/v2v/rgb_to_hsl.hh,
* mln/fun/v2v/rgb_to_int_u.hh,
* mln/fun/v2v/rgb_to_luma.hh: Add to conversion module.
---
milena/ChangeLog | 24 +++++
milena/doc/mln/convert.dox | 165 +++++++++++++++++++++++++++++++-
milena/mln/convert/from_to.hh | 2 +-
milena/mln/convert/to.hh | 19 ++++-
milena/mln/convert/to_image.hh | 28 ++++-
milena/mln/convert/to_p_array.hh | 21 +++-
milena/mln/convert/to_p_set.hh | 35 ++++++--
milena/mln/convert/to_qimage.hh | 18 +++-
milena/mln/convert/to_qimage_nocopy.hh | 24 +++++-
milena/mln/convert/to_upper_window.hh | 14 ++-
milena/mln/convert/to_window.hh | 23 ++++-
milena/mln/data/convert.hh | 38 +++++++-
milena/mln/fun/v2v/convert.hh | 16 +++-
milena/mln/fun/v2v/hsl_to_rgb.hh | 13 ++-
milena/mln/fun/v2v/qt_rgb_to_int_u.hh | 8 ++-
milena/mln/fun/v2v/rgb8_to_rgbn.hh | 31 +++---
milena/mln/fun/v2v/rgb_to_hsl.hh | 27 +++++-
milena/mln/fun/v2v/rgb_to_int_u.hh | 15 +++-
milena/mln/fun/v2v/rgb_to_luma.hh | 13 +++-
19 files changed, 460 insertions(+), 74 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 3f29bbc..b1cba37 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,29 @@
2013-04-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Add documentation about image conversions.
+
+ * doc/mln/convert.dox: Add examples and explanations.
+
+ * mln/convert/from_to.hh,
+ * mln/convert/to.hh,
+ * mln/convert/to_image.hh,
+ * mln/convert/to_p_array.hh,
+ * mln/convert/to_p_set.hh,
+ * mln/convert/to_qimage.hh,
+ * mln/convert/to_qimage_nocopy.hh,
+ * mln/convert/to_upper_window.hh,
+ * mln/convert/to_window.hh,
+ * mln/data/convert.hh,
+ * mln/fun/v2v/convert.hh,
+ * mln/fun/v2v/hsl_to_rgb.hh,
+ * mln/fun/v2v/qt_rgb_to_int_u.hh,
+ * mln/fun/v2v/rgb8_to_rgbn.hh,
+ * mln/fun/v2v/rgb_to_hsl.hh,
+ * mln/fun/v2v/rgb_to_int_u.hh,
+ * mln/fun/v2v/rgb_to_luma.hh: Add to conversion module.
+
+2013-04-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Add references to from_to_ overloads in documentation.
* mln/algebra/h_mat.hh,
diff --git a/milena/doc/mln/convert.dox b/milena/doc/mln/convert.dox
index bb2b1e6..158fb43 100644
--- a/milena/doc/mln/convert.dox
+++ b/milena/doc/mln/convert.dox
@@ -1,9 +1,164 @@
/*! \defgroup convert Convertion Routines
- *
- * \brief All conversion routines provided in Milena.
- *
- * \ingroup modroutines
- */
+
+ \brief All conversion routines provided in Milena.
+
+ Type conversions in Olena mainly relies on convert::from_to(). This
+ routine works on a single value only.
+
+ Type conversion of image value types relies on data::convert. This
+ routine relies on convert::from_to(). For each pixel value,
+ convert::from_to() is called.
+
+ Examples of use:
+ \code
+ image2d<value::int_u8> ima_gl;
+ // Initialization of ima_gl.
+ // ...
+ image2d<value::rgb8> ima_color = mln::data::convert(value::rgb8(), ima_gl);
+ \endcode
+
+ \code
+ image2d<value::int_u8> ima_gl;
+ // Initialization of ima_gl.
+ // ...
+ image2d<bool> ima_b = mln::data::convert(bool(), ima_gl);
+ \endcode
+
+
+ Sometimes, no default conversion is available from type \c
+ mln_value(I) to \c V. It fails with a compilation error such as:
+
+ \code
+ #include <mln/core/image/image2d.hh>
+ #include <mln/data/convert.hh>
+ #include <mln/value/int_u8.hh>
+ #include <mln/value/rgb8.hh>
+
+ int main()
+ {
+ using namespace mln;
+
+ image2d<value::rgb8> ima_color;
+ // Initialization of ima_color
+ // ...
+ image2d<value::int_u8> ima_gl = data::convert(value::int_u8(), ima_color);
+ }
+ \endcode
+ \code
+ $ g++ -I$OLN/milena main.cc
+ ...
+ /my/path/to/oln/milena/mln/convert/from_to.hh:152:5: error: ‘check’ is not a member of ‘mln::metal::abort_<mln::value::rgb<8u> >’
+ \endcode
+
+ Missing conversion is sometimes due to non-trivial
+ conversions. Here, converting a value::rgb8 towards a value::int_u8
+ implies to compute the luminance, but several formulae exist.
+
+ For a single use of a specific conversion, the shortest way is to
+ use the data::convert() overload which takes a conversion function.
+ It must be used with one of conversion function listed on this page.
+
+ \code
+ #include <mln/core/image/image2d.hh>
+ #include <mln/data/convert.hh>
+ #include <mln/value/int_u8.hh>
+ #include <mln/value/rgb8.hh>
+ #include <mln/fun/v2v/rgb_to_luma.hh>
+
+ int main()
+ {
+ using namespace mln;
+
+ image2d<value::rgb8> ima_color;
+ // Initialization of ima_color
+ // ...
+ image2d<value::int_u8> ima_gl = data::convert(fun::v2v::rgb_to_luma<value::int_u8>(), ima_color);
+ }
+ \endcode
+
+ It is also possible to declare a user-defined function. Just declare
+ a class that inherits from the mln::Function_v2v class and respects
+ the required interface.
+
+ \code
+ #include <mln/core/image/image2d.hh>
+ #include <mln/data/convert.hh>
+ #include <mln/value/int_u8.hh>
+ #include <mln/value/rgb8.hh>
+ #include <mln/fun/v2v/rgb_to_luma.hh>
+
+ namespace mln
+ {
+ struct only_red_component : public Function_v2v<only_red_component>
+ {
+ typedef value::int_u8 result;
+ typedef mln::value::rgb8 argument;
+
+ result operator()(const argument& v) const
+ {
+ return v.red();
+ }
+ };
+
+ } // end of namespace mln
+
+ int main()
+ {
+ using namespace mln;
+
+ image2d<value::rgb8> ima_color;
+ // Initialization of ima_color
+ // ...
+ image2d<value::int_u8> ima_red_gl = data::convert(only_red_component(), ima_color);
+ }
+ \endcode
+
+
+ If a program requires conversions that are not provided by default
+ they can be defined manually by declaring a from_to_()
+ overload. Default overloads are listed in module \ref fromto.
+
+ \code
+ #include <mln/core/image/image2d.hh>
+ #include <mln/data/convert.hh>
+ #include <mln/value/int_u8.hh>
+ #include <mln/value/rgb8.hh>
+
+ namespace mln
+ {
+ namespace value
+ {
+
+ void from_to_(const value::rgb8& from, value::int_u8& to)
+ {
+ to = (from.red() + from.green() + from.blue()) / 3;
+ }
+
+ } // end of namespace mln::value
+ } // end of namespace mln
+
+ int main()
+ {
+ using namespace mln;
+
+ image2d<value::rgb8> ima_color;
+ // Initialization of ima_color
+ // ...
+ image2d<value::int_u8> ima_red_gl = data::convert(value::int_u8(), ima_color);
+ }
+ \endcode
+
+ Such declarations extend the capabilities of from_to() and all
+ conversion routines relying on it.
+
+ \warning In order to work properly, the from_to_ overload must be
+ declared in the exact same namespace as its first argument. In case
+ the first argument is a builtin type (e.g. int), rely on the second
+ argument namespace. from_to_ overload resolution relies on the
+ Argument-Dependent Lookup (ADL) provided by C++.
+
+ \ingroup modroutines
+*/
/*! \defgroup fromto from_to_ Routines
*
diff --git a/milena/mln/convert/from_to.hh b/milena/mln/convert/from_to.hh
index 32a471d..2befb57 100644
--- a/milena/mln/convert/from_to.hh
+++ b/milena/mln/convert/from_to.hh
@@ -58,7 +58,7 @@ namespace mln
namespace convert
{
- /*! \brief Value conversion routine.
+ /*! \brief Conversion routine.
This is a generic function to convert an object towards another
one.
diff --git a/milena/mln/convert/to.hh b/milena/mln/convert/to.hh
index 6dc72e9..699b71d 100644
--- a/milena/mln/convert/to.hh
+++ b/milena/mln/convert/to.hh
@@ -46,7 +46,24 @@ namespace mln
{
- /// Conversion of the object \p from towards an object with type \c T.
+ /*!
+ \brief Conversion of the object \p from towards an object with
+ type \c T.
+
+ This routine relies on from_to().
+
+ It is provided for conveniance.
+
+ \warning The destination type must be specified as template
+ parameter while calling this function.
+
+ \code
+ value::int_u8 gl = 3;
+ value::rgb8 color = convert::to<value::rgb8>(gl);
+ \endcode
+
+ \ingroup convert
+ */
template <typename T, typename O>
T
to(const O& from);
diff --git a/milena/mln/convert/to_image.hh b/milena/mln/convert/to_image.hh
index 71fde90..2eda6e7 100644
--- a/milena/mln/convert/to_image.hh
+++ b/milena/mln/convert/to_image.hh
@@ -55,28 +55,44 @@ namespace mln
{
- /// Convert a point set \p pset into a binary image. Width of the
- /// converted image will be pset.bbox + 2 * \p border.
+ /*!
+ \brief Convert a point set \p pset into a binary image.
+
+ Width of the converted image will be pset.bbox + 2 * \p border.
+ \ingroup convert
+ */
template <typename S>
mln_image_from_grid(mln_site(S)::grid, bool)
to_image(const Site_Set<S>& pset, unsigned border = 1);
- /// Convert a window \p win into a binary image.
+ /*!
+ \brief Convert a window \p win into a binary image.
+ \ingroup convert
+ */
template <typename W>
mln_image_from_grid(mln_site(W)::grid, bool)
to_image(const Window<W>& win);
- /// Convert a weighted window \p w_win into an image.
+ /*!
+ \brief Convert a weighted window \p w_win into an image.
+ \ingroup convert
+ */
template <typename W>
mln_image_from_grid(mln_site(W)::grid, mln_weight(W))
to_image(const Weighted_Window<W>& w_win);
- /// Convert a neighborhood \p nbh into a binary image.
+ /*!
+ \brief Convert a neighborhood \p nbh into a binary image.
+ \ingroup convert
+ */
template <typename N>
mln_image_from_grid(mln_site(N)::grid, bool)
to_image(const Neighborhood<N>& nbh);
- /// Convert an histo \p h into an image1d<unsigned>.
+ /*!
+ \brief Convert an histo \p h into an image1d<unsigned>.
+ \ingroup convert
+ */
template <typename T>
image1d<unsigned>
to_image(const histo::array<T>& h);
diff --git a/milena/mln/convert/to_p_array.hh b/milena/mln/convert/to_p_array.hh
index 24d64fc..3d54b53 100644
--- a/milena/mln/convert/to_p_array.hh
+++ b/milena/mln/convert/to_p_array.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -43,18 +44,28 @@ namespace mln
namespace convert
{
- /// Convert a point set \p pset into a p_array (point set vector).
+ /*!
+ \brief Convert a point set \p pset into a p_array (point set vector).
+ \ingroup convert
+ */
template <typename S>
p_array<mln_psite(S)> to_p_array(const Site_Set<S>& pset);
- /// Convert a window \p win centered at point \p p into a p_array
- /// (point set vector).
+ /*!
+ \brief Convert a window \p win centered at point \p p into a p_array
+ (point set vector).
+
+ \ingroup convert
+ */
template <typename W>
p_array<mln_psite(W)> to_p_array(const Window<W>& win,
const mln_psite(W)& p);
- /// Convert an image \p img into a p_array.
+ /*!
+ \brief Convert an image \p img into a p_array.
+ \ingroup convert
+ */
template <typename I>
p_array<mln_psite(I)>
to_p_array(const Image<I>& img);
diff --git a/milena/mln/convert/to_p_set.hh b/milena/mln/convert/to_p_set.hh
index 46cd5e7..5758579 100644
--- a/milena/mln/convert/to_p_set.hh
+++ b/milena/mln/convert/to_p_set.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -48,28 +49,48 @@ namespace mln
namespace convert
{
- /// Convert a neighborhood \p nbh into a site set.
+ /*!
+ \brief Convert a neighborhood \p nbh into a site set.
+ \ingroup convert
+ */
template <typename N>
p_set<mln_psite(N)>
to_p_set(const Neighborhood<N>& nbh);
- /// Convert a binary image \p ima into a site set.
+ /*!
+ \brief Convert a binary image \p ima into a site set.
+ \ingroup convert
+ */
template <typename I>
p_set<mln_psite(I)>
to_p_set(const Image<I>& ima);
- /// Convert a Window \p win into a site set.
+ /*!
+ \brief Convert a Window \p win into a site set.
+ \ingroup convert
+ */
template <typename W>
p_set<mln_psite(W)>
to_p_set(const Window<W>& win);
- /// Convert an std::set \p s of sites into a site set.
- /// C is the comparison functor.
+ /*!
+ \brief Convert an std::set \p s of sites into a site set.
+
+ \tparam P is the site type.
+ \tparam C is the comparison functor.
+
+ \ingroup convert
+ */
template <typename P, typename C>
p_set<P>
to_p_set(const std::set<P, C>& s);
- /// Convert any site set \p ps into a 'mln::p_set<>' site set.
+ /*!
+ \brief Convert any site set \p ps into a 'mln::p_set<>' site
+ set.
+
+ \ingroup convert
+ */
template <typename S>
p_set<mln_psite(S)>
to_p_set(const Site_Set<S>& ps);
diff --git a/milena/mln/convert/to_qimage.hh b/milena/mln/convert/to_qimage.hh
index fd90125..b6f84a6 100755
--- a/milena/mln/convert/to_qimage.hh
+++ b/milena/mln/convert/to_qimage.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2010, 2012 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2010, 2012, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -56,9 +56,17 @@ namespace mln
namespace convert
{
- /// \brief Convert a Milena image to a Qimage.
- ///
- //
+ /*!
+ \brief Convert a Milena image to a Qimage by copying data.
+
+ This function requires the library <a
+ href="http://www.qt-project.org">Qt</a> 4.x or 5.x.
+
+ This function copies the content of \p ima into the QImage
+ output.
+
+ \ingroup convert
+ */
template <typename I>
inline
QImage
diff --git a/milena/mln/convert/to_qimage_nocopy.hh b/milena/mln/convert/to_qimage_nocopy.hh
index 2820f0e..2d5df86 100755
--- a/milena/mln/convert/to_qimage_nocopy.hh
+++ b/milena/mln/convert/to_qimage_nocopy.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2010, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -52,6 +53,26 @@ namespace mln
namespace convert
{
+ /*!
+ \brief Convert a Milena image to a Qimage without copy.
+
+ This function requires the library <a
+ href="http://www.qt-project.org">Qt</a> 4.x or 5.x.
+
+ It does not copy any data. The underlying data remains held by
+ \p ima.
+
+ \warning \p ima must remain valid until QImage is destroyed.
+
+ \ingroup convert
+ */
+ template <typename I>
+ inline
+ QImage to_qimage_nocopy(const Image<I>& ima);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
// Implementation
namespace impl
@@ -171,6 +192,7 @@ namespace mln
return output;
}
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::convert
diff --git a/milena/mln/convert/to_upper_window.hh b/milena/mln/convert/to_upper_window.hh
index aae46e2..af0b7f7 100644
--- a/milena/mln/convert/to_upper_window.hh
+++ b/milena/mln/convert/to_upper_window.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -42,11 +43,18 @@ namespace mln
namespace convert
{
- /// Convert a window \p nbh into an upper window.
+ /*!
+ \brief Convert a window \p nbh into an upper window.
+
+ \ingroup convert
+ */
template <typename W>
window<mln_dpsite(W)> to_upper_window(const Window<W>& win);
- /// Convert a neighborhood \p nbh into an upper window.
+ /*!
+ \brief Convert a neighborhood \p nbh into an upper window.
+ \ingroup convert
+ */
template <typename N>
window<mln_dpoint(N)> to_upper_window(const Neighborhood<N>& nbh);
diff --git a/milena/mln/convert/to_window.hh b/milena/mln/convert/to_window.hh
index 9114a00..a5697ff 100644
--- a/milena/mln/convert/to_window.hh
+++ b/milena/mln/convert/to_window.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -46,19 +47,31 @@ namespace mln
namespace convert
{
- /// Convert a neighborhood \p nbh into a window.
+ /*!
+ Convert a neighborhood \p nbh into a window.
+ \ingroup convert
+ */
template <typename N>
mln_window(N) to_window(const Neighborhood<N>& nbh);
- /// Convert a binary image \p ima into a window.
+ /*!
+ \brief Convert a binary image \p ima into a window.
+ \ingroup convert
+ */
template <typename I>
window<mln_site(I)::dpsite> to_window(const Image<I>& ima);
- /// Convert a site set \p pset into a window.
+ /*!
+ \brief Convert a site set \p pset into a window.
+ \ingroup convert
+ */
template <typename S>
window<mln_site(S)::dpsite> to_window(const Site_Set<S>& pset);
- /// Convert an std::set \p s of delta-sites into a window.
+ /*!
+ \brief Convert an std::set \p s of delta-sites into a window.
+ \ingroup convert
+ */
template <typename D, typename C>
window<D> to_window(const std::set<D, C>& s);
diff --git a/milena/mln/data/convert.hh b/milena/mln/data/convert.hh
index 260baac..2c2a4f0 100644
--- a/milena/mln/data/convert.hh
+++ b/milena/mln/data/convert.hh
@@ -45,16 +45,32 @@ namespace mln
{
/*! \brief Convert the image \p input by changing the value type.
- *
- * \param[in] v A value of the destination type.
- * \param[in] input The input image.
- *
- * \ingroup mlndata
+
+ \param[in] v A value of the destination type. Its type is used
+ to specify the target value type. The value itself
+ is unused.
+ \param[in] input The input image.
+
+ \return An image of value type V.
+
+ \ingroup mlndata convert
*/
template <typename V, typename I>
mln_ch_value(I, V)
convert(const V& v, const Image<I>& input);
+ /*!
+ \brief Convert the image \p input by changing the value type.
+ \overload
+
+ This overload allows to specify a specific conversion function
+ thanks to parameter \p convert_function.
+
+ \ingroup mlndata convert
+ */
+ template <typename F, typename I>
+ mln_ch_value(I, mln_result(F))
+ convert(const Function_v2v<F>& convert_function, const Image<I>& input);
# ifndef MLN_INCLUDE_ONLY
@@ -163,6 +179,18 @@ namespace mln
return output;
}
+ template <typename F, typename I>
+ mln_ch_value(I, mln_result(F))
+ convert(const Function_v2v<F>& convert_function, const Image<I>& input)
+ {
+ mln_trace("data::convert");
+ typedef mln_result(F) V;
+ internal::convert_tests(V(), input);
+
+ mln_ch_value(I, V) output = data::transform(input, convert_function);
+
+ return output;
+ }
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/fun/v2v/convert.hh b/milena/mln/fun/v2v/convert.hh
index e1064b8..42c4229 100644
--- a/milena/mln/fun/v2v/convert.hh
+++ b/milena/mln/fun/v2v/convert.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -28,7 +29,7 @@
/// \file
///
-/// FIXME.
+/// \brief Function which relies on from_to() to convert values.
///
/// \todo The function is intrisically meta; how to handle that
/// particular case?
@@ -47,13 +48,22 @@ namespace mln
namespace v2v
{
- // FIXME: Doc!
+ /*! \brief Function which relies on from_to() to convert values.
+ \tparam V The destination type.
+
+ This function relies on convert::from_to().
+
+ \sa data::convert.
+ \ingroup modfunv2v convert
+ */
template <typename V>
struct convert : public Function_v2v< convert<V> >
{
typedef V result;
+ /// Convert a value of type \c W towards type \c V thanks to
+ /// convert::from_to().
template <typename W>
V operator()(const W& w) const;
};
diff --git a/milena/mln/fun/v2v/hsl_to_rgb.hh b/milena/mln/fun/v2v/hsl_to_rgb.hh
index 4470681..25f5d10 100644
--- a/milena/mln/fun/v2v/hsl_to_rgb.hh
+++ b/milena/mln/fun/v2v/hsl_to_rgb.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2008, 2009, 2011, 2012 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2011, 2012, 2013 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -54,10 +54,11 @@ namespace mln
namespace v2v
{
- /// \brief Convert hsl values to rgb.
- ///
- /// \ingroup modfunv2v
- //
+ /*!
+ \brief Convert hsl values to rgb.
+
+ \ingroup modfunv2v convert
+ */
template <typename T_rgb>
struct f_hsl_to_rgb_ : public Function_v2v< f_hsl_to_rgb_<T_rgb> >
{
diff --git a/milena/mln/fun/v2v/qt_rgb_to_int_u.hh b/milena/mln/fun/v2v/qt_rgb_to_int_u.hh
index 17292fb..3a60763 100644
--- a/milena/mln/fun/v2v/qt_rgb_to_int_u.hh
+++ b/milena/mln/fun/v2v/qt_rgb_to_int_u.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2010, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -43,6 +44,11 @@ namespace mln
namespace v2v
{
+ /*!
+ \brief Convert value::qt::rgb32 values to value::int_u8.
+
+ \ingroup modfunv2v convert
+ */
template <unsigned n>
struct qt_rgb_to_int_u : Function_v2v< qt_rgb_to_int_u<n> >
{
diff --git a/milena/mln/fun/v2v/rgb8_to_rgbn.hh b/milena/mln/fun/v2v/rgb8_to_rgbn.hh
index 74b713e..d4cab2e 100644
--- a/milena/mln/fun/v2v/rgb8_to_rgbn.hh
+++ b/milena/mln/fun/v2v/rgb8_to_rgbn.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2010, 2012 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2010, 2012, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -47,25 +47,26 @@ namespace mln
{
- /// \brief Convert a rgb8 value to a rgn, n < 8.
- ///
- /// \param n defines the output quantification used for the transformation.
- ///
- /// \ingroup modfunv2v
- //
+ /*! \brief Convert a rgb8 value to a rgn, n < 8.
+
+ \tparam n defines the output quantification used for the transformation.
+
+ \ingroup modfunv2v convert
+ */
template <unsigned n>
struct rgb8_to_rgbn : Function_v2v< rgb8_to_rgbn<n> >
{
typedef value::rgb8 argument;
typedef value::rgb<n> result;
- /// \brief Convert a rgb8 value to a rgn, n < 8.
- ///
- /// \param[in] c the rgb8 value to convert.
- ///
- /// Conversion is done by computing the size by which we
- /// divide each rgb component.
- //
+ /*!
+ \brief Convert a rgb8 value to a rgn, n < 8.
+
+ \param[in] c the rgb8 value to convert.
+
+ Conversion is done by computing the size by which we
+ divide each rgb component.
+ */
result operator()(const argument& c) const;
};
diff --git a/milena/mln/fun/v2v/rgb_to_hsl.hh b/milena/mln/fun/v2v/rgb_to_hsl.hh
index 11339fd..177069f 100644
--- a/milena/mln/fun/v2v/rgb_to_hsl.hh
+++ b/milena/mln/fun/v2v/rgb_to_hsl.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2008, 2009, 2011, 2012 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2011, 2012, 2013 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -27,6 +27,10 @@
#ifndef MLN_FUN_V2V_RGB_TO_HSL_HH
# define MLN_FUN_V2V_RGB_TO_HSL_HH
+/// \file
+///
+/// \brief Conversion function from value::rgb to value::hsl_.
+
# include <cmath>
# include <mln/math/round.hh>
@@ -51,6 +55,13 @@ namespace mln
namespace v2v
{
+ /*!
+ \brief conversion function from value:rgb to value::hsl_.
+
+ \tparam T_hsl The desired output hsl type.
+
+ \ingroup modfunv2v convert
+ */
template <typename T_hsl>
struct f_rgb_to_hsl_ : public Function_v2v< f_rgb_to_hsl_<T_hsl> >
{
@@ -63,8 +74,20 @@ namespace mln
};
+ /*!
+ \brief Type of a default conversion function from value::rgb
+ to value::hsl_f.
+
+ \ingroup modfunv2v convert
+ */
typedef f_rgb_to_hsl_<value::hsl_f> f_rgb_to_hsl_f_t;
+ /*!
+ \brief Predefined conversion functor converting from value::rgb
+ to value::hsl_f.
+
+ \ingroup modfunv2v convert
+ */
extern f_rgb_to_hsl_f_t f_rgb_to_hsl_f;
diff --git a/milena/mln/fun/v2v/rgb_to_int_u.hh b/milena/mln/fun/v2v/rgb_to_int_u.hh
index 1be1ae2..a6a6feb 100644
--- a/milena/mln/fun/v2v/rgb_to_int_u.hh
+++ b/milena/mln/fun/v2v/rgb_to_int_u.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -24,6 +24,9 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
+/// \file
+///
+/// \brief Conversion function from value::rgb to value::int_u.
#ifndef MLN_FUN_V2V_RGB_TO_INT_U_HH
# define MLN_FUN_V2V_RGB_TO_INT_U_HH
@@ -41,6 +44,14 @@ namespace mln
namespace v2v
{
+ /*!
+ \brief Conversion function from value::rgb to value::int_u.
+
+ \tparam n Defines the number of bits of the integer
+ destination type.
+
+ \ingroup modfunv2v convert
+ */
template <unsigned n>
struct rgb_to_int_u : Function_v2v< rgb_to_int_u<n> >
{
diff --git a/milena/mln/fun/v2v/rgb_to_luma.hh b/milena/mln/fun/v2v/rgb_to_luma.hh
index 304a798..92c603a 100644
--- a/milena/mln/fun/v2v/rgb_to_luma.hh
+++ b/milena/mln/fun/v2v/rgb_to_luma.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2011, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -23,6 +24,10 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
+/// \file
+///
+/// \brief Conversion function from value::rgb to integer value type.
+
#ifndef MLN_FUN_V2V_RGB_TO_LUMA_HH
# define MLN_FUN_V2V_RGB_TO_LUMA_HH
@@ -37,6 +42,12 @@ namespace mln
namespace v2v
{
+ /*!
+ \brief Conversion function from a RGB value to an integer
+ value type.
+
+ \ingroup modfunv2v convert
+ */
template <typename T_luma>
struct rgb_to_luma : public Function_v2v< rgb_to_luma<T_luma> >
{
--
1.7.2.5
1
0
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch exp/newdoc has been updated
via a8d117672fb512482f7a098499a41e99a53fa445 (commit)
via 00a1e3480ea7c57d1b82d336a658127223f7c173 (commit)
from 61eb85aae63899be7b13c45c08e022bb6cd223ac (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
a8d1176 Add references to from_to_ overloads in documentation.
00a1e34 Explain how to iterate over an image in tutorial.
-----------------------------------------------------------------------
Summary of changes:
milena/ChangeLog | 49 ++++++++++++++++++++
milena/doc/examples/split/tuto3_rw_image-3.cc.raw | 6 +-
milena/doc/examples/split/tuto3_rw_image-4.cc.raw | 2 +-
milena/doc/examples/split/tuto3_rw_image-5.cc.raw | 5 +-
milena/doc/examples/split/tuto3_rw_image-6.cc.raw | 3 +-
milena/doc/examples/split/tuto3_rw_image-7.cc.raw | 2 +-
...3_rw_image-7.cc.raw => tuto3_rw_image-8.cc.raw} | 0
milena/doc/examples/tuto3_rw_image.cc | 6 ++
milena/doc/tutorial.tex | 31 ++++++++-----
milena/mln/algebra/h_mat.hh | 9 ++-
milena/mln/algebra/quat.hh | 13 ++++-
milena/mln/algebra/vec.hh | 32 ++++++++++---
milena/mln/convert/from_to.hh | 40 +++++++++++++++-
milena/mln/convert/impl/from_double_to_value.hh | 15 +++++-
milena/mln/convert/impl/from_float_to_value.hh | 20 ++++++--
milena/mln/convert/impl/from_unsigned_to_value.hh | 14 ++++--
milena/mln/core/alias/neighb2d.hh | 10 +++-
milena/mln/core/alias/neighb3d.hh | 5 ++-
milena/mln/core/alias/window1d.hh | 9 ++-
milena/mln/core/alias/window2d.hh | 12 ++++-
milena/mln/core/alias/window3d.hh | 5 ++-
milena/mln/core/concept/gpoint.hh | 10 +++-
milena/mln/core/image/#image2d# | 1 +
milena/mln/core/image/image1d.hh | 2 +-
milena/mln/core/image/image2d.hh | 2 +-
milena/mln/core/image/image3d.hh | 2 +-
milena/mln/core/mixed_neighb.hh | 12 +++--
milena/mln/core/neighb.hh | 12 +++--
milena/mln/core/w_window.hh | 12 +++--
milena/mln/fun/i2v/array.hh | 17 +++++--
milena/mln/histo/array.hh | 11 +++--
milena/mln/util/array.hh | 23 +++++++--
milena/mln/util/object_id.hh | 5 ++-
milena/mln/value/hsl.hh | 40 ++++++++++------
milena/mln/value/int_u.hh | 30 ++++++++++--
milena/mln/value/label.hh | 25 ++++++++--
milena/mln/value/qt/rgb32.hh | 10 +++-
milena/mln/value/rgb.hh | 20 ++++++--
38 files changed, 401 insertions(+), 121 deletions(-)
copy milena/doc/examples/split/{tuto3_rw_image-7.cc.raw => tuto3_rw_image-8.cc.raw} (100%)
create mode 100644 milena/mln/core/image/#image2d#
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0

olena: olena-2.0-553-ga8d1176 Add references to from_to_ overloads in documentation.
by Guillaume Lazzara 19 Apr '13
by Guillaume Lazzara 19 Apr '13
19 Apr '13
* mln/algebra/h_mat.hh,
* mln/algebra/quat.hh,
* mln/algebra/vec.hh,
* mln/convert/from_to.hh,
* mln/convert/impl/from_double_to_value.hh,
* mln/convert/impl/from_float_to_value.hh,
* mln/convert/impl/from_unsigned_to_value.hh,
* mln/core/alias/neighb2d.hh,
* mln/core/alias/neighb3d.hh,
* mln/core/alias/window1d.hh,
* mln/core/alias/window2d.hh,
* mln/core/alias/window3d.hh,
* mln/core/concept/gpoint.hh,
* mln/core/image/#image2d#,
* mln/core/image/image1d.hh,
* mln/core/image/image2d.hh,
* mln/core/image/image3d.hh,
* mln/core/mixed_neighb.hh,
* mln/core/neighb.hh,
* mln/core/w_window.hh,
* mln/fun/i2v/array.hh,
* mln/histo/array.hh,
* mln/util/array.hh,
* mln/util/object_id.hh,
* mln/value/hsl.hh,
* mln/value/int_u.hh,
* mln/value/label.hh,
* mln/value/qt/rgb32.hh,
* mln/value/rgb.hh: Add to from_to_ group.
---
milena/ChangeLog | 34 +++++++++++++++++
milena/mln/algebra/h_mat.hh | 9 +++--
milena/mln/algebra/quat.hh | 13 +++++--
milena/mln/algebra/vec.hh | 32 +++++++++++++----
milena/mln/convert/from_to.hh | 40 +++++++++++++++++++-
milena/mln/convert/impl/from_double_to_value.hh | 15 ++++++--
milena/mln/convert/impl/from_float_to_value.hh | 20 ++++++++--
milena/mln/convert/impl/from_unsigned_to_value.hh | 14 +++++--
milena/mln/core/alias/neighb2d.hh | 10 ++++-
milena/mln/core/alias/neighb3d.hh | 5 ++-
milena/mln/core/alias/window1d.hh | 9 +++--
milena/mln/core/alias/window2d.hh | 12 +++++--
milena/mln/core/alias/window3d.hh | 5 ++-
milena/mln/core/concept/gpoint.hh | 10 ++++-
milena/mln/core/image/#image2d# | 1 +
milena/mln/core/image/image1d.hh | 2 +-
milena/mln/core/image/image2d.hh | 2 +-
milena/mln/core/image/image3d.hh | 2 +-
milena/mln/core/mixed_neighb.hh | 12 ++++--
milena/mln/core/neighb.hh | 12 ++++--
milena/mln/core/w_window.hh | 12 ++++--
milena/mln/fun/i2v/array.hh | 17 +++++++--
milena/mln/histo/array.hh | 11 ++++--
milena/mln/util/array.hh | 23 +++++++++---
milena/mln/util/object_id.hh | 5 ++-
milena/mln/value/hsl.hh | 40 ++++++++++++--------
milena/mln/value/int_u.hh | 30 ++++++++++++---
milena/mln/value/label.hh | 25 ++++++++++---
milena/mln/value/qt/rgb32.hh | 10 ++++-
milena/mln/value/rgb.hh | 20 ++++++++--
30 files changed, 351 insertions(+), 101 deletions(-)
create mode 100644 milena/mln/core/image/#image2d#
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 6c15ccc..3f29bbc 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,39 @@
2013-04-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Add references to from_to_ overloads in documentation.
+
+ * mln/algebra/h_mat.hh,
+ * mln/algebra/quat.hh,
+ * mln/algebra/vec.hh,
+ * mln/convert/from_to.hh,
+ * mln/convert/impl/from_double_to_value.hh,
+ * mln/convert/impl/from_float_to_value.hh,
+ * mln/convert/impl/from_unsigned_to_value.hh,
+ * mln/core/alias/neighb2d.hh,
+ * mln/core/alias/neighb3d.hh,
+ * mln/core/alias/window1d.hh,
+ * mln/core/alias/window2d.hh,
+ * mln/core/alias/window3d.hh,
+ * mln/core/concept/gpoint.hh,
+ * mln/core/image/#image2d#,
+ * mln/core/image/image1d.hh,
+ * mln/core/image/image2d.hh,
+ * mln/core/image/image3d.hh,
+ * mln/core/mixed_neighb.hh,
+ * mln/core/neighb.hh,
+ * mln/core/w_window.hh,
+ * mln/fun/i2v/array.hh,
+ * mln/histo/array.hh,
+ * mln/util/array.hh,
+ * mln/util/object_id.hh,
+ * mln/value/hsl.hh,
+ * mln/value/int_u.hh,
+ * mln/value/label.hh,
+ * mln/value/qt/rgb32.hh,
+ * mln/value/rgb.hh: Add to from_to_ group.
+
+2013-04-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Explain how to iterate over an image in tutorial.
* doc/examples/split/tuto3_rw_image-3.cc.raw,
diff --git a/milena/mln/algebra/h_mat.hh b/milena/mln/algebra/h_mat.hh
index 4a9a61d..115bcf0 100644
--- a/milena/mln/algebra/h_mat.hh
+++ b/milena/mln/algebra/h_mat.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2012, 2013 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -73,7 +73,10 @@ namespace mln
};
- /// \internal Conversion: h_mat -> quat
+ /*!
+ \brief Conversion: h_mat -> quat
+ \ingroup fromto
+ */
template <typename C>
void from_to_(const algebra::h_mat<3,C>& from, algebra::quat& to);
diff --git a/milena/mln/algebra/quat.hh b/milena/mln/algebra/quat.hh
index 2ba89e4..9e60beb 100644
--- a/milena/mln/algebra/quat.hh
+++ b/milena/mln/algebra/quat.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2012, 2013 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -266,7 +266,10 @@ namespace mln
quat slerp_5(const quat& p, const quat& q, float h);
- /// \internal Conversion: quaternion -> (angle_degrees, axis).
+ /*!
+ \brief Conversion: quaternion -> (angle_degrees, axis).
+ \ingroup fromto
+ */
template <typename C>
void from_to_(const quat& from, mln::util::couple<C, algebra::vec<3,C> >& to);
@@ -276,6 +279,10 @@ namespace mln
namespace make
{
+ /*!
+ \brief Construct a quaternion.
+ \relates mln::algebra::quat
+ */
template <typename C>
mln::algebra::quat
quat(double angle, const mln::algebra::vec<3,C>& axis);
diff --git a/milena/mln/algebra/vec.hh b/milena/mln/algebra/vec.hh
index 0177254..b02bf24 100644
--- a/milena/mln/algebra/vec.hh
+++ b/milena/mln/algebra/vec.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2006, 2008, 2009, 2011, 2012 EPITA Research and
+// Copyright (C) 2006, 2008, 2009, 2011, 2012, 2013 EPITA Research and
// Development Laboratory (LRDE)
//
// This file is part of Olena.
@@ -272,33 +272,51 @@ namespace mln
};
- /// \internal Conversion: vec -> rgb.
+ /*!
+ \brief Conversion: vec -> rgb.
+ \ingroup fromto
+ */
template <typename T, unsigned m>
void from_to_(const vec<3,T>& from, value::rgb<m>& to_);
- /// \internal Conversion: vec<1,C1> -> point<G,C2>
+ /*!
+ \brief Conversion: vec<1,C1> -> point<G,C2>
+ \ingroup fromto
+ */
template <typename C1, typename G, typename C2>
inline
void
from_to_(const vec<1,C1>& from, point<G,C2>& to);
- /// \internal Conversion: vec<n,C1> -> point<G,C2>
+ /*!
+ \brief Conversion: vec<n,C1> -> point<G,C2>
+ \ingroup fromto
+ */
template <unsigned n, typename C1, typename G, typename C2>
void
from_to_(const vec<n,C1>& from, point<G,C2>& to);
- /// \internal Conversion: vec<1,C1> -> point<G,C1>
+ /*!
+ \brief Conversion: vec<1,C1> -> point<G,C1>
+ \ingroup fromto
+ */
template <typename C1, typename G>
inline
void
from_to_(const vec<1,C1>& from, point<G,C1>& to);
- /// \internal Conversion: vec<n,C1> -> point<G,C1>
+ /*!
+ \brief Conversion: vec<n,C1> -> point<G,C1>
+ \ingroup fromto
+ */
template <unsigned n, typename C1, typename G>
void
from_to_(const vec<n,C1>& from, point<G,C1>& to);
- /// \internal Conversion: vec -> gpoint
+ /*!
+ \brief Conversion: vec -> gpoint
+ \ingroup fromto
+ */
template <unsigned n, typename T, typename P>
void
from_to_(const vec<n,T>& from, Gpoint<P>& to);
diff --git a/milena/mln/convert/from_to.hh b/milena/mln/convert/from_to.hh
index a3ec6d4..32a471d 100644
--- a/milena/mln/convert/from_to.hh
+++ b/milena/mln/convert/from_to.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2008, 2009, 2010, 2012 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2010, 2012, 2013 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -58,6 +58,42 @@ namespace mln
namespace convert
{
+ /*! \brief Value conversion routine.
+
+ This is a generic function to convert an object towards another
+ one.
+
+ It relies on predefined conversion functions. Many are defined
+ by default and listed in \ref from_to_ module.
+
+ This conversion system is extensible. If more conversions are
+ needed, new ones can be added by implementing an overload of
+ from_to_(). This overload must be defined in the same namespace
+ as the first argument.
+
+ Here is an example of a new conversion from value::rgb8 to
+ value::int_u8.
+
+ \code
+ namespace value
+ {
+ template <unsigned m>
+ void from_to_(const value::rgb8& from, value::int_u8& to)
+ {
+ to = from.red() + from.green() + from.blue();
+ }
+ }
+ \endcode
+
+ Once this overload declared, one can safely write:
+ \code
+ value::rgb8 color(128,155,255);
+ value::int_8 gl;
+ convert::from_to(color, gl);
+ \endcode
+
+ \ingroup convert
+ */
template <typename F, typename T>
void
from_to(const F& from, T& to);
diff --git a/milena/mln/convert/impl/from_double_to_value.hh b/milena/mln/convert/impl/from_double_to_value.hh
index 9b70f8e..1c22860 100644
--- a/milena/mln/convert/impl/from_double_to_value.hh
+++ b/milena/mln/convert/impl/from_double_to_value.hh
@@ -45,14 +45,23 @@
namespace mln
{
- /// \internal Conversion: double-> Value
+ /*!
+ \brief Conversion: double-> Value
+ \ingroup fromto
+ */
template <typename V>
void from_to_(const double& from, Value<V>& to);
- /// \internal Conversion: double-> unsigned
+ /*!
+ \brief Conversion: double-> unsigned
+ \ingroup fromto
+ */
void from_to_(const double& from, unsigned& to);
- /// \internal Conversion: double-> int
+ /*!
+ \brief Conversion: double-> int
+ \ingroup fromto
+ */
void from_to_(const double& from, int& to);
diff --git a/milena/mln/convert/impl/from_float_to_value.hh b/milena/mln/convert/impl/from_float_to_value.hh
index 8d87f38..2b5bb85 100644
--- a/milena/mln/convert/impl/from_float_to_value.hh
+++ b/milena/mln/convert/impl/from_float_to_value.hh
@@ -45,17 +45,29 @@
namespace mln
{
- /// \internal Conversion: float-> Value
+ /*!
+ \brief Conversion: float-> Value
+ \ingroup fromto
+ */
template <typename V>
void from_to_(const float& from, Value<V>& to);
- /// \internal Conversion: float-> unsigned
+ /*!
+ \brief Conversion: float-> unsigned
+ \ingroup fromto
+ */
void from_to_(const float& from, unsigned& to);
- /// \internal Conversion: float-> int
+ /*!
+ \brief Conversion: float-> int
+ \ingroup fromto
+ */
void from_to_(const float& from, int& to);
- /// \internal Conversion: float-> short
+ /*!
+ \brief Conversion: float-> short
+ \ingroup fromto
+ */
void from_to_(const float& from, short& to);
diff --git a/milena/mln/convert/impl/from_unsigned_to_value.hh b/milena/mln/convert/impl/from_unsigned_to_value.hh
index 383f989..4c137f6 100644
--- a/milena/mln/convert/impl/from_unsigned_to_value.hh
+++ b/milena/mln/convert/impl/from_unsigned_to_value.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010, 2011, 2012 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2009, 2010, 2011, 2012, 2013 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -46,11 +46,17 @@ namespace mln
{
- /// \internal Conversion: unsigned-> Value
+ /*!
+ \brief Conversion: unsigned-> Value
+ \ingroup fromto
+ */
template <typename V>
void from_to_(const unsigned& from, Value<V>& to);
- /// \internal Conversion: unsigned -> bool
+ /*!
+ \brief Conversion: unsigned -> bool
+ \ingroup fromto
+ */
void from_to_(const unsigned& from, bool& to);
diff --git a/milena/mln/core/alias/neighb2d.hh b/milena/mln/core/alias/neighb2d.hh
index 31275f2..4283e83 100644
--- a/milena/mln/core/alias/neighb2d.hh
+++ b/milena/mln/core/alias/neighb2d.hh
@@ -207,11 +207,17 @@ namespace mln
neighb< win::multiple<window2d, mln::fun::p2b::chess> > c6_2d();
- /// \internal Conversion: bool[] -> neighb2d
+ /*!
+ \brief Conversion: bool[] -> neighb2d
+ \ingroup fromto
+ */
template <unsigned S>
void from_to_(const bool (&values)[S], neighb2d& nbh);
- /// \internal Conversion: bool[][] -> neighb2d
+ /*!
+ \brief Conversion: bool[][] -> neighb2d
+ \ingroup fromto
+ */
template <unsigned R, unsigned C>
void from_to_(bool const (&values)[R][C], neighb2d& nbh);
diff --git a/milena/mln/core/alias/neighb3d.hh b/milena/mln/core/alias/neighb3d.hh
index e902466..3419323 100644
--- a/milena/mln/core/alias/neighb3d.hh
+++ b/milena/mln/core/alias/neighb3d.hh
@@ -276,7 +276,10 @@ namespace mln
const neighb3d& c26();
- /// \internal Conversion: bool[] -> neighb3d
+ /*!
+ \brief Conversion: bool[] -> neighb3d
+ \ingroup fromto
+ */
template <unsigned S>
void from_to_(const bool (&values)[S], neighb3d& nbh);
diff --git a/milena/mln/core/alias/window1d.hh b/milena/mln/core/alias/window1d.hh
index d9c312f..a22859a 100644
--- a/milena/mln/core/alias/window1d.hh
+++ b/milena/mln/core/alias/window1d.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2012, 2013 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -93,7 +93,10 @@ namespace mln
/// \endcond
- /// \internal Conversion: bool[] -> window1d
+ /*!
+ \brief Conversion: bool[] -> window1d
+ \ingroup fromto
+ */
template <unsigned M>
void from_to_(const bool (&values)[M], window1d& win);
diff --git a/milena/mln/core/alias/window2d.hh b/milena/mln/core/alias/window2d.hh
index 49c8e2a..6c0c3e2 100644
--- a/milena/mln/core/alias/window2d.hh
+++ b/milena/mln/core/alias/window2d.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008, 2009, 2010, 2012 EPITA Research and
+// Copyright (C) 2007, 2008, 2009, 2010, 2012, 2013 EPITA Research and
// Development Laboratory (LRDE)
//
// This file is part of Olena.
@@ -125,11 +125,17 @@ namespace mln
const window2d& win_c8p();
- /// \internal Conversion: bool[] -> window2d
+ /*!
+ \brief Conversion: bool[] -> window2d
+ \ingroup fromto
+ */
template <unsigned S>
void from_to_(const bool (&values)[S], window2d& win);
- /// \internal Conversion: bool[][] -> window2d
+ /*!
+ \brief Conversion: bool[][] -> window2d
+ \ingroup fromto
+ */
template <unsigned R, unsigned C>
void from_to_(const bool (&values)[R][C], window2d& win);
diff --git a/milena/mln/core/alias/window3d.hh b/milena/mln/core/alias/window3d.hh
index 81ff2de..c4409c7 100644
--- a/milena/mln/core/alias/window3d.hh
+++ b/milena/mln/core/alias/window3d.hh
@@ -143,7 +143,10 @@ namespace mln
const window3d& win_c8p_3d();
- /// \internal Conversion: bool[] -> window3d
+ /*!
+ \brief Conversion: bool[] -> window3d
+ \ingroup fromto
+ */
template <unsigned M>
void from_to_(bool const (&values)[M], window3d& win);
diff --git a/milena/mln/core/concept/gpoint.hh b/milena/mln/core/concept/gpoint.hh
index 2c78226..59e17e7 100644
--- a/milena/mln/core/concept/gpoint.hh
+++ b/milena/mln/core/concept/gpoint.hh
@@ -271,12 +271,18 @@ namespace mln
// FIXME : add operators and traits?
- /// \internal Conversion: gpoint -> mln_delta
+ /*!
+ \brief Conversion: gpoint -> mln_delta
+ \ingroup fromto
+ */
template <typename P>
void
from_to_(const Gpoint<P>& from, mln_delta(P)& to);
- /// \internal Conversion: gpoint -> algebra::vec
+ /*!
+ \brief Conversion: gpoint -> algebra::vec
+ \ingroup fromto
+ */
template <typename P, unsigned n, typename T>
void
from_to_(const Gpoint<P>& from, algebra::vec<n,T>& to);
diff --git a/milena/mln/core/image/#image2d# b/milena/mln/core/image/#image2d#
new file mode 100644
index 0000000..501a6bb
--- /dev/null
+++ b/milena/mln/core/image/#image2d#
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/milena/mln/core/image/image1d.hh b/milena/mln/core/image/image1d.hh
index aaa1ec2..ce73205 100644
--- a/milena/mln/core/image/image1d.hh
+++ b/milena/mln/core/image/image1d.hh
@@ -127,7 +127,7 @@ namespace mln
/// Basic 1D image class.
///
- /// The parameter \c T is the type of pixel values. This image class
+ /// The parameter \c V is the type of pixel values. This image class
/// stores data in memory and has a virtual border with constant
/// thickness before and after data.
///
diff --git a/milena/mln/core/image/image2d.hh b/milena/mln/core/image/image2d.hh
index 830057d..490c261 100644
--- a/milena/mln/core/image/image2d.hh
+++ b/milena/mln/core/image/image2d.hh
@@ -124,7 +124,7 @@ namespace mln
/// Basic 2D image class.
///
- /// The parameter \c T is the type of pixel values. This image class
+ /// The parameter \c V is the type of pixel values. This image class
/// stores data in memory and has a virtual border with constant
/// thickness around data.
///
diff --git a/milena/mln/core/image/image3d.hh b/milena/mln/core/image/image3d.hh
index d4e14ee..be13c35 100644
--- a/milena/mln/core/image/image3d.hh
+++ b/milena/mln/core/image/image3d.hh
@@ -123,7 +123,7 @@ namespace mln
/// Basic 3D image class.
///
- /// The parameter \c T is the type of pixel values. This image class
+ /// The parameter \c V is the type of pixel values. This image class
/// stores data in memory and has a virtual border with constant
/// thickness around data.
///
diff --git a/milena/mln/core/mixed_neighb.hh b/milena/mln/core/mixed_neighb.hh
index e95e0e9..40036d3 100644
--- a/milena/mln/core/mixed_neighb.hh
+++ b/milena/mln/core/mixed_neighb.hh
@@ -83,17 +83,21 @@ namespace mln
};
- /// \cond INTERNAL_API
- /// Conversion: mixed_neighb<W> -> W
+ /*!
+ \brief Conversion: mixed_neighb<W> -> W
+ \ingroup fromto
+ */
template <typename W>
void
from_to_(const mln::mixed_neighb<W>& from, W& to);
- /// Conversion: mixed_neighb<W> -> W
+ /*!
+ \brief Conversion: mixed_neighb<W> -> W
+ \ingroup fromto
+ */
template <typename W>
void
from_to_(const W& from, mln::mixed_neighb<W>& to);
- /// \endcond
// mixed_neighb_fwd_niter<W>
diff --git a/milena/mln/core/neighb.hh b/milena/mln/core/neighb.hh
index 93e17f2..bfb7055 100644
--- a/milena/mln/core/neighb.hh
+++ b/milena/mln/core/neighb.hh
@@ -81,17 +81,21 @@ namespace mln
};
- /// \cond INTERNAL_API
- /// Conversions: neighb<W> -> W
+ /*!
+ \brief Conversions: neighb<W> -> W
+ \ingroup fromto
+ */
template <typename W>
void
from_to_(const mln::neighb<W>& from, W& to);
- /// Conversions: W -> neighb<W>
+ /*!
+ \brief Conversions: W -> neighb<W>
+ \ingroup fromto
+ */
template <typename W>
void
from_to_(const W& from, mln::neighb<W>& to);
- /// \endcond
// neighb_fwd_niter<W>
diff --git a/milena/mln/core/w_window.hh b/milena/mln/core/w_window.hh
index fd608e5..1c8a62c 100644
--- a/milena/mln/core/w_window.hh
+++ b/milena/mln/core/w_window.hh
@@ -141,15 +141,19 @@ namespace mln
template <typename D, typename Wl, typename Wr>
bool operator==(const w_window<D,Wl>& lhs, const w_window<D,Wr>& rhs);
- /// \cond INTERNAL_API
- /// Conversions: w_window -> image
+ /*!
+ \brief Conversions: w_window -> image
+ \ingroup fromto
+ */
template <typename D, typename W, typename I>
void from_to_(const w_window<D,W>& from, Image<I>& to);
- /// Conversions: weight[] -> w_window
+ /*!
+ \brief Conversions: weight[] -> w_window
+ \ingroup fromto
+ */
template <typename V, unsigned S, typename D, typename W>
void from_to_(const V (&weight)[S], w_window<D,W>& to);
- /// \endcond
diff --git a/milena/mln/fun/i2v/array.hh b/milena/mln/fun/i2v/array.hh
index a0e392a..8f7168f 100644
--- a/milena/mln/fun/i2v/array.hh
+++ b/milena/mln/fun/i2v/array.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008, 2009, 2012 EPITA Research and Development
+// Copyright (C) 2008, 2009, 2012, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -130,7 +130,10 @@ namespace mln
const array<T>& a);
- /// \internal Conversion: fun::i2v::array -> util::array
+ /*!
+ \brief Conversion: fun::i2v::array -> util::array
+ \ingroup fromto
+ */
template <typename T1, typename T2>
void
from_to_(const fun::i2v::array<T1>& from, util::array<T2>& to);
@@ -145,13 +148,19 @@ namespace mln
namespace std
{
- /// \internal Conversion: std::vectorfun::i2v::array<T> -> fun::i2v::array<T>
+ /*!
+ \brief Conversion: std::vectorfun::i2v::array<T> -> fun::i2v::array<T>
+ \ingroup fromto
+ */
template <typename T>
inline
void
from_to_(const vector<T>& from, mln::fun::i2v::array<T>& to);
- /// \internal Conversion: std::vector<T> -> mln::fun::i2v::array<U>
+ /*!
+ \brief Conversion: std::vector<T> -> mln::fun::i2v::array<U>
+ \ingroup fromto
+ */
template <typename T, typename U>
inline
void
diff --git a/milena/mln/histo/array.hh b/milena/mln/histo/array.hh
index b60bad3..4abe08c 100644
--- a/milena/mln/histo/array.hh
+++ b/milena/mln/histo/array.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2012, 2013 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -45,7 +45,7 @@ namespace mln
{
// Forward declaration
- template <typename T> struct image1d;
+ template <typename V> struct image1d;
namespace histo
{
@@ -84,7 +84,10 @@ namespace mln
template <typename T>
std::ostream& operator<<(std::ostream& ostr, const array<T>& h);
- /// \internal Conversion: histo::array -> image1d.
+ /*!
+ \brief Conversion: histo::array -> image1d.
+ \ingroup fromto
+ */
template <typename V, typename T>
void from_to_(const array<V>& from, image1d<T>& to);
diff --git a/milena/mln/util/array.hh b/milena/mln/util/array.hh
index 3fd987d..4469806 100644
--- a/milena/mln/util/array.hh
+++ b/milena/mln/util/array.hh
@@ -208,28 +208,39 @@ namespace mln
const array<T>& rhs);
- /// \cond INTERNAL_API
- /// Conversion: array -> array
+ /*!
+ \brief Conversion: array -> array
+ \ingroup fromto
+ */
template <typename T1, typename T2>
void
from_to_(const array<T1>& from, array<T2>& to);
- /// Conversion: array<T> -> fun::i2v::array<T>
+ /*!
+ \brief Conversion: array<T> -> fun::i2v::array<T>
+ \ingroup fromto
+ */
template <typename T>
inline
void
from_to_(const array<T>& from, fun::i2v::array<T>& to);
- /// Conversion: array<T> -> fun::i2v::array<U>
+ /*!
+ \brief Conversion: array<T> -> fun::i2v::array<U>
+ \ingroup fromto
+ */
template <typename T, typename U>
inline
void
from_to_(const array<T>& from, fun::i2v::array<U>& to);
- ///Conversion: util::array -> image1d.
+ /*!
+ \brief Conversion: util::array -> image1d.
+ \ingroup fromto
+ */
template <typename V, typename T>
void from_to_(const util::array<V>& from, image1d<T>& to);
- /// \endcond
+
// array_fwd_iter<T>
diff --git a/milena/mln/util/object_id.hh b/milena/mln/util/object_id.hh
index a63bb73..0f50c3b 100644
--- a/milena/mln/util/object_id.hh
+++ b/milena/mln/util/object_id.hh
@@ -91,7 +91,10 @@ namespace mln
bool
operator<(const object_id<Tag,V>& lhs, const object_id<Tag,V>& rhs);
- /// \internal Conversion: object_id<Tag,V> -> V.
+ /*!
+ \brief Conversion: object_id<Tag,V> -> V.
+ \ingroup fromto
+ */
template <typename Tag, typename V>
void from_to_(const util::object_id<Tag,V>& from, V& to_);
diff --git a/milena/mln/value/hsl.hh b/milena/mln/value/hsl.hh
index 2cbcbe0..9cef0ba 100644
--- a/milena/mln/value/hsl.hh
+++ b/milena/mln/value/hsl.hh
@@ -213,54 +213,62 @@ namespace mln
/// \param[in] c An rgb.
///
/// \return The modified output stream \p ostr.
+ /// \relates hsl_
template <typename H, typename S, typename L>
std::ostream& operator<<(std::ostream& ostr, const hsl_<H,S,L>& c);
- /// Addition.
- /// {
+ /*! \brief Addition with HSL.
+ \relates hsl_
+ */
template <typename H, typename S, typename L>
hsl_<H,S,L>
operator+(const hsl_<H,S,L>& lhs, const hsl_<H,S,L>& rhs);
- /// \}
- /// Subtraction.
- /// \{
+ /*! \brief Substraction with HSL.
+ \relates hsl_
+ */
template <typename H, typename S, typename L>
hsl_<H,S,L>
operator-(const hsl_<H,S,L>& lhs, const hsl_<H,S,L>& rhs);
- /// \}
- /// Product.
- /// \{
+ /*! \brief Product with HSL.
+ \relates hsl_
+ */
template <typename H, typename S, typename L, typename S2>
hsl_<H,S,L>
operator*(const hsl_<H,S,L>& lhs, const mln::value::scalar_<S2>& s);
- /// \}
- /// Division.
- /// \{
+ /*! \brief Division with HSL.
+ \relates hsl_
+ */
template <typename H, typename S, typename L, typename S2>
hsl_<H,S,L>
operator/(const hsl_<H,S,L>& lhs, const mln::value::scalar_<S2>& s);
/// \}
- /// Comparison.
- /// \{
+ /*! \brief Comparison with HSL.
+ \relates hsl_
+ */
template <typename H, typename S, typename L>
bool
operator==(const hsl_<H,S,L>& lhs, const hsl_<H,S,L>& rhs);
- /// \}
/// \cond INTERNAL_API
// Conversions
- /// \internal Conversion: hsl -> qt::rgb32.
+ /*!
+ \brief Conversion: hsl -> qt::rgb32.
+ \ingroup fromto
+ */
template <typename H, typename S, typename L>
void from_to_(const hsl_<H,S,L>& from, qt::rgb32& to);
- /// \internal Conversion: hsl -> rgb8.
+ /*!
+ \brief Conversion: hsl -> rgb8.
+ \ingroup fromto
+ */
template <typename H, typename S, typename L>
void from_to_(const value::hsl_<H,S,L>&, value::rgb<8>& to);
/// \endcond
diff --git a/milena/mln/value/int_u.hh b/milena/mln/value/int_u.hh
index 8e1e0ec..cfe2252 100644
--- a/milena/mln/value/int_u.hh
+++ b/milena/mln/value/int_u.hh
@@ -188,31 +188,49 @@ namespace mln
// Conversions
- /// \internal Conversion: int_u -> unsigned.
+ /*!
+ \brief Conversion: int_u -> unsigned.
+ \ingroup fromto
+ */
template <unsigned n>
void from_to_(const int_u<n>& from, unsigned& to_);
- /// \internal Conversion: int_u -> bool.
+ /*!
+ \brief Conversion: int_u -> bool.
+ \ingroup fromto
+ */
template <unsigned n>
void from_to_(const int_u<n>& from, bool& to_);
- /// \internal Conversion: int_u -> float.
+ /*!
+ \brief Conversion: int_u -> float.
+ \ingroup fromto
+ */
template <unsigned n>
void from_to_(const int_u<n>& from, float& to_);
- /// \internal Conversion: int_u -> double.
+ /*!
+ \brief Conversion: int_u -> double.
+ \ingroup fromto
+ */
template <unsigned n>
void
from_to_(const int_u<n>& from, double& to_);
- /// \internal Conversion: Conversion: int_u -> rgb.
+ /*!
+ \brief Conversion: Conversion: int_u -> rgb.
+ \ingroup fromto
+ */
template <unsigned m>
void from_to_(const int_u<m>& from, qt::rgb32& to);
- /// \internal Conversion: int_u -> rgb.
+ /*!
+ \brief Conversion: int_u -> rgb.
+ \ingroup fromto
+ */
template <unsigned m>
void from_to_(const int_u<m>& from, rgb<m>& to);
diff --git a/milena/mln/value/label.hh b/milena/mln/value/label.hh
index b43a927..b928099 100644
--- a/milena/mln/value/label.hh
+++ b/milena/mln/value/label.hh
@@ -163,24 +163,39 @@ namespace mln
std::ostream& operator<<(std::ostream& ostr, const label<n>& l);
- /// \internal Conversion: int_u -> label.
+ /*!
+ \brief Conversion: int_u -> label.
+ \ingroup fromto
+ */
template <unsigned n>
void from_to_(const value::int_u<n>& from, value::label<n>& to_);
- /// \internal Conversion: label -> int_u.
+ /*!
+ \brief Conversion: label -> int_u.
+ \ingroup fromto
+ */
template <unsigned n>
void from_to_(const value::label<n>& from, value::int_u<n>& to_);
- /// \internal Conversion: int_u -> label.
+ /*!
+ \brief Conversion: int_u -> label.
+ \ingroup fromto
+ */
template <unsigned n, unsigned m>
void from_to_(const value::int_u<n>& from, value::label<m>& to_);
- /// \internal Conversion: label -> bool.
+ /*!
+ \brief Conversion: label -> bool.
+ \ingroup fromto
+ */
template <unsigned n>
void from_to_(const value::label<n>& from, bool& to_);
- /// \internal Conversion: label -> unsigned.
+ /*!
+ \brief Conversion: label -> unsigned.
+ \ingroup fromto
+ */
template <unsigned n>
void from_to_(const value::label<n>& from, unsigned& to_);
diff --git a/milena/mln/value/qt/rgb32.hh b/milena/mln/value/qt/rgb32.hh
index 96404b8..329d01d 100644
--- a/milena/mln/value/qt/rgb32.hh
+++ b/milena/mln/value/qt/rgb32.hh
@@ -330,10 +330,16 @@ namespace mln
/// \}
- /// \internal Conversion: Conversion: #value::qt::rgb32 -> bool.
+ /*!
+ \brief Conversion: Conversion: #value::qt::rgb32 -> bool.
+ \ingroup fromto
+ */
void from_to_(const rgb32& from, bool& to);
- /// \internal Conversion: bool -> #value::qt::rgb32.
+ /*!
+ \brief Conversion: bool -> #value::qt::rgb32.
+ \ingroup fromto
+ */
void from_to_(const bool& from, value::qt::rgb32& to);
} // end of namespace mln::value::qt
diff --git a/milena/mln/value/rgb.hh b/milena/mln/value/rgb.hh
index b29b479..1a38c18 100644
--- a/milena/mln/value/rgb.hh
+++ b/milena/mln/value/rgb.hh
@@ -360,19 +360,31 @@ namespace mln
namespace value
{
- /// \internal Conversion: rgb -> bool.
+ /*!
+ \brief Conversion: rgb -> bool.
+ \ingroup fromto
+ */
template <unsigned m>
void from_to_(const value::rgb<m>& from, bool& to);
- /// \internal Conversion: rgb to hsl_
+ /*!
+ \brief Conversion: rgb to hsl_
+ \ingroup fromto
+ */
void
from_to_(const rgb<16>& from, hsl_<float,float,float>& to);
- /// \internal Conversion: rgb to hsl_
+ /*!
+ \brief Conversion: rgb to hsl_
+ \ingroup fromto
+ */
void
from_to_(const rgb<8>& from, hsl_<float,float,float>& to);
- /// \internal Conversion: bool -> rgb.
+ /*!
+ \brief Conversion: bool -> rgb.
+ \ingroup fromto
+ */
template <unsigned m>
void from_to_(bool from, value::rgb<m>& to);
--
1.7.2.5
1
0

olena: olena-2.0-552-g00a1e34 Explain how to iterate over an image in tutorial.
by Guillaume Lazzara 19 Apr '13
by Guillaume Lazzara 19 Apr '13
19 Apr '13
* doc/examples/split/tuto3_rw_image-3.cc.raw,
* doc/examples/split/tuto3_rw_image-4.cc.raw,
* doc/examples/split/tuto3_rw_image-5.cc.raw,
* doc/examples/split/tuto3_rw_image-6.cc.raw,
* doc/examples/split/tuto3_rw_image-7.cc.raw,
* doc/examples/split/tuto3_rw_image-8.cc.raw: Regen.
* doc/examples/tuto3_rw_image.cc: Add an example with iterators.
* doc/tutorial.tex: Add more explanations on iterators.
---
milena/ChangeLog | 15 +++++++++
milena/doc/examples/split/tuto3_rw_image-3.cc.raw | 6 ++--
milena/doc/examples/split/tuto3_rw_image-4.cc.raw | 2 +-
milena/doc/examples/split/tuto3_rw_image-5.cc.raw | 5 ++-
milena/doc/examples/split/tuto3_rw_image-6.cc.raw | 3 +-
milena/doc/examples/split/tuto3_rw_image-7.cc.raw | 2 +-
...3_rw_image-7.cc.raw => tuto3_rw_image-8.cc.raw} | 0
milena/doc/examples/tuto3_rw_image.cc | 6 ++++
milena/doc/tutorial.tex | 31 ++++++++++++-------
9 files changed, 50 insertions(+), 20 deletions(-)
copy milena/doc/examples/split/{tuto3_rw_image-7.cc.raw => tuto3_rw_image-8.cc.raw} (100%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index c4a23a0..6c15ccc 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,20 @@
2013-04-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Explain how to iterate over an image in tutorial.
+
+ * doc/examples/split/tuto3_rw_image-3.cc.raw,
+ * doc/examples/split/tuto3_rw_image-4.cc.raw,
+ * doc/examples/split/tuto3_rw_image-5.cc.raw,
+ * doc/examples/split/tuto3_rw_image-6.cc.raw,
+ * doc/examples/split/tuto3_rw_image-7.cc.raw,
+ * doc/examples/split/tuto3_rw_image-8.cc.raw: Regen.
+
+ * doc/examples/tuto3_rw_image.cc: Add an example with iterators.
+
+ * doc/tutorial.tex: Add more explanations on iterators.
+
+2013-04-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Introduce image transformation module in documentation.
* doc/mln/main.dox: Create new group.
diff --git a/milena/doc/examples/split/tuto3_rw_image-3.cc.raw b/milena/doc/examples/split/tuto3_rw_image-3.cc.raw
index f25ab40..88b5a64 100644
--- a/milena/doc/examples/split/tuto3_rw_image-3.cc.raw
+++ b/milena/doc/examples/split/tuto3_rw_image-3.cc.raw
@@ -1,3 +1,3 @@
- for (def::coord row = 20; row < 30; ++row)
- for (def::coord col = 20; col < 30; ++col)
- ima(point2d(row, col)) = literal::blue;
+ mln_piter(image2d<value::rgb8>) p(ima.domain());
+ for_all(p)
+ ima(p) = literal::red;
diff --git a/milena/doc/examples/split/tuto3_rw_image-4.cc.raw b/milena/doc/examples/split/tuto3_rw_image-4.cc.raw
index 06559c5..f25ab40 100644
--- a/milena/doc/examples/split/tuto3_rw_image-4.cc.raw
+++ b/milena/doc/examples/split/tuto3_rw_image-4.cc.raw
@@ -1,3 +1,3 @@
for (def::coord row = 20; row < 30; ++row)
for (def::coord col = 20; col < 30; ++col)
- opt::at(ima, row, col) = literal::blue;
+ ima(point2d(row, col)) = literal::blue;
diff --git a/milena/doc/examples/split/tuto3_rw_image-5.cc.raw b/milena/doc/examples/split/tuto3_rw_image-5.cc.raw
index d98037c..06559c5 100644
--- a/milena/doc/examples/split/tuto3_rw_image-5.cc.raw
+++ b/milena/doc/examples/split/tuto3_rw_image-5.cc.raw
@@ -1,2 +1,3 @@
- image2d<value::rgb8> lena;
- io::ppm::load(lena, MLN_IMG_DIR "/small.ppm");
+ for (def::coord row = 20; row < 30; ++row)
+ for (def::coord col = 20; col < 30; ++col)
+ opt::at(ima, row, col) = literal::blue;
diff --git a/milena/doc/examples/split/tuto3_rw_image-6.cc.raw b/milena/doc/examples/split/tuto3_rw_image-6.cc.raw
index 10eb29f..d98037c 100644
--- a/milena/doc/examples/split/tuto3_rw_image-6.cc.raw
+++ b/milena/doc/examples/split/tuto3_rw_image-6.cc.raw
@@ -1 +1,2 @@
- data::fill(ima, lena);
+ image2d<value::rgb8> lena;
+ io::ppm::load(lena, MLN_IMG_DIR "/small.ppm");
diff --git a/milena/doc/examples/split/tuto3_rw_image-7.cc.raw b/milena/doc/examples/split/tuto3_rw_image-7.cc.raw
index d362105..10eb29f 100644
--- a/milena/doc/examples/split/tuto3_rw_image-7.cc.raw
+++ b/milena/doc/examples/split/tuto3_rw_image-7.cc.raw
@@ -1 +1 @@
- data::paste(ima, lena);
+ data::fill(ima, lena);
diff --git a/milena/doc/examples/split/tuto3_rw_image-7.cc.raw b/milena/doc/examples/split/tuto3_rw_image-8.cc.raw
similarity index 100%
copy from milena/doc/examples/split/tuto3_rw_image-7.cc.raw
copy to milena/doc/examples/split/tuto3_rw_image-8.cc.raw
diff --git a/milena/doc/examples/tuto3_rw_image.cc b/milena/doc/examples/tuto3_rw_image.cc
index 14ba056..6e84f32 100644
--- a/milena/doc/examples/tuto3_rw_image.cc
+++ b/milena/doc/examples/tuto3_rw_image.cc
@@ -49,6 +49,12 @@ int main()
// \}
// \{
+ mln_piter(image2d<value::rgb8>) p(ima.domain());
+ for_all(p)
+ ima(p) = literal::red;
+ // \}
+
+ // \{
for (def::coord row = 20; row < 30; ++row)
for (def::coord col = 20; col < 30; ++col)
ima(point2d(row, col)) = literal::blue;
diff --git a/milena/doc/tutorial.tex b/milena/doc/tutorial.tex
index e67a9da..3e016ed 100644
--- a/milena/doc/tutorial.tex
+++ b/milena/doc/tutorial.tex
@@ -1474,13 +1474,20 @@ After this step you should know how to:
First create an empty color image with a \var{box2d} of 40x40 as domain.
\doxycode[1]{tuto3_rw_image}
-If you want to initialize the image with the color red, simply call data::fill as follows:
+If you want to initialize the image with the color red, you can
+iterate over all the image pixels using iterators:
+\doxycode[3]{tuto3_rw_image}
+
+Or simply call data::fill as follows:
\doxycode[2]{tuto3_rw_image}
-Updating a site value is also possible using \code{operator()} or the
-\code{opt::at()} routine. Here we create a blue square of 10x10 pixels from site
-(20, 20) to (30, 30).
-\doxycode[3]{tuto3_rw_image}
+Updating a site value is also possible using the \code{opt::at()}
+routine. Here we create a blue square of 10x10 pixels from site (20,
+20) to (30, 30).
+\doxycode[5]{tuto3_rw_image}
+
+The following code with image2d::operator() is also possible but may
+be slower because of the creation of a point2d.
\doxycode[4]{tuto3_rw_image}
The corresponding image: \\
@@ -1489,27 +1496,27 @@ The corresponding image: \\
An image can also be initialized/modified thanks to another image.
Let's load a new image.
-\doxycode[5]{tuto3_rw_image}
+\doxycode[6]{tuto3_rw_image}
\var{lena} looks like: \\
\doxyimg{small-enlarged}{3cm}
If we want to initialize \var{ima} with \var{lena}, we can use \code{data::fill}:
-\doxycode[6]{tuto3_rw_image}
+\doxycode[7]{tuto3_rw_image}
Output: \\
\doxyfigure[2]{tuto3_rw_image}{3cm} \\
-Note that to fill an image with some data, the image domain \must be smaller
-or equal to the data.
+Note that to fill an image with some data, the image domain \must be
+smaller or equal to the data.
Likewise, it is possible to paste data from an image to another:
-\doxycode[7]{tuto3_rw_image}
+\doxycode[8]{tuto3_rw_image}
Output: \\
\doxyfigure[3]{tuto3_rw_image}{3cm}
-More details can be found in sections \doxyref{imaaccessmodval}, \doxyref{fillop} and \doxyref{pasteop} in
-the reference guide.
+More details can be found in sections \doxyref{imaaccessmodval},
+\doxyref{fillop} and \doxyref{pasteop} in the reference guide.
\vspace{2cm}
\begin{center}
--
1.7.2.5
1
0
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch exp/newdoc has been updated
via 61eb85aae63899be7b13c45c08e022bb6cd223ac (commit)
from b14fad47f31cd31e47452c2997c4e80377eb7669 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
61eb85a Introduce image transformation module in documentation.
-----------------------------------------------------------------------
Summary of changes:
milena/ChangeLog | 17 +++++++++++++++++
milena/doc/mln/main.dox | 7 +++++++
milena/mln/geom/crop.hh | 6 +++---
milena/mln/geom/crop_without_localization.hh | 6 +++---
milena/mln/geom/horizontal_symmetry.hh | 6 +++---
milena/mln/geom/rotate.hh | 10 +++++-----
milena/mln/geom/translate.hh | 8 ++++----
milena/mln/geom/vertical_symmetry.hh | 6 +++---
milena/mln/registration/icp.hh | 3 +++
milena/mln/subsampling/antialiased.hh | 12 ++++++++++--
milena/mln/upscaling/art/scale2x.hh | 6 +++---
milena/mln/upscaling/art/scale3x.hh | 6 +++---
12 files changed, 64 insertions(+), 29 deletions(-)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0

olena-2.0-551-g61eb85a Introduce image transformation module in documentation.
by Guillaume Lazzara 19 Apr '13
by Guillaume Lazzara 19 Apr '13
19 Apr '13
* doc/mln/main.dox: Create new group.
* mln/geom/crop.hh,
* mln/geom/crop_without_localization.hh,
* mln/geom/horizontal_symmetry.hh,
* mln/geom/rotate.hh,
* mln/geom/translate.hh,
* mln/geom/vertical_symmetry.hh,
* mln/registration/icp.hh,
* mln/subsampling/antialiased.hh,
* mln/upscaling/art/scale2x.hh,
* mln/upscaling/art/scale3x.hh: move to this new group.
---
milena/ChangeLog | 17 +++++++++++++++++
milena/doc/mln/main.dox | 7 +++++++
milena/mln/geom/crop.hh | 6 +++---
milena/mln/geom/crop_without_localization.hh | 6 +++---
milena/mln/geom/horizontal_symmetry.hh | 6 +++---
milena/mln/geom/rotate.hh | 10 +++++-----
milena/mln/geom/translate.hh | 8 ++++----
milena/mln/geom/vertical_symmetry.hh | 6 +++---
milena/mln/registration/icp.hh | 3 +++
milena/mln/subsampling/antialiased.hh | 12 ++++++++++--
milena/mln/upscaling/art/scale2x.hh | 6 +++---
milena/mln/upscaling/art/scale3x.hh | 6 +++---
12 files changed, 64 insertions(+), 29 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index e081229..c4a23a0 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,22 @@
2013-04-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Introduce image transformation module in documentation.
+
+ * doc/mln/main.dox: Create new group.
+
+ * mln/geom/crop.hh,
+ * mln/geom/crop_without_localization.hh,
+ * mln/geom/horizontal_symmetry.hh,
+ * mln/geom/rotate.hh,
+ * mln/geom/translate.hh,
+ * mln/geom/vertical_symmetry.hh,
+ * mln/registration/icp.hh,
+ * mln/subsampling/antialiased.hh,
+ * mln/upscaling/art/scale2x.hh,
+ * mln/upscaling/art/scale3x.hh: move to this new group.
+
+2013-04-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Make template parameter name more consistant with naming
conventions.
diff --git a/milena/doc/mln/main.dox b/milena/doc/mln/main.dox
index 8cf0f87..8ee0e92 100644
--- a/milena/doc/mln/main.dox
+++ b/milena/doc/mln/main.dox
@@ -95,3 +95,10 @@
*
* \ingroup modroutines
*/
+
+/*! \defgroup mlntransformation Image Transformation
+ *
+ * \brief All transformation algorithms.
+ *
+ * \ingroup modroutines
+ */
diff --git a/milena/mln/geom/crop.hh b/milena/mln/geom/crop.hh
index 38841f7..7f557be 100644
--- a/milena/mln/geom/crop.hh
+++ b/milena/mln/geom/crop.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2011, 2012 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2011, 2012, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -43,7 +43,7 @@ namespace mln
/*! \brief Crop an image
- \ingroup mlngeom
+ \ingroup mlntransformation
*/
template <typename I, typename B>
mln_concrete(I) crop(const Image<I>& input, const Box<B>& b);
diff --git a/milena/mln/geom/crop_without_localization.hh b/milena/mln/geom/crop_without_localization.hh
index 9236d33..b2a5858 100644
--- a/milena/mln/geom/crop_without_localization.hh
+++ b/milena/mln/geom/crop_without_localization.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2011, 2012 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2011, 2012, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -45,7 +45,7 @@ namespace mln
/*! \brief Crop an image. Localization between input and output
* may not be preserved.
- \ingroup mlngeom
+ \ingroup mlntransformation
*/
template <typename I, typename B>
mln_concrete(I) crop_without_localization(const Image<I>& input,
diff --git a/milena/mln/geom/horizontal_symmetry.hh b/milena/mln/geom/horizontal_symmetry.hh
index cff3479..558c26d 100644
--- a/milena/mln/geom/horizontal_symmetry.hh
+++ b/milena/mln/geom/horizontal_symmetry.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2010, 2012 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2010, 2012, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -43,7 +43,7 @@ namespace mln
/*! \brief Perfoms a horizontal symmetry.
- \ingroup mlngeom
+ \ingroup mlntransformation
*/
template <typename I>
mln_concrete(I)
diff --git a/milena/mln/geom/rotate.hh b/milena/mln/geom/rotate.hh
index c7b5b3a..ce0dbef 100644
--- a/milena/mln/geom/rotate.hh
+++ b/milena/mln/geom/rotate.hh
@@ -79,7 +79,7 @@ namespace mln
\return An image with the same domain as \p input.
- \ingroup mlngeom
+ \ingroup mlntransformation
*/
template <typename I, typename Ext, typename S>
mln_concrete(I)
@@ -89,7 +89,7 @@ namespace mln
/*! \overload
- \ingroup mlngeom
+ \ingroup mlntransformation
*/
template <typename I, typename Ext>
mln_concrete(I)
@@ -99,7 +99,7 @@ namespace mln
/*! \overload
Use literal::zero as default value for the extension.
- \ingroup mlngeom
+ \ingroup mlntransformation
*/
template <typename I>
mln_concrete(I)
@@ -111,7 +111,7 @@ namespace mln
FIXME: the return type may be too generic and may lead to
invalid covariance.
- \ingroup mlngeom
+ \ingroup mlntransformation
*/
template <typename B>
B
@@ -121,7 +121,7 @@ namespace mln
The rotation center \p ref is set to box.pcenter().
- \ingroup mlngeom
+ \ingroup mlntransformation
*/
template <typename B>
B
diff --git a/milena/mln/geom/translate.hh b/milena/mln/geom/translate.hh
index a949a8c..73a0f72 100644
--- a/milena/mln/geom/translate.hh
+++ b/milena/mln/geom/translate.hh
@@ -64,11 +64,11 @@ namespace mln
of the domain before the translation.
\param[in] output_domain The domain of the output image. An
invalid domain, causes the routine
- to use the translated input_ domain.
+ to use the translated input domain.
\return An image with the same domain as \p input.
- \ingroup mlngeom
+ \ingroup mlntransformation
*/
template <typename I, typename V, typename Ext, typename S>
mln_concrete(I)
@@ -79,7 +79,7 @@ namespace mln
/*! \overload
- \ingroup mlngeom
+ \ingroup mlntransformation
*/
template <typename I, typename V, typename Ext>
mln_concrete(I)
@@ -91,7 +91,7 @@ namespace mln
/*! \overload
Use literal::zero as default value for the extension.
- \ingroup mlngeom
+ \ingroup mlntransformation
*/
template <typename I, typename V>
mln_concrete(I)
diff --git a/milena/mln/geom/vertical_symmetry.hh b/milena/mln/geom/vertical_symmetry.hh
index 019b866..9ae2885 100644
--- a/milena/mln/geom/vertical_symmetry.hh
+++ b/milena/mln/geom/vertical_symmetry.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2010, 2012 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2010, 2012, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -43,7 +43,7 @@ namespace mln
/*! \brief Perfoms a vertical symmetry.
- \ingroup mlngeom
+ \ingroup mlntransformation
*/
template <typename I>
mln_concrete(I)
diff --git a/milena/mln/registration/icp.hh b/milena/mln/registration/icp.hh
index 7c82202..1176802 100644
--- a/milena/mln/registration/icp.hh
+++ b/milena/mln/registration/icp.hh
@@ -109,6 +109,7 @@ namespace mln
*
* This implementation is based on \cite besl1992pami.
*
+ * \ingroup mlntransformation
*/
template <typename P, typename F>
std::pair<algebra::quat,mln_vec(P)>
@@ -128,6 +129,8 @@ namespace mln
*
* \return the rigid transformation which may be use later to create
* a registered image.
+ *
+ * \ingroup mlntransformation
*/
template <typename P, typename F>
composed< translation<P::dim,float>,rotation<P::dim,float> >
diff --git a/milena/mln/subsampling/antialiased.hh b/milena/mln/subsampling/antialiased.hh
index 378f452..1bf5f57 100644
--- a/milena/mln/subsampling/antialiased.hh
+++ b/milena/mln/subsampling/antialiased.hh
@@ -51,7 +51,11 @@ namespace mln
\param[in] output_domain Force output domain.
\param[in] border_thickness Force output border thickness.
- \ingroup mlngeom
+ \p output_domain should be large enough to store all the image
+ values. It can be larger than the minimum size required to store
+ all the image values.
+
+ \ingroup mlntransformation
*/
template <typename I>
inline
@@ -63,7 +67,11 @@ namespace mln
/*! \overload
- \ingroup mlngeom
+
+ The output_domain is set to the minimum domain size required to
+ store all the image values. This is the common use case.
+
+ \ingroup mlntransformation
*/
template <typename I>
mln_concrete(I)
diff --git a/milena/mln/upscaling/art/scale2x.hh b/milena/mln/upscaling/art/scale2x.hh
index e4a5ae8..2d50bee 100644
--- a/milena/mln/upscaling/art/scale2x.hh
+++ b/milena/mln/upscaling/art/scale2x.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2012 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2012, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -59,7 +59,7 @@ namespace mln
Source:
http://en.wikipedia.org/wiki/Pixel_art_scaling_algorithms
- \ingroup mlngeom
+ \ingroup mlntransformation
*/
template <typename I>
mln_concrete(I)
diff --git a/milena/mln/upscaling/art/scale3x.hh b/milena/mln/upscaling/art/scale3x.hh
index 5bd94b6..4400a79 100644
--- a/milena/mln/upscaling/art/scale3x.hh
+++ b/milena/mln/upscaling/art/scale3x.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2012 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2012, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -59,7 +59,7 @@ namespace mln
Source:
http://en.wikipedia.org/wiki/Pixel_art_scaling_algorithms
- \ingroup mlngeom
+ \ingroup mlntransformation
*/
template <typename I>
mln_concrete(I)
--
1.7.2.5
1
0