* image2d_rgb8.i: New file.
* Makefile.am (wrappers): Add image2d_rgb8.i.
* python/swilena.py: Import the contents of module image2d_rgb8.
* python/Makefile.am (pyexec_LTLIBRARIES): Add _image2d_rgb8.la.
(nodist__image2d_rgb8_la_SOURCES, _image2d_rgb8_la_LIBADD): New.
(CLEANFILES): Add $(nodist__image2d_rgb8_la_SOURCES)
image2d_rgb8.py image2d_rgb8.py[co].
(nodist_python_PYTHON): Add image2d_rgb8.py.
(image2d_rgb8-wrap.cc): Add dependencies.
---
swilena/ChangeLog | 14 +++++++++++
swilena/Makefile.am | 1 +
swilena/{image2d_int.i => image2d_rgb8.i} | 36 +++++++++++++++++++---------
swilena/python/Makefile.am | 15 ++++++++++++
swilena/python/swilena.py | 1 +
5 files changed, 55 insertions(+), 12 deletions(-)
copy swilena/{image2d_int.i => image2d_rgb8.i} (62%)
diff --git a/swilena/ChangeLog b/swilena/ChangeLog
index 605c3d5..fb854f5 100644
--- a/swilena/ChangeLog
+++ b/swilena/ChangeLog
@@ -1,5 +1,19 @@
2010-02-08 Roland Levillain <roland(a)lrde.epita.fr>
+ Add a Swilena wrapper for mln::image2d<mln::value::rgb8>.
+
+ * image2d_rgb8.i: New file.
+ * Makefile.am (wrappers): Add image2d_rgb8.i.
+ * python/swilena.py: Import the contents of module image2d_rgb8.
+ * python/Makefile.am (pyexec_LTLIBRARIES): Add _image2d_rgb8.la.
+ (nodist__image2d_rgb8_la_SOURCES, _image2d_rgb8_la_LIBADD): New.
+ (CLEANFILES): Add $(nodist__image2d_rgb8_la_SOURCES)
+ image2d_rgb8.py image2d_rgb8.py[co].
+ (nodist_python_PYTHON): Add image2d_rgb8.py.
+ (image2d_rgb8-wrap.cc): Add dependencies.
+
+2010-02-08 Roland Levillain <roland(a)lrde.epita.fr>
+
Add a Swilena meta-wrapper for PPM I/O.
* ppm.ixx: New file.
diff --git a/swilena/Makefile.am b/swilena/Makefile.am
index 7e84230..f484707 100644
--- a/swilena/Makefile.am
+++ b/swilena/Makefile.am
@@ -45,6 +45,7 @@ wrappers = \
dpoint2d.i \
image2d_int.i \
image2d_int_u8.i \
+ image2d_rgb8.i \
int_u32.i \
int_u8.i \
neighb2d.i \
diff --git a/swilena/image2d_int.i b/swilena/image2d_rgb8.i
similarity index 62%
copy from swilena/image2d_int.i
copy to swilena/image2d_rgb8.i
index ac82fe6..bda1ff9 100644
--- a/swilena/image2d_int.i
+++ b/swilena/image2d_rgb8.i
@@ -1,5 +1,6 @@
-// -*- C++ -*-
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// -*- C++ -*-
+// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -25,20 +26,29 @@
// 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.
+/// \brief A simple wrapping of mln::image2d<mln::value::rgb8> along
+/// with some algorithms.
-%module image2d_int
+%module image2d_rgb8
+
+%import "rgb8.i"
+// FIXME: The import directive does not include the `%{ ... %}' clauses.
+%{
+#include "mln/value/rgb8.hh"
+%}
-%include "intp.ixx"
%include "image2d.ixx"
-instantiate_image2d(image2d_int, int)
+instantiate_image2d(image2d_rgb8, mln::value::rgb<8>)
+
+%include "ppm.ixx"
+%template(load) mln::io::ppm::load< mln::value::rgb<8> >;
+%template(save) mln::io::ppm::save< mln::image2d< mln::value::rgb<8> >
>;
%include "fill.ixx"
-%template(fill) mln::data::fill< mln::image2d<int> >;
+%template(fill) mln::data::fill< mln::image2d< mln::value::rgb<8> > >;
%include "println.ixx"
-%template(println) mln::debug::println< mln::image2d<int> >;
+%template(println) mln::debug::println< mln::image2d< mln::value::rgb<8> >
>;
%import "window2d.i"
// FIXME: The import directive does not include the `%{ ... %}' clauses.
@@ -46,6 +56,8 @@ instantiate_image2d(image2d_int, int)
#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)
+%import "neighb2d.i"
+// FIXME: The import directive does not include the `%{ ... %}' clauses.
+%{
+#include "mln/core/alias/neighb2d.hh"
+%}
diff --git a/swilena/python/Makefile.am b/swilena/python/Makefile.am
index 13b17cc..44b9210 100644
--- a/swilena/python/Makefile.am
+++ b/swilena/python/Makefile.am
@@ -184,6 +184,16 @@ CLEANFILES += $(nodist__image2d_int_u8_la_SOURCES) image2d_int_u8.py
image2d_int
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_image2d_int_u8-wrap.Pcc@am__quote@
nodist_python_PYTHON += image2d_int_u8.py
+## image2d_rgb8.
+pyexec_LTLIBRARIES += _image2d_rgb8.la
+nodist__image2d_rgb8_la_SOURCES = image2d_rgb8-wrap.cc
+_image2d_rgb8_la_LIBADD = $(AM_LIBADD)
+CLEANFILES += $(nodist__image2d_rgb8_la_SOURCES) image2d_rgb8.py image2d_rgb8.py[co]
+## Include the dependency files. Copied from Automake's generated
+## case for C++.
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_image2d_rgb8-wrap.Pcc@am__quote@
+nodist_python_PYTHON += image2d_rgb8.py
+
## dynamic_image2d.
pyexec_LTLIBRARIES += _dynamic_image2d.la
# Swig also generates a header for this module, since it makes use of
@@ -240,6 +250,11 @@ image2d_int_u8-wrap.cc: $(top_srcdir)/swilena/fill.ixx
image2d_int_u8-wrap.cc: $(top_srcdir)/swilena/println.ixx
image2d_int_u8-wrap.cc: $(top_srcdir)/swilena/morpho.ixx $(morpho_ixx_deps)
+image2d_rgb8-wrap.cc: $(top_srcdir)/swilena/image2d.ixx
+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
+
## ---------------------------- ##
## Swilena Python Shell (sps). ##
diff --git a/swilena/python/swilena.py b/swilena/python/swilena.py
index 763bf40..14b9838 100644
--- a/swilena/python/swilena.py
+++ b/swilena/python/swilena.py
@@ -36,3 +36,4 @@ from rgb8 import *
import image2d_int
import image2d_int_u8
+import image2d_rgb8
--
1.5.6.5
Show replies by date