olena: olena-2.0-563-g138bfd8 Rename fun::i2v, fun::stat and fun::v2i to fun::v2v.

* scribo/postprocessing/fill_object_holes.hh, * scribo/preprocessing/denoise_bg.hh, * scribo/preprocessing/denoise_fg.hh, * scribo/primitive/extract/non_text_kmean.hh, * scribo/primitive/group/apply.hh, * scribo/primitive/group/from_graph.hh, * scribo/primitive/group/from_single_link.hh, * scribo/primitive/regroup/from_single_left_link.hh, * scribo/primitive/regroup/from_single_left_link_wrt_h_ratio.hh, * scribo/core/line_set.hh, * scribo/core/paragraph_set.hh, * scribo/filter/object_groups_with_holes.hh, * scribo/filter/objects_with_holes.hh, * scribo/fun/v2b/label_to_bool.hh: Here. --- scribo/ChangeLog | 19 +++++++++++++++++++ scribo/scribo/core/line_set.hh | 2 +- scribo/scribo/core/paragraph_set.hh | 6 +++--- scribo/scribo/filter/object_groups_with_holes.hh | 6 +++--- scribo/scribo/filter/objects_with_holes.hh | 6 +++--- scribo/scribo/fun/v2b/label_to_bool.hh | 6 +++--- scribo/scribo/postprocessing/fill_object_holes.hh | 4 ++-- scribo/scribo/preprocessing/denoise_bg.hh | 8 ++++---- scribo/scribo/preprocessing/denoise_fg.hh | 4 ++-- scribo/scribo/primitive/extract/non_text_kmean.hh | 2 +- scribo/scribo/primitive/group/apply.hh | 6 +++--- scribo/scribo/primitive/group/from_graph.hh | 2 +- scribo/scribo/primitive/group/from_single_link.hh | 2 +- .../primitive/regroup/from_single_left_link.hh | 2 +- .../regroup/from_single_left_link_wrt_h_ratio.hh | 2 +- 15 files changed, 48 insertions(+), 29 deletions(-) diff --git a/scribo/ChangeLog b/scribo/ChangeLog index 1fe01ca..446604a 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,3 +1,22 @@ +2013-04-25 Guillaume Lazzara <z@lrde.epita.fr> + + Rename fun::i2v, fun::stat and fun::v2i to fun::v2v. + + * scribo/postprocessing/fill_object_holes.hh, + * scribo/preprocessing/denoise_bg.hh, + * scribo/preprocessing/denoise_fg.hh, + * scribo/primitive/extract/non_text_kmean.hh, + * scribo/primitive/group/apply.hh, + * scribo/primitive/group/from_graph.hh, + * scribo/primitive/group/from_single_link.hh, + * scribo/primitive/regroup/from_single_left_link.hh, + * scribo/primitive/regroup/from_single_left_link_wrt_h_ratio.hh, + * scribo/core/line_set.hh, + * scribo/core/paragraph_set.hh, + * scribo/filter/object_groups_with_holes.hh, + * scribo/filter/objects_with_holes.hh, + * scribo/fun/v2b/label_to_bool.hh: Here. + 2013-04-18 Guillaume Lazzara <z@lrde.epita.fr> * src/primitive/extract/lines_pattern.cc: Fix description. diff --git a/scribo/scribo/core/line_set.hh b/scribo/scribo/core/line_set.hh index 7200bdd..f0a3789 100644 --- a/scribo/scribo/core/line_set.hh +++ b/scribo/scribo/core/line_set.hh @@ -40,7 +40,7 @@ # include <mln/labeling/compute.hh> # include <mln/make/relabelfun.hh> -# include <mln/fun/i2v/array.hh> +# include <mln/fun/v2v/array.hh> # include <mln/convert/from_to.hh> diff --git a/scribo/scribo/core/paragraph_set.hh b/scribo/scribo/core/paragraph_set.hh index 42bf4a3..e5b4736 100644 --- a/scribo/scribo/core/paragraph_set.hh +++ b/scribo/scribo/core/paragraph_set.hh @@ -335,7 +335,7 @@ namespace scribo } unsigned npars; - mln::fun::i2v::array<unsigned> + mln::fun::v2v::array<unsigned> par_ids = mln::make::relabelfun(links.line_to_link(), links.nelements() - 1, npars); paragraph_set<L> parset(links, npars); @@ -395,7 +395,7 @@ namespace scribo links(l) = internal::find_root(links, l); unsigned npars; - mln::fun::i2v::array<unsigned> + mln::fun::v2v::array<unsigned> par_ids = mln::make::relabelfun(links.line_to_link(), links.nelements() - 1, npars); paragraph_set<L> parset(links, npars); @@ -423,7 +423,7 @@ namespace scribo links.init(); unsigned npars; - mln::fun::i2v::array<unsigned> + mln::fun::v2v::array<unsigned> par_ids = mln::make::relabelfun(links.line_to_link(), links.nelements() - 1, npars); paragraph_set<L> parset(links, npars); diff --git a/scribo/scribo/filter/object_groups_with_holes.hh b/scribo/scribo/filter/object_groups_with_holes.hh index 40e0209..64c16f2 100644 --- a/scribo/scribo/filter/object_groups_with_holes.hh +++ b/scribo/scribo/filter/object_groups_with_holes.hh @@ -51,7 +51,7 @@ # include <mln/accu/math/count.hh> -# include <mln/fun/i2v/array.hh> +# include <mln/fun/v2v/array.hh> # include <scribo/core/macros.hh> @@ -169,7 +169,7 @@ namespace scribo // order to map properly the groups and their new component // id. // - mln::fun::i2v::array<mln_value(L)> group_2_comp; + mln::fun::v2v::array<mln_value(L)> group_2_comp; component_set<L> components = primitive::group::apply(groups, group_2_comp); @@ -185,7 +185,7 @@ namespace scribo // Will 'True' if a group has at least two background // components. - fun::i2v::array<bool> + fun::v2v::array<bool> to_keep(value::next(components.nelements()), false); const L& lbl = components.labeled_image(); diff --git a/scribo/scribo/filter/objects_with_holes.hh b/scribo/scribo/filter/objects_with_holes.hh index 22d045f..0ab7243 100644 --- a/scribo/scribo/filter/objects_with_holes.hh +++ b/scribo/scribo/filter/objects_with_holes.hh @@ -47,7 +47,7 @@ # include <mln/accu/math/count.hh> -# include <mln/fun/i2v/array.hh> +# include <mln/fun/v2v/array.hh> # include <mln/io/pbm/save.hh> # include <mln/io/pgm/save.hh> @@ -197,7 +197,7 @@ namespace scribo util::array<util::set<unsigned> > bg_comps( value::next(components.nelements())); - fun::i2v::array<bool> + fun::v2v::array<bool> to_keep(value::next(components.nelements()), false); @@ -361,7 +361,7 @@ namespace scribo util::array<bool> bg_comps_done( value::next(components.nelements()), false); - fun::i2v::array<bool> + fun::v2v::array<bool> to_keep(value::next(components.nelements()), false); const L& lbl = components.labeled_image(); diff --git a/scribo/scribo/fun/v2b/label_to_bool.hh b/scribo/scribo/fun/v2b/label_to_bool.hh index 3d65401..924f83b 100644 --- a/scribo/scribo/fun/v2b/label_to_bool.hh +++ b/scribo/scribo/fun/v2b/label_to_bool.hh @@ -28,7 +28,7 @@ # include <mln/core/concept/function.hh> -# include <mln/fun/i2v/array.hh> +# include <mln/fun/v2v/array.hh> namespace scribo { @@ -44,7 +44,7 @@ namespace scribo { typedef bool result; - label_to_bool(const mln::fun::i2v::array<bool>& f) + label_to_bool(const mln::fun::v2v::array<bool>& f) : f_(f) {} @@ -53,7 +53,7 @@ namespace scribo return f_(v); } - mln::fun::i2v::array<bool> f_; + mln::fun::v2v::array<bool> f_; }; } // end of namespace scribo::fun::v2b diff --git a/scribo/scribo/postprocessing/fill_object_holes.hh b/scribo/scribo/postprocessing/fill_object_holes.hh index 636b929..a451d38 100644 --- a/scribo/scribo/postprocessing/fill_object_holes.hh +++ b/scribo/scribo/postprocessing/fill_object_holes.hh @@ -52,7 +52,7 @@ # include <mln/accu/math/count.hh> -# include <mln/fun/i2v/array.hh> +# include <mln/fun/v2v/array.hh> # include <mln/value/int_u16.hh> @@ -178,7 +178,7 @@ namespace scribo mln::util::array<bool> bg_comps_done( value::next(components.nelements()), false); - mln::fun::i2v::array<bool> + mln::fun::v2v::array<bool> to_keep(value::next(components.nelements()), false); const L& lbl = components.labeled_image(); diff --git a/scribo/scribo/preprocessing/denoise_bg.hh b/scribo/scribo/preprocessing/denoise_bg.hh index 63dff9b..cbf1917 100644 --- a/scribo/scribo/preprocessing/denoise_bg.hh +++ b/scribo/scribo/preprocessing/denoise_bg.hh @@ -41,7 +41,7 @@ # include <mln/core/alias/neighb2d.hh> # include <mln/util/array.hh> -# include <mln/fun/i2v/array.hh> +# include <mln/fun/v2v/array.hh> # include <mln/labeling/compute.hh> # include <mln/labeling/background.hh> @@ -91,7 +91,7 @@ namespace mln { typedef bool result; - label_to_bool(const fun::i2v::array<bool>& f) + label_to_bool(const fun::v2v::array<bool>& f) : f_(f) {} @@ -100,7 +100,7 @@ namespace mln return f_(v); } - fun::i2v::array<bool> f_; + fun::v2v::array<bool> f_; }; @@ -135,7 +135,7 @@ namespace scribo mln::util::array<unsigned> result = labeling::compute(accu::meta::math::count(), lbl, nlabels); - mln::fun::i2v::array<bool> f(nlabels + 1, false); + mln::fun::v2v::array<bool> f(nlabels + 1, false); f(0) = true; for (unsigned i = 1; i <= nlabels; ++i) if (result(i) < min_card) diff --git a/scribo/scribo/preprocessing/denoise_fg.hh b/scribo/scribo/preprocessing/denoise_fg.hh index 0c1d549..503751c 100644 --- a/scribo/scribo/preprocessing/denoise_fg.hh +++ b/scribo/scribo/preprocessing/denoise_fg.hh @@ -40,7 +40,7 @@ # include <mln/core/alias/neighb2d.hh> # include <mln/util/array.hh> -# include <mln/fun/i2v/array.hh> +# include <mln/fun/v2v/array.hh> # include <mln/data/transform.hh> @@ -96,7 +96,7 @@ namespace scribo mln::util::array<unsigned> result = labeling::compute(accu::meta::math::count(), lbl, nlabels); - mln::fun::i2v::array<bool> f(nlabels + 1, true); + mln::fun::v2v::array<bool> f(nlabels + 1, true); f(0) = false; for (unsigned i = 1; i <= nlabels; ++i) if (result(i) < min_card) diff --git a/scribo/scribo/primitive/extract/non_text_kmean.hh b/scribo/scribo/primitive/extract/non_text_kmean.hh index 55b9a7b..6cc4c1e 100644 --- a/scribo/scribo/primitive/extract/non_text_kmean.hh +++ b/scribo/scribo/primitive/extract/non_text_kmean.hh @@ -152,7 +152,7 @@ namespace scribo bg_id = c; } - mln::fun::i2v::array<bool> f(4, true); + mln::fun::v2v::array<bool> f(4, true); f(0) = false; f(bg_id) = false; labeling::relabel_inplace(img_lbl8, 4, f); diff --git a/scribo/scribo/primitive/group/apply.hh b/scribo/scribo/primitive/group/apply.hh index 5c33c60..b2cf737 100644 --- a/scribo/scribo/primitive/group/apply.hh +++ b/scribo/scribo/primitive/group/apply.hh @@ -31,7 +31,7 @@ /// /// Apply grouping in an object image. -# include <mln/fun/i2v/array.hh> +# include <mln/fun/v2v/array.hh> # include <mln/make/relabelfun.hh> # include <mln/labeling/relabel.hh> @@ -75,7 +75,7 @@ namespace scribo template <typename L> component_set<L> apply(const object_groups<L>& groups, - mln::fun::i2v::array<mln_value(L)>& relabel_fun) + mln::fun::v2v::array<mln_value(L)>& relabel_fun) { mln_trace("scribo::primitive::group::apply"); @@ -112,7 +112,7 @@ namespace scribo component_set<L> apply(const object_groups<L>& groups) { - mln::fun::i2v::array<mln_value(L)> relabel_fun; + mln::fun::v2v::array<mln_value(L)> relabel_fun; return apply(groups, relabel_fun); } diff --git a/scribo/scribo/primitive/group/from_graph.hh b/scribo/scribo/primitive/group/from_graph.hh index 7282f1a..0594aeb 100644 --- a/scribo/scribo/primitive/group/from_graph.hh +++ b/scribo/scribo/primitive/group/from_graph.hh @@ -42,7 +42,7 @@ # include <mln/pw/all.hh> -# include <mln/fun/i2v/array.hh> +# include <mln/fun/v2v/array.hh> # include <mln/util/array.hh> # include <mln/util/graph_ids.hh> diff --git a/scribo/scribo/primitive/group/from_single_link.hh b/scribo/scribo/primitive/group/from_single_link.hh index 802b3c0..6c58897 100644 --- a/scribo/scribo/primitive/group/from_single_link.hh +++ b/scribo/scribo/primitive/group/from_single_link.hh @@ -32,7 +32,7 @@ # include <mln/core/concept/image.hh> # include <mln/core/site_set/box.hh> -# include <mln/fun/i2v/array.hh> +# include <mln/fun/v2v/array.hh> # include <mln/accu/shape/bbox.hh> diff --git a/scribo/scribo/primitive/regroup/from_single_left_link.hh b/scribo/scribo/primitive/regroup/from_single_left_link.hh index a333ea2..42d7486 100644 --- a/scribo/scribo/primitive/regroup/from_single_left_link.hh +++ b/scribo/scribo/primitive/regroup/from_single_left_link.hh @@ -106,7 +106,7 @@ namespace scribo object_groups<L> output = groups.duplicate(); - fun::i2v::array<mln_value(L)> relabel_fun; + fun::v2v::array<mln_value(L)> relabel_fun; component_set<L> components = primitive::group::apply(groups, relabel_fun); diff --git a/scribo/scribo/primitive/regroup/from_single_left_link_wrt_h_ratio.hh b/scribo/scribo/primitive/regroup/from_single_left_link_wrt_h_ratio.hh index 165d8ef..0625a1a 100644 --- a/scribo/scribo/primitive/regroup/from_single_left_link_wrt_h_ratio.hh +++ b/scribo/scribo/primitive/regroup/from_single_left_link_wrt_h_ratio.hh @@ -110,7 +110,7 @@ namespace scribo object_groups<L> output = groups.duplicate(); - fun::i2v::array<mln_value(L)> relabel_fun; + fun::v2v::array<mln_value(L)> relabel_fun; component_set<L> components = primitive::group::apply(groups, relabel_fun); -- 1.7.2.5
participants (1)
-
Guillaume Lazzara