Index: ChangeLog
===================================================================
--- ChangeLog (revision 644)
+++ ChangeLog (working copy)
@@ -1,5 +1,20 @@
2006-10-16 Thierry GERAUD <theo(a)tegucigalpa.lrde.epita.fr>
+ Add binary value type plus update image hierarchy plugs.
+
+ * oln/value/tags.hh: New.
+ * oln/value/bin.hh: New.
+ * oln/value/all.hh: New.
+ * oln/core/abstract/image/type/hierarchy.hh (case_): Rely on value
+ tags.
+ (case_): Overload to handle other value types.
+ (include): Update.
+ * oln/value/greylevel.hh (greylevel_): New conversion operator.
+ (gl1): Remove; now replaced by value::bin.
+ * oln/Makefile.am: Update.
+
+2006-10-16 Thierry GERAUD <theo(a)tegucigalpa.lrde.epita.fr>
+
Add grey-level types.
* tests/grey.cc: New.
Index: oln/core/abstract/image/type/hierarchy.hh
===================================================================
--- oln/core/abstract/image/type/hierarchy.hh (revision 644)
+++ oln/core/abstract/image/type/hierarchy.hh (working copy)
@@ -30,7 +30,7 @@
# include <oln/core/abstract/image.hh>
# include <oln/core/abstract/image/hierarchies.hh>
-# include <xtd/valtraits.hh>
+# include <oln/value/tags.hh>
/* Image ``type'' hierarchy (summary).
@@ -93,34 +93,50 @@
namespace oln
{
- /// Switch on on the grid dimension.
+ /// Switch on the value type.
/// \{
- // ----------------------------------------------- //
- // Cases where the value type is an builtin type. //
- // ----------------------------------------------- //
+ // ------------------------------------- //
+ // Cases where the value type is known. //
+ // ------------------------------------- //
/// Binary case.
template <typename E>
struct case_< image_hierarchy_wrt_type, E, 1 > :
- where_< xtd_is_binary(oln_type_of(E, value)) >
+ where_< value::is_binary<oln_type_of(E, value)> >
{
// Definition of the super class corresponding to this case.
typedef abstract::binary_image<E> ret;
};
- /// Grey-level case.
+ /// Color case.
template <typename E>
struct case_< image_hierarchy_wrt_type, E, 2 > :
- where_< mlc::or_list_< mlc::eq_<oln_type_of(E, value), char>,
- mlc::eq_<oln_type_of(E, value), signed char>,
- mlc::eq_<oln_type_of(E, value), unsigned char> > >
+ where_< value::is_color<oln_type_of(E, value)> >
{
// Definition of the super class corresponding to this case.
+ typedef abstract::color_image<E> ret;
+ };
+
+ /// Grey-level case.
+ template <typename E>
+ struct case_< image_hierarchy_wrt_type, E, 3 > :
+ where_< value::is_grey_level<oln_type_of(E, value)> >
+ {
+ // Definition of the super class corresponding to this case.
typedef abstract::grey_level_image<E> ret;
};
+ /// Label case.
+ template <typename E>
+ struct case_< image_hierarchy_wrt_type, E, 4 > :
+ where_< value::is_label<oln_type_of(E, value)> >
+ {
+ // Definition of the super class corresponding to this case.
+ typedef abstract::label_image<E> ret;
+ };
+
// -------------- //
// Default case. //
// -------------- //
Index: oln/Makefile.am
===================================================================
--- oln/Makefile.am (revision 644)
+++ oln/Makefile.am (working copy)
@@ -152,8 +152,10 @@
morpher/tags.hh \
morpher/thru_fun.hh \
\
+ value/all.hh \
value/default.hh \
value/greylevel.hh \
+ value/tags.hh \
\
basics1d.hh \
basics2d.hh \
Index: oln/value/bin.hh
===================================================================
--- oln/value/bin.hh (revision 0)
+++ oln/value/bin.hh (revision 0)
@@ -0,0 +1,110 @@
+// Copyright (C) 2006 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef OLN_CORE_VALUE_BIN_HH
+# define OLN_CORE_VALUE_BIN_HH
+
+# include <mlc/bexpr.hh>
+# include <xtd/optraits.hh>
+# include <xtd/valtraits.hh>
+# include <oln/value/greylevel.hh>
+
+
+namespace oln
+{
+
+ namespace value
+ {
+
+ typedef greylevel_<1> bin;
+
+
+ // Binary ops.
+ bin operator and(bin lhs, bin rhs);
+ bin operator or(bin lhs, bin rhs);
+ bin operator xor(bin lhs, bin rhs);
+
+ // Unary ops.
+ bin operator not(bin val);
+
+
+# ifndef OLN_INCLUDE_ONLY
+
+ bin operator and(bin lhs, bin rhs)
+ {
+ return bin(bool(lhs) and bool(rhs));
+ }
+
+ bin operator or(bin lhs, bin rhs)
+ {
+ return bin(bool(lhs) or bool(rhs));
+ }
+
+ bin operator xor(bin lhs, bin rhs)
+ {
+ return bin(bool(lhs) xor bool(rhs));
+ }
+
+ bin operator not(bin val)
+ {
+ return bin(not bool(val));
+ }
+
+# endif
+
+ } // end of namespace oln::value
+
+} // end of namespace oln
+
+
+
+namespace xtd
+{
+
+ using oln::value::bin;
+
+
+ // Logical traits.
+
+ template <> struct set_trait_< op_land, bin, bin > { typedef bin ret; };
+ template <> struct set_trait_< op_land, bool, bin > { typedef bin ret; };
+ template <> struct set_trait_< op_land, bin, bool > { typedef bin ret; };
+
+ template <> struct set_trait_< op_lor, bin, bin > { typedef bin ret; };
+ template <> struct set_trait_< op_lor, bool, bin > { typedef bin ret; };
+ template <> struct set_trait_< op_lor, bin, bool > { typedef bin ret; };
+
+ template <> struct set_trait_< op_lxor, bin, bin > { typedef bin ret; };
+ template <> struct set_trait_< op_lxor, bool, bin > { typedef bin ret; };
+ template <> struct set_trait_< op_lxor, bin, bool > { typedef bin ret; };
+
+ template <> struct set_trait_< op_lnot, bin > { typedef bin ret; };
+
+} // end of namespace xtd
+
+
+#endif // ! OLN_CORE_VALUE_BIN_HH
Index: oln/value/all.hh
===================================================================
--- oln/value/all.hh (revision 0)
+++ oln/value/all.hh (revision 0)
@@ -0,0 +1,41 @@
+// Copyright (C) 2006 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef OLN_VALUE_ALL_HH
+# define OLN_VALUE_ALL_HH
+
+
+# include <oln/value/tags.hh>
+
+# include <oln/value/greylevel.hh>
+# include <oln/value/bin.hh>
+# include <oln/value/default.hh>
+
+# include <oln/color/rgb.hh>
+
+
+#endif // ! OLN_VALUE_ALL_HH
Index: oln/value/greylevel.hh
===================================================================
--- oln/value/greylevel.hh (revision 644)
+++ oln/value/greylevel.hh (working copy)
@@ -30,10 +30,12 @@
# include <iostream>
# include <mlc/contract.hh>
+# include <mlc/bexpr.hh>
# include <xtd/optraits.hh>
# include <oln/core/abstract/value.hh>
+
namespace oln
{
@@ -71,11 +73,14 @@
greylevel_();
/// Ctor.
- explicit greylevel_(typename internal::encoding<nbits>::ret val);
+ explicit greylevel_(const typename internal::encoding<nbits>::ret& val);
/// Access to std type.
typename internal::encoding<nbits>::ret value() const;
+ /// Op encoding_t.
+ operator typename internal::encoding<nbits>::ret() const;
+
/// Op greylevel.
operator greylevel() const;
@@ -96,7 +101,6 @@
/// Aliases.
- typedef greylevel_<1> gl1;
typedef greylevel_<8> gl8;
typedef greylevel_<16> gl16;
typedef greylevel_<32> gl32;
@@ -183,7 +187,7 @@
}
template <unsigned nbits>
- greylevel_<nbits>::greylevel_(typename internal::encoding<nbits>::ret val)
+ greylevel_<nbits>::greylevel_(const typename internal::encoding<nbits>::ret& val)
: val_(val)
{
}
@@ -203,6 +207,12 @@
}
template <unsigned nbits>
+ greylevel_<nbits>::operator typename internal::encoding<nbits>::ret() const
+ {
+ return val_;
+ }
+
+ template <unsigned nbits>
bool greylevel_<nbits>::operator<(const greylevel_<nbits>& rhs) const
{
return val_ < rhs.val_;
Index: oln/value/tags.hh
===================================================================
--- oln/value/tags.hh (revision 0)
+++ oln/value/tags.hh (revision 0)
@@ -0,0 +1,105 @@
+// Copyright (C) 2006 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef OLN_VALUE_TAGS_HH
+# define OLN_VALUE_TAGS_HH
+
+# include <mlc/bexpr.hh>
+
+
+namespace oln
+{
+
+
+ namespace color
+ {
+ template <typename T> class rgb_;
+ } // end of namespace oln::color
+
+
+ namespace value
+ {
+
+ // Color trait.
+
+ template <typename T>
+ struct is_color : public mlc::bexpr_<false>
+ {
+ };
+
+ template <typename T>
+ struct is_color < color::rgb_<T> > : public mlc::bexpr_<true> {};
+
+
+ // Grey-level trait.
+
+ template <typename T>
+ struct is_grey_level : public mlc::bexpr_<false>
+ {};
+
+ template <unsigned nbits>
+ class greylevel_;
+
+ template <unsigned nbits>
+ struct is_grey_level < greylevel_<nbits> > : public mlc::bexpr_<true> {};
+
+ class greylevel;
+
+ template <>
+ struct is_grey_level < greylevel > : public mlc::bexpr_<true> {};
+
+
+ // Binary trait.
+
+ template <typename T>
+ struct is_binary : public mlc::bexpr_<false>
+ {
+ };
+
+ template <>
+ struct is_binary < bool > : public mlc::bexpr_<true> {};
+
+ typedef greylevel_<1> bin;
+
+ template <>
+ struct is_binary < bin > : public mlc::bexpr_<true> {};
+
+
+ // Label trait.
+
+ template <typename T>
+ struct is_label : public mlc::bexpr_<false>
+ {
+ };
+
+
+ } // end of namespace oln::value
+
+} // end of namespace oln
+
+
+#endif // ! OLN_VALUE_TAGS_HH
https://svn.lrde.epita.fr/svn/oln/trunk/olena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Get rid of the explicit instantiations of oln::bbox<>.
* oln/core/gen/topo_lbbox.hh (oln::vtypes< topo_lbbox_<point> >):
Define this virtul type using `bbox_<point>::self_t' instead of
just `bbox_<point>' to force the instiantiation of
oln::bbox_<point> at this point.
(oln::topo_lbbox_<point>::bbox_t): Use oln_type_of to define it
(more of an aesthetic change than a functional change).
* oln/core/1d/bbox1d.hh, oln/core/2d/bbox2d.hh,
* oln/core/3d/bbox3d.hh: Remove.
* oln/basics1d.hh, oln/basics2d.hh, oln/basics3d.hh,
* oln/core/1d/image1d.hh, oln/core/2d/image2d.hh,
* oln/core/3d/image3d.hh: Remove their inclusions.
basics1d.hh | 1
basics2d.hh | 1
basics3d.hh | 1
core/1d/image1d.hh | 1
core/2d/image2d.hh | 1
core/3d/image3d.hh | 1
core/gen/topo_lbbox.hh | 57 +++++++++++++++++++++++++++++++++++++++++++++++--
7 files changed, 55 insertions(+), 8 deletions(-)
Index: oln/basics1d.hh
--- oln/basics1d.hh (revision 640)
+++ oln/basics1d.hh (working copy)
@@ -39,7 +39,6 @@
# include <oln/core/gen/bbox.hh>
# include <oln/core/gen/topo_lbbox.hh>
-# include <oln/core/1d/bbox1d.hh>
# include <oln/core/gen/fwd_piter_bbox.hh>
# include <oln/core/gen/bkd_piter_bbox.hh>
Index: oln/core/1d/image1d.hh
--- oln/core/1d/image1d.hh (revision 640)
+++ oln/core/1d/image1d.hh (working copy)
@@ -35,7 +35,6 @@
# include <oln/core/internal/tracked_ptr.hh>
# include <oln/core/1d/array1d.hh>
# include <oln/core/1d/point1d.hh>
-# include <oln/core/1d/bbox1d.hh>
// For topo1d.
# include <oln/core/1d/aliases.hh>
// For fwd_piter and bkd_piter virtual types.
Index: oln/core/2d/image2d.hh
--- oln/core/2d/image2d.hh (revision 640)
+++ oln/core/2d/image2d.hh (working copy)
@@ -35,7 +35,6 @@
# include <oln/core/internal/tracked_ptr.hh>
# include <oln/core/2d/array2d.hh>
# include <oln/core/2d/point2d.hh>
-# include <oln/core/2d/bbox2d.hh>
// For topo2d.
# include <oln/core/2d/aliases.hh>
// For fwd_piter and bkd_piter virtual types.
Index: oln/core/3d/image3d.hh
--- oln/core/3d/image3d.hh (revision 640)
+++ oln/core/3d/image3d.hh (working copy)
@@ -35,7 +35,6 @@
# include <oln/core/internal/tracked_ptr.hh>
# include <oln/core/3d/array3d.hh>
# include <oln/core/3d/point3d.hh>
-# include <oln/core/3d/bbox3d.hh>
// For topo3d.
# include <oln/core/3d/aliases.hh>
// For fwd_piter and bkd_piter virtual types.
Index: oln/core/gen/topo_lbbox.hh
--- oln/core/gen/topo_lbbox.hh (revision 640)
+++ oln/core/gen/topo_lbbox.hh (working copy)
@@ -54,7 +54,59 @@
template <typename point>
struct vtypes< topo_lbbox_<point> >
{
- typedef bbox_<point> bbox_type;
+ /* Trick to force the instantiation of bbox_<point>.
+
+ As bbox_<point> is a template type used to define the `bbox'
+ virtual type of topo_lbbox_<point>, it requires some attention
+ regarding its instantiation.
+
+
+ Metalic's mlc_is_a is used by the static hierarchy mechanism of
+ Static. mlc_is_a performs a static typedef introspection,
+ taking advantage of the SFINAE rule. However, there two
+ phenomena seem to happen here (probably due to the very nature
+ of SFINAE):
+
+ 1. the statement `mlc_is_a(B, A)' requires the knowledge of the
+ entire declaration of the inspected class to answer
+ positively if a `B' actually *is a* `A'. If B is a template
+ class, this implies that B must have been instantiated for
+ mlc_is_a to be able to inspect it;
+
+ 2. mlc_is_a does *not* trigger the instantiation of the
+ inspected type (probably to prevent any error, in accordance
+ to the SFINAE rule).
+
+ When a template type is used to define a virtual type, it
+ *must* have been instantiated, because it might be used during
+ the construction of the base classes of the class it belongs
+ to. That is the case of bbox_<point> here.
+
+ So, how one can trigger such an instantiation? We used to
+ address this problem by using explicit template instantiations
+ placed before the definition of the class holding the template
+ type used a virtual type :
+
+ template class bbox_<point1d>;
+ template class bbox_<point2d>;
+ template class bbox_<point3d>;
+
+ And so on. But this is not good w.r.t. software engineering:
+ one must take care of the correct explicit instantiations at
+ the right place, which is error-prone --and the C++ compiler
+ won't produces easily understandable messages!-- and requires a
+ manual addition for each instantiation of the template type
+ potentially used as a definition of a virtual type.
+
+ A better solution is to force the compiler to instantiate the
+ type at the definition site of the virtual type (here, as for
+ bbox_<point>). Such an instantiation can be triggered by
+ requesting the use of a typedef contained within this type. As
+ many template types define a typedef `self_t' to refer to
+ themselves, we use this typename to both trigger the
+ instantiation of bbox_<point>, and to define
+ `vtypes< topo_lbbox_<point> >::bbox_type'. */
+ typedef typename bbox_<point>::self_t bbox_type;
typedef point point_type;
typedef mlc::true_ is_random_accessible_type;
};
@@ -66,7 +118,8 @@
public topology_entry< topo_lbbox_<point> >,
private mlc::assert_< mlc_is_a(point, abstract::point) >
{
- typedef bbox_<point> bbox_t;
+ typedef topo_lbbox_<point> self_t;
+ typedef oln_type_of(self_t, bbox) bbox_t;
public:
Index: oln/basics2d.hh
--- oln/basics2d.hh (revision 640)
+++ oln/basics2d.hh (working copy)
@@ -39,7 +39,6 @@
# include <oln/core/gen/bbox.hh>
# include <oln/core/gen/topo_lbbox.hh>
-# include <oln/core/2d/bbox2d.hh>
# include <oln/core/gen/fwd_piter_bbox.hh>
# include <oln/core/gen/bkd_piter_bbox.hh>
Index: oln/basics3d.hh
--- oln/basics3d.hh (revision 640)
+++ oln/basics3d.hh (working copy)
@@ -39,7 +39,6 @@
# include <oln/core/gen/bbox.hh>
# include <oln/core/gen/topo_lbbox.hh>
-# include <oln/core/3d/bbox3d.hh>
# include <oln/core/gen/fwd_piter_bbox.hh>
# include <oln/core/gen/bkd_piter_bbox.hh>
I haven't checked whether this bug has been fixed in SWIG's
Subversion repository yet (but it wasn't present in SWIG 1.3.28).
2006-07-04 Roland Levillain <roland(a)lrde.epita.fr>
Work around a bug in SWIG 1.3.29.
* generate_arith_instantiations.py (write_algorithms)
* generate_morpho_instantiations.py (write_algorithms): Work
around a bug in SWIG 1.3.29 in the generation of C++ wrappers.
Index: 10.229/tools/swilena/generate_morpho_instantiations.py
--- 10.229/tools/swilena/generate_morpho_instantiations.py Fri, 30 Jun 2006 17:26:15 +0200 levill_r (oln/v/24_generate_m 1.8.1.1 700)
+++ 10.229(w)/tools/swilena/generate_morpho_instantiations.py Mon, 03 Jul 2006 12:23:42 +0200 levill_r (oln/v/24_generate_m 1.8.1.1 700)
@@ -57,7 +57,13 @@
"ntg_int_u8", "ntg_int_u32",
"ntg_int_s8", "ntg_int_s32",
"ntg_float" ]:
- img_type = "::oln::image%(dim)sd< %(type)s >" % vars()
+ # FIXME: SWIG 1.3.29 Bug. We used to refer to `oln::image' from
+ # the global (top-level) namespace, i.e. `::oln::image',
+ # but it makes swig 1.3.29 generate invalid C++ code when
+ # used ad a template argument: the space between `<' and
+ # `::' is eaten by swig, and `<:' is understood as a
+ # trigraph (for `[') by the C++ compiler.
+ img_type = "oln::image%(dim)sd< %(type)s >" % vars()
win_type = "::oln::window%(dim)sd" % vars()
neighb_type = "::oln::neighborhood%(dim)sd" % vars()
@@ -135,10 +141,12 @@
instantiate(idx, "top_hat_contrast_op", img_type, img_type, win_type)
instantiate(idx, "fast_top_hat_contrast_op", img_type, img_type, win_type)
# Watershed
- img_ret_type = "::oln::image%(dim)sd< ntg_int_u32 >" % vars()
+ # FIXME: SWIG 1.3.29 Bug (same as above).
+ img_ret_type = "oln::image%(dim)sd< ntg_int_u32 >" % vars()
instantiate(idx, "watershed_seg", img_ret_type, img_type, neighb_type)
instantiate(idx, "watershed_con", img_ret_type, img_type, neighb_type)
- bin_img_type = "::oln::image%(dim)sd< ntg_bin >" % vars()
+ # FIXME: SWIG 1.3.29 Bug (same as above).
+ bin_img_type = "oln::image%(dim)sd< ntg_bin >" % vars()
instantiate(idx, "sure_minima_imposition", img_type, img_type, bin_img_type, neighb_type)
instantiate(idx, "sequential_minima_imposition", img_type, img_type, bin_img_type, neighb_type)
instantiate(idx, "hybrid_minima_imposition", img_type, img_type, bin_img_type, neighb_type)
Index: 10.229/tools/swilena/generate_arith_instantiations.py
--- 10.229/tools/swilena/generate_arith_instantiations.py Fri, 30 Jun 2006 17:26:15 +0200 levill_r (oln/v/51_generate_a 1.1.1.1 700)
+++ 10.229(w)/tools/swilena/generate_arith_instantiations.py Mon, 03 Jul 2006 11:44:33 +0200 levill_r (oln/v/51_generate_a 1.1.1.1 700)
@@ -59,13 +59,19 @@
"ntg_int_u8", "ntg_int_u32",
"ntg_int_s8", "ntg_int_s32",
"ntg_float" ]:
- img_type = "::oln::image%(dim)sd< %(type)s >" % vars()
+ # FIXME: SWIG 1.3.29 Bug. We used to refer to `oln::image' from
+ # the global (top-level) namespace, i.e. `::oln::image',
+ # but it makes swig 1.3.29 generate invalid C++ code when
+ # used ad a template argument: the space between `<' and
+ # `::' is eaten by swig, and `<:' is understood as a
+ # trigraph (for `[') by the C++ compiler.
+ img_type = "oln::image%(dim)sd< %(type)s >" % vars()
bigger_type = get_bigger_type(type)
- return_img_type = "::oln::image%(dim)sd< %(bigger_type)s >" % vars()
+ return_img_type = "oln::image%(dim)sd< %(bigger_type)s >" % vars()
# FIXME: these algorithms do not work with bin
if type != "ntg_bin":
- for algo in [ "plus", "minus", "times", "div" ]:
+ for algo in [ "plus", "minus", "times", "div" ]:
instantiate(dim, algo, return_img_type, img_type, img_type)
instantiate(dim, "min", return_img_type, img_type, img_type)