last-svn-commit-168-g102284f Add a Swilena wrapper for mln::image2d<mln::point2d>.

* image2d_point2d.i: New. * Makefile.am (wrappers): Add image2d_point2d.i. * python/Makefile.am (pyexec_LTLIBRARIES): Add _image2d_point2d.la. (nodist__image2d_point2d_la_SOURCES, _image2d_point2d_la_LIBADD): New. (CLEANFILES): Add $(nodist__image2d_point2d_la_SOURCES) image2d_point2d.py image2d_point2d.py[co]. (nodist_python_PYTHON): Add image2d_point2d.py. (image2d_point2d-wrap.cc): Add dependencies. * python/swilena.py: Import image2d_point2d. --- swilena/ChangeLog | 16 ++++++++++ swilena/Makefile.am | 1 + swilena/{image2d_int.i => image2d_point2d.i} | 42 +++++++++++++------------ swilena/python/Makefile.am | 14 ++++++++ swilena/python/swilena.py | 2 + 5 files changed, 55 insertions(+), 20 deletions(-) copy swilena/{image2d_int.i => image2d_point2d.i} (67%) diff --git a/swilena/ChangeLog b/swilena/ChangeLog index 89da33d..b0145d8 100644 --- a/swilena/ChangeLog +++ b/swilena/ChangeLog @@ -1,5 +1,21 @@ 2010-04-01 Roland Levillain <roland@lrde.epita.fr> + Add a Swilena wrapper for mln::image2d<mln::point2d>. + + * image2d_point2d.i: New. + * Makefile.am (wrappers): Add image2d_point2d.i. + * python/Makefile.am (pyexec_LTLIBRARIES): + Add _image2d_point2d.la. + (nodist__image2d_point2d_la_SOURCES, _image2d_point2d_la_LIBADD): + New. + (CLEANFILES): Add $(nodist__image2d_point2d_la_SOURCES) + image2d_point2d.py image2d_point2d.py[co]. + (nodist_python_PYTHON): Add image2d_point2d.py. + (image2d_point2d-wrap.cc): Add dependencies. + * python/swilena.py: Import image2d_point2d. + +2010-04-01 Roland Levillain <roland@lrde.epita.fr> + Have Make generate the Swilena Python Shell (sps). * python/Makefile.am (EXTRA_DIST): Add sps-common.in, sps.in and diff --git a/swilena/Makefile.am b/swilena/Makefile.am index f484707..98eb4f6 100644 --- a/swilena/Makefile.am +++ b/swilena/Makefile.am @@ -45,6 +45,7 @@ wrappers = \ dpoint2d.i \ image2d_int.i \ image2d_int_u8.i \ + image2d_point2d.i \ image2d_rgb8.i \ int_u32.i \ int_u8.i \ diff --git a/swilena/image2d_int.i b/swilena/image2d_point2d.i similarity index 67% copy from swilena/image2d_int.i copy to swilena/image2d_point2d.i index ac82fe6..0ef3bd9 100644 --- a/swilena/image2d_int.i +++ b/swilena/image2d_point2d.i @@ -1,5 +1,5 @@ -// -*- C++ -*- -// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// -*- C++ -*- +// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE) // // This file is part of Olena. // @@ -24,28 +24,30 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. -/// \file image2d.i -/// \brief A simple wrapping of mln::image2d<int> along with some -/// algorithms. +/// \file image2d_point2d.i +/// \brief A simple wrapping of mln::image2d<mln::point2d> along +/// with some algorithms. -%module image2d_int +%module image2d_point2d + +%import "point2d.i" +// FIXME: The import directive does not include the `%{ ... %}' clauses. +%{ +#include "mln/core/alias/point2d.hh" +%} + +%include concat.ixx -%include "intp.ixx" %include "image2d.ixx" -instantiate_image2d(image2d_int, int) +instantiate_image2d(image2d_point2d, + concat2(mln::point< mln::grid::square, mln::def::coord >)) %include "fill.ixx" -%template(fill) mln::data::fill< mln::image2d<int> >; +%template(fill) +mln::data::fill< mln::image2d< mln::point< mln::grid::square, + mln::def::coord> > >; %include "println.ixx" -%template(println) mln::debug::println< mln::image2d<int> >; - -%import "window2d.i" -// FIXME: The import directive does not include the `%{ ... %}' clauses. -%{ -#include "mln/core/alias/window2d.hh" -%} - -%include "morpho.ixx" -instantiate_erosion(erosion, mln::image2d<int>, mln::window2d) -instantiate_dilation(dilation, mln::image2d<int>, mln::window2d) +%template(println) +mln::debug::println< mln::image2d< mln::point< mln::grid::square, + mln::def::coord> > >; diff --git a/swilena/python/Makefile.am b/swilena/python/Makefile.am index 9693c2e..71ca9e7 100644 --- a/swilena/python/Makefile.am +++ b/swilena/python/Makefile.am @@ -194,6 +194,16 @@ CLEANFILES += $(nodist__image2d_rgb8_la_SOURCES) image2d_rgb8.py image2d_rgb8.py @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_image2d_rgb8-wrap.Pcc@am__quote@ nodist_python_PYTHON += image2d_rgb8.py +## image2d_point2d. +pyexec_LTLIBRARIES += _image2d_point2d.la +nodist__image2d_point2d_la_SOURCES = image2d_point2d-wrap.cc +_image2d_point2d_la_LIBADD = $(AM_LIBADD) +CLEANFILES += $(nodist__image2d_point2d_la_SOURCES) image2d_point2d.py image2d_point2d.py[co] +## Include the dependency files. Copied from Automake's generated +## case for C++. +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_image2d_point2d-wrap.Pcc@am__quote@ +nodist_python_PYTHON += image2d_point2d.py + ## dynamic_image2d. pyexec_LTLIBRARIES += _dynamic_image2d.la # Swig also generates a header for this module, since it makes use of @@ -255,6 +265,10 @@ image2d_rgb8-wrap.cc: $(top_srcdir)/swilena/ppm.ixx image2d_rgb8-wrap.cc: $(top_srcdir)/swilena/fill.ixx image2d_rgb8-wrap.cc: $(top_srcdir)/swilena/println.ixx +image2d_point2d-wrap.cc: $(top_srcdir)/swilena/image2d.ixx +image2d_point2d-wrap.cc: $(top_srcdir)/swilena/fill.ixx +image2d_point2d-wrap.cc: $(top_srcdir)/swilena/println.ixx + ## ---------------------------- ## ## Swilena Python Shell (sps). ## diff --git a/swilena/python/swilena.py b/swilena/python/swilena.py index 14b9838..6c4dc89 100644 --- a/swilena/python/swilena.py +++ b/swilena/python/swilena.py @@ -37,3 +37,5 @@ from rgb8 import * import image2d_int import image2d_int_u8 import image2d_rgb8 + +import image2d_point2d -- 1.5.6.5
participants (1)
-
Roland Levillain