Pour que ca compile correctement, j'ai fait quelques modifs que je ne trouve
pas du tout elegante, si quelqu'un a mieux a proposer, je suis preneur.
Index: ChangeLog
from Damien Thivolle <damien(a)lrde.epita.fr>
* config/oln.m4: Remove `-Werror' flag for g++-3.2.
Index: doc/ChangeLog
from Damien Thivolle <damien(a)lrde.epita.fr>
* doc/ref/Makefile.am: Replace `make' by $(MAKE).
* doc/ref/out/exdoc.config.in: Add -DNEED_ROUND -DNEED_ROUNDF flags
to examples compilation.
+2004-04-03 Damien Thivolle <damien(a)lrde.epita.fr>
+
* ref/Makefile.am: Correct install-data-hook rule.
2004-03-25 Giovanni Palma <giovanni(a)lrde.epita.fr>
Index: olena/ChangeLog
from Damien Thivolle <damien(a)lrde.epita.fr>
* olena/oln/Makefile.am: Add files.
* olena/oln/morpher/generic_morpher.hh: Repair unmorph().
* olena/oln/morpher/color_morpher.hh: Correct comments.
* olena/tests/morpher/tests/color_morph: Readd a test.
+2004-04-03 Damien Thivolle <damien(a)lrde.epita.fr>
+
* olena/oln/morpher/generic_morpher.hh: Inherit directly from oln::image.
* olena/oln/morpher/subq_morpher.hh: Change inheritance system.
* olena/oln/morpher/color_morpher.hh: Likewise.
Index: doc/ref/Makefile.am
--- doc/ref/Makefile.am Sat, 03 Apr 2004 14:42:26 +0200 thivol_d (oln/d/51_Makefile.a
1.27.1.15 600)
+++ doc/ref/Makefile.am Sat, 03 Apr 2004 22:55:16 +0200 thivol_d (oln/d/51_Makefile.a
1.27.1.15 600)
@@ -15,7 +15,7 @@
doxy:
$(EXDOC) --config=$(OUT_DIR)/exdoc.config --output-dir=$(OUT_DIR)
--input-dir=$(top_srcdir)
mkdir -p img
- cd $(OUT_DIR) && make -f makefile
+ cd $(OUT_DIR) && $(MAKE) -f makefile
$(IMG_CONV) $(top_srcdir)/olena/img img preserve
$(IMG_CONV) img img nopreserve
$(DOXYGEN) doxygen.config
@@ -30,7 +30,7 @@
dist_noinst_DATA = oln-ref.pdf html.tar.gz $(srcdir)/exdoc.pl $(srcdir)/img_conv.pl
dist-local:
- rm -f img/*
+ rm -rf img/* out/*
MAINTAINERCLEANFILES = $(dist_noinst_DATA) \
./html/* ./img/* ./$(OUT_DIR)/*
Index: config/oln.m4
--- config/oln.m4 Fri, 08 Aug 2003 13:24:29 +0200 burrus_n (oln/j/15_oln.m4 1.36 600)
+++ config/oln.m4 Sat, 03 Apr 2004 22:53:47 +0200 thivol_d (oln/j/15_oln.m4 1.36 600)
@@ -435,10 +435,10 @@
[ac_cv_cxx_style],
[ac_cv_cxx_style=unknown
if test "x$ac_compiler_gnu" != xno; then
- if $CXX --version | grep '^2\.' >/dev/null ; then
- ac_cv_cxx_style=weakGNU
- else
+ if $CXX --version | grep ' 3\.[34]' >/dev/null ; then
ac_cv_cxx_style=GNU
+ else
+ ac_cv_cxx_style=weakGNU
fi
elif $CXX -V 2>&1 | grep -i "WorkShop">/dev/null
2>&1; then
ac_cv_cxx_style=Sun
@@ -468,7 +468,7 @@
_CXXFLAGS_DEBUG="-g"
_CXXFLAGS_OPTIMIZE="-O2 -felide-constructors -funroll-loops"
_CXXFLAGS_STRICT="-Wall -pedantic"
- _CXXFLAGS_STRICT_ERRORS="-Wall -pedantic -Werror"
+ _CXXFLAGS_STRICT_ERRORS="-Wall -pedantic"
;;
Sun)
_CXXFLAGS_DEBUG="-g"
Index: olena/oln/Makefile.am
--- olena/oln/Makefile.am Tue, 30 Mar 2004 22:10:11 +0200 thivol_d (oln/q/47_Makefile.a
1.3.1.1.1.6.1.7.1.4 600)
+++ olena/oln/Makefile.am Sat, 03 Apr 2004 22:42:17 +0200 thivol_d (oln/q/47_Makefile.a
1.3.1.1.1.6.1.7.1.4 600)
@@ -157,6 +157,7 @@
morpho/closing.hh \
morpho/closing.inc \
morpho/dilation.hh \
+ morpho/environments.hh \
morpho/erosion.hh \
morpho/extrema.hh \
morpho/extrema.hxx \
@@ -203,6 +204,8 @@
topo/inter-pixel/internal/dir-iter.hh \
topo/inter-pixel/internal/dir.hh \
topo/tarjan/flat-zone.hh \
+ topo/tarjan/tarjan.hh \
+ topo/tarjan/tarjan_with_attr.hh \
topo/tarjan/union.hh \
transforms/fft.hh \
transforms/dwt.hh \
Index: doc/ref/out/exdoc.config.in
--- doc/ref/out/exdoc.config.in Wed, 10 Mar 2004 16:20:23 +0100 palma_g
(oln/k/7_exdoc.conf 1.2 600)
+++ doc/ref/out/exdoc.config.in Sat, 03 Apr 2004 22:55:44 +0200 thivol_d
(oln/k/7_exdoc.conf 1.2 600)
@@ -4,7 +4,7 @@
TAG_CLOSE = endcode
CAPTIONS = cxx # We want to run cxx on the extracted files (see line below)
ALIAS cxx = @CXX@ # Here, cxx means g++ but you can choose other compilers
- OPTIONS = @CXXFLAGS_OPTIMIZE@ @CXXFLAGS_STRICT_ERRORS@ -I@top_srcdir@/integre
-I@top_srcdir@/olena -I@top_srcdir@/metalic $1 -o $2 -DIMG_OUT=\"../img/\"
-DIMG_IN=\"@top_srcdir@/olena/img/\" # tell how to use the soft, i.e. where to
put input and output arguments (default if not overriden) ($1: input, $2: output) FIXME:
$* should have explicit name, chek flags
+ OPTIONS = -DNEED_ROUND -DNEED_ROUNDF @CXXFLAGS_OPTIMIZE@ @CXXFLAGS_STRICT_ERRORS@
-I@top_srcdir@/integre -I@top_srcdir@/olena -I@top_srcdir@/metalic $1 -o $2
-DIMG_OUT=\"../img/\" -DIMG_IN=\"@top_srcdir@/olena/img/\" # tell how
to use the soft, i.e. where to put input and output arguments (default if not overriden)
($1: input, $2: output) FIXME: $* should have explicit name, chek flags
OUT = out # FIXME: should be obsolete
EXT = cc # Extension of generated file
STD_OUT_EXT = std # Extension of generated file standard output
Index: olena/oln/morpher/generic_morpher.hh
--- olena/oln/morpher/generic_morpher.hh Sat, 03 Apr 2004 14:42:26 +0200 thivol_d
(oln/m/18_generic_mo 1.5 600)
+++ olena/oln/morpher/generic_morpher.hh Sat, 03 Apr 2004 22:44:20 +0200 thivol_d
(oln/m/18_generic_mo 1.5 600)
@@ -65,6 +65,32 @@
namespace abstract {
+ template <unsigned Dim, class T>
+ struct dest_type;
+
+ template <class T>
+ struct dest_type<1, T>
+ {
+ typedef image1d<T> ret;
+ };
+
+
+ template <class T>
+ struct dest_type<2, T>
+ {
+ typedef image2d<T> ret;
+ };
+
+
+ template <class T>
+ struct dest_type<3, T>
+ {
+ typedef image3d<T> ret;
+ };
+
+
+
+
/*! The Abstract morpher class.
**
** Define a default implementation for all the
@@ -80,7 +106,7 @@
template <class SrcType, class Exact>
class generic_morpher :
public oln::abstract::image_with_impl<typename image_id<Exact>::impl_type,
- typename image_id<Exact>::exact_type>
+ Exact>
{
protected:
@@ -119,10 +145,7 @@
/// The morpher underlying implementation.
typedef typename image_traits<exact_type>::impl_type impl_type;
- typedef oln::image<image_traits<exact_type>::dim,
- value_type,
- impl_type,
- mlc::final> DestType;
+ typedef typename dest_type<image_traits<exact_type>::dim, value_type>::ret
DestType;
/// Type of the decorated image.
typedef SrcType src_self_type;
@@ -159,6 +182,19 @@
return ima_;
}
+ /// Instantiate and return the image that the morpher is simulating.
+ DestType
+ unmorph() const
+ {
+ DestType res(to_exact(*this).size());
+ oln_iter_type(DestType) it(res);
+
+ for_all(it)
+ res[it] = (*this)[it];
+ return res;
+ }
+
+
/*! Default implementation of at.
**
** Return the value stored at \a p in the decorated image.
@@ -169,7 +205,7 @@
const src_value_type
at(const src_point_type& p) const
{
- return to_exact(ima_).at(p);
+ return ima_[p];
}
/*! Default implementation of at.
@@ -182,31 +218,31 @@
src_value_type&
at(const src_point_type& p)
{
- return to_exact(ima_).at(p);
+ return ima_[p];
}
/// Default implementation of impl.
const src_impl_type*
impl() const
{
- return to_exact(ima_).impl();
+ return ima_.impl();
}
/// Default implementation of impl.
src_impl_type*
impl()
{
- return to_exact(ima_).impl();
+ return ima_.impl();
}
/*! Default implementation of clone_.
**
** Return a copy of the decorated image.
*/
- src_self_type
+ src_exact_type
clone_() const
{
- return to_exact(ima_).clone_();
+ return to_exact(ima_).clone();
}
/*! Default implementation of npoints_.
@@ -216,7 +252,7 @@
size_t
npoints_()
{
- return to_exact(ima_).npoints_();
+ return to_exact(ima_).npoints();
}
/*! Default implementation of assign.
Index: olena/oln/morpher/color_morpher.hh
--- olena/oln/morpher/color_morpher.hh Sat, 03 Apr 2004 14:42:26 +0200 thivol_d
(oln/m/26_color_morp 1.3 600)
+++ olena/oln/morpher/color_morpher.hh Sat, 03 Apr 2004 19:25:42 +0200 thivol_d
(oln/m/26_color_morp 1.3 600)
@@ -72,7 +72,7 @@
/*! \brief Specialized version for color_morpher.
**
- ** \param I The type of the decorated image.
+ ** \param SrcType The type of the decorated image.
**
** \param Exact The exact type of the object.
*/
@@ -89,8 +89,6 @@
/*! \brief Abstract color_morpher class used for
** code factorization.
**
- ** \param DestType Output type of the morpher.
- **
** \param SrcType Input type decorated.
**
** \param Exact Exact type
Index: olena/tests/morpher/tests/color_morph
--- olena/tests/morpher/tests/color_morph Sat, 03 Apr 2004 14:42:26 +0200 thivol_d
(oln/m/45_color_morp 1.2 600)
+++ olena/tests/morpher/tests/color_morph Sat, 03 Apr 2004 22:39:14 +0200 thivol_d
(oln/m/45_color_morp 1.2 600)
@@ -37,8 +37,7 @@
fail = fail | (oln::utils::md5(oln::morpher::bmorph(imc)) !=
oln::utils::key(data_key_c_b));
fail = fail | (oln::utils::md5(oln::morpher::rmorph(imc_const)) !=
oln::utils::key(data_key_c_r));
fail = fail | (oln::utils::md5(mimd) != oln::utils::md5(mimc));
-// remove comments when it works ...
-// fail = fail | (oln::utils::md5(*(oln::morpher::rmorph(imc).unmorph())) !=
oln::utils::key(data_key_c_r));
+ fail = fail | (oln::utils::md5(oln::morpher::rmorph(imc).unmorph()) !=
oln::utils::key(data_key_c_r));
if (!fail)
--
Damien Thivolle
damien.thivolle(a)lrde.epita.fr