URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
ChangeLog:
2009-07-16 Edwin Carlinet <carlinet(a)lrde.epita.fr>
Fix bugs in segmentation method based on mean color.
* edwin/exec/max_delta_colormean_obj.cc:
The distance used to retrieve components is now based on the
distance to parent and the distance to brothers.
* edwin/exec/mask_fill_mean_color.cc: Fill the mask from
binarisation with the mean color of the components.
* edwin/exec/pgm_gradient.cc: Compute a thick gradient from the a grey
scale image.
Debug:
* edwin/mln/morpho/tree/components_debug.hh,
* edwin/mln/morpho/tree/debug.hh,
* edwin/mln/morpho/tree/propagate_node_debug.hh,
* edwin/exec/tree_debug.cc:
Code instrumentalized for debuging.
Vizualisation:
* edwin/tools: New.
* edwin/exec/give_me_the_curve.cc,
* edwin/tools/make_the_curves.sh:
Trace the plot of log files genererated by debug code.
---
exec/give_me_the_curve.cc | 2
exec/mask_fill_mean_color.cc | 61 +++++
exec/max_delta_colormean_obj.cc | 53 +++-
exec/pgm_gradient.cc | 42 +++
exec/tree_debug.cc | 86 +++++++
mln/morpho/tree/components_debug.hh | 384 ++++++++++++++++++++++++++++++++
mln/morpho/tree/debug.hh | 124 ++++++++++
mln/morpho/tree/propagate_node_debug.hh | 217 ++++++++++++++++++
tools/make_the_curves.sh | 15 +
9 files changed, 976 insertions(+), 8 deletions(-)
Index: trunk/milena/sandbox/edwin/tools/make_the_curves.sh
===================================================================
--- trunk/milena/sandbox/edwin/tools/make_the_curves.sh (revision 0)
+++ trunk/milena/sandbox/edwin/tools/make_the_curves.sh (revision 4305)
@@ -0,0 +1,15 @@
+#! /bin/bash
+
+conf="gplot.conf"
+
+echo 'set terminal png;' > $conf
+echo 'set size 2,1' >> $conf
+echo 'set xtic out rotate by 90' >> $conf
+i=0
+for file in *.log; do
+ printf "set output \"plot_%03i.png\"\n" $i >> $conf
+ echo plot \"$file\" 'using 2:xticlabels(1) with lines' >> $conf
+ i=$((i+1))
+done
+
+gnuplot $conf
Property changes on: trunk/milena/sandbox/edwin/tools/make_the_curves.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/milena/sandbox/edwin/exec/give_me_the_curve.cc
===================================================================
--- trunk/milena/sandbox/edwin/exec/give_me_the_curve.cc (revision 4304)
+++ trunk/milena/sandbox/edwin/exec/give_me_the_curve.cc (revision 4305)
@@ -72,7 +72,7 @@
while (!tree.is_root(p))
{
- data << a(p) << std::endl;
+ data << '"' << p << "\" " << a(p) << std::endl;
p = tree.parent(p);
}
data.close();
Index: trunk/milena/sandbox/edwin/exec/mask_fill_mean_color.cc
===================================================================
--- trunk/milena/sandbox/edwin/exec/mask_fill_mean_color.cc (revision 0)
+++ trunk/milena/sandbox/edwin/exec/mask_fill_mean_color.cc (revision 4305)
@@ -0,0 +1,61 @@
+#include <mln/core/image/image2d.hh>
+#include <mln/core/alias/neighb2d.hh>
+
+#include <mln/value/int_u8.hh>
+#include <mln/value/int_u16.hh>
+#include <mln/value/rgb8.hh>
+
+#include <mln/io/pbm/load.hh>
+#include <mln/io/ppm/load.hh>
+#include <mln/io/ppm/save.hh>
+
+#include <mln/accu/stat/mean.hh>
+
+#include <mln/labeling/compute_image.hh>
+#include <mln/labeling/blobs.hh>
+
+#include <mln/convert/to.hh>
+#include <mln/data/convert.hh>
+
+using namespace mln;
+using value::int_u16;
+using value::int_u8;
+using value::rgb8;
+
+void usage(char** argv)
+{
+ std::cout << "Usage: " << argv[0] << " in:mask.pgm in:source.ppm [out:colormean.ppm]"
+ << std::endl;
+ abort();
+}
+
+template <typename M, typename I>
+void
+process(const Image<M>& mask, const Image<I>& ref, const char* foutput)
+{
+ int_u16 nlabels;
+
+ image2d<int_u16> labels = labeling::blobs(mask, c4(), nlabels);
+
+ typedef mln_ch_value(I, rgb8) O;
+ O out = data::convert(rgb8(), labeling::compute_image(accu::meta::stat::mean (), ref, labels, nlabels));
+
+ io::ppm::save(out, foutput);
+}
+
+int main(int argc, char** argv)
+{
+ if (argc < 3)
+ usage(argv);
+
+ const char* finput = argv[1];
+ const char* freference = argv[2];
+ const char* foutput = (argc >= 4) ? argv[3] : "colormean.ppm";
+
+ image2d<bool> input;
+ io::pbm::load(input, finput);
+
+ image2d<rgb8> ref;
+ io::ppm::load(ref, freference);
+ process(input, ref, foutput);
+}
Index: trunk/milena/sandbox/edwin/exec/pgm_gradient.cc
===================================================================
--- trunk/milena/sandbox/edwin/exec/pgm_gradient.cc (revision 0)
+++ trunk/milena/sandbox/edwin/exec/pgm_gradient.cc (revision 4305)
@@ -0,0 +1,42 @@
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project 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.
+
+#include <mln/core/image/image2d.hh>
+#include <mln/core/alias/neighb2d.hh>
+#include <mln/io/pgm/load.hh>
+#include <mln/io/pgm/save.hh>
+
+#include <mln/morpho/elementary/gradient.hh>
+
+
+int main(int argc, char* argv[])
+{
+ using namespace mln;
+ using value::int_u8;
+
+ image2d<int_u8> ima;
+ io::pgm::load(ima, argv[1]);
+ io::pgm::save(morpho::elementary::gradient(ima, c8()), argv[2]);
+}
Index: trunk/milena/sandbox/edwin/exec/tree_debug.cc
===================================================================
--- trunk/milena/sandbox/edwin/exec/tree_debug.cc (revision 0)
+++ trunk/milena/sandbox/edwin/exec/tree_debug.cc (revision 4305)
@@ -0,0 +1,86 @@
+//Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+
+// This file is part of Olena.
+
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+
+// As a special exception, you may use this file as part of a free
+// software project 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.
+
+
+#include <mln/core/image/image2d.hh>
+#include <mln/core/alias/neighb2d.hh>
+
+#include <mln/value/int_u8.hh>
+#include <mln/value/rgb8.hh>
+
+#include <mln/morpho/tree/data.hh>
+#include <mln/morpho/tree/compute_attribute_image.hh>
+#include <mln/morpho/tree/propagate.hh>
+#include <mln/morpho/tree/propagate_representative.hh>
+#include <mln/morpho/tree/debug.hh>
+
+# include <mln/io/pgm/save.hh>
+# include <mln/io/pgm/load.hh>
+
+#include <mln/accu/stat/mean.hh>
+
+#include <mln/data/sort_psites.hh>
+
+#include <map>
+#include <iostream>
+
+
+using namespace mln;
+using value::int_u8;
+
+int main(int argc, char** argv)
+{
+
+ if (argc < 1)
+ abort();
+
+ const char* finput = argv[1];
+
+ // Image loadin'.
+ typedef image2d<value::int_u8> I;
+ I input;
+ io::pgm::load(input, finput);
+
+
+ // Tree construction.
+ typedef p_array<mln_psite_(I)> S;
+ typedef morpho::tree::data<I, S> T;
+
+ S s = data::sort_psites_decreasing(input);
+ T tree(input, s, c4());
+
+ typedef std::map< int_u8, unsigned > M;
+
+ M m = morpho::tree::debug::tree_height(tree);
+
+ std::cout << "Height:\tLeaf Count:" << std::endl;
+ for (M::iterator it = m.begin(); it != m.end(); ++it)
+ std::cout << it->first << "\t" << it->second << std::endl;
+
+
+ mln_ch_value_(I, int_u8) bro = morpho::tree::debug::tree_brother(tree);
+ morpho::tree::propagate_representative(tree, bro);
+ io::pgm::save(bro, "bro.pgm");
+}
Index: trunk/milena/sandbox/edwin/exec/max_delta_colormean_obj.cc
===================================================================
--- trunk/milena/sandbox/edwin/exec/max_delta_colormean_obj.cc (revision 4304)
+++ trunk/milena/sandbox/edwin/exec/max_delta_colormean_obj.cc (revision 4305)
@@ -31,7 +31,6 @@
#include <mln/morpho/tree/data.hh>
#include <mln/morpho/tree/compute_attribute_image.hh>
-#include <mln/morpho/tree/components.hh>
#include <mln/morpho/tree/propagate.hh>
#include <mln/morpho/tree/propagate_representative.hh>
@@ -46,15 +45,26 @@
#include <mln/io/pgm/save.hh>
#include <mln/io/ppm/save.hh>
+#include <mln/math/max.hh>
+
#include <mln/math/diff_abs.hh>
#include "color_distance.hh"
+
#include <iostream>
#include <cstring>
+// debug
+#include <mln/morpho/tree/debug.hh>
+#include <mln/morpho/tree/components.hh>
+
using namespace mln;
using value::int_u8;
+//template <typename T>
+//struct mymean : public mln::accu::internal
+
+
void usage(char** argv)
{
@@ -108,10 +118,16 @@
{
typedef mln_ch_value(typename T::function, mln_sum(mln_value(S))) O;
- O out = morpho::tree::compute_attribute_image_from(accu::stat::mean<mln_value(S)>(),
- tree, source);
+ typedef accu::stat::mean<mln_value(S)> ACC;
+ typedef mln_ch_value(typename T::function, ACC) ACC_IMG;
- io::ppm::save(data::convert(value::rgb8(), out), "mean.ppm");
+ ACC_IMG accus;
+ O means = morpho::tree::compute_attribute_image_from(ACC (),
+ tree,
+ source,
+ &accus);
+
+ io::ppm::save(data::convert(value::rgb8(), means), "mean.ppm");
// Compute delta image.
mln_ch_value(typename T::function, int_u8) dist;
@@ -120,8 +136,29 @@
mln_up_node_piter(T) n(tree);
for_all(n)
{
- // Fixme: rewrite distance routines with vector instead of convert ?
- dist(n) = dist_mean(convert::to<value::rgb8>(out(tree.parent(n))), convert::to<value::rgb8>(out(n)));
+ int_u8 dist_dad, dist_bro;
+ value::rgb8 current, mean_bro;
+ ACC aux = accus(tree.parent(n));
+
+ aux.untake(accus(n));
+
+ // FIXME: add untake_n_times to accumlator concept
+ // Note: this is an approximation to avoid the real mean computation of bros.
+ unsigned m = accus(tree.parent(n)).count() - accus(n).count() - aux.count();
+ value::rgb8 v = exact(source)(n);
+
+ for (unsigned i = 0; i < m; i++)
+ aux.untake(v);
+
+ current = convert::to<value::rgb8>(means(n));
+ mean_bro = convert::to<value::rgb8>(aux.to_result());
+
+ dist_dad = dist_mean(convert::to<value::rgb8>(means(tree.parent(n))),
+ current);
+ dist_bro = dist_mean(convert::to<value::rgb8>(aux.to_result()),
+ current);
+
+ dist(n) = math::max(dist_bro, dist_dad);
}
return dist;
@@ -140,7 +177,6 @@
int main(int argc, char** argv)
{
-
if (argc < 3)
usage(argv);
@@ -175,6 +211,9 @@
{
image2d<value::rgb8> src;
io::ppm::load(src, fsource);
+
+ // init debug
+ global::debug_img = duplicate(src);
delta = compute_delta_mean(tree, src);
}
else
Index: trunk/milena/sandbox/edwin/mln/morpho/tree/debug.hh
===================================================================
--- trunk/milena/sandbox/edwin/mln/morpho/tree/debug.hh (revision 0)
+++ trunk/milena/sandbox/edwin/mln/morpho/tree/debug.hh (revision 4305)
@@ -0,0 +1,124 @@
+//Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+
+// This file is part of Olena.
+
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+
+// As a special exception, you may use this file as part of a free
+// software project 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 DEBUG_HH
+# define DEBUG_HH
+
+# include <mln/core/image/image2d.hh>
+# include <mln/morpho/tree/data.hh>
+
+# include <mln/value/rgb8.hh>
+# include <mln/value/int_u8.hh>
+
+# include <mln/data/fill.hh>
+
+# include <map>
+
+namespace mln
+{
+
+ namespace global
+ {
+ image2d<value::rgb8> debug_img;
+ }
+
+
+ namespace morpho
+ {
+
+ namespace tree
+ {
+
+ namespace debug
+ {
+
+
+ /// Count the brothers of each tree node and return the result
+ /// as an image.
+ ///
+ /// \param tree The component tree.
+ ///
+ /// \return The bro' count image.
+ ///
+ template <typename T>
+ inline
+ mln_ch_value(typename T::function, value::int_u8)
+ tree_brother(const T& tree)
+ {
+
+ typedef typename T::function F;
+
+ typedef mln_ch_value(F, value::int_u8) A;
+
+ A out;
+ initialize(out, tree.f());
+
+ mln::data::fill(out, 0);
+
+ {
+ mln_up_node_piter(T) n(tree);
+ for_all(n)
+ out(tree.parent(n))++;
+ }
+
+ {
+ mln_dn_node_piter(T) n(tree);
+ for_all(n)
+ out(n) = out(tree.parent(n)) - 1;
+ }
+ return out;
+ }
+
+ template <typename T>
+ inline
+ std::map< mln_value(T::function), unsigned>
+ tree_height(const T& tree)
+ {
+ std::map< mln_value(T::function), unsigned> m;
+
+ mln_leaf_piter(T) l(tree);
+ for_all(l)
+ m[tree.f(l)]++;
+
+ return m;
+ }
+
+ }
+
+ }
+
+ }
+
+}
+
+
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+# endif // ! MLN_INCLUDE_ONLY
+
+#endif // ! DEBUG_HH
Index: trunk/milena/sandbox/edwin/mln/morpho/tree/components_debug.hh
===================================================================
--- trunk/milena/sandbox/edwin/mln/morpho/tree/components_debug.hh (revision 0)
+++ trunk/milena/sandbox/edwin/mln/morpho/tree/components_debug.hh (revision 4305)
@@ -0,0 +1,384 @@
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Milena 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 MLN_MORPHO_TREE_COMPONENTS_HH_
+# define MLN_MORPHO_TREE_COMPONENTS_HH_
+
+# include <mln/core/concept/image.hh>
+# include <mln/core/concept/function.hh>
+# include <mln/data/fill.hh>
+
+# include <mln/morpho/tree/propagate_node.hh>
+# include <mln/morpho/tree/data.hh>
+# include <mln/trace/entering.hh>
+# include <mln/trace/exiting.hh>
+
+/* Debug */
+# include <mln/morpho/tree/debug.hh>
+# include <mln/morpho/tree/propagate_representative.hh>
+# include <mln/core/image/image2d.hh>
+# include <mln/literal/colors.hh>
+# include <mln/io/ppm/save.hh>
+# include <iostream>
+# include <fstream>
+# include <sstream>
+# include <unistd.h>
+
+/**
+** \file mln/morpho/tree/components.hh
+**
+** Routines that permits to retrieve tree components.
+** Tree components are nodes maximising the attribute.
+** The code is instrumented for debugging.
+*/
+
+
+
+namespace mln {
+
+ namespace morpho {
+
+ namespace tree {
+
+ /**
+ ** Retrieve components from the tree until all leaves belong to
+ ** components.
+ **
+ ** @param tree Component tree.
+ ** @param attr_image Attribute image.
+ **
+ ** @return Array of components.
+ */
+ template <typename T, typename A>
+ p_array< mln_psite(A) >
+ get_components(const T& tree, const Image<A>& attr_image);
+
+ /**
+ ** Retrieve the \p n most important components from the tree. n
+ ** should be lesser than the maximum number of components. If
+ ** not, the functions stops when there's no more components.
+ **
+ ** @param tree Component tree.
+ ** @param attr_image Attribute image.
+ ** @param n Number of components to get.
+ **
+ ** @return Array of components.
+ */
+ template <typename T, typename A>
+ p_array< mln_psite(A) >
+ get_components(const T& tree, const Image<A>& attr_image, unsigned n);
+
+ /**
+ ** Retrieve the most important components that check
+ ** predicate \p pred.
+ **
+ ** @param tree Component tree.
+ ** @param attr_image Attribute image.
+ ** @param pred Predicate that components must check.
+ **
+ ** @return Array of components.
+ */
+ template <typename T, typename A, typename P2B>
+ p_array< mln_psite(A) >
+ get_components(const T& tree, const Image<A>& attr_image, const Function_v2b<P2B>& pred);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ namespace internal
+ {
+ template <typename P, typename I>
+ struct desc_sort
+ {
+ bool operator()(const P& p1, const P& p2) const
+ {
+ return ima(p1) > ima(p2);
+ }
+ const I& ima;
+
+ desc_sort(const I& ima) : ima(ima) {}
+ };
+
+ template <typename P, typename I>
+ inline
+ void
+ sort(p_array<P>& arr, const I& ima_)
+ {
+ mlc_converts_to(P, mln_psite(I))::check();
+
+ const I& ima = exact(ima_);
+ std::vector<P>& v = arr.hook_std_vector_();
+ std::sort(v.begin(), v.end(), desc_sort<P,I>(ima));
+ }
+
+ template <typename A>
+ inline
+ bool
+ get_max(const p_array< mln_psite(A) >& arr, const A& activity, unsigned& pos)
+ {
+ while (pos < arr.nsites() && !activity(arr[pos]))
+ ++pos;
+ return (pos < arr.nsites());
+ }
+
+
+ //////////////////////////
+ // Predifined predicate //
+ //////////////////////////
+
+ /// Predicate used to gets components until tree leaves last.
+ template <typename T>
+ class pred_tree_leaves_last
+ {
+ public:
+ pred_tree_leaves_last(const T& tree) :
+ n_ (tree.leaves().nsites())
+ {
+ }
+
+ template <typename P>
+ bool operator() (const P& p, unsigned n, unsigned* nb_leaves) const
+ {
+ (void)p;
+ (void)n;
+ mln_assertion(nb_leaves != 0);
+
+ return (*nb_leaves < n_);
+ }
+
+
+ private:
+ unsigned n_;
+ };
+
+ /// Predicate used to get n components.
+ class pred_n_components
+ {
+ public:
+ pred_n_components(unsigned n) :
+ n_(n)
+ {
+ }
+
+ template <typename P>
+ bool operator() (const P& p, unsigned n, unsigned* nb_leaves) const
+ {
+ (void)p;
+ (void)nb_leaves;
+
+ return (n < n_);
+ }
+
+
+ private:
+ unsigned n_;
+ };
+
+ /// Predicate used to get components that check a p2b function predicate.
+ template <typename P2B>
+ class pred_p2b
+ {
+ public:
+ pred_p2b(const P2B& f) :
+ f_ (f)
+ {
+ }
+
+ template <typename P>
+ bool operator() (const P& p, unsigned n, unsigned* nb_leaves) const
+ {
+ (void)n;
+ (void)nb_leaves;
+
+ return (f_(p));
+ }
+
+
+ private:
+ const P2B& f_;
+ };
+
+ template <typename T, typename A, class P>
+ p_array< mln_psite(A) >
+ get_components(const T& tree, const A& a, const P& pred, bool uses_leaves = 0)
+ {
+
+ mln_psite(A) p;
+ p_array< mln_psite(A) > components;
+ mln_ch_value(A, bool) activity;
+ p_array< mln_psite(A) > max_arr = tree.nodes();
+ unsigned arr_pos = 0; // position in max_array
+ unsigned n = 0;
+ unsigned* nb_leaves = uses_leaves ? new unsigned(0) : 0;
+
+ initialize(activity, a);
+ mln::data::fill(activity, true);
+ internal::sort(max_arr, a);
+
+ unsigned cpt = 0;
+
+ do
+ {
+ if (!internal::get_max(max_arr, activity, arr_pos))
+ break;
+ p = max_arr[arr_pos];
+
+ { // debug
+ std::cout << "# " << cpt << " Retrieve " << p << " with attribute value: "
+ << a(p) << std::endl;
+ }
+
+
+ if (a(p) == 0)
+ break;
+ components.insert(p);
+ morpho::tree::propagate_node_to_descendants(p, tree, activity, false, nb_leaves);
+ morpho::tree::propagate_node_to_ancestors(p, tree, activity, false);
+ activity(p) = false;
+ n++;
+ mln_assertion(nb_leaves == 0 || *nb_leaves < mln_max(unsigned));
+
+ // debug
+ {
+ morpho::tree::propagate_node_to_descendants(p, tree, global::debug_img,
+ literal::green);
+ morpho::tree::propagate_node_to_ancestors(p, tree, global::debug_img,
+ literal::red);
+
+ global::debug_img(p) = literal::blue;
+
+ morpho::tree::propagate_representative(tree, global::debug_img);
+
+ std::stringstream fn;
+ fn.fill('0');
+ fn << "debug/log_";
+ fn.width(3);
+ fn << std::right << cpt;
+
+ std::ofstream out((fn.str() + ".log").c_str());
+
+ out << "# " << cpt << " Retrieve " << p << " with attribute value: "
+ << a(p) << std::endl;
+
+ mln_psite(T) it = p;
+ while (!tree.is_root(it))
+ {
+ out << "\"" << it << "\" " << a(it) << std::endl;
+ it = tree.parent(it);
+ }
+ out.close();
+
+
+ io::ppm::save(global::debug_img, (fn.str() + ".ppm").c_str());
+
+
+// if (fork() == 0)
+// {
+// execlp("xv", "xv", "debug.ppm", 0);
+// exit(0);
+// }
+ //std::cout << "Press to continue: "
+ // << std::endl;
+ //std::cin.ignore();
+ cpt++;
+ }
+ }
+ while (pred(p, n, nb_leaves));
+
+ if (uses_leaves)
+ delete nb_leaves;
+ return components;
+ }
+
+ } // end of namespace mln::morpho::tree::internal
+
+
+ template <typename T, typename A>
+ p_array< mln_psite(A) >
+ get_components(const T& tree, const Image<A>& attr_image)
+ {
+ trace::entering("mln::morpho::tree::get_components");
+
+ const A& a = exact(attr_image);
+ mln_precondition(tree.f().domain() == a.domain()); // May be to strong.
+ mln_precondition(a.is_valid());
+
+ p_array< mln_psite(A) > components =
+ internal::get_components<T, A>(tree, a, internal::pred_tree_leaves_last<T>(tree), true);
+
+ trace::exiting("mln::morpho::tree::get_components");
+ return components;
+ }
+
+
+ template <typename T, typename A>
+ p_array< mln_psite(A) >
+ get_components(const T& tree, const Image<A>& attr_image, unsigned n)
+ {
+ trace::entering("mln::morpho::tree::get_components");
+
+ const A& a = exact(attr_image);
+ mln_precondition(tree.f().domain() == a.domain()); // May be to strong.
+ mln_precondition(a.is_valid());
+
+ p_array< mln_psite(A) > components;
+
+ if (n > 0)
+ components = internal::get_components(tree, a, internal::pred_n_components(n), false);
+
+ trace::exiting("mln::morpho::tree::get_components");
+ return components;
+ }
+
+ template <typename T, typename A, typename P2B>
+ p_array< mln_psite(A) >
+ get_components(const T& tree, const Image<A>& attr_image, const Function_v2b<P2B>& pred)
+ {
+ trace::entering("mln::morpho::tree::get_components");
+
+ const A& a = exact(attr_image);
+ const P2B& predicate = exact(pred);
+ mln_precondition(tree.f().domain() == a.domain()); // May be to strong.
+ mln_precondition(a.is_valid());
+
+ p_array< mln_psite(A) > components =
+ internal::get_components(tree, a, internal::pred_p2b<P2B>(predicate), false);
+
+ trace::exiting("mln::morpho::tree::get_components");
+ return components;
+ }
+
+# endif /* !MLN_INCLUDE_ONLY */
+
+ } // end of namespace mln::morpho::tree
+
+ } // end of namespace mln::morpho
+
+} // end of namespace mln
+
+#endif /* !MLN_MORPHO_TREE_COMPONENTS_HH_ */
Property changes on: trunk/milena/sandbox/edwin/mln/morpho/tree/components_debug.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: trunk/milena/sandbox/edwin/mln/morpho/tree/propagate_node_debug.hh
===================================================================
--- trunk/milena/sandbox/edwin/mln/morpho/tree/propagate_node_debug.hh (revision 0)
+++ trunk/milena/sandbox/edwin/mln/morpho/tree/propagate_node_debug.hh (revision 4305)
@@ -0,0 +1,217 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project 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 MLN_MORPHO_TREE_PROPAGATE_NODE_HH
+# define MLN_MORPHO_TREE_PROPAGATE_NODE_HH
+
+# include <mln/core/concept/image.hh>
+# include <mln/core/macros.hh>
+# include <mln/morpho/tree/data.hh>
+
+// debug
+# include <mln/morpho/tree/debug.hh>
+
+/// \file
+///
+/// Functions to propagate node in the tree.
+
+
+namespace mln
+{
+
+ namespace morpho
+ {
+
+ namespace tree
+ {
+
+ /*!
+ ** Propagate a value \p v from a node \p n to its descendants.
+ **
+ ** \param[in] n Node to propagate.
+ ** \param[in] t Component tree used for propagation.
+ ** \param[in] a_ Attribute image where values are propagated.
+ ** \param[in] v Value to propagate.
+ ** \param[out] nb_leaves Optional. Store the number of leaves in
+ ** the component.
+ */
+ template <typename T, typename A>
+ void
+ propagate_node_to_descendants(mln_psite(A) n,
+ const T& t,
+ Image<A>& a_,
+ const mln_value(A)& v,
+ unsigned* nb_leaves = 0);
+
+ /*!
+ ** Propagate the node's value to its descendants.
+ **
+ ** \param[in] n Node to propagate.
+ ** \param[in] t Component tree used for propagation.
+ ** \param[in] a_ Attribute image where values are propagated.
+ ** \param[out] nb_leaves Optional. Store the number of leaves in
+ ** the component.
+ */
+ template <typename T, typename A>
+ inline
+ void
+ propagate_node_to_descendants(mln_psite(A)& n,
+ const T& t,
+ Image<A>& a_,
+ unsigned* nb_leaves = 0);
+
+
+ /*!
+ ** Propagate a value \p v from a node \p n to its ancestors.
+ **
+ ** \param[in] n Node to propagate.
+ ** \param[in] t Component tree used for propagation.
+ ** \param[in] a_ Attribute image where values are propagated.
+ ** \param[in] v Value to propagate.
+ */
+ template <typename T, typename A>
+ void
+ propagate_node_to_ancestors(mln_psite(A) n,
+ const T& t,
+ Image<A>& a_,
+ const mln_value(A)& v);
+
+ /*!
+ ** Propagate the node's value to its ancestors.
+ **
+ ** \param[in] n Node to propagate.
+ ** \param[in] t Component tree used for propagation.
+ ** \param[in,out] a_ Attribute image where values are propagated.
+ */
+ template <typename T, typename A>
+ inline
+ void
+ propagate_node_to_ancestors(mln_psite(A) n,
+ const T& t,
+ Image<A>& a_);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ /* Descendants propagation */
+
+ template <typename T, typename A>
+ inline
+ void
+ propagate_node_to_descendants(mln_psite(A) n,
+ const T& t,
+ Image<A>& a_,
+ const mln_value(A)& v,
+ unsigned* nb_leaves = 0)
+ {
+ A& a = exact(a_);
+ mln_precondition(a.is_valid());
+ mln_precondition(a.domain() == t.f().domain());
+ mln_precondition(a.domain().has(n));
+
+
+ if (!t.is_a_node(n)) // Get the representant.
+ n = t.parent(n);
+ mln_assertion(t.is_a_node(n));
+
+ typename T::depth1st_piter pp(t, n);
+
+ pp.start(); // We don't set n to v.
+
+ if (nb_leaves)
+ *nb_leaves += t.is_a_leaf(pp);
+
+ for (pp.next(); pp.is_valid(); pp.next())
+ {
+ a(pp) = v;
+ if (nb_leaves && t.is_a_leaf(pp))
+ ++(*nb_leaves);
+ }
+
+ }
+
+
+ template <typename T, typename A>
+ inline
+ void
+ propagate_node_to_descendants(mln_psite(A) n,
+ const T& t,
+ Image<A>& a_,
+ unsigned* nb_leaves = 0)
+
+ {
+ A& a = exact(a_);
+ propagate_node_to_descendants(n, t, a, a(n), nb_leaves);
+ }
+
+
+ /* Ancestors propagation */
+
+ template <typename T, typename A>
+ void
+ propagate_node_to_ancestors(mln_psite(A) n,
+ const T& t,
+ Image<A>& a_,
+ const mln_value(A)& v)
+ {
+ A& a = exact(a_);
+ mln_precondition(a.is_valid());
+ mln_precondition(a.domain() == t.f().domain());
+ mln_precondition(a.domain().has(n));
+
+ if (!t.is_a_node(n)) // Get the representant.
+ n = t.parent(n);
+ mln_assertion(t.is_a_node(n));
+
+ if (t.is_root(n))
+ return;
+
+ do {
+ n = t.parent(n);
+ a(n) = v;
+ } while (!t.is_root(n));
+
+ }
+
+ template <typename T, typename A>
+ inline
+ void
+ propagate_node_to_ancestors(mln_psite(A) n,
+ const T& t,
+ Image<A>& a_)
+ {
+ A& a = exact(a_);
+ propagate_node_to_ancestors(n, t, a, a(n));
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::morpho::tree
+
+ } // end of namespace mln::morpho
+
+} // end of namespace mln
+
+#endif // ! MLN_MORPHO_TREE_PROPAGATE_NODE_HH
Property changes on: trunk/milena/sandbox/edwin/mln/morpho/tree/propagate_node_debug.hh
___________________________________________________________________
Added: svn:mergeinfo
#43: Fix the initialization of all global constants.
------------------------+---------------------------------------------------
Reporter: garrigues | Owner: Olena Team
Type: defect | Status: reopened
Priority: major | Milestone: Olena 1.1
Component: Milena | Version: 1.0
Resolution: | Keywords:
------------------------+---------------------------------------------------
Changes (by levill_r):
* status: closed => reopened
* resolution: fixed =>
* milestone: Olena 1.0 => Olena 1.1
Old description:
> * Use extern const ref, not static.
> * Move impl. within MLN_INCLUDE_ONLY.
>
> Apply this to source:trunk/milena/mln.
New description:
* Use extern const ref, not static (really?)
* Move implementation into another file (e.g., `foo.hcc`)
* Provide a `globals.hcc` including all `.hcc` files (convenience
shortcut).
* Tell users (a entry in the FAQ would be useful) to include each
needed `.hcc` file '''once''' per program.
--
Comment:
Reopen. The test is spurious: there are actual link issues with the
current solution.
--
Ticket URL: <https://trac.lrde.org/olena/ticket/43#comment:5>
Olena <http://olena.lrde.epita.fr>
Olena, a generic and efficient C++ image processing library.
* build-aux/devtools.sh: Improve MILENA_DEVTOOLS_PATH value
detection.
* build-aux/devtools_utils.sh,
* build-aux/make_report_utils.sh: New. Set of functions to help
writing devtools.
* build-aux/mln_add_file,
* build-aux/mln_check_source_has_test,
* build-aux/mln_check_test_hierarchy: Update headers.
* build-aux/mln_check_all_hh_headers: split into...
* build-aux/mln_check_all_hh_inclusions,
* build-aux/mln_check_missing_all_hh_headers: ... these files.
* build-aux/mln_check_guards: move...
* build-aux/mln_fix_guards: ... here.
* build-aux/mln_check_guards: New.
---
ChangeLog | 29 ++++-
build-aux/devtools.sh | 13 +-
build-aux/devtools_utils.sh | 34 +++++
build-aux/make_report_utils.sh | 52 +++++++
build-aux/mln_add_file | 18 +--
build-aux/mln_check_all_hh_headers | 55 -------
build-aux/mln_check_all_hh_inclusions | 93 ++++++++++++
build-aux/mln_check_guards | 182 +++++++++---------------
build-aux/mln_check_missing_all_hh_headers | 80 +++++++++++
build-aux/mln_check_source_has_test | 18 +--
build-aux/mln_check_test_hierarchy | 18 +--
build-aux/{mln_check_guards => mln_fix_guards} | 21 ++--
12 files changed, 395 insertions(+), 218 deletions(-)
create mode 100644 build-aux/devtools_utils.sh
create mode 100644 build-aux/make_report_utils.sh
delete mode 100755 build-aux/mln_check_all_hh_headers
create mode 100755 build-aux/mln_check_all_hh_inclusions
create mode 100755 build-aux/mln_check_missing_all_hh_headers
copy build-aux/{mln_check_guards => mln_fix_guards} (83%)
diff --git a/ChangeLog b/ChangeLog
index 30c1297..b9b99a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2009-07-15 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ Improve devtools.
+
+ * build-aux/devtools.sh: Improve MILENA_DEVTOOLS_PATH value
+ detection.
+
+ * build-aux/devtools_utils.sh,
+ * build-aux/make_report_utils.sh: New. Set of functions to help
+ writing devtools.
+
+ * build-aux/mln_add_file,
+ * build-aux/mln_check_source_has_test,
+ * build-aux/mln_check_test_hierarchy: Update headers.
+
+
+ * build-aux/mln_check_all_hh_headers: split into...
+ * build-aux/mln_check_all_hh_inclusions,
+ * build-aux/mln_check_missing_all_hh_headers: ... these files.
+
+ * build-aux/mln_check_guards: move...
+ * build-aux/mln_fix_guards: ... here.
+
+ * build-aux/mln_check_guards: New.
+
2009-07-14 Roland Levillain <roland(a)lrde.epita.fr>
* configure.ac, NEWS: Version 1.0a.
@@ -10,9 +35,9 @@
Aesthetic changes.
2009-07-13 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
-
+
* lrde-upload.sh: Set permissions on specific directories only.
-
+
2009-07-13 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
* lrde-upload.sh: Set writing permissions for group on uploaded
diff --git a/build-aux/devtools.sh b/build-aux/devtools.sh
index fc5465a..0a35ac6 100644
--- a/build-aux/devtools.sh
+++ b/build-aux/devtools.sh
@@ -1,9 +1,10 @@
-export MILENA_DEVTOOLS_PATH=`dirname $0`
-
-if [ -d "$PWD/$MILENA_DEVTOOLS_PATH" ]; then
- export PATH=$PWD/$MILENA_DEVTOOLS_PATH:$PATH
-elif [ -d "$MILENA_DEVTOOLS_PATH" ] && [ -z "`echo $MILENA_DEVTOOLS_PATH | cut -d '/' -f 1`" ]; then
- export PATH=$MILENA_DEVTOOLS_PATH:$PATH
+dname="`dirname $0`"
+if [ "$dname" = "." ]; then
+ export PATH="$PWD:$PATH"
+ export MILENA_DEVTOOLS_PATH="$PWD"
+elif [ -d "$PWD/$dname" ]; then
+ export PATH="$PWD/$MILENA_DEVTOOLS_PATH:$PATH"
+ export MILENA_DEVTOOLS_PATH="$PWD/$dname"
else
echo "Cannot guess Milena's devtools path. Please set MILENA_DEVTOOLS_PATH variable manually."
fi
diff --git a/build-aux/devtools_utils.sh b/build-aux/devtools_utils.sh
new file mode 100644
index 0000000..2156a50
--- /dev/null
+++ b/build-aux/devtools_utils.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+
+# $1: a file.
+#
+# Return the absolute file path.
+#
+abs_filepath()
+{
+ path=$PWD
+ if [ "`dirname $1`" != "." ]; then
+ path=$path/`dirname $1`
+ fi
+
+ echo "$path"
+}
+
+
+# $1: a file.
+#
+# Return the relative path to mln
+#
+mln_based_path()
+{
+ path=`abs_filepath "$1"`
+ local mln_path=""
+ while [ "`basename $path`" != "mln" ]; do
+ mln_path="`basename $path`/$mln_path"
+ path=`dirname $path`
+ done
+ mln_path="mln/$mln_path"
+
+ echo "$mln_path" | sed -e 's,/$,,'
+}
diff --git a/build-aux/make_report_utils.sh b/build-aux/make_report_utils.sh
new file mode 100644
index 0000000..4660f2b
--- /dev/null
+++ b/build-aux/make_report_utils.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+# Set of useful functions to generate HTML reports.
+
+
+
+# $1: report file.
+close_dir_entry()
+{
+ echo "</ol>" >> $1
+}
+
+# $1: entry name.
+# $2: report file.
+open_dir_entry()
+{
+ echo "<li><b>$1</b></li><ol>" >> $2
+}
+
+
+
+# $1: report file.
+# $2: report title.
+prepare_report()
+{
+ cat >> $1 << EOF
+<html>
+ <head>
+ <script language="javascript" src="http://api.uttk.org/javascripts/uttk.js"></script>
+ <style type="text/css">
+ @import url('http://api.uttk.org/stylesheets/uttk.css');
+ </style>
+ <title>
+ $2
+ </title>
+ </head>
+ <body>
+ <h1>$2</h2>
+EOF
+
+}
+
+
+# $1: report file.
+end_report()
+{
+ close_dir_entry $1
+ cat >> $1 << EOF
+ </body>
+</html>
+EOF
+}
\ No newline at end of file
diff --git a/build-aux/mln_add_file b/build-aux/mln_add_file
index f92801f..193784b 100755
--- a/build-aux/mln_add_file
+++ b/build-aux/mln_add_file
@@ -1,22 +1,20 @@
#!/bin/sh
-# Copyright (C) 2009 EPITA Research and Development Laboratory
-# (LRDE)
+# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE).
#
-# This file is part of the Milena 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 file is part of Olena.
#
-# This library is distributed in the hope that it will be useful,
+# Olena is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, version 2 of the License.
+#
+# Olena 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.
+# along with Olena. If not, see <http://www.gnu.org/licenses/>.
# Usage: ./new_header.sh <mln/path/header.hh>
#
diff --git a/build-aux/mln_check_all_hh_headers b/build-aux/mln_check_all_hh_headers
deleted file mode 100755
index 80d394d..0000000
--- a/build-aux/mln_check_all_hh_headers
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2009 EPITA Research and Development Laboratory
-# (LRDE)
-#
-# This file is part of the Milena 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.
-
-if [ $# -ne 2 ]; then
- echo "Usage: `basename $0` <path to mln> <output_log_dir>" 1>&2
- exit 1;
-fi
-
-
-path_to_mln=`dirname $1`
-
-echo "" > $2/missing_all_hh.log
-echo "" > $2/not_included_in_all_hh.log
-
-cd $path_to_mln
-
-# Checking local all.hh
-for dir in `find mln -mindepth 1 -type d`; do
-
- if ! [ -e "$dir/all.hh" ]; then
- echo "WARNING: no all.hh header in $dir" >&2
- echo "$dir/all.hh" >> $2/missing_all_hh.log
- continue
- fi
-
- for f in `ls $dir/*.hh | grep -vE '*.spe.hh'`; do
- if [ "`basename $f`" != "all.hh" ]; then
- result=`grep "include <$f>" $dir/all.hh`
- if [ -z "$result" ]; then
- echo " WARNING $f is not included in $dir/all.hh" >&2
- echo "$f" >> $2/not_included_in_all_hh.log
- fi
- fi
- done
-
-done
-
-#cd -
diff --git a/build-aux/mln_check_all_hh_inclusions b/build-aux/mln_check_all_hh_inclusions
new file mode 100755
index 0000000..23b781c
--- /dev/null
+++ b/build-aux/mln_check_all_hh_inclusions
@@ -0,0 +1,93 @@
+#!/bin/sh
+
+# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE).
+#
+# This file is part of Olena.
+#
+# Olena is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, version 2 of the License.
+#
+# Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+
+
+if [ -z "$MILENA_DEVTOOLS_PATH" ]; then
+ echo "MILENA_DEVTOOLS_PATH is not set." >&2
+ exit 1
+fi
+
+
+source $MILENA_DEVTOOLS_PATH/make_report_utils.sh
+source $MILENA_DEVTOOLS_PATH/devtools_utils.sh
+
+
+last_path=""
+check()
+{
+ f=`basename $1`
+ abs_dir=`abs_filepath $1`
+ mln_based_dir=`mln_based_path $1`
+
+# Checking local all.hh
+ if ! [ -e "$abs_dir/all.hh" ]; then
+ echo "WARNING: no all.hh header in $mln_based_dir" >&2
+ return
+ fi
+
+ result=`grep "include <$mln_based_dir/$f>" $abs_dir/all.hh`
+ if [ -z "$result" ]; then
+ if [ -z "$report" ]; then
+ echo " WARNING $f is not included in $mln_based_dir/all.hh" >&2
+ else
+ if [ "$last_path" != "$mln_based_dir" ]; then
+ close_dir_entry $2
+ open_dir_entry "$mln_based_dir" $2
+ last_path="$mln_based_dir"
+ fi
+ echo "<li>$f</li>" >> $2
+ fi
+ fi
+}
+
+
+
+if [ $# -lt 1 ]; then
+ echo "Usage: $0 [--report output.html] <file1> <file2> ..." >&2
+ echo "-----"
+ echo " Names of files which are not included in their respective"
+ echo " all.hh file will be printed out."
+ echo " A HTML report may be also generated."
+ exit 1
+fi
+
+report=""
+if [ "$1" == "--report" ]; then
+ shift
+ report=$1
+ rm -f $1
+ touch $1
+ shift
+fi
+
+if ! [ -z "$report" ]; then
+ prepare_report $report "Files not included in all.hh."
+fi
+
+
+while [ $# -ne 0 ]; do
+ if [ "`basename $1`" != "all.hh" ]; then
+ check $1 "$report"
+ fi
+ shift
+done
+
+
+if ! [ -z "$report" ]; then
+ end_report $report
+fi
diff --git a/build-aux/mln_check_guards b/build-aux/mln_check_guards
index 3a2a95b..22fe5e5 100755
--- a/build-aux/mln_check_guards
+++ b/build-aux/mln_check_guards
@@ -1,134 +1,90 @@
-#! /usr/bin/env perl
+#!/bin/sh
+
+# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE).
#
-# Copyright (C) 2009 EPITA Research and Development Laboratory
-# (LRDE)
+# This file is part of Olena.
#
-# This file is part of the Milena 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.
+# Olena is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, version 2 of the License.
#
-# This library is distributed in the hope that it will be useful,
+# Olena 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.
-#
-#
-# check_guards.pl: this file comes from the Vaucanson project.
-#
-# Usage: ./mln_check_guards <file1> <file2> ....
-#
-# Check guards and fix them if needed.
-
-use warnings;
-use strict;
-
-my $boundupper = "#ifndef %CPPNAME%
-# define %CPPNAME%";
-my $boundlower = "#endif // ! %CPPNAME%";
-
-sub check_guards ($)
-{
- my $fname = $_[0];
-
- # The short name, without the path from builddir to srcdir.
- $_ = $fname;
- s,^.*milena/mln/,,g;
- my $shortname = $_;
- s,.*/,,g;
- my $basename = $_;
-
- $_ = $shortname;
- s,^[./]*,,g;
- s,^,MLN_,g;
- s,[^a-zA-Z0-9],_,g;
- y/[a-z]./[A-Z]_/;
- my $cppname = $_;
+# along with Olena. If not, see <http://www.gnu.org/licenses/>.
- $_ = $boundupper;
- s,%BASENAME%,$basename,g;
- s,%CPPNAME%,$cppname,g;
- my $xboundupper = $_;
+# Usage: mln_check_guards [--report output.html] <file1> <file2> ...
- $_ = $boundlower;
- s,%BASENAME%,$basename,g;
- s,%CPPNAME%,$cppname,g;
- my $xboundlower = $_;
+if [ -z "$MILENA_DEVTOOLS_PATH" ]; then
+ echo "MILENA_DEVTOOLS_PATH is not set." >&2
+ exit 1
+fi
- open(FILE, "<", $fname) or die "cannot open $fname: $!\n";
- my $content;
- while (<FILE>)
- {
- $content .= $_;
- }
- close FILE;
+source $MILENA_DEVTOOLS_PATH/make_report_utils.sh
+source $MILENA_DEVTOOLS_PATH/devtools_utils.sh
- # Prepare the new contents.
- $_ = $content;
- # Kill trailing spaces.
-# s/[ \t]+$//mg;
-# s,([ \t\n])*$,\n,sg;
- # Adjust cpp guards.
- if (/\# *ifndef[^\n]*\n[\n\t ]*\# *define[^\n]*\n/s)
- {
- s,\# *ifndef[^\n]*\n[\n\t ]*\# *define[^\n]*\n,$xboundupper\n,sg;
- }
-
- if (/\# *endif[^\n]*\n[\n\t ]*$/s)
- {
- s,\# *endif[^\n]*\n[\n\t ]*$,$xboundlower\n,sg;
- }
-
- # Make sure we have a unique ending eol.
- s/\n+\z/\n/;
-
- $content = $_;
-
- my @mv = ("mv", "-f", "$fname", "$fname.bak");
- system(@mv) == 0 or die "system @mv failed: $?\n";
-
- open(FILE, ">", $fname) or die "cannot open $fname for writing: $!\n";
- print FILE $content;
-}
-
-if ($#ARGV == -1)
+last_path=""
+check()
{
- print "mln_check_guards <file1> <file2> ...\n";
- print "----\n";
- print "Check guards in a list of files and fix them if needed.\n";
- exit 1;
+ local mln_path=`mln_based_path $1`
+
+ bname=`basename $1`
+ guards=`echo ${mln_path}/${bname} | sed -e 's,[/\.],_,g' | awk '{print toupper($0)}'`
+
+ nndef=`grep "^#ifndef $guards$" $1 | wc -l`
+ ndefine=`grep "^# define $guards$" $1 | wc -l`
+ nendif=`grep "^#endif // ! $guards" $1 | wc -l`
+
+ if [ $nndef -ne 1 ] || [ $ndefine -ne 1 ] || [ $nendif -ne 1 ]; then
+ if [ -z "$2" ]; then
+ echo "$1 has missing or invalid guards."
+ else
+ if [ "$last_path" != "$mln_path" ]; then
+ close_dir_entry $2
+ open_dir_entry "$mln_path" $2
+ last_path="$mln_path"
+ fi
+ echo "<li>$bname</li>" >> $2
+ fi
+ fi
}
-foreach my $file (@ARGV)
-{
- check_guards ($file);
-}
-exit 0;
-
-### Setup "GNU" style for perl-mode and cperl-mode.
-## Local Variables:
-## perl-indent-level: 2
-## perl-continued-statement-offset: 2
-## perl-continued-brace-offset: 0
-## perl-brace-offset: 0
-## perl-brace-imaginary-offset: 0
-## perl-label-offset: -2
-## cperl-indent-level: 2
-## cperl-brace-offset: 0
-## cperl-continued-brace-offset: 0
-## cperl-label-offset: -2
-## cperl-extra-newline-before-brace: t
-## cperl-merge-trailing-else: nil
-## cperl-continued-statement-offset: 2
-## End:
+if [ $# -lt 1 ]; then
+ echo "Usage: $0 [--report output.html] <file1> <file2> ..." >&2
+ echo "-----"
+ echo " Names of files with missing or invalid guards will be printed out."
+ echo " A HTML report may be also generated."
+ exit 1
+fi
+
+report=""
+if [ "$1" == "--report" ]; then
+ shift
+ report=$1
+ rm -f $1
+ touch $1
+ shift
+fi
+
+if ! [ -z "$report" ]; then
+ prepare_report $report "Files with invalid or missing guards."
+fi
+
+while [ $# -ne 0 ]; do
+ check $1 "$report"
+ shift
+done
+
+if ! [ -z "$report" ]; then
+ end_report $report
+fi
+
diff --git a/build-aux/mln_check_missing_all_hh_headers b/build-aux/mln_check_missing_all_hh_headers
new file mode 100755
index 0000000..4062076
--- /dev/null
+++ b/build-aux/mln_check_missing_all_hh_headers
@@ -0,0 +1,80 @@
+#!/bin/sh
+
+# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE).
+#
+# This file is part of Olena.
+#
+# Olena is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, version 2 of the License.
+#
+# Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+
+if [ -z "$MILENA_DEVTOOLS_PATH" ]; then
+ echo "MILENA_DEVTOOLS_PATH is not set." >&2
+ exit 1
+fi
+
+
+source $MILENA_DEVTOOLS_PATH/make_report_utils.sh
+source $MILENA_DEVTOOLS_PATH/devtools_utils.sh
+
+
+check()
+{
+ local mln_path=`mln_based_path $1/all.hh`
+ local abs_path=`abs_filepath $1/all.hh`
+
+# Checking local all.hh
+ for dir in `find "$abs_path" -type d`; do
+ if ! [ -e "$dir/all.hh" ]; then
+ path=`mln_based_path $dir/all.hh`
+ if [ -z "$2" ]; then
+ echo "WARNING: no all.hh header in $path" >&2
+ else
+ close_dir_entry $2
+ open_dir_entry "$path" $2
+ fi
+
+ continue
+ fi
+ done
+}
+
+
+
+if [ $# -lt 1 ]; then
+ echo "Usage: $0 [--report output.html] <dir1> <dir2> ..." >&2
+ echo "-----"
+ echo " Directories without all.hh files will be printed out."
+ echo " A HTML report may be also generated."
+ exit 1
+fi
+
+report=""
+if [ "$1" == "--report" ]; then
+ shift
+ report=$1
+ rm -f $1
+ touch $1
+ shift
+fi
+
+if ! [ -z "$report" ]; then
+ prepare_report $report "Missing all.hh headers."
+fi
+
+while [ $# -ne 0 ]; do
+ check $1 "$report"
+ shift
+done
+
+if ! [ -z "$report" ]; then
+ end_report $report
+fi
diff --git a/build-aux/mln_check_source_has_test b/build-aux/mln_check_source_has_test
index 3b9e564..a0e7cc5 100755
--- a/build-aux/mln_check_source_has_test
+++ b/build-aux/mln_check_source_has_test
@@ -1,22 +1,20 @@
#! /bin/sh
-# Copyright (C) 2009 EPITA Research and Development Laboratory
-# (LRDE)
+# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE).
#
-# This file is part of the Milena 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 file is part of Olena.
#
-# This library is distributed in the hope that it will be useful,
+# Olena is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, version 2 of the License.
+#
+# Olena 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.
+# along with Olena. If not, see <http://www.gnu.org/licenses/>.
failed_tests=0
all_tests=0
diff --git a/build-aux/mln_check_test_hierarchy b/build-aux/mln_check_test_hierarchy
index 91dddcb..40da3ea 100755
--- a/build-aux/mln_check_test_hierarchy
+++ b/build-aux/mln_check_test_hierarchy
@@ -1,22 +1,20 @@
#! /bin/sh
-# Copyright (C) 2009 EPITA Research and Development Laboratory
-# (LRDE)
+# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE).
#
-# This file is part of the Milena 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 file is part of Olena.
#
-# This library is distributed in the hope that it will be useful,
+# Olena is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, version 2 of the License.
+#
+# Olena 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.
+# along with Olena. If not, see <http://www.gnu.org/licenses/>.
failed_tests=0
all_tests=0
diff --git a/build-aux/mln_check_guards b/build-aux/mln_fix_guards
similarity index 83%
copy from build-aux/mln_check_guards
copy to build-aux/mln_fix_guards
index 3a2a95b..eb2b331 100755
--- a/build-aux/mln_check_guards
+++ b/build-aux/mln_fix_guards
@@ -1,24 +1,21 @@
#! /usr/bin/env perl
+
+# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE).
#
-# Copyright (C) 2009 EPITA Research and Development Laboratory
-# (LRDE)
+# This file is part of Olena.
#
-# This file is part of the Milena 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.
+# Olena is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, version 2 of the License.
#
-# This library is distributed in the hope that it will be useful,
+# Olena 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.
-#
-#
+# along with Olena. If not, see <http://www.gnu.org/licenses/>.
+
# check_guards.pl: this file comes from the Vaucanson project.
#
# Usage: ./mln_check_guards <file1> <file2> ....
--
1.5.6.5
---
ANNOUNCE-1.0 | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 62 insertions(+), 0 deletions(-)
create mode 100644 ANNOUNCE-1.0
diff --git a/ANNOUNCE-1.0 b/ANNOUNCE-1.0
new file mode 100644
index 0000000..03978ee
--- /dev/null
+++ b/ANNOUNCE-1.0
@@ -0,0 +1,62 @@
+The Olena Team is proud to announce the release of Olena 1.0.
+
+Olena is a platform dedicated to image processing and pattern
+recognition. Its core component is a generic and efficient C++
+library called Milena. Milena provides a framework to implement
+simple, fast, safe, reusable and extensible image processing tool
+chains. The library provides many ready-to-use image data structures
+(regular 1D, 2D, 3D images, graph-based images, etc.) and algorithms.
+Milena's algorithms are built upon classical entities from the image
+processing field (images, points/sites, domains, neighborhoods, etc.).
+This design allows image processing developers and practitioners to
+easily understand, modify, develop and extend new algorithms while
+retaining the core traits of Milena: genericity and efficiency.
+
+The package also features Swilena, an optional component exposing
+Milena to other languages thanks to the Simplified Wrapper and
+Interface Generator (SWIG). For the moment, only some Python bindings
+are provided.
+
+The Olena platform is Free Software. It is distributed under the
+conditions of the GNU General Public License (GPL) version 2. See the
+file COPYING shipped with the Olena distribution.
+
+Release notes are available at:
+ http://olena.lrde.epita.fr/Olena100
+
+You can download packages of the Olena 1.0 distribution here:
+ http://www.lrde.epita.fr/dload/olena/1.0/olena-1.0.tar.gz (25MB)
+ http://www.lrde.epita.fr/dload/olena/1.0/olena-1.0.tar.bz2 (21MB)
+
+The SHA1 digests of theses packages are:
+ 33fc3a327db3f4f68c882d3b2462b83841425628 olena-1.0.tar.gz
+ 2c6ba36d4a156156f7d5ea8f2e1f02bbec9c9098 olena-1.0.tar.bz2
+
+Here is a list of major changes since Olena 0.11:
+
+ * The core C++ library, renamed to Milena, has been rewritten from
+ scratch and features numerous additions over the past releases.
+ Some features have also been dropped or disabled, and some of them
+ will be reintegrated in future releases. The programming
+ interface has changed from previous versions, but most programs
+ using Olena 0.11 can be adapted to the Olena 1.0 API.
+
+ * Milena uses a simplified version of the SCOOP 2 paradigm
+ (informally called SCOOP 1.5), to improve the speed of compilation
+ and make developing easier while still providing very good
+ run-time performances.
+
+ * A first (re)implementation of Swilena featuring Python wrappers
+ for a very small subset of Milena is available. The bundled
+ Swilena Python Shell (sps) allows interactive Olena sessions.
+
+ * A reference documentation including a tutorial and a quick
+ reference guide have been started. They do not cover the whole
+ Milena library yet.
+
+ * Olena includes some demos and applications using Milena.
+
+The file NEWS, included in the archive, contains a more complete list
+of user-visible changes.
+
+Please report any problem by mail to <olena-bugs(a)lrde.epita.fr>.
--
1.6.1.2
* NEWS: Update.
Aesthetic changes.
---
ChangeLog | 7 ++++
NEWS | 119 +++++++++++++++++++++++++++++++------------------------------
2 files changed, 67 insertions(+), 59 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 73c6fb3..18870fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-07-14 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Olena 1.0.
+
+ * NEWS: Update.
+ Aesthetic changes.
+
2009-07-13 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
* lrde-upload.sh: Set writing permissions for group on uploaded
diff --git a/NEWS b/NEWS
index 9702ab6..7532bc3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,25 +1,26 @@
* Olena 1.0 July 14, 2009
- * The core C++ library, renamed to Milena, has been rewritten
- from scratch and features numerous additions over the past
- releases.
+ * The core C++ library, renamed to Milena, has been rewritten from
+ scratch and features numerous additions over the past releases.
+ Some features have also been dropped or disabled, and some of them
+ will be reintegrated in future releases. The programming
+ interface has changed from previous versions, but most programs
+ using Olena 0.11 can be adapted to the Olena 1.0 API.
* Milena uses a simplified version of the SCOOP 2 paradigm
- (informally called SCOOP 1.5), to improve the speed of
- compilation and the ease of development while still
- providing very good run-time performances.
+ (informally called SCOOP 1.5), to improve the speed of compilation
+ and make developing easier while still providing very good
+ run-time performances.
- * A first reimplementation of Swilena featuring Python
- wrappers for a very small subset of Milena is available.
- The Swilena Python Shell (sps) allows interactive Olena
- sessions.
+ * A first (re)implementation of Swilena featuring Python wrappers
+ for a very small subset of Milena is available. The bundled
+ Swilena Python Shell (sps) allows interactive Olena sessions.
* A reference documentation including a tutorial and a quick
- reference guide have been started. They do not cover the
- whole library yet.
+ reference guide have been started. They do not cover the whole
+ Milena library yet.
- * Olena includes some demos which use Milena, the core C++
- library.
+ * Olena includes some demos and applications using Milena.
* Olena 0.11 February 21, 2007
@@ -48,11 +49,11 @@
* Olena 0.10 April 15, 2004
* New documentation system.
- Now any comment should use doxygen style (i.e. /*! ... */).
+ Now any comment should use Doxygen style (i.e. /*! ... */).
You can also write some programs inside the comments. They are
compiled at documentation generation time. It is useful to
illustrate some algorithms with concrete input and output. To
- use this feature the program has to be between \code and \endcode
+ use this feature the program has to be between \code and \endcode
tags. If you produce an image, you can include it in the comments
with the \image command, using the same name you used to produce
it, but with the png extension. To make sure your image will not
@@ -88,24 +89,24 @@
* Olena 0.9 August 8, 2003
- * New static hierarchy paradigm
+ * New static hierarchy paradigm
- Complete rewrite of the image hierarchy.
- - The new hierarchy benefits from multiple inheritance and
+ - The new hierarchy benefits from multiple inheritance and
diamond constructs.
- - Objects' abstract interfaces made available, leading to
- safer and easier algorithm writing.
+ - Objects' abstract interfaces made available, leading to
+ safer and easier algorithm writing.
- Label images such as binary_image or vectorial_image added.
- * Partial rewrite of images I/O
- - Support for 1d, 3d images and windows.
- - Better handling of built-in types.
+ * Partial rewrite of images I/O
+ - Support for 1d, 3d images and windows.
+ - Better handling of built-in types.
- * Color conversions fixed and improved.
+ * Color conversions fixed and improved.
- * Cleanup and coding style conformance.
+ * Cleanup and coding style conformance.
- * Many bug fixes.
- * Improved test-suite.
+ * Many bug fixes.
+ * Improved test-suite.
* Olena 0.8 April 10, 2003
@@ -113,7 +114,7 @@
IMPORTANT NOTE: This version is not compatible with older
versions of Olena. The project has been split into three part,
so many header files have moved and new namespaces have been
- created. Please read the UPGRADING file for more informations.
+ created. Please read the UPGRADING file for more information.
* Many source code cleanups.
* The source code has been split into 3 parts: image
@@ -133,32 +134,32 @@
* New `oln.m4' file for use by autoconf'ed user projects.
* Major documentation updates.
* New `oln-config.sh' scripts for user Makefiles.
- * Olena now works on MacOS X, NetBSD, FreeBSD and cygwin.
+ * Olena now works on Mac OS X, NetBSD, FreeBSD and Cygwin.
-* Olena 0.6 January 15, 2003
+* Olena 0.6 January 15, 2003
- * Complete rewriting of data types.
- * Command line utilities.
- * Fully implementation of convolutions
- * Fast Fourier Transform (FFT)
- * Discrete Wavelet Transform (Daubechie's wavelet) (DWT)
- * Many bug fixes.
+ * Complete rewriting of data types.
+ * Command line utilities.
+ * Fully implementation of convolutions
+ * Fast Fourier Transform (FFT)
+ * Discrete Wavelet Transform (Daubechie's wavelet) (DWT)
+ * Many bug fixes.
-* Olena 0.5 July 25, 2002
-
- * Documentation in LaTeX (instead of Texinfo).
- * Support reading/writing gziped images
- (include <oln/io/gz.hh> and link with libz).
- * Complete rewrite of the static arrays
- (meta::array1d, meta::array2d, meta::array3d).
- * Preliminary implementation of convolutions
- (oln::convol::convolve)
- * All headers should now be referenced with the `oln/' prefix,
- as in `#include <oln/basics2d.hh>'.
- * New conversion operator: convert::stretch.
- * Many bug fixes.
+* Olena 0.5 July 25, 2002
+
+ * Documentation in LaTeX (instead of Texinfo).
+ * Support reading/writing gziped images
+ (include <oln/io/gz.hh> and link with libz).
+ * Complete rewrite of the static arrays
+ (meta::array1d, meta::array2d, meta::array3d).
+ * Preliminary implementation of convolutions
+ (oln::convol::convolve)
+ * All headers should now be referenced with the `oln/' prefix,
+ as in `#include <oln/basics2d.hh>'.
+ * New conversion operator: convert::stretch.
+ * Many bug fixes.
* Olena 0.4.1 April 25, 2002
@@ -209,11 +210,11 @@
The currently available conversions are
- hsi yuv
- \ /
+ hsi yuv
+ \ /
rgb -- nrgb
- \ / \
- xyz yiq
+ \ / \
+ xyz yiq
* Various cleanups and bug fixes. Especially:
- border handling (mirroring, copying) simplified and fixed.
@@ -252,7 +253,7 @@
- `morpho::geodesic_erosion', `morpho::simple_geodesic_erosion'.
- `morpho::get_plus_se_only', `morpho::get_plus_se_p',
`morpho::get_minus_se_only', `morpho::get_minus_se_p': Split
- a structural element in a `plus' (lexicaly before than the center)
+ a structural element in a `plus' (lexically before than the center)
and `minus' (after).
* Misc:
@@ -275,7 +276,7 @@
- the latter six types are instances of the `color' type.
* Processings:
- - All basic morpholohical processings (`opening',
+ - All basic morphological processings (`opening',
`hit_or_miss', `beucher_gradient', etc.) from namespace
`morpho::' have their fast equivalent in namespace
`morpho::fast::'.
@@ -309,17 +310,17 @@
conversion<Inferior>
^
- |
+ |
conversion_to_type<To,Inferior>
^
- |
+ |
conversion_from_type_to_type<From,To,Inferior>
All children of conversion_from_type_to_type are models of
Adaptable Unary Function. See conversion.hh for more comments.
* The only two functions that perform file i/o are `load' and
- `save'. The other functions (`read', `write', `read_pnm',
+ `save'. The other functions (`read', `write', `read_pnm',
`write_pnm') have been removed.
* image2d<rgb<int_u8> > can be loaded and saved as ppm.
@@ -338,7 +339,7 @@
* Olena 0.1 November 1, 2001
- * Initial public release.
+ * Initial public release.
Local Variables:
--
1.6.1.2