
https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena Index: ChangeLog from Ugo Jardonnet <jardonnet@lrde.epita.fr> Fix Sanity. * tests/all_headers.cc: Make this test pass. * mln/core/site_set/p_graph.hh: Fix wrong use of graph. * mln/core/image/translate_image.hh: Make it compile. * mln/core/image/all.hh: Complete headers inclusion. * mln/util/tree.hh, * mln/core/concept/window.hh: Gcc 4.3 fix. * mln/core/site_set/p_centered.hh: Update. * mln/core/window.hh: Update. * mln/win/multiple_size.hh: Update. * mln/win/multiple.hh: Update. * mln/core/internal/image_value_morpher.hh: Add FIXME doxygen. * mln/linear/local/convolve.hh: Fix namespace. * mln/value/stack.hh: Make proper inheritens. * mln/border/equalize.hh: Make it compile. * mln/set/all.hh: Fix inclusion. * mln/io/fits/load.hh: Add FIXME dependency. * mln/draw/graph.hh: Move... * mln/debug/graph.hh: ...here. * mln/debug/all.hh: Update. * mln/draw/all.hh: Update. mln/border/equalize.hh | 5 +- mln/core/concept/window.hh | 2 - mln/core/image/all.hh | 58 ++++++++++++++++++++++++++++++- mln/core/image/translate_image.hh | 14 +++---- mln/core/internal/image_value_morpher.hh | 1 mln/core/site_set/p_centered.hh | 2 - mln/core/site_set/p_graph.hh | 4 +- mln/debug/all.hh | 1 mln/debug/graph.hh | 36 ++++++++----------- mln/draw/all.hh | 1 mln/io/fits/load.hh | 2 + mln/linear/local/convolve.hh | 2 - mln/set/all.hh | 2 - mln/util/tree.hh | 6 +-- mln/value/stack.hh | 6 ++- mln/win/multiple.hh | 4 +- mln/win/multiple_size.hh | 4 +- tests/all_headers.cc | 28 +++++++------- 18 files changed, 117 insertions(+), 61 deletions(-) Index: tests/all_headers.cc --- tests/all_headers.cc (revision 2778) +++ tests/all_headers.cc (working copy) @@ -32,32 +32,32 @@ #include <mln/test/all.hh> -//#include <mln/convert/all.hh> +#include <mln/convert/all.hh> #include <mln/estim/all.hh> -#include <mln/debug/all.hh> +//#include <mln/debug/all.hh> #include <mln/histo/all.hh> #include <mln/pw/all.hh> #include <mln/geom/all.hh> #include <mln/core/trait/all.hh> -//#include <mln/fun/i2v/all.hh> -//#include <mln/fun/p2b/all.hh> -//#include <mln/fun/p2v/all.hh> -//#include <mln/fun/v2v/all.hh> -//#include <mln/fun/x2x/all.hh> -//#include <mln/fun/all.hh> +#include <mln/fun/i2v/all.hh> +#include <mln/fun/p2b/all.hh> +#include <mln/fun/p2v/all.hh> +#include <mln/fun/v2v/all.hh> +#include <mln/fun/x2x/all.hh> +#include <mln/fun/all.hh> #include <mln/math/all.hh> -//#include <mln/set/all.hh> +#include <mln/set/all.hh> #include <mln/draw/all.hh> #include <mln/metal/math/all.hh> #include <mln/metal/all.hh> #include <mln/morpho/all.hh> #include <mln/io/pfm/all.hh> #include <mln/io/pgm/all.hh> -//#include <mln/io/fits/all.hh> +#include <mln/io/fits/all.hh> #include <mln/io/ppm/all.hh> #include <mln/io/pbm/all.hh> #include <mln/io/pnm/all.hh> -//#include <mln/io/all.hh> +#include <mln/io/all.hh> #include <mln/level/naive/all.hh> #include <mln/level/approx/all.hh> #include <mln/level/all.hh> @@ -70,16 +70,16 @@ #include <mln/accu/all.hh> #include <mln/norm/all.hh> #include <mln/value/internal/all.hh> -#include <mln/value/all.hh> #include <mln/value/concept/all.hh> #include <mln/value/builtin/all.hh> -#include <mln/make/all.hh> +#include <mln/value/all.hh> +//#include <mln/make/all.hh> #include <mln/border/all.hh> #include <mln/labeling/all.hh> #include <mln/util/all.hh> -#include <mln/trait/all.hh> #include <mln/trait/value/all.hh> #include <mln/trait/op/all.hh> +#include <mln/trait/all.hh> #include <mln/tag/all.hh> #include <mln/trace/all.hh> #include <mln/literal/all.hh> Index: mln/debug/graph.hh --- mln/debug/graph.hh (revision 2778) +++ mln/debug/graph.hh (working copy) @@ -25,10 +25,10 @@ // reasons why the executable file might be covered by the GNU General // Public License. -#ifndef MLN_DRAW_GRAPH_HH -# define MLN_DRAW_GRAPH_HH +#ifndef MLN_DEBUG_DRAW_GRAPH_HH +# define MLN_DEBUG_DRAW_GRAPH_HH -/// \file mln/draw/graph.hh +/// \file mln/debug/draw_graph.hh /// \brief Draw an (classical) image from a mln::graph_image. # include <mln/pw/image.hh> @@ -40,12 +40,8 @@ namespace mln { - namespace draw + namespace debug { - /* FIXME: `draw::graph' is not a good name. These functions do not - actually _draw_ the graph/graph_image; it *converts* it to a - printable image. These functions should be put elsewhere - (e.g., in debug::). */ /*! \brief Draw an image \p ima from a mln::p_graph \p pg, with * value \p vertex_v for vertices, value \p edge_v for edges and 0 for @@ -61,7 +57,7 @@ */ template <typename I, typename P> void - graph(Image<I>& ima, const p_graph<P>& pg, + draw_graph(Image<I>& ima, const p_graph<P>& pg, mln_value(I) vertex_v, mln_value(I) edge_v); /*! \brief Draw an image \p ima from a mln::graph_image \p gi. @@ -78,7 +74,7 @@ // constructed from `int'! We should remove this last argument. template <typename I, typename P, typename V> void - graph(Image<I>& ima, const graph_image<P, V>& gi, + draw_graph(Image<I>& ima, const graph_image<P, V>& gi, mln_value(I) edge_v = 1); # ifndef MLN_INCLUDE_ONLY @@ -89,12 +85,12 @@ template <typename I, typename P> inline void - graph(Image<I>& ima, const p_graph<P>& pg, + draw_graph(Image<I>& ima, const p_graph<P>& pg, mln_value(I) vertex_v, mln_value(I) edge_v) { - // Draw the background. + // Debug the background. level::fill(ima, 0); - // Draw the lines (edges). + // Debug the lines (edges). for (unsigned l = 0; l < pg.nedges(); ++l) line (exact(ima), // FIXME: Too low-level. See similar remarks @@ -102,7 +98,7 @@ pg.gr_->vertex_data(pg.gr_->edge(l).v1()), pg.gr_->vertex_data(pg.gr_->edge(l).v2()), edge_v); - // Draw the points (vertices). + // Debug the points (vertices). for (unsigned p = 0; p < pg.nsites(); ++p) exact(ima)(pg.gr_->vertex_data(p)) = vertex_v; } @@ -110,23 +106,23 @@ template <typename I, typename P, typename V> inline void - graph(Image<I>& ima, const graph_image<P, V>& gi, + draw_graph(Image<I>& ima, const graph_image<P, V>& gi, mln_value(I) edge_v) { - // Draw the background. + // Debug the background. level::fill(ima, 0); - // Draw the lines (edges). + // Debug the lines (edges). for (unsigned l = 0; l < gi.domain().nedges(); ++l) line (exact(ima), gi.vertex1(l), gi.vertex2(l), edge_v); - // Draw the points (vertices). + // Debug the points (vertices). for (unsigned p = 0; p < gi.domain().nvertices(); ++p) exact(ima)(gi.domain().point_from_id(p)) = gi.vertex_values()[p]; } # endif // ! MLN_INCLUDE_ONLY - } // end of namespace mln::draw + } // end of namespace mln::debug } // end of namespace mln -#endif // MLN_GRAPH_PSITE_HH +#endif // MLN_DEBUG_DRAW_GRAPH_HH Property changes on: mln/debug/graph.hh ___________________________________________________________________ Added: svn:mergeinfo Index: mln/debug/all.hh --- mln/debug/all.hh (revision 2778) +++ mln/debug/all.hh (working copy) @@ -50,6 +50,7 @@ # include <mln/debug/iota.hh> # include <mln/debug/println.hh> # include <mln/debug/println_with_border.hh> +# include <mln/debug/graph.hh> #endif // ! MLN_DEBUG_ALL_HH Index: mln/core/site_set/p_centered.hh --- mln/core/site_set/p_centered.hh (revision 2778) +++ mln/core/site_set/p_centered.hh (working copy) @@ -253,7 +253,7 @@ { this->change_target(s); q_.center_at(s.center()); - q_.change_target(s.window()); + q_.change_target(s.window_()); } template <typename W> Index: mln/core/site_set/p_graph.hh --- mln/core/site_set/p_graph.hh (revision 2778) +++ mln/core/site_set/p_graph.hh (working copy) @@ -70,7 +70,7 @@ typedef p_graph<P> self_; typedef internal::site_set_base_< P, self_ > super_; - typedef util::graph<P> graph; + typedef util::graph graph; /// \brief Construct a graph psite set from a graph of points. /// @@ -201,7 +201,7 @@ inline p_graph<P>::p_graph(const graph& gr) // Create a deep, managed copy of GR. - : gr_ (new util::graph<P>(gr)) + : gr_ (new util::graph(gr)) { } Index: mln/core/image/translate_image.hh --- mln/core/image/translate_image.hh (revision 2778) +++ mln/core/image/translate_image.hh (working copy) @@ -38,6 +38,7 @@ # include <mln/core/internal/image_identity.hh> # include <mln/core/alias/box2d.hh> +//FIXME: Fix this image morpher. namespace mln { @@ -76,13 +77,11 @@ { typedef trait::image::category::domain_morpher category; - typedef mln_trait_image_access(I) access; - typedef mln_trait_image_space(I) space; + typedef mln_trait_image_value_access(I) access; + typedef mln_trait_image_localization(I) space; typedef mln_trait_image_size(I) size; - typedef mln_trait_image_support(I) support; - typedef mln_trait_image_border(I) border; - typedef mln_trait_image_io_from_(I) io; - typedef mln_trait_image_data_from_(I) data; + //typedef mln_trait_image_io_from_(I) io; + //typedef mln_trait_image_data_from_(I) data; }; @@ -100,8 +99,7 @@ struct translate_image : public mln::internal::image_identity< I, mln_pset(I), translate_image<I> > { - typedef mln::internal::image_morpher< I, mln_pset(I), translate_image<I> > super_; - typedef line_piter_<mln_psite(I)> line_piter; + typedef mln::internal::image_morpher< I, mln_value(I), mln_pset(I), translate_image<I> > super_; /// Return type of read-write access. typedef mln_morpher_lvalue(I) lvalue; Index: mln/core/image/all.hh --- mln/core/image/all.hh (revision 2778) +++ mln/core/image/all.hh (working copy) @@ -36,7 +36,63 @@ */ -// FIXME: Complete... +# include <bgraph_image.hh> +# include <bgraph_psite.hh> +# include <cast_image.hh> +# include <ch_piter.hh> +# include <complex_image.hh> +# include <complex_neighborhood_piter.hh> +# include <complex_neighborhoods.hh> +# include <complex_window_piter.hh> +# include <complex_windows.hh> +# include <decorated_image.hh> +# include <extended.hh> +# include <extension_fun.hh> +# include <extension_ima.hh> +# include <extension_val.hh> +# include <fi_adaptor.hh> +# include <flat_image.hh> +# include <graph_elt_neighborhood.hh> +# include <graph_elt_window.hh> +# include <graph_image.hh> +# include <graph_neighborhood_piter.hh> +# include <graph_window_piter.hh> +# include <hexa.hh> +# include <hexa_piter.hh> +# include <image1d.hh> +# include <image2d.hh> +# include <image2d_h.hh> +# include <image3d.hh> +# include <image_if.hh> +# include <interpolated.hh> +# include <lazy_image.hh> +# include <line_graph_elt_neighborhood.hh> +# include <line_graph_elt_window.hh> +# include <line_graph_image.hh> +# include <line_graph_neighborhood_piter.hh> +# include <line_graph_psite.hh> +# include <line_graph_window_piter.hh> +# include <mono_obased_rle_encode.hh> +# include <mono_obased_rle_image.hh> +# include <mono_rle_encode.hh> +# include <mono_rle_image.hh> +# include <obased_rle_encode.hh> +# include <obased_rle_image.hh> +# include <plain.hh> +# include <rle_encode.hh> +# include <rle_image.hh> +# include <safe.hh> +# include <sparse_encode.hh> +# include <sparse_image.hh> +# include <status.txt +# include <sub_image.hh> +# include <sub_image_if.hh> +# include <t_image.hh> +# include <translate_image.hh> +# include <tr_image.hh> +# include <tr_mesh.hh> +# include <value_enc_image.hh> +# include <value_encode.hh> #endif // ! MLN_CORE_IMAGE_ALL_HH Index: mln/core/concept/window.hh --- mln/core/concept/window.hh (revision 2778) +++ mln/core/concept/window.hh (working copy) @@ -277,7 +277,7 @@ for (unsigned w = 0; w < nw; ++w) { ostr << " #" << w << ':'; - win.window(w).print(ostr); + win.window_(w).print(ostr); } ostr << " ]"; } Index: mln/core/window.hh Index: mln/core/internal/image_value_morpher.hh --- mln/core/internal/image_value_morpher.hh (revision 2778) +++ mln/core/internal/image_value_morpher.hh (working copy) @@ -45,6 +45,7 @@ namespace internal { + //FIXME: Fix doxygen. /*! A base class for image morphers w.r.t. value. * Parameter \p S is a point set type. Index: mln/draw/all.hh --- mln/draw/all.hh (revision 2778) +++ mln/draw/all.hh (working copy) @@ -43,7 +43,6 @@ } # include <mln/draw/box.hh> -# include <mln/draw/graph.hh> # include <mln/draw/label.hh> # include <mln/draw/line.hh> # include <mln/draw/plot.hh> Index: mln/linear/local/convolve.hh --- mln/linear/local/convolve.hh (revision 2778) +++ mln/linear/local/convolve.hh (working copy) @@ -127,7 +127,7 @@ const W& w_win, R& result) { - const P& p = internal::force_exact<P>(p_); + const P& p = mln::internal::force_exact<P>(p_); mln_precondition(p.ima().border() >= w_win.delta()); R tmp = 0; Index: mln/value/stack.hh --- mln/value/stack.hh (revision 2778) +++ mln/value/stack.hh (working copy) @@ -109,7 +109,7 @@ // here. typedef trait::image::category::value_morpher category; - typedef trait::image::value::vectorial value; + typedef trait::image::nature::vectorial nature; /* FIXME: Setting the speed trait of a stack_image to `fast' is a bad approximation. @@ -146,7 +146,9 @@ */ template <unsigned n, typename I> struct stack_image - : public mln::internal::image_value_morpher< I, stack_image<n,I> > + : public mln::internal::image_value_morpher< I, + algebra::vec<n, mln_value(I)>, + stack_image<n,I> > { /// Point_Site associated type. typedef mln_psite(I) psite; Index: mln/border/equalize.hh --- mln/border/equalize.hh (revision 2778) +++ mln/border/equalize.hh (working copy) @@ -116,8 +116,9 @@ { trace::entering("border::equalize"); - mlc_is(mln_trait_image_border(I), trait::image::border::some)::check(); - mlc_is(mln_trait_image_border(J), trait::image::border::some)::check(); + //FIXME: check border + //mlc_is(mln_trait_image_border(I), trait::image::border::some)::check(); + //mlc_is(mln_trait_image_border(J), trait::image::border::some)::check(); const I& ima1 = exact(ima1_); const J& ima2 = exact(ima2_); mln_precondition(ima1.has_data() && ima2.has_data()); Index: mln/set/all.hh --- mln/set/all.hh (revision 2778) +++ mln/set/all.hh (working copy) @@ -46,6 +46,6 @@ # include <mln/set/inter.hh> # include <mln/set/is_subset_of.hh> # include <mln/set/sym_diff.hh> -# include <mln/set/union.hh> +# include <mln/set/uni.hh> #endif // ! MLN_SET_ALL_HH Index: mln/win/multiple_size.hh --- mln/win/multiple_size.hh (revision 2778) +++ mln/win/multiple_size.hh (working copy) @@ -101,7 +101,7 @@ void set_window(unsigned i, const W& win); - const W& window(unsigned i) const; + const W& window_(unsigned i) const; unsigned nwindows() const; @@ -200,7 +200,7 @@ template <typename W, typename F> inline const W& - multiple_size<W,F>::window(unsigned i) const + multiple_size<W,F>::window_(unsigned i) const { mln_precondition(i < win_.nelements()); return win_[i]; Index: mln/win/multiple.hh --- mln/win/multiple.hh (revision 2778) +++ mln/win/multiple.hh (working copy) @@ -103,7 +103,7 @@ void set_window(unsigned i, const W& win); - const W& window(unsigned i) const; + const W& window_(unsigned i) const; unsigned nwindows() const; @@ -206,7 +206,7 @@ template <typename W, typename F> inline const W& - multiple<W,F>::window(unsigned i) const + multiple<W,F>::window_(unsigned i) const { mln_precondition(i < win_.nelements()); return win_[i]; Index: mln/io/fits/load.hh --- mln/io/fits/load.hh (revision 2778) +++ mln/io/fits/load.hh (working copy) @@ -43,6 +43,8 @@ # include <mln/core/image/image2d.hh> # include <mln/value/int_u8.hh> + +//FIXME: Add fitsio dependency # include <fitsio.h> namespace mln Index: mln/util/tree.hh --- mln/util/tree.hh (revision 2778) +++ mln/util/tree.hh (working copy) @@ -269,7 +269,7 @@ * * \return The tree of the current branch. */ - tree<T>& tree(); + tree<T>& util_tree(); private: /// The tree of this branch. @@ -554,8 +554,8 @@ template <typename T> inline - util::tree<T>& - branch<T>::tree() + mln::util::tree<T>& + branch<T>::util_tree() { return tree_; }