2846: Add new typedefs for commonly-used complex-based images.

* mln/core/alias/complex_geometry.hh: New. Use it... * mln/core/alias/bin_2complex_image3df.hh: ...here. Rename as... * mln/core/alias/complex_image.hh: ...this. Adjust (mln::int_u8_2complex_image3df) (mln::float_2complex_image3df) (mln::rgb8_2complex_image3df): New typedefs. * mln/io/off/load.hh, * mln/io/off/save.hh Adjust clients. --- milena/ChangeLog | 18 +++++++++ ...in_2complex_image3df.hh => complex_geometry.hh} | 19 ++++------ .../{bin_2complex_image3df.hh => complex_image.hh} | 39 ++++++++++++++++---- milena/mln/io/off/load.hh | 2 +- milena/mln/io/off/save.hh | 2 +- 5 files changed, 59 insertions(+), 21 deletions(-) copy milena/mln/core/alias/{bin_2complex_image3df.hh => complex_geometry.hh} (72%) rename milena/mln/core/alias/{bin_2complex_image3df.hh => complex_image.hh} (58%) diff --git a/milena/ChangeLog b/milena/ChangeLog index 3e28a7e..3ffe29b 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,23 @@ 2008-11-12 Roland Levillain <roland@lrde.epita.fr> + Add new typedefs for commonly-used complex-based images. + + * mln/core/alias/complex_geometry.hh: New. + Use it... + * mln/core/alias/bin_2complex_image3df.hh: ...here. + Rename as... + * mln/core/alias/complex_image.hh: ...this. + Adjust + (mln::int_u8_2complex_image3df) + (mln::float_2complex_image3df) + (mln::rgb8_2complex_image3df): + New typedefs. + * mln/io/off/load.hh, + * mln/io/off/save.hh + Adjust clients. + +2008-11-12 Roland Levillain <roland@lrde.epita.fr> + Properly handle command-line arguments in apps/statues/. * apps/statues/mesh-segm.cc, apps/statues/mesh-skel.cc: diff --git a/milena/mln/core/alias/bin_2complex_image3df.hh b/milena/mln/core/alias/complex_geometry.hh similarity index 72% copy from milena/mln/core/alias/bin_2complex_image3df.hh copy to milena/mln/core/alias/complex_geometry.hh index c429752..3bde2d4 100644 --- a/milena/mln/core/alias/bin_2complex_image3df.hh +++ b/milena/mln/core/alias/complex_geometry.hh @@ -25,13 +25,12 @@ // reasons why the executable file might be covered by the GNU General // Public License. -#ifndef MLN_CORE_ALIAS_BIN_2COMPLEX_IMAGE3DF_HH -# define MLN_CORE_ALIAS_BIN_2COMPLEX_IMAGE3DF_HH +#ifndef MLN_CORE_ALIAS_COMPLEX_GEOMETRY_HH +# define MLN_CORE_ALIAS_COMPLEX_GEOMETRY_HH -/// \file mln/core/alias/bin_2complex_image3df.hh -/// \brief Definition of the mln::bin_2complex_image3df alias. +/// \file mln/core/alias/complex_geometry.hh +/// \brief Definition of mln::geom::complex_geometry aliases. -# include <mln/core/image/complex_image.hh> # include <mln/geom/complex_geometry.hh> # include <mln/core/alias/point3df.hh> @@ -39,13 +38,11 @@ namespace mln { - /// \brief Type alias for a binary image based on a 2-complex, where - /// 0-faces are located at floating-point 3-dimensional points. - typedef - mln::complex_image<2, mln::geom::complex_geometry<2,point3df>, bool> - bin_2complex_image3df; + /// \brief Type alias for the geometry of a 2-complex located in a + /// 3-dimensional space (with floating-point coordinates). + typedef mln::geom::complex_geometry<2,point3df> space_2complex_geometry; } // end of namespace mln -#endif // ! MLN_CORE_ALIAS_BIN_2COMPLEX_IMAGE3DF_HH +#endif // ! MLN_CORE_ALIAS_COMPLEX_GEOMETRY_HH diff --git a/milena/mln/core/alias/bin_2complex_image3df.hh b/milena/mln/core/alias/complex_image.hh similarity index 58% rename from milena/mln/core/alias/bin_2complex_image3df.hh rename to milena/mln/core/alias/complex_image.hh index c429752..9dc5956 100644 --- a/milena/mln/core/alias/bin_2complex_image3df.hh +++ b/milena/mln/core/alias/complex_image.hh @@ -25,15 +25,17 @@ // reasons why the executable file might be covered by the GNU General // Public License. -#ifndef MLN_CORE_ALIAS_BIN_2COMPLEX_IMAGE3DF_HH -# define MLN_CORE_ALIAS_BIN_2COMPLEX_IMAGE3DF_HH +#ifndef MLN_CORE_ALIAS_COMPLEX_IMAGE_HH +# define MLN_CORE_ALIAS_COMPLEX_IMAGE_HH -/// \file mln/core/alias/bin_2complex_image3df.hh -/// \brief Definition of the mln::bin_2complex_image3df alias. +/// \file mln/core/alias/complex_image.hh +/// \brief Definition of mln::complex_image aliases. # include <mln/core/image/complex_image.hh> -# include <mln/geom/complex_geometry.hh> -# include <mln/core/alias/point3df.hh> +# include <mln/core/alias/complex_geometry.hh> + +# include <mln/value/int_u8.hh> +# include <mln/value/rgb8.hh> namespace mln @@ -42,10 +44,31 @@ namespace mln /// \brief Type alias for a binary image based on a 2-complex, where /// 0-faces are located at floating-point 3-dimensional points. typedef - mln::complex_image<2, mln::geom::complex_geometry<2,point3df>, bool> + mln::complex_image<2, mln::space_2complex_geometry, bool> bin_2complex_image3df; + /// \brief Type alias for a grey-level image based on a 2-complex, + /// where 0-faces are located at floating-point 3-dimensional + /// points. + typedef + mln::complex_image<2, mln::space_2complex_geometry, mln::value::int_u8> + int_u8_2complex_image3df; + + /// \brief Type alias for a floating-point image based on a + /// 2-complex, where 0-faces are located at floating-point + /// 3-dimensional points. + typedef + mln::complex_image<2, mln::space_2complex_geometry, float> + float_2complex_image3df; + + /// \brief Type alias for a (3x8-bit) RGB image based on a + /// 2-complex, where 0-faces are located at floating-point + /// 3-dimensional points. + typedef + mln::complex_image<2, mln::space_2complex_geometry, mln::value::rgb8> + rgb8_2complex_image3df; + } // end of namespace mln -#endif // ! MLN_CORE_ALIAS_BIN_2COMPLEX_IMAGE3DF_HH +#endif // ! MLN_CORE_ALIAS_COMPLEX_IMAGE_HH diff --git a/milena/mln/io/off/load.hh b/milena/mln/io/off/load.hh index 092d439..05160d0 100644 --- a/milena/mln/io/off/load.hh +++ b/milena/mln/io/off/load.hh @@ -40,7 +40,7 @@ # include <string> -# include <mln/core/alias/bin_2complex_image3df.hh> +# include <mln/core/alias/complex_image.hh> namespace mln diff --git a/milena/mln/io/off/save.hh b/milena/mln/io/off/save.hh index ff47744..4273821 100644 --- a/milena/mln/io/off/save.hh +++ b/milena/mln/io/off/save.hh @@ -41,7 +41,7 @@ # include <string> -# include <mln/core/alias/bin_2complex_image3df.hh> +# include <mln/core/alias/complex_image.hh> # include <mln/core/image/complex_neighborhoods.hh> # include <mln/core/image/complex_neighborhood_piter.hh> -- 1.6.0.1
participants (1)
-
Roland Levillain