Olena-patches
Threads by month
- ----- 2025 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
May 2009
- 11 participants
- 312 discussions
29 May '09
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Rename level/ stuff to data/ and labeling/level to /value.
* mln/labeling/level.hh,
* mln/labeling/level.spe.hh,
* tests/labeling/level.cc: Rename as...
* mln/labeling/value.hh,
* mln/labeling/value.spe.hh,
* tests/labeling/value.cc: ...those.
Update
* mln/labeling/all.hh: Update.
* mln/data/approx,
* tests/data/approx,
* mln/data/naive,
* tests/data/naive: New directories.
* mln/level/update.hh,
* mln/level/apply.hh,
* mln/level/was.median.hh,
* mln/level/compare.hh,
* mln/level/essential.hh,
* mln/level/saturate.hh,
* mln/level/median.hh,
* mln/level/transform.spe.hh,
* mln/level/naive/essential.hh,
* mln/level/naive/all.hh,
* mln/level/naive/median.hh,
* mln/level/abs.hh,
* mln/level/transform_inplace.hh,
* mln/level/to_enc.hh,
* mln/level/all.hh,
* mln/level/fast_median.hh,
* mln/level/approx/essential.hh,
* mln/level/approx/all.hh,
* mln/level/approx/median.hh,
* mln/level/replace.hh,
* mln/level/apply.spe.hh,
* mln/level/transform.hh,
* mln/level/stretch.hh,
* mln/level/compute.hh,
* mln/level/sort_psites.hh,
* mln/level/convert.hh,
* mln/level/sort_offsets.hh: Move to...
* mln/data/update.hh,
* mln/data/was.median.hh,
* mln/data/transform.spe.hh,
* mln/data/to_enc.hh,
* mln/data/transform.hh,
* mln/data/replace.hh,
* mln/data/approx/essential.hh,
* mln/data/approx/all.hh,
* mln/data/approx/median.hh,
* mln/data/apply.spe.hh,
* mln/data/stretch.hh,
* mln/data/sort_offsets.hh,
* mln/data/apply.hh,
* mln/data/compare.hh,
* mln/data/saturate.hh,
* mln/data/median.hh,
* mln/data/naive/essential.hh,
* mln/data/naive/all.hh,
* mln/data/naive/median.hh,
* mln/data/abs.hh,
* mln/data/transform_inplace.hh,
* mln/data/fast_median.hh,
* mln/data/compute.hh,
* mln/data/sort_psites.hh,
* mln/data/convert.hh: ...those new files.
Update.
* mln/data/all.hh,
* mln/data/essential.hh: Update.
* mln/level: Remove this directory.
* mln/all.hh: Update.
* tests/level/median.cc,
* tests/level/transform_full.cc,
* tests/level/compute_full.cc,
* tests/level/stretch_full.cc,
* tests/level/all_headers.cc,
* tests/level/abs.cc,
* tests/level/transform_inplace.cc,
* tests/level/apply_full.cc,
* tests/level/compare_full.cc,
* tests/level/median_fast.cc,
* tests/level/saturate_full.cc,
* tests/level/replace.cc,
* tests/level/transform.cc,
* tests/level/stretch.cc,
* tests/level/compute.cc,
* tests/level/naive,
* tests/level/naive/median.cc,
* tests/level/naive/Makefile.am,
* tests/level/sort_psites.cc,
* tests/level/convert.cc,
* tests/level/update.cc,
* tests/level/approx,
* tests/level/approx/median.cc,
* tests/level/approx/Makefile.am,
* tests/level/apply.cc,
* tests/level/compare.cc,
* tests/level/abs_full.cc,
* tests/level/saturate.cc: Move to...
* tests/data/transform_full.cc,
* tests/data/median.cc,
* tests/data/compute_full.cc,
* tests/data/all_headers.cc,
* tests/data/abs.cc,
* tests/data/transform_inplace.cc,
* tests/data/apply_full.cc,
* tests/data/median_fast.cc,
* tests/data/compute.cc,
* tests/data/sort_psites.cc,
* tests/data/convert.cc,
* tests/data/update.cc,
* tests/data/abs_full.cc,
* tests/data/stretch_full.cc,
* tests/data/compare_full.cc,
* tests/data/saturate_full.cc,
* tests/data/replace.cc,
* tests/data/transform.cc,
* tests/data/stretch.cc,
* tests/data/apply.cc,
* tests/data/compare.cc,
* tests/data/saturate.cc: ...those new files.
Update.
* tests/data/Makefile.am: Update.
* tests/Makefile.am: Update.
Propagate those renamings.
* trash/to_tiles.hh,
* trash/display_save.hh,
* trash/translate_image.cc,
* trash/display_color_pretty.cc,
* trash/save_and_show.cc,
* trash/to_tiles.cc,
* trash/display_color_pretty.hh,
* mln/trait/accumulators.hh,
* mln/debug/superpose.hh,
* mln/world/binary_2d/subsample.hh,
* mln/world/binary_2d/enlarge.hh,
* mln/core/image/imorph/labeled_image.hh,
* mln/core/concept/object.hh,
* mln/arith/min.hh,
* mln/arith/min.spe.hh,
* mln/arith/diff_abs.hh,
* mln/data/approx/essential.hh,
* mln/data/approx/all.hh,
* mln/data/approx/median.hh,
* mln/data/naive/essential.hh,
* mln/data/naive/all.hh,
* mln/data/naive/median.hh,
* mln/linear/sobel_2d.hh,
* mln/linear/gaussian.hh,
* mln/linear/gaussian/impl.hh,
* mln/transform/hough.hh,
* mln/estim/sum.hh,
* mln/estim/min_max.hh,
* mln/estim/mean.hh,
* mln/essential/routine.hh,
* mln/binarization/binarization.hh,
* mln/morpho/watershed/superpose.hh,
* mln/morpho/tree/compute_parent.hh,
* mln/morpho/tree/max.hh,
* mln/morpho/approx/dilation.hh,
* mln/morpho/plus.hh,
* mln/morpho/min.hh,
* mln/morpho/reconstruction/by_erosion/union_find.hh,
* mln/morpho/reconstruction/by_dilation/union_find.hh,
* mln/morpho/minus.hh,
* mln/morpho/complementation.hh,
* mln/morpho/Rd.hh,
* mln/morpho/includes.hh,
* mln/morpho/leveling_filter.hh,
* mln/morpho/algebraic_filter.hh,
* mln/logical/and.hh,
* mln/logical/and_not.hh,
* mln/logical/includes.hh,
* mln/logical/xor.hh,
* mln/logical/not.hh,
* mln/logical/or.hh,
* mln/canvas/morpho/attribute_filter.hh,
* mln/canvas/labeling.hh,
* mln/labeling/colorize.hh,
* mln/labeling/regional_minima.hh,
* mln/labeling/regional_maxima.hh,
* mln/labeling/mean_values.hh,
* mln/labeling/blobs.hh,
* mln/labeling/relabel.hh,
* mln/labeling/wrap.hh,
* mln/labeling/foreground.hh,
* mln/labeling/pack.hh,
* mln/labeling/background.hh,
* mln/util/tree_to_image.hh,
* tools/seed2tiling.cc,
* tests/topo/skeleton/crest.cc,
* tests/debug/iota.cc,
* tests/world/inter_pixel/compute.cc,
* tests/world/inter_pixel/immerse.cc,
* tests/world/inter_pixel/dim2/make_edge_image.cc,
* tests/world/inter_pixel/display_edge.cc,
* tests/world/binary_2d/enlarge.cc,
* tests/core/other/clock_test.cc,
* tests/core/image/sparse_image.cc,
* tests/core/image/obased_rle_image.cc,
* tests/core/image/value_enc_image.cc,
* tests/core/image/plain.cc,
* tests/core/image/dmorph/slice_image.cc,
* tests/core/image/fi_adaptor.cc,
* tests/core/image/mono_rle_image.cc,
* tests/core/image/rle_image.cc,
* tests/core/image/vmorph/cast_image.cc,
* tests/core/image/mono_obased_rle_image.cc,
* tests/draw/graph.cc,
* tests/draw/line.cc,
* tests/opt/at.cc,
* tests/transformation/rotate.cc,
* tests/arith/minus.cc,
* tests/arith/diff_abs.cc,
* tests/arith/times.cc,
* tests/arith/plus.cc,
* tests/arith/revert.cc,
* tests/data/fill_with_image.cc,
* tests/data/approx/median.cc,
* tests/data/paste_full.cc,
* tests/data/paste.cc,
* tests/data/naive/median.cc,
* tests/linear/convolve.cc,
* tests/linear/lap.cc,
* tests/linear/log.cc,
* tests/linear/convolve_directional.cc,
* tests/linear/convolve_2x1d.cc,
* tests/linear/sobel_2d.cc,
* tests/linear/gaussian.cc,
* tests/transform/distance_and_closest_point_geodesic.cc,
* tests/accu/transform_snake.cc,
* tests/accu/image/to_result.cc,
* tests/accu/image/take_n_times.cc,
* tests/accu/image/init.cc,
* tests/accu/image/take.cc,
* tests/accu/image/set_value.cc,
* tests/accu/image/untake.cc,
* tests/accu/image/take_as_init.cc,
* tests/accu/transform_diagonal.cc,
* tests/accu/transform.cc,
* tests/accu/nil.cc,
* tests/accu/transform_line.cc,
* tests/accu/min.cc,
* tests/accu/max.cc,
* tests/accu/line.cc,
* tests/accu/transform_directional.cc,
* tests/make/image3d.cc,
* tests/convert/to_image.cc,
* tests/geom/seed2tiling_roundness.cc,
* tests/geom/seed2tiling.cc,
* tests/fun/v2v/hsl_to_rgb.cc,
* tests/fun/v2v/rgb_to_hsl.cc,
* tests/binarization/threshold.cc,
* tests/morpho/artificial_line_graph_image_wst.cc,
* tests/morpho/watershed/flooding.cc,
* tests/morpho/watershed/superpose.cc,
* tests/morpho/closing/area.cc,
* tests/morpho/tree/compute_attribute_image.cc,
* tests/morpho/tree/filter/filter.cc,
* tests/morpho/tree/compute_parent.cc,
* tests/morpho/tree/max.cc,
* tests/morpho/tree/data.cc,
* tests/morpho/skeleton_constrained.cc,
* tests/morpho/reconstruction/by_erosion/union_find.cc,
* tests/morpho/reconstruction/by_dilation/union_find.cc,
* tests/morpho/rank_filter.cc,
* tests/morpho/lena_line_graph_image_wst2.cc,
* tests/io/pgm/pgm27.cc,
* tests/io/pgm/pgm19.cc,
* tests/io/pgm/pgm.cc,
* tests/io/pgm/pgm16.cc,
* tests/io/fits/fits.cc,
* tests/io/dump/dump.cc,
* tests/io/tiff/load.cc,
* tests/io/tiff/tiff2pbm.cc,
* tests/io/dicom/dicom.cc,
* tests/io/magick/save.cc,
* tests/io/magick/load.cc,
* tests/io/ppm/ppm.cc,
* tests/io/ppm/ppm23.cc,
* tests/io/ppm/ppm16.cc,
* tests/io/pbm/pbm.cc,
* tests/logical/not.cc,
* tests/logical/or.cc,
* tests/logical/and.cc,
* tests/logical/and_not.cc,
* tests/logical/xor.cc,
* tests/canvas/chamfer.cc,
* tests/canvas/browsing/snake_generic_2d_vert.cc,
* tests/canvas/browsing/snake_generic_2d_hori.cc,
* tests/canvas/browsing/snake_generic_3d_vert.cc,
* tests/canvas/browsing/diagonal2d.cc,
* tests/canvas/browsing/snake_generic_3d_hori.cc,
* tests/canvas/browsing/backdiagonal2d.cc,
* tests/labeling/mean_values.cc,
* tests/labeling/n_max.cc,
* tests/labeling/flat_zones.cc,
* tests/labeling/wrap.cc,
* tests/labeling/foreground.cc,
* tests/labeling/pack.cc,
* tests/labeling/Makefile.am,
* tests/labeling/colorize.cc,
* tests/util/tree_to_image.cc,
* tests/util/tree_fast_to_image.cc,
* apps/statues/mesh-max-curv.cc,
* apps/statues/mesh-complex-max-curv.cc,
* doc/benchmark/canvas.cc,
* doc/benchmark/median/median_bench.cc,
* doc/examples/trash/tuto_one.cc,
* doc/examples/trash/labeling_algo.cc,
* doc/examples/trash/tuto_bis.cc,
* doc/examples/trash/graph.cc,
* doc/examples/accu-right-instanciation.cc,
* doc/examples/extend.cc,
* doc/examples/tuto3/first_routine.cc: Propagate renamings.
apps/statues/mesh-complex-max-curv.cc | 6 -
apps/statues/mesh-max-curv.cc | 2
doc/benchmark/canvas.cc | 10 -
doc/benchmark/median/median_bench.cc | 12 +-
doc/examples/accu-right-instanciation.cc | 4
doc/examples/extend.cc | 4
doc/examples/trash/graph.cc | 6 -
doc/examples/trash/labeling_algo.cc | 4
doc/examples/trash/tuto_bis.cc | 4
doc/examples/trash/tuto_one.cc | 4
doc/examples/tuto3/first_routine.cc | 2
mln/all.hh | 8 -
mln/arith/diff_abs.hh | 4
mln/arith/min.hh | 8 -
mln/arith/min.spe.hh | 8 -
mln/binarization/binarization.hh | 4
mln/canvas/labeling.hh | 12 +-
mln/canvas/morpho/attribute_filter.hh | 12 +-
mln/core/concept/object.hh | 2
mln/core/image/imorph/labeled_image.hh | 4
mln/data/abs.hh | 22 ++--
mln/data/all.hh | 20 +++
mln/data/apply.hh | 22 ++--
mln/data/apply.spe.hh | 14 +-
mln/data/approx/all.hh | 10 -
mln/data/approx/essential.hh | 4
mln/data/approx/median.hh | 30 ++---
mln/data/compare.hh | 14 +-
mln/data/compute.hh | 20 +--
mln/data/convert.hh | 30 ++---
mln/data/essential.hh | 9 +
mln/data/fast_median.hh | 8 -
mln/data/median.hh | 26 ++---
mln/data/naive/all.hh | 10 -
mln/data/naive/essential.hh | 4
mln/data/naive/median.hh | 14 +-
mln/data/replace.hh | 18 +--
mln/data/saturate.hh | 28 ++---
mln/data/sort_offsets.hh | 36 +++---
mln/data/sort_psites.hh | 8 -
mln/data/stretch.hh | 22 ++--
mln/data/to_enc.hh | 14 +-
mln/data/transform.hh | 36 +++---
mln/data/transform.spe.hh | 84 ++++++++--------
mln/data/transform_inplace.hh | 88 ++++++++---------
mln/data/update.hh | 32 +++---
mln/data/was.median.hh | 10 -
mln/debug/superpose.hh | 4
mln/essential/routine.hh | 2
mln/estim/mean.hh | 6 -
mln/estim/min_max.hh | 4
mln/estim/sum.hh | 6 -
mln/labeling/all.hh | 2
mln/labeling/background.hh | 8 -
mln/labeling/blobs.hh | 2
mln/labeling/colorize.hh | 8 -
mln/labeling/foreground.hh | 12 +-
mln/labeling/mean_values.hh | 6 -
mln/labeling/pack.hh | 12 +-
mln/labeling/regional_maxima.hh | 2
mln/labeling/regional_minima.hh | 2
mln/labeling/relabel.hh | 8 -
mln/labeling/value.hh | 51 ++++-----
mln/labeling/value.spe.hh | 40 +++----
mln/labeling/wrap.hh | 4
mln/linear/gaussian.hh | 6 -
mln/linear/gaussian/impl.hh | 6 -
mln/linear/sobel_2d.hh | 6 -
mln/logical/and.hh | 4
mln/logical/and_not.hh | 4
mln/logical/includes.hh | 4
mln/logical/not.hh | 4
mln/logical/or.hh | 4
mln/logical/xor.hh | 4
mln/morpho/Rd.hh | 2
mln/morpho/algebraic_filter.hh | 4
mln/morpho/approx/dilation.hh | 2
mln/morpho/complementation.hh | 2
mln/morpho/includes.hh | 2
mln/morpho/leveling_filter.hh | 4
mln/morpho/min.hh | 2
mln/morpho/minus.hh | 2
mln/morpho/plus.hh | 2
mln/morpho/reconstruction/by_dilation/union_find.hh | 6 -
mln/morpho/reconstruction/by_erosion/union_find.hh | 6 -
mln/morpho/tree/compute_parent.hh | 2
mln/morpho/tree/max.hh | 4
mln/morpho/watershed/superpose.hh | 4
mln/trait/accumulators.hh | 2
mln/transform/hough.hh | 4
mln/util/tree_to_image.hh | 2
mln/world/binary_2d/enlarge.hh | 4
mln/world/binary_2d/subsample.hh | 2
tests/Makefile.am | 1
tests/accu/image/init.cc | 2
tests/accu/image/set_value.cc | 2
tests/accu/image/take.cc | 2
tests/accu/image/take_as_init.cc | 2
tests/accu/image/take_n_times.cc | 2
tests/accu/image/to_result.cc | 2
tests/accu/image/untake.cc | 2
tests/accu/line.cc | 2
tests/accu/max.cc | 6 -
tests/accu/min.cc | 6 -
tests/accu/nil.cc | 6 -
tests/accu/transform.cc | 2
tests/accu/transform_diagonal.cc | 2
tests/accu/transform_directional.cc | 2
tests/accu/transform_line.cc | 2
tests/accu/transform_snake.cc | 2
tests/arith/diff_abs.cc | 2
tests/arith/minus.cc | 2
tests/arith/plus.cc | 4
tests/arith/revert.cc | 2
tests/arith/times.cc | 2
tests/binarization/threshold.cc | 2
tests/canvas/browsing/backdiagonal2d.cc | 12 +-
tests/canvas/browsing/diagonal2d.cc | 13 +-
tests/canvas/browsing/snake_generic_2d_hori.cc | 2
tests/canvas/browsing/snake_generic_2d_vert.cc | 2
tests/canvas/browsing/snake_generic_3d_hori.cc | 2
tests/canvas/browsing/snake_generic_3d_vert.cc | 2
tests/canvas/chamfer.cc | 2
tests/convert/to_image.cc | 2
tests/core/image/dmorph/slice_image.cc | 2
tests/core/image/fi_adaptor.cc | 4
tests/core/image/mono_obased_rle_image.cc | 8 -
tests/core/image/mono_rle_image.cc | 8 -
tests/core/image/obased_rle_image.cc | 8 -
tests/core/image/plain.cc | 2
tests/core/image/rle_image.cc | 8 -
tests/core/image/sparse_image.cc | 8 -
tests/core/image/value_enc_image.cc | 10 -
tests/core/image/vmorph/cast_image.cc | 2
tests/core/other/clock_test.cc | 6 -
tests/data/Makefile.am | 36 ++++++
tests/data/abs.cc | 8 -
tests/data/abs_full.cc | 10 -
tests/data/all_headers.cc | 6 -
tests/data/apply.cc | 8 -
tests/data/apply_full.cc | 10 -
tests/data/approx/median.cc | 10 -
tests/data/compare.cc | 6 -
tests/data/compare_full.cc | 8 -
tests/data/compute.cc | 10 -
tests/data/compute_full.cc | 28 ++---
tests/data/convert.cc | 12 +-
tests/data/fill_with_image.cc | 2
tests/data/median.cc | 14 +-
tests/data/median_fast.cc | 8 -
tests/data/naive/median.cc | 8 -
tests/data/paste.cc | 2
tests/data/paste_full.cc | 4
tests/data/replace.cc | 10 -
tests/data/saturate.cc | 8 -
tests/data/saturate_full.cc | 12 +-
tests/data/sort_psites.cc | 10 -
tests/data/stretch.cc | 8 -
tests/data/stretch_full.cc | 12 +-
tests/data/transform.cc | 26 ++---
tests/data/transform_full.cc | 10 -
tests/data/transform_inplace.cc | 36 +++---
tests/data/update.cc | 12 +-
tests/debug/iota.cc | 2
tests/draw/graph.cc | 2
tests/draw/line.cc | 2
tests/fun/v2v/hsl_to_rgb.cc | 6 -
tests/fun/v2v/rgb_to_hsl.cc | 6 -
tests/geom/seed2tiling.cc | 2
tests/geom/seed2tiling_roundness.cc | 2
tests/io/dicom/dicom.cc | 2
tests/io/dump/dump.cc | 2
tests/io/fits/fits.cc | 2
tests/io/magick/load.cc | 2
tests/io/magick/save.cc | 2
tests/io/pbm/pbm.cc | 2
tests/io/pgm/pgm.cc | 2
tests/io/pgm/pgm16.cc | 6 -
tests/io/pgm/pgm19.cc | 8 -
tests/io/pgm/pgm27.cc | 8 -
tests/io/ppm/ppm.cc | 2
tests/io/ppm/ppm16.cc | 2
tests/io/ppm/ppm23.cc | 2
tests/io/tiff/load.cc | 2
tests/io/tiff/tiff2pbm.cc | 4
tests/labeling/Makefile.am | 4
tests/labeling/colorize.cc | 2
tests/labeling/flat_zones.cc | 2
tests/labeling/foreground.cc | 6 -
tests/labeling/mean_values.cc | 2
tests/labeling/n_max.cc | 4
tests/labeling/pack.cc | 2
tests/labeling/value.cc | 8 -
tests/labeling/wrap.cc | 2
tests/linear/convolve.cc | 4
tests/linear/convolve_2x1d.cc | 4
tests/linear/convolve_directional.cc | 4
tests/linear/gaussian.cc | 2
tests/linear/lap.cc | 4
tests/linear/log.cc | 4
tests/linear/sobel_2d.cc | 4
tests/logical/and.cc | 2
tests/logical/and_not.cc | 2
tests/logical/not.cc | 2
tests/logical/or.cc | 2
tests/logical/xor.cc | 2
tests/make/image3d.cc | 2
tests/morpho/artificial_line_graph_image_wst.cc | 2
tests/morpho/closing/area.cc | 6 -
tests/morpho/lena_line_graph_image_wst2.cc | 2
tests/morpho/rank_filter.cc | 4
tests/morpho/reconstruction/by_dilation/union_find.cc | 2
tests/morpho/reconstruction/by_erosion/union_find.cc | 2
tests/morpho/skeleton_constrained.cc | 2
tests/morpho/tree/compute_attribute_image.cc | 4
tests/morpho/tree/compute_parent.cc | 6 -
tests/morpho/tree/data.cc | 4
tests/morpho/tree/filter/filter.cc | 4
tests/morpho/tree/max.cc | 2
tests/morpho/watershed/flooding.cc | 6 -
tests/morpho/watershed/superpose.cc | 2
tests/opt/at.cc | 2
tests/topo/skeleton/crest.cc | 2
tests/transform/distance_and_closest_point_geodesic.cc | 2
tests/transformation/rotate.cc | 2
tests/util/tree_fast_to_image.cc | 4
tests/util/tree_to_image.cc | 4
tests/world/binary_2d/enlarge.cc | 2
tests/world/inter_pixel/compute.cc | 2
tests/world/inter_pixel/dim2/make_edge_image.cc | 2
tests/world/inter_pixel/display_edge.cc | 2
tests/world/inter_pixel/immerse.cc | 2
tools/seed2tiling.cc | 6 -
trash/display_color_pretty.cc | 6 -
trash/display_color_pretty.hh | 8 -
trash/display_save.hh | 4
trash/save_and_show.cc | 4
trash/to_tiles.cc | 22 ++--
trash/to_tiles.hh | 4
trash/translate_image.cc | 8 -
240 files changed, 928 insertions(+), 876 deletions(-)
Index: trash/to_tiles.hh
--- trash/to_tiles.hh (revision 3927)
+++ trash/to_tiles.hh (working copy)
@@ -34,7 +34,7 @@
*/
# include <mln/core/image/translate_image.hh>
-# include <mln/level/paste.hh>
+# include <mln/data/paste.hh>
# include <mln/geom/nrows.hh>
# include <mln/geom/ncols.hh>
@@ -84,7 +84,7 @@
translate_image<I> tr_ima(v_ima[i], dp);
/// Paste translated image into output.
- level::paste(tr_ima, output);
+ data::paste(tr_ima, output);
}
return output;
Index: trash/display_save.hh
--- trash/display_save.hh (revision 3927)
+++ trash/display_save.hh (working copy)
@@ -38,8 +38,8 @@
# include <mln/core/image/image_if.hh>
# include <mln/core/image/image2d.hh>
# include <mln/value/rgb8.hh>
-# include <mln/level/fill.hh>
-# include <mln/level/paste.hh>
+# include <mln/data/fill.hh>
+# include <mln/data/paste.hh>
# include <mln/display/color_pretty.hh>
# include <mln/io/ppm/save.hh>
Index: trash/translate_image.cc
--- trash/translate_image.cc (revision 3927)
+++ trash/translate_image.cc (working copy)
@@ -33,8 +33,8 @@
#include <mln/core/image/image2d.hh>
#include <mln/value/int_u8.hh>
#include <mln/debug/iota.hh>
-#include <mln/level/fill.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/fill.hh>
+#include <mln/data/paste.hh>
#include <mln/border/fill.hh>
#include <mln/debug/println_with_border.hh>
#include <mln/debug/println.hh>
@@ -67,8 +67,8 @@
std::cout << std::endl;
I out (4,4);
- level::paste(ima, out);
- level::paste(tmp, out);
+ data::paste(ima, out);
+ data::paste(tmp, out);
std::cout << "pasted image :"
<< std::endl;
debug::println (out);
Index: trash/display_color_pretty.cc
--- trash/display_color_pretty.cc (revision 3927)
+++ trash/display_color_pretty.cc (working copy)
@@ -31,13 +31,13 @@
# include <mln/core/image/image2d.hh>
# include <mln/value/int_u8.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/core/site_set/p_set.hh>
# include <mln/core/image/sub_image.hh>
# include <mln/value/rgb8.hh>
# include <mln/display/color_pretty.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
int main()
@@ -48,7 +48,7 @@
/// Test on color_pretty.
{
image2d<int_u8> ima (2, 2);
- level::fill (ima, 51);
+ data::fill (ima, 51);
p_set<point2d > s;
s.insert(point2d(0, 0));
Index: trash/save_and_show.cc
--- trash/save_and_show.cc (revision 3927)
+++ trash/save_and_show.cc (working copy)
@@ -42,7 +42,7 @@
#include <mln/display/show.hh>
#include <mln/io/ppm/save.hh>
#include <mln/display/save_and_show.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include "tests/data.hh"
@@ -74,7 +74,7 @@
/// Test with color image.
{
image2d<value::rgb8> ima (100, 100);
- level::fill(ima, value::rgb8 (0, 0, 255));
+ data::fill(ima, value::rgb8 (0, 0, 255));
display::save_and_show (ima, "display", 1);
}
Index: trash/to_tiles.cc
--- trash/to_tiles.cc (revision 3927)
+++ trash/to_tiles.cc (working copy)
@@ -33,8 +33,8 @@
#include <mln/core/image/image2d.hh>
#include <mln/value/int_u8.hh>
#include <mln/debug/iota.hh>
-#include <mln/level/fill.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/fill.hh>
+#include <mln/data/paste.hh>
#include <mln/border/fill.hh>
#include <mln/debug/println_with_border.hh>
#include <mln/debug/println.hh>
@@ -49,39 +49,39 @@
std::vector<I> vec;
I ima1 (4, 2, 1);
- level::fill(ima1, 1);
+ data::fill(ima1, 1);
vec.push_back(ima1);
I ima2 (4, 2, 1);
- level::fill(ima2, 2);
+ data::fill(ima2, 2);
vec.push_back(ima2);
I ima3 (4, 2, 1);
- level::fill(ima3, 3);
+ data::fill(ima3, 3);
vec.push_back(ima3);
I ima4 (4, 2, 1);
- level::fill(ima4, 4);
+ data::fill(ima4, 4);
vec.push_back(ima4);
I ima5 (4, 2, 1);
- level::fill(ima5, 5);
+ data::fill(ima5, 5);
vec.push_back(ima5);
I ima6 (4, 2, 1);
- level::fill(ima6, 6);
+ data::fill(ima6, 6);
vec.push_back(ima6);
I ima7 (4, 2, 1);
- level::fill(ima7, 7);
+ data::fill(ima7, 7);
vec.push_back(ima7);
I ima8 (4, 2, 1);
- level::fill(ima8, 8);
+ data::fill(ima8, 8);
vec.push_back(ima8);
I ima9 (4, 2, 1);
- level::fill(ima9, 9);
+ data::fill(ima9, 9);
vec.push_back(ima9);
I output = convert::to_tiles(vec, 1.33333f);
Index: trash/display_color_pretty.hh
--- trash/display_color_pretty.hh (revision 3927)
+++ trash/display_color_pretty.hh (working copy)
@@ -37,8 +37,8 @@
# include <mln/trait/image_from_grid.hh>
# include <mln/core/image/image2d.hh>
# include <mln/value/rgb8.hh>
-# include <mln/level/fill.hh>
-# include <mln/level/paste.hh>
+# include <mln/data/fill.hh>
+# include <mln/data/paste.hh>
# include <mln/core/site_set/p_set.hh>
# include <mln/metal/is_not.hh>
@@ -124,7 +124,7 @@
const I& input = exact (input_);
image2d<value::rgb8> output(input.domain().bbox());
- level::fill(output, value::rgb8(255, 0, 0));
+ data::fill(output, value::rgb8(255, 0, 0));
{
mln_piter(I) p(input.domain());
@@ -150,7 +150,7 @@
const I& input = exact (input_);
image2d<value::rgb8> output(input.domain().bbox());
- level::fill(output, value::rgb8(0, 0, 0));
+ data::fill(output, value::rgb8(0, 0, 0));
{
mln_piter(p_set<mln_psite(I) >) p(s1_);
Index: mln/trait/accumulators.hh
--- mln/trait/accumulators.hh (revision 3927)
+++ mln/trait/accumulators.hh (working copy)
@@ -46,7 +46,7 @@
# define mln_trait_accumulator_has_stop(A) typename mln::trait::accumulator_< A >::has_stop
/// Shortcut to the accumulator property about behavior when pixel is given as take() value
-/// Used for instance in mln::canvas::morpho::leveling
+/// Used for instance in mln::canvas::morpho::dataing
# define mln_trait_accumulator_when_pix(A) typename mln::trait::accumulator_< A >::when_pix
Index: mln/debug/superpose.hh
--- mln/debug/superpose.hh (revision 3927)
+++ mln/debug/superpose.hh (working copy)
@@ -37,7 +37,7 @@
# include <mln/core/image/dmorph/image_if.hh>
# include <mln/value/rgb8.hh>
# include <mln/data/fill.hh>
-# include <mln/level/convert.hh>
+# include <mln/data/convert.hh>
# include <mln/pw/all.hh>
# include <mln/literal/colors.hh>
@@ -91,7 +91,7 @@
mln_precondition(object.is_valid());
mln_precondition(input.domain() == object.domain());
- mln_ch_value(I,value::rgb8) output = level::convert(value::rgb8(), input);
+ mln_ch_value(I,value::rgb8) output = data::convert(value::rgb8(), input);
data::fill((output | pw::value(object)).rw(), object_color);
trace::exiting("debug::superpose");
Index: mln/world/binary_2d/subsample.hh
--- mln/world/binary_2d/subsample.hh (revision 3927)
+++ mln/world/binary_2d/subsample.hh (working copy)
@@ -73,7 +73,7 @@
if (n == 0)
{
image2d<value::int_u8>
- output = level::convert(int_u8(), input);
+ output = data::convert(int_u8(), input);
trace::exiting("world::binary_2d::subsample");
return output;
Index: mln/world/binary_2d/enlarge.hh
--- mln/world/binary_2d/enlarge.hh (revision 3927)
+++ mln/world/binary_2d/enlarge.hh (working copy)
@@ -44,7 +44,7 @@
# include <mln/fun/p2v/ternary.hh>
# include <mln/fun/v2b/threshold.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/pw/image.hh>
# include <mln/pw/cst.hh>
@@ -294,7 +294,7 @@
{
mln_ch_value(I,value::int_u8) tmp = do_enlarge_gl(input, n);
I output
- = level::transform(tmp, fun::v2b::threshold<value::int_u8>(150));
+ = data::transform(tmp, fun::v2b::threshold<value::int_u8>(150));
return output;
}
Index: mln/core/image/imorph/labeled_image.hh
--- mln/core/image/imorph/labeled_image.hh (revision 3927)
+++ mln/core/image/imorph/labeled_image.hh (working copy)
@@ -53,7 +53,7 @@
# ifndef NDEBUG
# include <mln/accu/max.hh>
-# include <mln/level/compute.hh>
+# include <mln/data/compute.hh>
# endif // ! NDEBUG
@@ -253,7 +253,7 @@
void
labeled_image<I>::init_(const I& ima, const mln_value(I)& nlabels)
{
- mln_precondition(level::compute(accu::meta::max(), ima) == nlabels);
+ mln_precondition(data::compute(accu::meta::max(), ima) == nlabels);
this->data_ = new internal::data< labeled_image<I> >(ima, nlabels);
this->update_();
}
Index: mln/core/concept/object.hh
--- mln/core/concept/object.hh (revision 3927)
+++ mln/core/concept/object.hh (working copy)
@@ -85,7 +85,7 @@
* <LI> \ref mln::histo
* <LI> \ref mln::io
* <LI> \ref mln::labeling
- * <LI> \ref mln::level
+ * <LI> \ref mln::data
* <LI> \ref mln::linear
* <LI> \ref mln::literal
* <LI> \ref mln::logical
Index: mln/all.hh
--- mln/all.hh (revision 3927)
+++ mln/all.hh (working copy)
@@ -26,8 +26,8 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_ALL_HH_
-# define MLN_ALL_HH_
+#ifndef MLN_ALL_HH
+# define MLN_ALL_HH
/// \file mln/all.hh
///
@@ -53,7 +53,6 @@
#include <mln/histo/all.hh>
#include <mln/io/all.hh>
#include <mln/labeling/all.hh>
-#include <mln/level/all.hh>
#include <mln/linear/all.hh>
#include <mln/literal/all.hh>
#include <mln/logical/all.hh>
@@ -78,5 +77,4 @@
#include <mln/essential/2d.hh>
#include <mln/essential/3d.hh>
-#endif // ! MLN_ALL_HH_
-
+#endif // ! MLN_ALL_HH
Index: mln/arith/min.hh
--- mln/arith/min.hh (revision 3927)
+++ mln/arith/min.hh (working copy)
@@ -80,27 +80,27 @@
inline
void min_(const L& lhs, const R& rhs, O& output)
{
- trace::entering("level::arith::generic::min_");
+ trace::entering("data::arith::generic::min_");
mln_piter(L) p(lhs.domain());
for_all(p)
output(p) = lhs(p) < rhs(p) ? lhs(p) : rhs(p);
- trace::entering("level::arith::generic::min_");
+ trace::entering("data::arith::generic::min_");
}
template <typename L, typename R>
inline
void min_inplace_(L& lhs, const R& rhs)
{
- trace::entering("level::arith::generic::min_inplace_");
+ trace::entering("data::arith::generic::min_inplace_");
mln_piter(L) p(lhs.domain());
for_all(p)
if (rhs(p) < lhs(p))
lhs(p) = rhs(p);
- trace::exiting("level::arith::generic::min_inplace_");
+ trace::exiting("data::arith::generic::min_inplace_");
}
} // end of namespace mln::arith::impl::generic
Index: mln/arith/min.spe.hh
--- mln/arith/min.spe.hh (revision 3927)
+++ mln/arith/min.spe.hh (working copy)
@@ -73,7 +73,7 @@
void min_(trait::image::speed::fastest, const L& lhs,
trait::image::speed::fastest, const R& rhs, O& output)
{
- trace::entering("level::arith::min_");
+ trace::entering("data::arith::min_");
mln_pixter(const L) lp(lhs);
mln_pixter(const R) rp(rhs);
@@ -81,7 +81,7 @@
for_all_3(lp, rp, op)
op.val() = lp.val() < rp.val() ? lp.val() : rp.val();
- trace::exiting("level::arith::min_");
+ trace::exiting("data::arith::min_");
}
template <typename L, typename R>
@@ -97,7 +97,7 @@
void min_inplace_(trait::image::speed::fastest, L& lhs,
trait::image::speed::fastest, const R& rhs)
{
- trace::entering("level::arith::min_inplace_");
+ trace::entering("data::arith::min_inplace_");
mln_pixter(L) lp(lhs);
mln_pixter(const R) rp(rhs);
@@ -105,7 +105,7 @@
if (rp.val() < lp.val())
lp.val() = rp.val();
- trace::exiting("level::arith::min_inplace_");
+ trace::exiting("data::arith::min_inplace_");
}
} // end of namespace mln::arith::impl
Index: mln/arith/diff_abs.hh
--- mln/arith/diff_abs.hh (revision 3927)
+++ mln/arith/diff_abs.hh (working copy)
@@ -37,7 +37,7 @@
# include <mln/arith/includes.hh>
# include <mln/fun/vv2v/diff_abs.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
namespace mln
{
@@ -70,7 +70,7 @@
mln_precondition(exact(rhs).is_valid());
mln_precondition(exact(rhs).domain() == exact(lhs).domain());
- mln_concrete(I) output = level::transform(lhs, rhs, fun::vv2v::diff_abs<mln_value(I)>());
+ mln_concrete(I) output = data::transform(lhs, rhs, fun::vv2v::diff_abs<mln_value(I)>());
trace::exiting("arith::diff_abs");
return output;
Index: mln/data/update.hh
--- mln/data/update.hh (revision 3920)
+++ mln/data/update.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef MLN_LEVEL_UPDATE_HH
# define MLN_LEVEL_UPDATE_HH
-/*! \file mln/level/update.hh
+/*! \file mln/data/update.hh
*
* \brief Update an accumulator with image pixel values.
*/
@@ -41,7 +41,7 @@
namespace mln
{
- namespace level
+ namespace data
{
/*! Update an accumulator with the pixel values of the image \p input.
@@ -90,51 +90,51 @@
namespace generic
{
- /// Generic implementation of level::update.
+ /// Generic implementation of data::update.
template <typename A, typename I>
inline
mln_result(A)
update(Accumulator<A>& a_, const Image<I>& input_)
{
- trace::entering("level::impl::generic::update");
+ trace::entering("data::impl::generic::update");
A& a = exact(a_);
const I& input = exact(input_);
- level::internal::update_tests(a, input);
+ data::internal::update_tests(a, input);
mln_piter(I) p(input.domain());
for_all(p)
a.take(input(p));
- trace::exiting("level::impl::generic::update");
+ trace::exiting("data::impl::generic::update");
return a.to_result();
}
- } // end of namespace mln::level::impl::generic
+ } // end of namespace mln::data::impl::generic
- /// Fastest implementation of level::update.
+ /// Fastest implementation of data::update.
template <typename A, typename I>
inline
mln_result(A)
update_fastest(Accumulator<A>& a_, const Image<I>& input_)
{
- trace::entering("level::impl::update_fastest");
+ trace::entering("data::impl::update_fastest");
A& a = exact(a_);
const I& input = exact(input_);
- level::internal::update_tests(a, input);
+ data::internal::update_tests(a, input);
mln_pixter(const I) pxl(input);
for_all(pxl)
a.take(pxl.val());
- trace::exiting("level::impl::update_fastest");
+ trace::exiting("data::impl::update_fastest");
return a.to_result();
}
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
@@ -181,18 +181,18 @@
mln_result(A)
update(Accumulator<A>& a, const Image<I>& input)
{
- trace::entering("level::update");
+ trace::entering("data::update");
- level::internal::update_tests(a, input);
+ data::internal::update_tests(a, input);
mln_result(A) r = internal::update_dispatch(a, input);
- trace::exiting("level::update");
+ trace::exiting("data::update");
return r;
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/was.median.hh
--- mln/data/was.median.hh (revision 3920)
+++ mln/data/was.median.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef MLN_LEVEL_WAS_MEDIAN_HH
# define MLN_LEVEL_WAS_MEDIAN_HH
-/*! \file mln/level/was.median.hh
+/*! \file mln/data/was.median.hh
*
* \brief Obsolete routines for median filtering.
*/
@@ -44,7 +44,7 @@
# include <mln/win/diff.hh>
# include <mln/win/shift.hh>
-# include <mln/level/median.hh>
+# include <mln/data/median.hh>
# include <mln/win/hline2d.hh>
# include <mln/opt/at.hh>
@@ -52,7 +52,7 @@
namespace mln
{
- namespace level
+ namespace data
{
namespace impl
@@ -199,9 +199,9 @@
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/transform.spe.hh
--- mln/data/transform.spe.hh (revision 3920)
+++ mln/data/transform.spe.hh (working copy)
@@ -29,9 +29,9 @@
#ifndef MLN_LEVEL_TRANSFORM_SPE_HH
# define MLN_LEVEL_TRANSFORM_SPE_HH
-/// \file mln/level/transform.spe.hh
+/// \file mln/data/transform.spe.hh
///
-/// Specializations for mln::level::transform.
+/// Specializations for mln::data::transform.
# ifndef MLN_LEVEL_TRANSFORM_HH
# error "Forbidden inclusion of *.spe.hh"
@@ -53,7 +53,7 @@
namespace mln
{
- namespace level
+ namespace data
{
// Forward declarations.
@@ -100,14 +100,14 @@
mln_ch_value(I, mln_result(F))
transform_lowq_v2v(const Image<I>& input_, const Function_v2v<F>& f_)
{
- trace::entering("level::impl::transform_lowq_v2v");
+ trace::entering("data::impl::transform_lowq_v2v");
mlc_is(mln_trait_image_pw_io(mln_ch_value(I, mln_result(F))),
trait::image::pw_io::read_write)::check();
const I& input = exact(input_);
const F& f = exact(f_);
- level::internal::transform_tests(input, f);
+ data::internal::transform_tests(input, f);
mln_ch_value(I, mln_result(F)) output;
initialize(output, input);
@@ -119,7 +119,7 @@
for_all(p)
output(p) = lut(input(p));
- trace::exiting("level::impl::transform_lowq_v2v");
+ trace::exiting("data::impl::transform_lowq_v2v");
return output;
}
@@ -128,14 +128,14 @@
mln_ch_value(I, mln_result(F))
transform_lowq_i2v(const Image<I>& input_, const Function_i2v<F>& f_)
{
- trace::entering("level::impl::transform_lowq");
+ trace::entering("data::impl::transform_lowq");
mlc_is(mln_trait_image_pw_io(mln_ch_value(I, mln_result(F))),
trait::image::pw_io::read_write)::check();
const I& input = exact(input_);
const F& f = exact(f_);
- level::internal::transform_tests(input, f);
+ data::internal::transform_tests(input, f);
mln_ch_value(I, mln_result(F)) output;
initialize(output, input);
@@ -144,7 +144,7 @@
for_all(p)
output(p) = f(input(p));
- trace::exiting("level::impl::transform_lowq");
+ trace::exiting("data::impl::transform_lowq");
return output;
}
@@ -153,14 +153,14 @@
mln_ch_value(I, mln_result(F))
transform_taken_v2v(const Image<I>& input_, const Function_v2v<F>& f_)
{
- trace::entering("level::impl::transform_taken_v2v");
+ trace::entering("data::impl::transform_taken_v2v");
mlc_is(mln_trait_image_pw_io(mln_ch_value(I, mln_result(F))),
trait::image::pw_io::read_write)::check();
const I& input = exact(input_);
const F& f = exact(f_);
- level::internal::transform_tests(input, f);
+ data::internal::transform_tests(input, f);
mln_ch_value(I, mln_result(F)) output;
initialize(output, input);
@@ -172,7 +172,7 @@
for_all(p)
output(p) = lut(input(p));
- trace::exiting("level::impl::transform_taken_v2v");
+ trace::exiting("data::impl::transform_taken_v2v");
return output;
}
@@ -181,14 +181,14 @@
mln_ch_value(I, mln_result(F))
transform_taken_i2v(const Image<I>& input_, const Function_i2v<F>& f_)
{
- trace::entering("level::impl::transform_taken_i2v");
+ trace::entering("data::impl::transform_taken_i2v");
mlc_is(mln_trait_image_pw_io(mln_ch_value(I, mln_result(F))),
trait::image::pw_io::read_write)::check();
const I& input = exact(input_);
const F& f = exact(f_);
- level::internal::transform_tests(input, f);
+ data::internal::transform_tests(input, f);
mln_ch_value(I, mln_result(F)) output;
initialize(output, input);
@@ -197,7 +197,7 @@
for_all(p)
output(p) = f(input(p));
- trace::exiting("level::impl::transform_taken_i2v");
+ trace::exiting("data::impl::transform_taken_i2v");
return output;
}
@@ -206,11 +206,11 @@
mln_ch_value(I, mln_result(F))
transform_singleton(const Image<I>& input_, const Function_v2v<F>& f_)
{
- trace::entering("level::impl::transform_singleton");
+ trace::entering("data::impl::transform_singleton");
const I& input = exact(input_);
const F& f = exact(f_);
- level::internal::transform_tests(input, f);
+ data::internal::transform_tests(input, f);
mln_ch_value(I, mln_result(F)) output;
initialize(output, input);
@@ -218,7 +218,7 @@
mln_result(F) val = f(opt::value(input));
data::fill_with_value(output, val);
- trace::exiting("level::impl::transform_singleton");
+ trace::exiting("data::impl::transform_singleton");
return output;
}
@@ -227,12 +227,12 @@
mln_ch_value(I, mln_result(F))
transform_fast(const Image<I>& input_, const Function_v2v<F>& f_)
{
- trace::entering("level::impl::transform_fast");
+ trace::entering("data::impl::transform_fast");
const I& input = exact(input_);
const F& f = exact(f_);
- level::internal::transform_tests(input, f);
+ data::internal::transform_tests(input, f);
typedef mln_ch_value(I, mln_result(F)) O;
O output;
@@ -243,7 +243,7 @@
for_all_2(pi, po)
po.val() = f(pi.val());
- trace::exiting("level::impl::transform_fast");
+ trace::exiting("data::impl::transform_fast");
return output;
}
@@ -252,11 +252,11 @@
mln_ch_value(I, mln_result(F))
transform_fast_lowq(const Image<I>& input_, const Function_v2v<F>& f_)
{
- trace::entering("level::impl::transform_fast_lowq");
+ trace::entering("data::impl::transform_fast_lowq");
const I& input = exact(input_);
const F& f = exact(f_);
- level::internal::transform_tests(input, f);
+ data::internal::transform_tests(input, f);
typedef mln_ch_value(I, mln_result(F)) O;
O output;
@@ -270,7 +270,7 @@
for_all_2(pi, po)
po.val() = lut(pi.val());
- trace::exiting("level::impl::transform_fast_lowq");
+ trace::exiting("data::impl::transform_fast_lowq");
return output;
}
@@ -280,12 +280,12 @@
transform_fastest(const Image<I1>& input1_, const Image<I2>& input2_,
const Function_vv2v<F>& f_)
{
- trace::entering("level::impl::transform_fastest");
+ trace::entering("data::impl::transform_fastest");
const I1& input1 = exact(input1_);
const I2& input2 = exact(input2_);
const F& f = exact(f_);
- level::internal::transform_tests(input1, input2, f);
+ data::internal::transform_tests(input1, input2, f);
typedef mln_ch_value(I1, mln_result(F)) O;
O output;
@@ -297,13 +297,13 @@
for_all_3(pi1, pi2, po)
po.val() = f(pi1.val(), pi2.val());
- trace::exiting("level::impl::transform_fastest");
+ trace::exiting("data::impl::transform_fastest");
return output;
}
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
@@ -320,7 +320,7 @@
trait::image::quant::any,
const Image<I>& input, const Function_v2v<F>& f)
{
- return level::impl::generic::transform(input, f);
+ return data::impl::generic::transform(input, f);
}
template <typename I, typename F>
@@ -330,7 +330,7 @@
trait::image::quant::any,
const Image<I>& input, const Function_v2v<F>& f)
{
- return level::impl::generic::transform(input, f);
+ return data::impl::generic::transform(input, f);
}
template <typename I, typename F>
@@ -340,7 +340,7 @@
trait::image::quant::low,
const Image<I>& input, const Function_v2v<F>& f)
{
- return level::impl::transform_taken_v2v(input, f);
+ return data::impl::transform_taken_v2v(input, f);
}
template <typename I, typename F>
@@ -350,7 +350,7 @@
trait::image::quant::low,
const Image<I>& input, const Function_i2v<F>& f)
{
- return level::impl::transform_taken_i2v(input, f);
+ return data::impl::transform_taken_i2v(input, f);
}
template <typename I, typename F>
@@ -360,7 +360,7 @@
trait::image::quant::low,
const Image<I>& input, const Function_v2v<F>& f)
{
- return level::impl::transform_lowq_v2v(input, f);
+ return data::impl::transform_lowq_v2v(input, f);
}
template <typename I, typename F>
@@ -370,7 +370,7 @@
trait::image::quant::low,
const Image<I>& input, const Function_i2v<F>& f)
{
- return level::impl::transform_lowq_i2v(input, f);
+ return data::impl::transform_lowq_i2v(input, f);
}
template <typename I, typename F>
@@ -380,7 +380,7 @@
trait::image::value_access::direct,
const Image<I>& input, const Function_v2v<F>& f)
{
- return level::impl::transform_fast(input, f);
+ return data::impl::transform_fast(input, f);
}
template <typename I, typename F>
@@ -390,7 +390,7 @@
trait::image::value_access::direct,
const Image<I>& input, const Function_v2v<F>& f)
{
- return level::impl::transform_fast_lowq(input, f);
+ return data::impl::transform_fast_lowq(input, f);
}
template <typename I, typename F>
@@ -400,7 +400,7 @@
trait::image::value_access::direct,
const Image<I>& input, const Function_i2v<F>& f)
{
- return level::impl::transform_fast(input, f);
+ return data::impl::transform_fast(input, f);
}
template <typename I, typename F>
@@ -433,7 +433,7 @@
transform_dispatch(trait::image::value_storage::singleton,
const Image<I>& input, const Function_v2v<F>& f)
{
- return level::impl::transform_singleton(input, f);
+ return data::impl::transform_singleton(input, f);
}
template <typename I, typename F>
@@ -469,7 +469,7 @@
const Image<I1>& input1, const Image<I2>& input2,
const Function_vv2v<F>& f)
{
- return level::impl::generic::transform(input1, input2, f);
+ return data::impl::generic::transform(input1, input2, f);
}
template <typename I1, typename I2, typename F>
@@ -481,7 +481,7 @@
const Image<I1>& input1, const Image<I2>& input2,
const Function_vv2v<F>& f)
{
- return level::impl::transform_fastest(input1, input2, f);
+ return data::impl::transform_fastest(input1, input2, f);
}
// end of Dispatch for transformation from a couple of images.
@@ -510,11 +510,11 @@
input1, input2, f);
}
- } // end of namespace mln::level::internal
+ } // end of namespace mln::data::internal
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/to_enc.hh
--- mln/data/to_enc.hh (revision 3920)
+++ mln/data/to_enc.hh (working copy)
@@ -28,20 +28,20 @@
#ifndef MLN_LEVEL_TO_ENC_HH
# define MLN_LEVEL_TO_ENC_HH
-/*! \file mln/level/to_enc.hh
+/*! \file mln/data/to_enc.hh
*
* \brief Transform with fun::v2v::enc the contents of an image into
* another one.
*/
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/fun/v2v/enc.hh>
namespace mln
{
- namespace level
+ namespace data
{
/*! Set the \p output image with the encoding values of the image \p input pixels.
@@ -61,17 +61,17 @@
inline
void to_enc(const Image<I>& input, Image<O>& output)
{
- trace::entering("level::to_enc");
+ trace::entering("data::to_enc");
mln_precondition(exact(output).domain() == exact(input).domain());
- output = level::transform(input, fun::v2v::enc< mln_value(I) >());
+ output = data::transform(input, fun::v2v::enc< mln_value(I) >());
- trace::exiting("level::to_enc");
+ trace::exiting("data::to_enc");
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/all.hh
--- mln/data/all.hh (revision 3927)
+++ mln/data/all.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of the Olena Library. This library is free
@@ -52,8 +52,26 @@
}
+# include <mln/data/abs.hh>
+# include <mln/data/apply.hh>
+# include <mln/data/approx/all.hh>
+# include <mln/data/compare.hh>
+# include <mln/data/compute.hh>
+# include <mln/data/convert.hh>
+# include <mln/data/fast_median.hh>
# include <mln/data/fill.hh>
+# include <mln/data/median.hh>
+# include <mln/data/naive/all.hh>
# include <mln/data/paste.hh>
+# include <mln/data/replace.hh>
+# include <mln/data/saturate.hh>
+# include <mln/data/sort_offsets.hh>
+# include <mln/data/sort_psites.hh>
+# include <mln/data/stretch.hh>
+# include <mln/data/to_enc.hh>
+# include <mln/data/transform.hh>
+# include <mln/data/update.hh>
+//<< # include <mln/data/was.median.hh> >>
Index: mln/data/transform.hh
--- mln/data/transform.hh (revision 3920)
+++ mln/data/transform.hh (working copy)
@@ -29,7 +29,7 @@
#ifndef MLN_LEVEL_TRANSFORM_HH
# define MLN_LEVEL_TRANSFORM_HH
-/// \file mln/level/transform.hh
+/// \file mln/data/transform.hh
///
/// Transform the contents of an image into another one.
///
@@ -42,13 +42,13 @@
# include <mln/value/set.hh>
// Specializations are in:
-# include <mln/level/transform.spe.hh>
+# include <mln/data/transform.spe.hh>
namespace mln
{
- namespace level
+ namespace data
{
/*! Transform the image \p input through a function \p f.
@@ -116,7 +116,7 @@
(void) f;
}
- } // end of namespace mln::level::internal
+ } // end of namespace mln::data::internal
@@ -130,17 +130,17 @@
namespace generic
{
- /// Generic implementation of level::transform.
+ /// Generic implementation of data::transform.
template <typename I, typename F>
mln_ch_value(I, mln_result(F))
transform(const Image<I>& input_, const Function_v2v<F>& f_)
{
- trace::entering("level::impl::generic::transform");
+ trace::entering("data::impl::generic::transform");
const I& input = exact(input_);
const F& f = exact(f_);
- level::internal::transform_tests(input, f);
+ data::internal::transform_tests(input, f);
mln_ch_value(I, mln_result(F)) output;
initialize(output, input);
@@ -149,7 +149,7 @@
for_all(p)
output(p) = f(input(p));
- trace::exiting("level::impl::generic::transform");
+ trace::exiting("data::impl::generic::transform");
return output;
}
@@ -160,13 +160,13 @@
const Image<I2>& input2_,
const Function_vv2v<F>& f_)
{
- trace::entering("level::impl::generic::transform");
+ trace::entering("data::impl::generic::transform");
const I1& input1 = exact(input1_);
const I2& input2 = exact(input2_);
const F& f = exact(f_);
- level::internal::transform_tests(input1, input2, f);
+ data::internal::transform_tests(input1, input2, f);
mln_ch_value(I1, mln_result(F)) output;
initialize(output, input1);
@@ -175,14 +175,14 @@
for_all(p)
output(p) = f(input1(p), input2(p));
- trace::exiting("level::impl::generic::transform");
+ trace::exiting("data::impl::generic::transform");
return output;
}
- } // end of namespace mln::level::impl::generic
+ } // end of namespace mln::data::impl::generic
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
@@ -194,14 +194,14 @@
mln_ch_value(I, mln_result(F))
transform(const Image<I>& input, const Function_v2v<F>& f)
{
- trace::entering("level::transform");
+ trace::entering("data::transform");
internal::transform_tests(input, f);
mln_ch_value(I, mln_result(F)) output;
output = internal::transform_dispatch(input, f);
- trace::exiting("level::transform");
+ trace::exiting("data::transform");
return output;
}
@@ -212,21 +212,21 @@
transform(const Image<I1>& input1, const Image<I2>& input2,
const Function_vv2v<F>& f)
{
- trace::entering("level::transform");
+ trace::entering("data::transform");
internal::transform_tests(input1, input2, f);
mln_ch_value(I1, mln_result(F)) output;
output = internal::transform_dispatch(input1, input2, f);
- trace::exiting("level::transform");
+ trace::exiting("data::transform");
return output;
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/replace.hh
--- mln/data/replace.hh (revision 3920)
+++ mln/data/replace.hh (working copy)
@@ -29,7 +29,7 @@
#ifndef MLN_LEVEL_REPLACE_HH
# define MLN_LEVEL_REPLACE_HH
-/// \file mln/level/replace.hh
+/// \file mln/data/replace.hh
///
/// Replace the contents of an image into another one.
@@ -44,7 +44,7 @@
namespace mln
{
- namespace level
+ namespace data
{
/*! Replace \p old_value by \p new_value in the image \p input
@@ -71,18 +71,18 @@
void replace_(Image<I>& input_, const mln_value(I)& old_value,
const mln_value(I)& new_value)
{
- trace::entering("level::impl::generic::replace");
+ trace::entering("data::impl::generic::replace");
I& input = exact(input_);
data::fill((input | (pw::value(input) == pw::cst(old_value))).rw(),
new_value);
- trace::exiting("level::impl::generic::replace");
+ trace::exiting("data::impl::generic::replace");
}
- } // end of namespace mln::level::impl::generic
+ } // end of namespace mln::data::impl::generic
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
@@ -91,19 +91,19 @@
void replace(Image<I>& input,
const mln_value(I)& old_value, const mln_value(I)& new_value)
{
- trace::entering("level::replace");
+ trace::entering("data::replace");
mln_precondition(exact(input).is_valid());
impl::generic::replace_<I>(exact(input), old_value, new_value);
- trace::exiting("level::replace");
+ trace::exiting("data::replace");
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/approx/essential.hh
--- mln/data/approx/essential.hh (revision 3927)
+++ mln/data/approx/essential.hh (working copy)
@@ -28,13 +28,13 @@
#ifndef MLN_LEVEL_APPROX_ESSENTIAL_HH
# define MLN_LEVEL_APPROX_ESSENTIAL_HH
-/*! \file mln/level/approx/essential.hh
+/*! \file mln/data/approx/essential.hh
*
* \brief File that includes essential level-related routines with
* approximation.
*/
-# include <mln/level/approx/all.hh>
+# include <mln/data/approx/all.hh>
#endif // ! MLN_LEVEL_APPROX_ESSENTIAL_HH
Index: mln/data/approx/all.hh
--- mln/data/approx/all.hh (revision 3927)
+++ mln/data/approx/all.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef MLN_LEVEL_APPROX_ALL_HH
# define MLN_LEVEL_APPROX_ALL_HH
-/*! \file mln/level/approx/all.hh
+/*! \file mln/data/approx/all.hh
*
* \brief File that includes all level-related routines with
* approximation.
@@ -38,23 +38,23 @@
namespace mln
{
- namespace level
+ namespace data
{
/// \brief Namespace of image processing routines related to pixel
/// levels with approximation.
namespace approx
{
- /// Implementation namespace of level::approx namespace.
+ /// Implementation namespace of data::approx namespace.
namespace impl {}
}
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
-# include <mln/level/approx/median.hh>
+# include <mln/data/approx/median.hh>
#endif // ! MLN_LEVEL_APPROX_ALL_HH
Index: mln/data/approx/median.hh
--- mln/data/approx/median.hh (revision 3927)
+++ mln/data/approx/median.hh (working copy)
@@ -29,11 +29,11 @@
#ifndef MLN_LEVEL_APPROX_MEDIAN_HH
# define MLN_LEVEL_APPROX_MEDIAN_HH
-/// \file mln/level/approx/median.hh
+/// \file mln/data/approx/median.hh
///
/// Approximates of some median filters of an image.
-# include <mln/level/median.hh>
+# include <mln/data/median.hh>
# include <mln/win/rectangle2d.hh>
# include <mln/win/disk2d.hh>
# include <mln/win/octagon2d.hh>
@@ -48,7 +48,7 @@
namespace mln
{
- namespace level
+ namespace data
{
namespace approx
@@ -114,17 +114,17 @@
mln_concrete(I)
median(const Image<I>& input, const win::rectangle2d& win)
{
- trace::entering("level::approx::median");
+ trace::entering("data::approx::median");
mln_concrete(I) output;
win::hline2d win1(win.width());
- output = level::median(input, win1);
+ output = data::median(input, win1);
win::vline2d win2(win.height());
- output = level::median(output, win2);
+ output = data::median(output, win2);
- trace::exiting("level::approx::median");
+ trace::exiting("data::approx::median");
return output;
}
@@ -134,24 +134,24 @@
mln_concrete(I)
median(const Image<I>& input, const win::disk2d& win)
{
- trace::entering("level::approx::median");
+ trace::entering("data::approx::median");
const unsigned len = win.diameter() / 3 + 1;
mln_concrete(I) output;
win::diag2d win1(len);
- output = level::median(input, win1);
+ output = data::median(input, win1);
win::backdiag2d win2(len);
- output = level::median(output, win2);
+ output = data::median(output, win2);
win::hline2d win3(len);
- output = level::median(input, win3);
+ output = data::median(input, win3);
win::vline2d win4(len);
- output = level::median(output, win4);
+ output = data::median(output, win4);
- trace::exiting("level::approx::median");
+ trace::exiting("data::approx::median");
return output;
}
@@ -166,9 +166,9 @@
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level::approx
+ } // end of namespace mln::data::approx
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/apply.spe.hh
--- mln/data/apply.spe.hh (revision 3920)
+++ mln/data/apply.spe.hh (working copy)
@@ -28,9 +28,9 @@
#ifndef MLN_LEVEL_APPLY_SPE_HH
# define MLN_LEVEL_APPLY_SPE_HH
-/*! \file mln/level/apply.spe.hh
+/*! \file mln/data/apply.spe.hh
*
- * \brief Specializations for mln::level::apply.
+ * \brief Specializations for mln::data::apply.
*/
# ifndef MLN_LEVEL_APPLY_HH
@@ -47,7 +47,7 @@
namespace mln
{
- namespace level
+ namespace data
{
namespace impl
@@ -73,19 +73,19 @@
inline
void apply_(trait::image::speed::fastest, I& input, const F& f)
{
- trace::entering("level::impl::apply_");
+ trace::entering("data::impl::apply_");
mln_pixter(I) pxl(input);
for_all(pxl)
pxl.val() = f(pxl.val());
- trace::exiting("level::impl::apply_");
+ trace::exiting("data::impl::apply_");
}
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/stretch.hh
--- mln/data/stretch.hh (revision 3920)
+++ mln/data/stretch.hh (working copy)
@@ -29,7 +29,7 @@
#ifndef MLN_LEVEL_STRETCH_HH
# define MLN_LEVEL_STRETCH_HH
-/// \file mln/level/stretch.hh
+/// \file mln/data/stretch.hh
///
/// Transform linearly the contents of an image into another one in a
/// stretching way.
@@ -41,7 +41,7 @@
# include <mln/estim/min_max.hh>
# include <mln/value/int_u.hh>
# include <mln/fun/v2v/linear.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/value/internal/encoding.hh>
@@ -49,7 +49,7 @@
namespace mln
{
- namespace level
+ namespace data
{
/*! Stretch the values of \p input so that they can be stored in
@@ -72,7 +72,7 @@
namespace impl
{
- /// Generic implementation of level::stretch.
+ /// Generic implementation of data::stretch.
///
/// \param[in] v A value to set the output value type.
/// \param[in] input The input image.
@@ -84,7 +84,7 @@
mln_ch_value(I, V)
stretch(V, const Image<I>& input)
{
- trace::entering("level::impl::stretch");
+ trace::entering("data::impl::stretch");
mlc_converts_to(float, V)::check();
@@ -105,7 +105,7 @@
a = (M - m) / (max - min),
b = (m * max - M * min) / (max - min);
fun::v2v::linear_sat<mln_value(I), double, V> f(a, b);
- output = level::transform(input, f);
+ output = data::transform(input, f);
}
else
{
@@ -113,11 +113,11 @@
trace::warning("output has no significative data!");
}
- trace::exiting("level::impl::stretch");
+ trace::exiting("data::impl::stretch");
return output;
}
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
@@ -128,19 +128,19 @@
mln_ch_value(I, V)
stretch(V, const Image<I>& input)
{
- trace::entering("level::stretch");
+ trace::entering("data::stretch");
mln_precondition(exact(input).is_valid());
mln_ch_value(I, V) output = impl::stretch(V(), input);
- trace::exiting("level::stretch");
+ trace::exiting("data::stretch");
return output;
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/sort_offsets.hh
--- mln/data/sort_offsets.hh (revision 3920)
+++ mln/data/sort_offsets.hh (working copy)
@@ -29,7 +29,7 @@
#ifndef MLN_LEVEL_SORT_OFFSETS_HH
# define MLN_LEVEL_SORT_OFFSETS_HH
-/// \file mln/level/sort_offsets.hh
+/// \file mln/data/sort_offsets.hh
/// \brief Sort_Offsets the contents of an image into another one.
///
/// \todo Factor code + optimize.
@@ -46,7 +46,7 @@
namespace mln
{
- namespace level
+ namespace data
{
/// Sort pixel offsets of the image \p input wrt increasing pixel
@@ -95,7 +95,7 @@
util::array<unsigned>
sort_offsets_increasing(const Image<I>& input_)
{
- trace::entering("level::impl::generic::sort_offsets_increasing");
+ trace::entering("data::impl::generic::sort_offsets_increasing");
const I& input = exact(input_);
@@ -107,7 +107,7 @@
std::sort(v.hook_std_vector_().begin(), v.hook_std_vector_().end(),
value_offset_less_<I>(input));
- trace::exiting("level::impl::generic::sort_offsets_increasing");
+ trace::exiting("data::impl::generic::sort_offsets_increasing");
return v;
}
@@ -133,7 +133,7 @@
util::array<unsigned>
sort_offsets_decreasing(const Image<I>& input_)
{
- trace::entering("level::impl::generic::sort_offsets_decreasing");
+ trace::entering("data::impl::generic::sort_offsets_decreasing");
const I& input = exact(input_);
@@ -145,12 +145,12 @@
std::sort(v.hook_std_vector_().begin(), v.hook_std_vector_().end(),
value_offset_greater_<I>(input));
- trace::exiting("level::impl::generic::sort_offsets_decreasing");
+ trace::exiting("data::impl::generic::sort_offsets_decreasing");
return v;
}
- } // end of namespace mln::level::impl::generic
+ } // end of namespace mln::data::impl::generic
@@ -161,7 +161,7 @@
util::array<unsigned>
sort_offsets_increasing_radix(const Image<I>& input_)
{
- trace::entering("level::impl::sort_offsets_increasing_radix");
+ trace::entering("data::impl::sort_offsets_increasing_radix");
const I& input = exact(input_);
@@ -184,7 +184,7 @@
for_all(pxl)
vec[loc[vset.index_of(pxl.val())]++] = pxl.offset();
- trace::exiting("level::impl::sort_offsets_increasing_radix");
+ trace::exiting("data::impl::sort_offsets_increasing_radix");
return vec;
}
@@ -196,7 +196,7 @@
util::array<unsigned>
sort_offsets_decreasing_radix(const Image<I>& input_)
{
- trace::entering("level::impl::sort_offsets_decreasing_radix");
+ trace::entering("data::impl::sort_offsets_decreasing_radix");
const I& input = exact(input_);
@@ -219,12 +219,12 @@
for_all(pxl)
vec[loc[vset.index_of(pxl.val())]++] = pxl.offset();
- trace::exiting("level::impl::sort_offsets_decreasing_radix");
+ trace::exiting("data::impl::sort_offsets_decreasing_radix");
return vec;
}
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
@@ -289,7 +289,7 @@
input);
}
- } // end of namespace mln::level::internal
+ } // end of namespace mln::data::internal
@@ -300,14 +300,14 @@
util::array<unsigned>
sort_offsets_increasing(const Image<I>& input)
{
- trace::entering("level::sort_offsets_increasing");
+ trace::entering("data::sort_offsets_increasing");
mlc_is(mln_trait_image_speed(I),
trait::image::speed::fastest)::check();
mln_precondition(exact(input).is_valid());
util::array<unsigned> output = internal::sort_offsets_increasing_dispatch(input);
- trace::exiting("level::sort_offsets_increasing");
+ trace::exiting("data::sort_offsets_increasing");
return output;
}
@@ -316,20 +316,20 @@
util::array<unsigned>
sort_offsets_decreasing(const Image<I>& input)
{
- trace::entering("level::sort_offsets_decreasing");
+ trace::entering("data::sort_offsets_decreasing");
mlc_is(mln_trait_image_speed(I),
trait::image::speed::fastest)::check();
mln_precondition(exact(input).is_valid());
util::array<unsigned> output = internal::sort_offsets_decreasing_dispatch(input);
- trace::exiting("level::sort_offsets_decreasing");
+ trace::exiting("data::sort_offsets_decreasing");
return output;
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/apply.hh
--- mln/data/apply.hh (revision 3920)
+++ mln/data/apply.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef MLN_LEVEL_APPLY_HH
# define MLN_LEVEL_APPLY_HH
-/*! \file mln/level/apply.hh
+/*! \file mln/data/apply.hh
*
* \brief Apply a function-object onto image pixel values.
*/
@@ -37,13 +37,13 @@
# include <mln/core/concept/function.hh>
// Specializations are in:
-# include <mln/level/apply.spe.hh>
+# include <mln/data/apply.spe.hh>
namespace mln
{
- namespace level
+ namespace data
{
/*! Apply a function-object to the image \p input.
@@ -54,7 +54,7 @@
* This routine runs: \n
* for all p of \p input, \p input(p) = \p f( \p input(p) ) \n
*
- * This routine is equivalent to level::tranform(input, f, input)
+ * This routine is equivalent to data::tranform(input, f, input)
* but it is faster since a single iterator is required.
*
* \todo Add versions for lowq images.
@@ -76,18 +76,18 @@
inline
void apply_(I& input, const F& f)
{
- trace::entering("level::impl::generic::apply_");
+ trace::entering("data::impl::generic::apply_");
mln_piter(I) p(input.domain());
for_all(p)
input(p) = f(input(p));
- trace::exiting("level::impl::generic::apply_");
+ trace::exiting("data::impl::generic::apply_");
}
- } // end of namespace mln::level::impl::generic
+ } // end of namespace mln::data::impl::generic
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
// Facade.
@@ -96,18 +96,18 @@
inline
void apply(Image<I>& input, const Function_v2v<F>& f)
{
- trace::entering("level::apply");
+ trace::entering("data::apply");
mln_precondition(exact(input).is_valid());
impl::apply_(mln_trait_image_speed(I)(), exact(input),
exact(f));
- trace::exiting("level::apply");
+ trace::exiting("data::apply");
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/compare.hh
--- mln/data/compare.hh (revision 3920)
+++ mln/data/compare.hh (working copy)
@@ -29,7 +29,7 @@
#ifndef MLN_LEVEL_COMPARE_HH
# define MLN_LEVEL_COMPARE_HH
-/// \file mln/level/compare.hh
+/// \file mln/data/compare.hh
///
/// Comparison operators between the pixel values of images.
@@ -87,7 +87,7 @@
inline
bool operator == (const Image<L>& lhs_, const Image<R>& rhs_)
{
- trace::entering("level::compare (==)");
+ trace::entering("data::compare (==)");
const L& lhs = exact(lhs_);
const R& rhs = exact(rhs_);
@@ -99,7 +99,7 @@
typedef fun::vv2b::eq<mln_value(L), mln_value(R)> F;
bool res = test::predicate(lhs_, rhs_, F());
- trace::exiting("level::compare (==)");
+ trace::exiting("data::compare (==)");
return res;
}
@@ -108,7 +108,7 @@
inline
bool operator < (const Image<L>& lhs_, const Image<R>& rhs_)
{
- trace::entering("level::compare (<)");
+ trace::entering("data::compare (<)");
const L& lhs = exact(lhs_);
const R& rhs = exact(rhs_);
@@ -118,7 +118,7 @@
typedef fun::vv2b::lt<mln_value(L), mln_value(R)> F;
bool res = test::predicate(lhs_, rhs_, F());
- trace::exiting("level::compare (<)");
+ trace::exiting("data::compare (<)");
return res;
}
@@ -127,7 +127,7 @@
inline
bool operator <= (const Image<L>& lhs_, const Image<R>& rhs_)
{
- trace::entering("level::compare (<=)");
+ trace::entering("data::compare (<=)");
const L& lhs = exact(lhs_);
const R& rhs = exact(rhs_);
@@ -137,7 +137,7 @@
typedef fun::vv2b::le<mln_value(L), mln_value(R)> F;
bool res = test::predicate(lhs_, rhs_, F());
- trace::exiting("level::compare (<=)");
+ trace::exiting("data::compare (<=)");
return res;
}
Index: mln/data/essential.hh
--- mln/data/essential.hh (revision 3927)
+++ mln/data/essential.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -33,8 +34,14 @@
/// File that includes essential data-related routines.
+# include <mln/data/apply.hh>
+# include <mln/data/compare.hh>
+# include <mln/data/convert.hh>
# include <mln/data/fill.hh>
# include <mln/data/paste.hh>
+# include <mln/data/saturate.hh>
+# include <mln/data/stretch.hh>
+# include <mln/data/transform.hh>
#endif // ! MLN_DATA_ESSENTIAL_HH
Index: mln/data/saturate.hh
--- mln/data/saturate.hh (revision 3920)
+++ mln/data/saturate.hh (working copy)
@@ -29,19 +29,19 @@
#ifndef MLN_LEVEL_SATURATE_HH
# define MLN_LEVEL_SATURATE_HH
-/// \file mln/level/saturate.hh
+/// \file mln/data/saturate.hh
///
/// Apply a saturation function to image pixel values.
# include <mln/fun/v2v/saturate.hh>
-# include <mln/level/apply.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/apply.hh>
+# include <mln/data/transform.hh>
namespace mln
{
- namespace level
+ namespace data
{
@@ -89,14 +89,14 @@
mln_ch_value(I, V)
saturate(V, const Image<I>& input)
{
- trace::entering("level::saturate");
+ trace::entering("data::saturate");
mln_precondition(exact(input).is_valid());
fun::v2v::saturate<V> f;
- mln_ch_value(I, V) output = level::transform(input, f);
+ mln_ch_value(I, V) output = data::transform(input, f);
- trace::exiting("level::saturate");
+ trace::exiting("data::saturate");
return output;
}
@@ -106,14 +106,14 @@
saturate(const Image<I>& input,
const V& min, const V& max)
{
- trace::entering("level::saturate");
+ trace::entering("data::saturate");
mln_precondition(exact(input).is_valid());
fun::v2v::saturate<V> f(min, max);
- mln_ch_value(I, V) output = level::transform(input, f);
+ mln_ch_value(I, V) output = data::transform(input, f);
- trace::exiting("level::saturate");
+ trace::exiting("data::saturate");
return output;
}
@@ -122,19 +122,19 @@
void saturate_inplace(Image<I>& input,
const mln_value(I)& min, const mln_value(I)& max)
{
- trace::entering("level::saturate_inplace");
+ trace::entering("data::saturate_inplace");
mln_precondition(exact(input).is_valid());
fun::v2v::saturate<mln_value(I)> f(min, max);
- level::apply(input, f);
+ data::apply(input, f);
- trace::exiting("level::saturate_inplace");
+ trace::exiting("data::saturate_inplace");
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/median.hh
--- mln/data/median.hh (revision 3920)
+++ mln/data/median.hh (working copy)
@@ -29,7 +29,7 @@
#ifndef MLN_LEVEL_MEDIAN_HH
# define MLN_LEVEL_MEDIAN_HH
-/// \file mln/level/median.hh
+/// \file mln/data/median.hh
///
/// Median filtering of an image.
///
@@ -51,7 +51,7 @@
namespace mln
{
- namespace level
+ namespace data
{
/*! Compute in \p output the median filter of image \p input by
@@ -83,7 +83,7 @@
(void) win;
}
- } // end of namespace level::internal
+ } // end of namespace data::internal
namespace impl
@@ -189,7 +189,7 @@
mln_concrete(I)
median(const Image<I>& input, const Window<W>& win)
{
- trace::entering("level::impl::generic::median");
+ trace::entering("data::impl::generic::median");
mlc_equal(mln_trait_image_quant(I),
trait::image::quant::low)::check();
@@ -203,11 +203,11 @@
median_t<I,W,O> f(exact(input), exact(win), output);
canvas::browsing::snake_fwd(f);
- trace::exiting("level::impl::generic::median");
+ trace::exiting("data::impl::generic::median");
return output;
}
- } // end of namespace mln::level::impl::generic
+ } // end of namespace mln::data::impl::generic
template <typename I,
@@ -216,7 +216,7 @@
mln_concrete(I)
median_line(const Image<I>& input, const win::line<M,i,C>& win)
{
- trace::entering("level::impl::median_line");
+ trace::entering("data::impl::median_line");
mlc_equal(mln_trait_image_quant(I),
trait::image::quant::low)::check();
@@ -225,12 +225,12 @@
accu::median_h<mln_value(I)> a;
mln_concrete(I) output = accu::transform_line(a, input, win.length(), i);
- trace::exiting("level::impl::median_line");
+ trace::exiting("data::impl::median_line");
return output;
}
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
@@ -263,7 +263,7 @@
return median_dispatch_wrt_win(input, exact(win));
}
- } // end of namespace level::internal
+ } // end of namespace data::internal
// Facade.
@@ -272,7 +272,7 @@
mln_concrete(I)
median(const Image<I>& input, const Window<W>& win)
{
- trace::entering("level::median");
+ trace::entering("data::median");
mlc_equal(mln_trait_image_quant(I),
trait::image::quant::low)::check();
@@ -281,13 +281,13 @@
mln_concrete(I) output;
output = internal::median_dispatch(input, win);
- trace::exiting("level::median");
+ trace::exiting("data::median");
return output;
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/naive/essential.hh
--- mln/data/naive/essential.hh (revision 3927)
+++ mln/data/naive/essential.hh (working copy)
@@ -28,12 +28,12 @@
#ifndef MLN_LEVEL_NAIVE_ESSENTIAL_HH
# define MLN_LEVEL_NAIVE_ESSENTIAL_HH
-/*! \file mln/level/naive/essential.hh
+/*! \file mln/data/naive/essential.hh
*
* \brief File that includes essential level-related routines with
* naive approach.
*/
-# include <mln/level/naive/all.hh>
+# include <mln/data/naive/all.hh>
#endif // ! MLN_LEVEL_NAIVE_ESSENTIAL_HH
Index: mln/data/naive/all.hh
--- mln/data/naive/all.hh (revision 3927)
+++ mln/data/naive/all.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef MLN_LEVEL_NAIVE_ALL_HH
# define MLN_LEVEL_NAIVE_ALL_HH
-/*! \file mln/level/naive/all.hh
+/*! \file mln/data/naive/all.hh
*
* \brief File that includes all level-related routines with
* naive approach.
@@ -39,23 +39,23 @@
{
- namespace level
+ namespace data
{
/// \brief Namespace of image processing routines related to pixel levels
/// with naive approach.
namespace naive
{
- /// Implementation namespace of level::naive namespace.
+ /// Implementation namespace of data::naive namespace.
namespace impl {}
}
- } // end of namespace level
+ } // end of namespace data
} // end of namespace mln
-# include <mln/level/naive/median.hh>
+# include <mln/data/naive/median.hh>
#endif // ! MLN_LEVEL_NAIVE_ALL_HH
Index: mln/data/naive/median.hh
--- mln/data/naive/median.hh (revision 3927)
+++ mln/data/naive/median.hh (working copy)
@@ -29,19 +29,19 @@
#ifndef MLN_LEVEL_NAIVE_MEDIAN_HH
# define MLN_LEVEL_NAIVE_MEDIAN_HH
-/// \file mln/level/naive/median.hh
+/// \file mln/data/naive/median.hh
///
/// Naive version of median filtering.
# include <mln/core/concept/image.hh>
# include <mln/core/alias/window2d.hh>
-# include <mln/level/median.hh>
+# include <mln/data/median.hh>
namespace mln
{
- namespace level
+ namespace data
{
namespace naive
@@ -59,7 +59,7 @@
*
* \pre \p input and \p output have to be initialized.
*
- * \see mln::level::median
+ * \see mln::data::median
*/
template <typename I, typename W, typename O>
void median(const Image<I>& input, const Window<W>& win,
@@ -91,7 +91,7 @@
}
- } // end of namespace mln::level::naive::impl
+ } // end of namespace mln::data::naive::impl
@@ -107,9 +107,9 @@
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level::naive
+ } // end of namespace mln::data::naive
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/abs.hh
--- mln/data/abs.hh (revision 3920)
+++ mln/data/abs.hh (working copy)
@@ -28,21 +28,21 @@
#ifndef MLN_LEVEL_ABS_HH
# define MLN_LEVEL_ABS_HH
-/*! \file mln/level/abs.hh
+/*! \file mln/data/abs.hh
*
* \brief Apply the absolute value (abs) function to image pixel
* values.
*/
# include <mln/fun/v2v/abs.hh>
-# include <mln/level/apply.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/apply.hh>
+# include <mln/data/transform.hh>
namespace mln
{
- namespace level
+ namespace data
{
@@ -69,29 +69,29 @@
inline
void abs(const Image<I>& input, Image<O>& output)
{
- trace::entering("level::abs");
+ trace::entering("data::abs");
mln_precondition(exact(input).domain() == exact(output).domain());
- exact(output) = level::transform(input, fun::v2v::abs<mln_value(I)>());
+ exact(output) = data::transform(input, fun::v2v::abs<mln_value(I)>());
- trace::exiting("level::abs");
+ trace::exiting("data::abs");
}
template <typename I>
inline
void abs_inplace(Image<I>& input)
{
- trace::entering("level::abs_inplace");
+ trace::entering("data::abs_inplace");
mln_precondition(exact(input).is_valid());
- level::apply(input, fun::v2v::abs<mln_value(I)>());
+ data::apply(input, fun::v2v::abs<mln_value(I)>());
- trace::exiting("level::abs_inplace");
+ trace::exiting("data::abs_inplace");
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/transform_inplace.hh
--- mln/data/transform_inplace.hh (revision 3920)
+++ mln/data/transform_inplace.hh (working copy)
@@ -29,11 +29,11 @@
#ifndef MLN_LEVEL_TRANSFORM_INPLACE_HH
# define MLN_LEVEL_TRANSFORM_INPLACE_HH
-/// \file mln/level/transform_inplace.hh
+/// \file mln/data/transform_inplace.hh
///
/// Transform inplace the contents of an image through a function.
///
-/// \todo Take into account more properties; see level/transform.hh.
+/// \todo Take into account more properties; see data/transform.hh.
# include <mln/core/concept/image.hh>
# include <mln/core/concept/function.hh>
@@ -45,7 +45,7 @@
namespace mln
{
- namespace level
+ namespace data
{
/*! Transform inplace the image \p ima through a function \p f.
@@ -131,7 +131,7 @@
(void) f;
}
- } // end of namespace mln::level::internal
+ } // end of namespace mln::data::internal
namespace impl
@@ -146,7 +146,7 @@
void
transform_inplace(Image<I>& ima_, const Function_v2v<F>& f_)
{
- trace::entering("level::impl::generic::transform_inplace");
+ trace::entering("data::impl::generic::transform_inplace");
mlc_is(mln_trait_image_pw_io(I),
trait::image::pw_io::read_write)::check();
@@ -154,13 +154,13 @@
I& ima = exact(ima_);
const F& f = exact(f_);
- level::internal::transform_inplace_tests(ima, f);
+ data::internal::transform_inplace_tests(ima, f);
mln_piter(I) p(ima.domain());
for_all(p)
ima(p) = f(ima(p));
- trace::exiting("level::impl::generic::transform_inplace");
+ trace::exiting("data::impl::generic::transform_inplace");
}
template <typename I1, typename I2, typename F>
@@ -168,7 +168,7 @@
transform_inplace(Image<I1>& ima_, const Image<I2>& aux_,
const Function_vv2v<F>& f_)
{
- trace::entering("level::impl::generic::transform_inplace");
+ trace::entering("data::impl::generic::transform_inplace");
mlc_is(mln_trait_image_pw_io(I1),
trait::image::pw_io::read_write)::check();
@@ -177,16 +177,16 @@
const I2& aux = exact(aux_);
const F& f = exact(f_);
- level::internal::transform_inplace_tests(ima, aux, f);
+ data::internal::transform_inplace_tests(ima, aux, f);
mln_piter(I1) p(ima.domain());
for_all(p)
ima(p) = f(ima(p), aux(p));
- trace::exiting("level::impl::generic::transform_inplace");
+ trace::exiting("data::impl::generic::transform_inplace");
}
- } // end of namespace mln::level::impl::generic
+ } // end of namespace mln::data::impl::generic
/// Specialized implementation
@@ -195,7 +195,7 @@
transform_inplace_lowq(Image<I>& input_,
const Function_v2v<F>& f_)
{
- trace::entering("level::impl::transform_inplace_lowq");
+ trace::entering("data::impl::transform_inplace_lowq");
mlc_is(mln_trait_image_pw_io(I),
trait::image::pw_io::read_write)::check();
@@ -203,7 +203,7 @@
I& input = exact(input_);
const F& f = exact(f_);
- level::internal::transform_inplace_tests(input, f);
+ data::internal::transform_inplace_tests(input, f);
value::lut_vec<mln_vset(I), mln_result(F)>
lut(input.values_eligible(), f);
@@ -212,7 +212,7 @@
for_all(p)
input(p) = lut(input(p));
- trace::exiting("level::impl::transform_inplace_lowq");
+ trace::exiting("data::impl::transform_inplace_lowq");
}
template <typename I, typename F>
@@ -220,7 +220,7 @@
transform_inplace_taken(Image<I>& input_,
const Function_v2v<F>& f_)
{
- trace::entering("level::impl::transform_inplace_taken");
+ trace::entering("data::impl::transform_inplace_taken");
mlc_is(mln_trait_image_pw_io(I),
trait::image::pw_io::read_write)::check();
@@ -228,7 +228,7 @@
I& input = exact(input_);
const F& f = exact(f_);
- level::internal::transform_inplace_tests(input, f);
+ data::internal::transform_inplace_tests(input, f);
value::lut_vec<mln_vset(I), mln_result(F)>
lut(input.taken_values(), f);
@@ -237,7 +237,7 @@
for_all(p)
input(p) = lut(input(p));
- trace::exiting("level::impl::transform_inplace_taken");
+ trace::exiting("data::impl::transform_inplace_taken");
}
@@ -246,34 +246,34 @@
transform_inplace_singleton(Image<I>& input_,
const Function_v2v<F>& f_)
{
- trace::entering("level::impl::transform_inplace_singleton");
+ trace::entering("data::impl::transform_inplace_singleton");
I& input = exact(input_);
const F& f = exact(f_);
- level::internal::transform_inplace_tests(input, f);
+ data::internal::transform_inplace_tests(input, f);
opt::value(input) = f(opt::value(input));
- trace::exiting("level::impl::transform_inplace_singleton");
+ trace::exiting("data::impl::transform_inplace_singleton");
}
template <typename I, typename F>
void
transform_inplace_fastest(Image<I>& ima_, const Function_v2v<F>& f_)
{
- trace::entering("level::impl::transform_inplace_fastest");
+ trace::entering("data::impl::transform_inplace_fastest");
I& ima = exact(ima_);
const F& f = exact(f_);
- level::internal::transform_inplace_tests(ima, f);
+ data::internal::transform_inplace_tests(ima, f);
mln_pixter(I) p(ima);
for_all(p)
p.val() = f(p.val());
- trace::exiting("level::impl::transform_inplace_fastest");
+ trace::exiting("data::impl::transform_inplace_fastest");
}
@@ -282,12 +282,12 @@
transform_inplace_fastest_lowq(Image<I>& input_,
const Function_v2v<F>& f_)
{
- trace::entering("level::impl::transform_inplace_fastest_lowq");
+ trace::entering("data::impl::transform_inplace_fastest_lowq");
I& input = exact(input_);
const F& f = exact(f_);
- level::internal::transform_inplace_tests(input, f);
+ data::internal::transform_inplace_tests(input, f);
value::lut_vec<mln_vset(I), mln_result(F)>
lut(input.values_eligible(), f);
@@ -296,7 +296,7 @@
for_all(pi)
pi.val() = lut(pi.val());
- trace::exiting("level::impl::transform_inplace_fastest_lowq");
+ trace::exiting("data::impl::transform_inplace_fastest_lowq");
}
@@ -305,7 +305,7 @@
transform_inplace_fastest(Image<I1>& ima_, const Image<I2>& aux_,
const Function_vv2v<F>& f_)
{
- trace::entering("level::impl::transform_inplace_fastest");
+ trace::entering("data::impl::transform_inplace_fastest");
mlc_is(mln_trait_image_pw_io(I1),
trait::image::pw_io::read_write)::check();
@@ -314,18 +314,18 @@
const I2& aux = exact(aux_);
const F& f = exact(f_);
- level::internal::transform_inplace_tests(ima, aux, f);
+ data::internal::transform_inplace_tests(ima, aux, f);
mln_pixter(I1) pi(ima);
mln_pixter(const I2) pa(aux);
for_all_2(pi, pa)
pi.val() = f(pi.val(), pa.val());
- trace::exiting("level::impl::transform_inplace_fastest");
+ trace::exiting("data::impl::transform_inplace_fastest");
}
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
@@ -343,7 +343,7 @@
trait::image::quant::any,
Image<I>& ima, const Function_v2v<F>& f)
{
- level::impl::generic::transform_inplace(ima, f);
+ data::impl::generic::transform_inplace(ima, f);
}
template <typename I, typename F>
@@ -352,7 +352,7 @@
trait::image::quant::any,
Image<I>& ima, const Function_v2v<F>& f)
{
- level::impl::transform_inplace_taken(ima, f);
+ data::impl::transform_inplace_taken(ima, f);
}
template <typename I, typename F>
@@ -361,7 +361,7 @@
trait::image::quant::low,
Image<I>& ima, const Function_v2v<F>& f)
{
- level::impl::transform_inplace_lowq(ima, f);
+ data::impl::transform_inplace_lowq(ima, f);
}
@@ -372,7 +372,7 @@
transform_inplace_dispatch_fast(trait::image::quant::any,
Image<I>& ima, const Function_v2v<F>& f)
{
- level::impl::transform_inplace_fastest(ima, f);
+ data::impl::transform_inplace_fastest(ima, f);
}
template <typename I, typename F>
@@ -380,7 +380,7 @@
transform_inplace_dispatch_fast(trait::image::quant::low,
Image<I>& ima, const Function_v2v<F>& f)
{
- level::impl::transform_inplace_fastest_lowq(ima, f);
+ data::impl::transform_inplace_fastest_lowq(ima, f);
}
@@ -404,7 +404,7 @@
trait::image::value_access::any,
Image<I>& ima, const Function_v2v<F>& f)
{
- level::impl::transform_inplace_singleton(ima, f);
+ data::impl::transform_inplace_singleton(ima, f);
}
@@ -444,7 +444,7 @@
Image<I1>& ima, const Image<I2>& aux,
const Function_vv2v<F>& f)
{
- level::impl::generic::transform_inplace(ima, aux, f);
+ data::impl::generic::transform_inplace(ima, aux, f);
}
template <typename I1, typename I2, typename F>
@@ -456,7 +456,7 @@
Image<I1>& ima, const Image<I2>& aux,
const Function_vv2v<F>& f)
{
- level::impl::transform_inplace_fastest(ima, aux, f);
+ data::impl::transform_inplace_fastest(ima, aux, f);
}
template <typename I1, typename I2, typename F>
@@ -471,7 +471,7 @@
ima, aux, f);
}
- } // end of namespace mln::level::internal
+ } // end of namespace mln::data::internal
@@ -481,12 +481,12 @@
void
transform_inplace(Image<I>& ima, const Function_v2v<F>& f)
{
- trace::entering("level::transform_inplace");
+ trace::entering("data::transform_inplace");
internal::transform_inplace_tests(ima, f);
internal::transform_inplace_dispatch(ima, f);
- trace::exiting("level::transform_inplace");
+ trace::exiting("data::transform_inplace");
}
template <typename I1, typename I2, typename F>
@@ -494,18 +494,18 @@
transform_inplace(Image<I1>& ima, const Image<I2>& aux,
const Function_vv2v<F>& f)
{
- trace::entering("level::transform_inplace");
+ trace::entering("data::transform_inplace");
internal::transform_inplace_tests(ima, aux, f);
internal::transform_inplace_dispatch(ima, aux, f);
- trace::exiting("level::transform_inplace");
+ trace::exiting("data::transform_inplace");
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/fast_median.hh
--- mln/data/fast_median.hh (revision 3920)
+++ mln/data/fast_median.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef MLN_LEVEL_FAST_MEDIAN_HH
# define MLN_LEVEL_FAST_MEDIAN_HH
-/*! \file mln/level/fast_median.hh
+/*! \file mln/data/fast_median.hh
*
* \brief Fast Median filtering of an image.
*
@@ -51,7 +51,7 @@
namespace mln
{
- namespace level
+ namespace data
{
/*! Compute in \p output the median filter of image \p input by
@@ -159,7 +159,7 @@
}
}
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
// facade
@@ -174,7 +174,7 @@
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/compute.hh
--- mln/data/compute.hh (revision 3920)
+++ mln/data/compute.hh (working copy)
@@ -29,11 +29,11 @@
#ifndef MLN_LEVEL_COMPUTE_HH
# define MLN_LEVEL_COMPUTE_HH
-/// \file mln/level/compute.hh
+/// \file mln/data/compute.hh
///
/// Compute an accumulator onto image pixel values.
-# include <mln/level/update.hh>
+# include <mln/data/update.hh>
# include <mln/core/concept/meta_accumulator.hh>
@@ -41,7 +41,7 @@
namespace mln
{
- namespace level
+ namespace data
{
/// Compute an accumulator onto the pixel values of the image \p input.
@@ -50,7 +50,7 @@
/// \param[in] input The input image.
/// \return The accumulator result.
///
- /// It fully relies on level::update.
+ /// It fully relies on data::update.
///
template <typename A, typename I>
mln_result(A)
@@ -79,15 +79,15 @@
mln_result(A)
compute(const Accumulator<A>& a_, const Image<I>& input)
{
- trace::entering("level::compute");
+ trace::entering("data::compute");
A a = exact(a_);
- level::internal::update_tests(a, input);
+ data::internal::update_tests(a, input);
a.init();
- level::internal::update_dispatch(a, input);
+ data::internal::update_dispatch(a, input);
- trace::exiting("level::compute");
+ trace::exiting("data::compute");
return a;
}
@@ -99,12 +99,12 @@
typedef mln_accu_with(A, mln_value(I)) A_;
A_ a_ = accu::unmeta(exact(a), mln_value(I)());
- return level::compute(a_, input); // Call the previous version.
+ return data::compute(a_, input); // Call the previous version.
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/sort_psites.hh
--- mln/data/sort_psites.hh (revision 3920)
+++ mln/data/sort_psites.hh (working copy)
@@ -29,7 +29,7 @@
#ifndef MLN_LEVEL_SORT_PSITES_HH
# define MLN_LEVEL_SORT_PSITES_HH
-/// \file mln/level/sort_psites.hh
+/// \file mln/data/sort_psites.hh
/// \brief Sort_Psites the contents of an image into another one.
///
/// \todo Factor code + optimize.
@@ -46,7 +46,7 @@
namespace mln
{
- namespace level
+ namespace data
{
/*! Sort psites the image \p input through a function \p f to set
@@ -210,7 +210,7 @@
}
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
// Facades.
@@ -237,7 +237,7 @@
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/data/convert.hh
--- mln/data/convert.hh (revision 3920)
+++ mln/data/convert.hh (working copy)
@@ -29,7 +29,7 @@
#ifndef MLN_LEVEL_CONVERT_HH
# define MLN_LEVEL_CONVERT_HH
-/// \file mln/level/convert.hh
+/// \file mln/data/convert.hh
///
/// Convert the contents of an image into another one.
///
@@ -37,13 +37,13 @@
# include <mln/core/routine/duplicate.hh>
# include <mln/fun/v2v/convert.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
namespace mln
{
- namespace level
+ namespace data
{
/// Convert the image \p input by changing the value type.
@@ -71,7 +71,7 @@
(void) input;
}
- } // using namespace mln::level::internal
+ } // using namespace mln::data::internal
namespace impl
{
@@ -84,17 +84,17 @@
mln_ch_value(I, V)
convert(const V& v, const Image<I>& input)
{
- trace::entering("level::impl::generic::convert");
+ trace::entering("data::impl::generic::convert");
internal::convert_tests(v, input);
fun::v2v::convert<V> f;
- mln_ch_value(I, V) output = level::transform(input, f);
+ mln_ch_value(I, V) output = data::transform(input, f);
- trace::exiting("level::impl::generic::convert");
+ trace::exiting("data::impl::generic::convert");
return output;
}
- } // end of namespace mln::level::impl::generic
+ } // end of namespace mln::data::impl::generic
template <typename V, typename I>
@@ -102,17 +102,17 @@
mln_ch_value(I,V)
convert_identity(const V& v, const Image<I>& input)
{
- trace::entering("level::impl::convert_identity");
+ trace::entering("data::impl::convert_identity");
internal::convert_tests(v, input);
mln_concrete(I) output = duplicate(input);
- trace::exiting("level::impl::convert_identity");
+ trace::exiting("data::impl::convert_identity");
return output;
}
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
namespace internal
{
@@ -147,7 +147,7 @@
v, input);
}
- } // end of namespace mln::level::internal
+ } // end of namespace mln::data::internal
// Facade.
@@ -156,20 +156,20 @@
mln_ch_value(I, V)
convert(const V& v, const Image<I>& input)
{
- trace::entering("level::convert");
+ trace::entering("data::convert");
internal::convert_tests(v, input);
mln_ch_value(I, V) output = internal::convert_dispatch(v, input);
- trace::exiting("level::convert");
+ trace::exiting("data::convert");
return output;
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: mln/linear/sobel_2d.hh
--- mln/linear/sobel_2d.hh (revision 3927)
+++ mln/linear/sobel_2d.hh (working copy)
@@ -41,7 +41,7 @@
# include <mln/metal/int.hh>
# include <mln/arith/plus.hh>
-# include <mln/level/abs.hh>
+# include <mln/data/abs.hh>
# include <mln/fun/x2v/l1_norm.hh>
# include <mln/fun/vv2v/vec.hh>
# include <mln/linear/convolve_2x1d.hh>
@@ -134,7 +134,7 @@
J h = sobel_2d_h(input),
v = sobel_2d_v(input);
fun::vv2v::vec<mln_value(J)> f;
- mln_ch_convolve_grad(I, int) output = level::transform(h, v, f);
+ mln_ch_convolve_grad(I, int) output = data::transform(h, v, f);
trace::exiting("linear::sobel_2d");
return output;
@@ -151,7 +151,7 @@
typedef mln_ch_convolve_grad(I, int) G;
G grad = sobel_2d(input);
fun::x2v::l1_norm<mln_value(G)> f;
- mln_ch_convolve(I, int) output = level::transform(grad, f);
+ mln_ch_convolve(I, int) output = data::transform(grad, f);
trace::exiting("linear::sobel_2d");
return output;
Index: mln/linear/gaussian.hh
--- mln/linear/gaussian.hh (revision 3927)
+++ mln/linear/gaussian.hh (working copy)
@@ -49,7 +49,7 @@
# include <mln/geom/ninds.hh>
# include <mln/geom/nslis.hh>
# include <mln/data/paste.hh>
-# include <mln/level/stretch.hh>
+# include <mln/data/stretch.hh>
# include <mln/algebra/vec.hh>
@@ -557,7 +557,7 @@
work_img, coef, i);
// Convert work_img into result type
- data::paste(level::stretch(mln_value(I)(), work_img), out);
+ data::paste(data::stretch(mln_value(I)(), work_img), out);
}
template <class I, class F, class O>
@@ -581,7 +581,7 @@
work_img, coef, dir);
// Convert work_img into result type
- data::paste(level::stretch(mln_value(I)(), work_img), out);
+ data::paste(data::stretch(mln_value(I)(), work_img), out);
}
Index: mln/linear/gaussian/impl.hh
--- mln/linear/gaussian/impl.hh (revision 3927)
+++ mln/linear/gaussian/impl.hh (working copy)
@@ -49,7 +49,7 @@
# include <mln/geom/ninds.hh>
# include <mln/geom/nslis.hh>
# include <mln/data/paste.hh>
-# include <mln/level/stretch.hh>
+# include <mln/data/stretch.hh>
# include <mln/algebra/vec.hh>
# include <mln/linear/gaussian/internal/coefficients.hh>
@@ -364,7 +364,7 @@
work_img, coef, i);
// Convert work_img into result type
- data::paste(level::stretch(mln_value(I)(), work_img), out);
+ data::paste(data::stretch(mln_value(I)(), work_img), out);
}
template <class I, class F, class O>
@@ -388,7 +388,7 @@
work_img, coef, dir);
// Convert work_img into result type
- data::paste(level::stretch(mln_value(I)(), work_img), out);
+ data::paste(data::stretch(mln_value(I)(), work_img), out);
}
Index: mln/transform/hough.hh
--- mln/transform/hough.hh (revision 3927)
+++ mln/transform/hough.hh (working copy)
@@ -53,7 +53,7 @@
//FIXME: to be removed. For debug purpose.
-//#include <mln/level/convert.hh>
+//#include <mln/data/convert.hh>
//#include <mln/value/rgb8.hh>
//#include <mln/draw/line.hh>
//#include <mln/literal/colors.hh>
@@ -189,7 +189,7 @@
//
// std::cout << b << " - " << e << std::endl;
//
-// image2d<value::rgb8> toto = level::convert(value::rgb8(), input);
+// image2d<value::rgb8> toto = data::convert(value::rgb8(), input);
// draw::line(toto, b, e, literal::red);
// io::ppm::save(toto, "tmp_input.ppm");
// }
Index: mln/estim/sum.hh
--- mln/estim/sum.hh (revision 3927)
+++ mln/estim/sum.hh (working copy)
@@ -36,7 +36,7 @@
/// \todo Sum works on level so move into mln/level; otherwise on pix then ambiguous.
# include <mln/accu/sum.hh>
-# include <mln/level/compute.hh>
+# include <mln/data/compute.hh>
namespace mln
@@ -70,7 +70,7 @@
mln_sum(mln_value(I)) sum(const Image<I>& input)
{
mln_precondition(exact(input).is_valid());
- return level::compute(accu::meta::sum(), input);
+ return data::compute(accu::meta::sum(), input);
}
template <typename I, typename S>
@@ -79,7 +79,7 @@
{
mln_precondition(exact(input).is_valid());
accu::sum<mln_value(I), S> a;
- result = level::compute(a, input);
+ result = data::compute(a, input);
}
# endif // ! MLN_INCLUDE_ONLY
Index: mln/estim/min_max.hh
--- mln/estim/min_max.hh (revision 3927)
+++ mln/estim/min_max.hh (working copy)
@@ -36,7 +36,7 @@
/// \todo Overload while returning an std::pair.
# include <mln/accu/min_max.hh>
-# include <mln/level/compute.hh>
+# include <mln/data/compute.hh>
namespace mln
@@ -65,7 +65,7 @@
{
mln_precondition(exact(input).is_valid());
typedef mln_value(I) V;
- std::pair<V, V> mm = level::compute(accu::meta::min_max(), input);
+ std::pair<V, V> mm = data::compute(accu::meta::min_max(), input);
min = mm.first;
max = mm.second;
}
Index: mln/estim/mean.hh
--- mln/estim/mean.hh (revision 3927)
+++ mln/estim/mean.hh (working copy)
@@ -34,7 +34,7 @@
/// Compute the mean pixel value.
# include <mln/accu/mean.hh>
-# include <mln/level/compute.hh>
+# include <mln/data/compute.hh>
namespace mln
@@ -71,7 +71,7 @@
mln_sum(mln_value(I)) mean(const Image<I>& input)
{
mln_precondition(exact(input).is_valid());
- return level::compute(accu::meta::mean(), input);
+ return data::compute(accu::meta::mean(), input);
}
template <typename S, typename I, typename M>
@@ -80,7 +80,7 @@
{
mln_precondition(exact(input).is_valid());
accu::mean<mln_value(I), S, M> a;
- result = level::compute(a, input);
+ result = data::compute(a, input);
}
# endif // ! MLN_INCLUDE_ONLY
Index: mln/essential/routine.hh
--- mln/essential/routine.hh (revision 3927)
+++ mln/essential/routine.hh (working copy)
@@ -50,7 +50,7 @@
# include <mln/histo/essential.hh>
# include <mln/io/essential.hh>
# include <mln/labeling/essential.hh>
-# include <mln/level/essential.hh>
+# include <mln/data/essential.hh>
# include <mln/linear/essential.hh>
# include <mln/literal/essential.hh>
# include <mln/logical/essential.hh>
Index: mln/binarization/binarization.hh
--- mln/binarization/binarization.hh (revision 3927)
+++ mln/binarization/binarization.hh (working copy)
@@ -34,7 +34,7 @@
/// Threshold the contents of an image into another binary one.
# include <mln/core/concept/function.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
namespace mln
@@ -69,7 +69,7 @@
trace::entering("binarization::impl::binarization_");
mln_concrete_ch_value(I, bool) output(input.domain());
- output = level::transform(input, fun);
+ output = data::transform(input, fun);
trace::exiting("binarization::impl::binarization_");
return output;
Index: mln/morpho/watershed/superpose.hh
--- mln/morpho/watershed/superpose.hh (revision 3927)
+++ mln/morpho/watershed/superpose.hh (working copy)
@@ -35,7 +35,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/image/dmorph/image_if.hh>
-# include <mln/level/convert.hh>
+# include <mln/data/convert.hh>
# include <mln/data/fill.hh>
# include <mln/value/rgb8.hh>
# include <mln/literal/colors.hh>
@@ -96,7 +96,7 @@
mln_precondition(input.is_valid());
mln_precondition(ws_ima.is_valid());
- mln_ch_value(I,value::rgb8) output = level::convert(value::rgb8(), input);
+ mln_ch_value(I,value::rgb8) output = data::convert(value::rgb8(), input);
data::fill((output | (pw::value(ws_ima) == pw::cst(literal::zero))).rw(),
wsl_color);
Index: mln/morpho/tree/compute_parent.hh
--- mln/morpho/tree/compute_parent.hh (revision 3927)
+++ mln/morpho/tree/compute_parent.hh (working copy)
@@ -37,7 +37,7 @@
///
/// \todo Augment and improve documentation.
///
-/// \todo Change level::sort so that the explanations below are valid
+/// \todo Change data::sort so that the explanations below are valid
/// whatever the choice 'increasing or decreasing'.
# include <mln/core/concept/image.hh>
Index: mln/morpho/tree/max.hh
--- mln/morpho/tree/max.hh (revision 3927)
+++ mln/morpho/tree/max.hh (working copy)
@@ -33,7 +33,7 @@
/// Compute a canonized (parenthood) max-tree from an image.
# include <mln/morpho/tree/compute_parent.hh>
-# include <mln/level/sort_psites.hh>
+# include <mln/data/sort_psites.hh>
namespace mln
@@ -72,7 +72,7 @@
mln_precondition(nbh.is_valid());
// For the max-tree, childhood maps "increasing level":
- p_array<mln_psite(I)> s = level::sort_psites_increasing(f);
+ p_array<mln_psite(I)> s = data::sort_psites_increasing(f);
mln_ch_value(I, mln_psite(I)) output = compute_parent(f, nbh, s);
trace::exiting("morpho::tree::max");
Index: mln/morpho/approx/dilation.hh
--- mln/morpho/approx/dilation.hh (revision 3927)
+++ mln/morpho/approx/dilation.hh (working copy)
@@ -35,7 +35,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/routine/duplicate.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
# include <mln/transform/distance_front.hh>
# include <mln/pw/all.hh>
Index: mln/morpho/reconstruction/by_erosion/union_find.hh
--- mln/morpho/reconstruction/by_erosion/union_find.hh (revision 3927)
+++ mln/morpho/reconstruction/by_erosion/union_find.hh (working copy)
@@ -33,8 +33,8 @@
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
# include <mln/data/fill.hh>
-# include <mln/level/compare.hh>
-# include <mln/level/sort_psites.hh>
+# include <mln/data/compare.hh>
+# include <mln/data/sort_psites.hh>
namespace mln
@@ -144,7 +144,7 @@
initialize(deja_vu, f);
data::fill(deja_vu, false);
- s = level::sort_psites_increasing(g);
+ s = data::sort_psites_increasing(g);
}
// First pass.
Index: mln/morpho/reconstruction/by_dilation/union_find.hh
--- mln/morpho/reconstruction/by_dilation/union_find.hh (revision 3927)
+++ mln/morpho/reconstruction/by_dilation/union_find.hh (working copy)
@@ -33,8 +33,8 @@
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
# include <mln/data/fill.hh>
-# include <mln/level/compare.hh>
-# include <mln/level/sort_psites.hh>
+# include <mln/data/compare.hh>
+# include <mln/data/sort_psites.hh>
namespace mln
@@ -145,7 +145,7 @@
initialize(deja_vu, f);
data::fill(deja_vu, false);
- s = level::sort_psites_decreasing(g);
+ s = data::sort_psites_decreasing(g);
}
// First pass.
Index: mln/morpho/min.hh
--- mln/morpho/min.hh (revision 3927)
+++ mln/morpho/min.hh (working copy)
@@ -35,7 +35,7 @@
* (logical and or arithmetical min) of an image.
*/
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
# include <mln/logical/and.hh>
# include <mln/arith/min.hh>
Index: mln/morpho/plus.hh
--- mln/morpho/plus.hh (revision 3927)
+++ mln/morpho/plus.hh (working copy)
@@ -35,7 +35,7 @@
* (logical or or arithmetical plus) of an image.
*/
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
# include <mln/logical/or.hh>
# include <mln/arith/plus.hh>
Index: mln/morpho/minus.hh
--- mln/morpho/minus.hh (revision 3927)
+++ mln/morpho/minus.hh (working copy)
@@ -35,7 +35,7 @@
* not" or arithmetical min) of an image.
*/
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
# include <mln/logical/and_not.hh>
# include <mln/arith/minus.hh>
Index: mln/morpho/complementation.hh
--- mln/morpho/complementation.hh (revision 3927)
+++ mln/morpho/complementation.hh (working copy)
@@ -35,7 +35,7 @@
* (logical or arithmetical) of an image.
*/
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
# include <mln/logical/not.hh>
# include <mln/arith/revert.hh>
Index: mln/morpho/Rd.hh
--- mln/morpho/Rd.hh (revision 3927)
+++ mln/morpho/Rd.hh (working copy)
@@ -41,7 +41,7 @@
# include <mln/core/concept/neighborhood.hh>
# include <mln/trait/value_.hh>
# include <mln/data/fill.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
# include <mln/util/ord.hh>
Index: mln/morpho/includes.hh
--- mln/morpho/includes.hh (revision 3927)
+++ mln/morpho/includes.hh (working copy)
@@ -54,7 +54,7 @@
# include <mln/fun/v2v/saturate.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
# include <mln/data/fill.hh>
# include <mln/test/positive.hh>
Index: mln/morpho/leveling_filter.hh
--- mln/morpho/leveling_filter.hh (revision 3927)
+++ mln/morpho/leveling_filter.hh (working copy)
@@ -39,8 +39,8 @@
# include <mln/trait/accumulators.hh>
-# include <mln/level/sort_psites.hh>
-# include <mln/level/sort_offsets.hh>
+# include <mln/data/sort_psites.hh>
+# include <mln/data/sort_offsets.hh>
# include <mln/canvas/morpho/attribute_filter.hh>
Index: mln/morpho/algebraic_filter.hh
--- mln/morpho/algebraic_filter.hh (revision 3927)
+++ mln/morpho/algebraic_filter.hh (working copy)
@@ -39,8 +39,8 @@
# include <mln/trait/accumulators.hh>
-# include <mln/level/sort_psites.hh>
-# include <mln/level/sort_offsets.hh>
+# include <mln/data/sort_psites.hh>
+# include <mln/data/sort_offsets.hh>
# include <mln/canvas/morpho/attribute_filter.hh>
Index: mln/logical/and.hh
--- mln/logical/and.hh (revision 3927)
+++ mln/logical/and.hh (working copy)
@@ -83,7 +83,7 @@
internal::tests(lhs, rhs);
mln_fun_vv2v(land, L, R) f;
- mln_ch_fun_vv2v(land, L, R) output = level::transform(lhs, rhs, f);
+ mln_ch_fun_vv2v(land, L, R) output = data::transform(lhs, rhs, f);
trace::exiting("logical::and_");
return output;
@@ -101,7 +101,7 @@
internal::tests(lhs, rhs);
mln_fun_vv2v(land, L, R) f;
- level::transform_inplace(lhs, rhs, f);
+ data::transform_inplace(lhs, rhs, f);
trace::exiting("logical::and_inplace");
}
Index: mln/logical/and_not.hh
--- mln/logical/and_not.hh (revision 3927)
+++ mln/logical/and_not.hh (working copy)
@@ -83,7 +83,7 @@
internal::tests(lhs, rhs);
mln_fun_vv2v(land_not, L, R) f;
- mln_ch_fun_vv2v(land_not, L, R) output = level::transform(lhs, rhs, f);
+ mln_ch_fun_vv2v(land_not, L, R) output = data::transform(lhs, rhs, f);
trace::exiting("logical::and_not");
return output;
@@ -101,7 +101,7 @@
internal::tests(lhs, rhs);
mln_fun_vv2v(land_not, L, R) f;
- level::transform_inplace(lhs, rhs, f);
+ data::transform_inplace(lhs, rhs, f);
trace::exiting("logical::and_not_inplace");
}
Index: mln/logical/includes.hh
--- mln/logical/includes.hh (revision 3927)
+++ mln/logical/includes.hh (working copy)
@@ -32,8 +32,8 @@
# include <mln/core/concept/image.hh>
-# include <mln/level/transform.hh>
-# include <mln/level/transform_inplace.hh>
+# include <mln/data/transform.hh>
+# include <mln/data/transform_inplace.hh>
# include <mln/fun/vv2v/macros.hh>
Index: mln/logical/xor.hh
--- mln/logical/xor.hh (revision 3927)
+++ mln/logical/xor.hh (working copy)
@@ -83,7 +83,7 @@
internal::tests(lhs, rhs);
mln_fun_vv2v(lxor, L, R) f;
- mln_ch_fun_vv2v(lxor, L, R) output = level::transform(lhs, rhs, f);
+ mln_ch_fun_vv2v(lxor, L, R) output = data::transform(lhs, rhs, f);
trace::exiting("logical::xor_");
return output;
@@ -101,7 +101,7 @@
internal::tests(lhs, rhs);
mln_fun_vv2v(lxor, L, R) f;
- level::transform_inplace(lhs, rhs, f);
+ data::transform_inplace(lhs, rhs, f);
trace::exiting("logical::xor_inplace");
}
Index: mln/logical/not.hh
--- mln/logical/not.hh (revision 3927)
+++ mln/logical/not.hh (working copy)
@@ -80,7 +80,7 @@
mln_precondition(exact(input).is_valid());
fun::v2b::lnot<mln_value(I)> f;
- mln_concrete(I) output = level::transform(input, f);
+ mln_concrete(I) output = data::transform(input, f);
trace::exiting("logical::not_");
return output;
@@ -95,7 +95,7 @@
mln_precondition(exact(input).is_valid());
fun::v2b::lnot<mln_value(I)> f;
- level::transform_inplace(input, f);
+ data::transform_inplace(input, f);
trace::exiting("logical::not_inplace");
}
Index: mln/logical/or.hh
--- mln/logical/or.hh (revision 3927)
+++ mln/logical/or.hh (working copy)
@@ -83,7 +83,7 @@
internal::tests(lhs, rhs);
mln_fun_vv2v(lor, L, R) f;
- mln_ch_fun_vv2v(lor, L, R) output = level::transform(lhs, rhs, f);
+ mln_ch_fun_vv2v(lor, L, R) output = data::transform(lhs, rhs, f);
trace::exiting("logical::or_");
return output;
@@ -101,7 +101,7 @@
internal::tests(lhs, rhs);
mln_fun_vv2v(lor, L, R) f;
- level::transform_inplace(lhs, rhs, f);
+ data::transform_inplace(lhs, rhs, f);
trace::exiting("logical::or_inplace");
}
Index: mln/canvas/morpho/attribute_filter.hh
--- mln/canvas/morpho/attribute_filter.hh (revision 3927)
+++ mln/canvas/morpho/attribute_filter.hh (working copy)
@@ -38,14 +38,14 @@
# include <mln/core/concept/neighborhood.hh>
# include <mln/core/concept/accumulator.hh>
-# include <mln/level/sort_offsets.hh>
+# include <mln/data/sort_offsets.hh>
# include <mln/trait/accumulators.hh>
# include <mln/util/pix.hh>
# include <mln/border/get.hh>
# include <mln/data/fill.hh>
# include <mln/extension/adjust_fill.hh>
-# include <mln/level/sort_psites.hh>
+# include <mln/data/sort_psites.hh>
namespace mln
@@ -406,8 +406,8 @@
bool increasing)
{
p_array<mln_psite(I)> s = increasing ?
- level::sort_psites_increasing(input) :
- level::sort_psites_decreasing(input);
+ data::sort_psites_increasing(input) :
+ data::sort_psites_decreasing(input);
return impl::generic::attribute_filter(input, nbh, s, a, lambda);
}
@@ -429,8 +429,8 @@
util::array<unsigned> s =
increasing ?
- level::sort_offsets_increasing(input) :
- level::sort_offsets_decreasing(input);
+ data::sort_offsets_increasing(input) :
+ data::sort_offsets_decreasing(input);
return impl::attribute_filter_fastest(input, nbh, s, a, lambda);
}
Index: mln/canvas/labeling.hh
--- mln/canvas/labeling.hh (revision 3927)
+++ mln/canvas/labeling.hh (working copy)
@@ -42,8 +42,8 @@
# include <mln/convert/to_upper_window.hh>
# include <mln/extension/adjust_fill.hh>
-# include <mln/level/sort_psites.hh>
-# include <mln/level/sort_offsets.hh>
+# include <mln/data/sort_psites.hh>
+# include <mln/data/sort_offsets.hh>
namespace mln
@@ -524,8 +524,8 @@
{
p_array<mln_psite(I)> s =
increasing ?
- level::sort_psites_increasing(input) :
- level::sort_psites_decreasing(input);
+ data::sort_psites_increasing(input) :
+ data::sort_psites_decreasing(input);
return impl::generic::labeling(input, nbh, nlabels, s,
functor);
}
@@ -539,8 +539,8 @@
{
util::array<unsigned> s =
increasing ?
- level::sort_offsets_increasing(input) :
- level::sort_offsets_decreasing(input);
+ data::sort_offsets_increasing(input) :
+ data::sort_offsets_decreasing(input);
return impl::labeling_sorted_fastest(input, nbh, nlabels, s,
functor);
}
Index: mln/labeling/colorize.hh
--- mln/labeling/colorize.hh (revision 3927)
+++ mln/labeling/colorize.hh (working copy)
@@ -37,8 +37,8 @@
# include <mln/fun/i2v/array.hh>
# include <mln/value/rgb8.hh>
# include <mln/literal/black.hh>
-# include <mln/level/transform.hh>
-# include <mln/level/compute.hh>
+# include <mln/data/transform.hh>
+# include <mln/data/compute.hh>
# include <mln/accu/max.hh>
@@ -138,7 +138,7 @@
f(i) = internal::random_color(value);
}
mln_assertion(f.size() >= (label_count));
- mln_ch_value(L, V) output = level::transform(input, f);
+ mln_ch_value(L, V) output = data::transform(input, f);
trace::exiting("labeling::colorize");
return output;
@@ -154,7 +154,7 @@
mln_precondition(exact(input).is_valid());
accu::max<mln_value(L)> accu;
- mln_value(L) nlabels = level::compute(accu, input);
+ mln_value(L) nlabels = data::compute(accu, input);
mln_ch_value(L,V) output = colorize(value, input, nlabels);
Index: mln/labeling/regional_minima.hh
--- mln/labeling/regional_minima.hh (revision 3927)
+++ mln/labeling/regional_minima.hh (working copy)
@@ -37,7 +37,7 @@
# include <mln/core/concept/neighborhood.hh>
# include <mln/canvas/labeling.hh>
# include <mln/data/fill.hh>
-# include <mln/level/sort_psites.hh>
+# include <mln/data/sort_psites.hh>
namespace mln
Index: mln/labeling/regional_maxima.hh
--- mln/labeling/regional_maxima.hh (revision 3927)
+++ mln/labeling/regional_maxima.hh (working copy)
@@ -37,7 +37,7 @@
# include <mln/core/concept/neighborhood.hh>
# include <mln/canvas/labeling.hh>
# include <mln/data/fill.hh>
-# include <mln/level/sort_psites.hh>
+# include <mln/data/sort_psites.hh>
namespace mln
Index: mln/labeling/mean_values.hh
--- mln/labeling/mean_values.hh (revision 3927)
+++ mln/labeling/mean_values.hh (working copy)
@@ -42,7 +42,7 @@
# include <mln/accu/mean.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/labeling/compute.hh>
@@ -119,7 +119,7 @@
convert::from_to(m_3f, m);
m[0] = 150u; //FIXME: handle label 0 correctly.
- mln_concrete(I) output = level::transform(lbl, m);
+ mln_concrete(I) output = data::transform(lbl, m);
trace::exiting("mln::labeling::impl::generic::mean_values");
return output;
@@ -149,7 +149,7 @@
convert::from_to(m_3f, m);
m[0] = literal::yellow; //FIXME: handle label 0 correctly.
- mln_concrete(I) output = level::transform(lbl,
+ mln_concrete(I) output = data::transform(lbl,
convert::to< fun::i2v::array<mln_value(I)> >(m));
Index: mln/labeling/blobs.hh
--- mln/labeling/blobs.hh (revision 3927)
+++ mln/labeling/blobs.hh (working copy)
@@ -36,7 +36,7 @@
///
/// \todo Handle abort in a nice way...
///
-/// \todo Add a 2nd version precising the 'level' to label.
+/// \todo Add a 2nd version precising the 'value' to label.
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
Index: mln/labeling/value.spe.hh
--- mln/labeling/value.spe.hh (revision 3920)
+++ mln/labeling/value.spe.hh (working copy)
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -26,18 +26,18 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_LABELING_LEVEL_SPE_HH
-# define MLN_LABELING_LEVEL_SPE_HH
+#ifndef MLN_LABELING_VALUE_SPE_HH
+# define MLN_LABELING_VALUE_SPE_HH
-/// \file mln/labeling/level.spe.hh
+/// \file mln/labeling/value.spe.hh
///
-/// Specialization for mln::labeling::level.
+/// Specialization for mln::labeling::value.
///
/// \todo Re-activate the fastest version in dispatch...
-# ifndef MLN_LABELING_LEVEL_HH
+# ifndef MLN_LABELING_VALUE_HH
# error "Forbidden inclusion of *.spe.hh"
-# endif // ! MLN_LABELING_LEVEL_HH
+# endif // ! MLN_LABELING_VALUE_HH
# include <mln/extension/adjust_fill.hh>
# include <mln/value/other.hh>
@@ -51,17 +51,17 @@
{
/*! Connected component labeling of the image objects at a given
- * level.
+ * value.
*
* \param[in] input The input image.
- * \param[in] val The level to consider for the labeling.
- * \param[in] nbh The connexity of the level components.
+ * \param[in] val The value to consider for the labeling.
+ * \param[in] nbh The connexity of the value components.
* \param[out] nlabels The number of labels.
* \return The label image.
*/
template <typename I, typename N, typename L>
mln_ch_value(I, L)
- level(const Image<I>& input, const mln_value(I)& val,
+ value(const Image<I>& input, const mln_value(I)& val,
const Neighborhood<N>& nbh, L& nlabels);
@@ -77,7 +77,7 @@
template <typename I, typename N, typename L>
mln_ch_value(I, L)
- level(const Image<I>& input, const mln_value(I)& val,
+ value(const Image<I>& input, const mln_value(I)& val,
const Neighborhood<N>& nbh,
L& nlabels);
@@ -88,7 +88,7 @@
// Fastest functor.
template <typename I_, typename N_, typename L_>
- struct level_fastest_functor
+ struct value_fastest_functor
{
// requirements from mln::canvas::labeling:
@@ -114,7 +114,7 @@
const mln_value(I_)& val;
- level_fastest_functor(const I_& input, const mln_value(I_)& val,
+ value_fastest_functor(const I_& input, const mln_value(I_)& val,
const N_& nbh)
: input(input),
nbh(nbh),
@@ -128,24 +128,24 @@
template <typename I, typename N, typename L>
mln_ch_value(I, L)
- level_fastest(const Image<I>& input, const mln_value(I)& val,
+ value_fastest(const Image<I>& input, const mln_value(I)& val,
const Neighborhood<N>& nbh,
L& nlabels)
{
- trace::entering("labeling::impl::level_fastest");
+ trace::entering("labeling::impl::value_fastest");
// FIXME: HERE
extension::adjust_fill(input, nbh.delta(), value::other(val));
- typedef level_fastest_functor<I,N,L> F;
+ typedef value_fastest_functor<I,N,L> F;
F f(input, val, nbh);
canvas::labeling_fastest<F> run(f);
nlabels = run.nlabels;
// FIXME: Handle run.status
- trace::exiting("labeling::impl::level_fastest");
+ trace::exiting("labeling::impl::value_fastest");
return run.output;
}
@@ -160,4 +160,4 @@
} // end of namespace mln
-#endif // ! MLN_LABELING_LEVEL_SPE_HH
+#endif // ! MLN_LABELING_VALUE_SPE_HH
Index: mln/labeling/relabel.hh
--- mln/labeling/relabel.hh (revision 3927)
+++ mln/labeling/relabel.hh (working copy)
@@ -38,8 +38,8 @@
# include <mln/make/relabelfun.hh>
-# include <mln/level/transform.hh>
-# include <mln/level/transform_inplace.hh>
+# include <mln/data/transform.hh>
+# include <mln/data/transform_inplace.hh>
# include <mln/value/label.hh>
@@ -188,7 +188,7 @@
internal::relabel_tests(label, nlabels, fv2v);
- mln_concrete(I) output = level::transform(label, fv2v);
+ mln_concrete(I) output = data::transform(label, fv2v);
trace::exiting("labeling::relabel");
return output;
@@ -228,7 +228,7 @@
internal::relabel_inplace_tests(label, nlabels, fv2v);
- level::transform_inplace(label, fv2v);
+ data::transform_inplace(label, fv2v);
trace::exiting("labeling::relabel_inplace");
}
Index: mln/labeling/all.hh
--- mln/labeling/all.hh (revision 3927)
+++ mln/labeling/all.hh (working copy)
@@ -60,11 +60,11 @@
# include <mln/labeling/fill_holes.hh>
# include <mln/labeling/flat_zones.hh>
# include <mln/labeling/foreground.hh>
-# include <mln/labeling/level.hh>
# include <mln/labeling/n_max.hh>
# include <mln/labeling/pack.hh>
# include <mln/labeling/regional_maxima.hh>
# include <mln/labeling/regional_minima.hh>
+# include <mln/labeling/value.hh>
#endif // ! MLN_LABELING_ALL_HH
Index: mln/labeling/wrap.hh
--- mln/labeling/wrap.hh (revision 3927)
+++ mln/labeling/wrap.hh (working copy)
@@ -35,7 +35,7 @@
/// Lmax] (using modulus).
# include <mln/core/concept/image.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/fun/v2v/wrap.hh>
# include <mln/metal/converts_to.hh>
# include <mln/metal/is_a.hh>
@@ -82,7 +82,7 @@
mln_precondition(exact(input).is_valid());
(void) value_type;
- mln_ch_value(I,V) output = level::transform(input, fun::v2v::wrap<V>());
+ mln_ch_value(I,V) output = data::transform(input, fun::v2v::wrap<V>());
trace::exiting("labeling::wrap");
return output;
Index: mln/labeling/foreground.hh
--- mln/labeling/foreground.hh (revision 3927)
+++ mln/labeling/foreground.hh (working copy)
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -34,7 +34,7 @@
/// Connected component labeling of the object part in a binary
/// image.
-# include <mln/labeling/level.hh>
+# include <mln/labeling/value.hh>
namespace mln
@@ -53,10 +53,10 @@
*
* \pre The input image has to be binary (checked at compile-time).
*
- * This routine actually calls mln::labeling::level with the level
+ * This routine actually calls mln::labeling::value with the
* value set to \c true.
*
- * \see mln::labeling::level
+ * \see mln::labeling::value
*/
template <typename I, typename N, typename L>
mln_ch_value(I, L)
@@ -79,7 +79,7 @@
mln_precondition(exact(input).is_valid());
mln_precondition(exact(nbh).is_valid());
- mln_ch_value(I, L) output = labeling::level(input, true, nbh, nlabels);
+ mln_ch_value(I, L) output = labeling::value(input, true, nbh, nlabels);
trace::exiting("labeling::foreground");
return output;
Index: mln/labeling/value.hh
--- mln/labeling/value.hh (revision 3920)
+++ mln/labeling/value.hh (working copy)
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -26,13 +26,12 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_LABELING_LEVEL_HH
-# define MLN_LABELING_LEVEL_HH
+#ifndef MLN_LABELING_VALUE_HH
+# define MLN_LABELING_VALUE_HH
-/// \file mln/labeling/level.hh
+/// \file mln/labeling/value.hh
///
-/// Connected component labeling of the image objects at a given
-/// level.
+/// Connected component labeling of image sites at a given value.
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
@@ -47,18 +46,18 @@
namespace labeling
{
- /*! Connected component labeling of the image objects at a given
- * level.
- *
- * \param[in] input The input image.
- * \param[in] val The level to consider for the labeling.
- * \param[in] nbh The connexity of the level components.
- * \param[out] nlabels The number of labels.
- * \return The label image.
- */
+ /// \brief Connected component labeling of the image sites at a given
+ /// value.
+ ///
+ /// \param[in] input The input image.
+ /// \param[in] val The value to consider.
+ /// \param[in] nbh The connectivity of components.
+ /// \param[out] nlabels The number of labels.
+ /// \return The label image.
+ //
template <typename I, typename N, typename L>
mln_ch_value(I, L)
- level(const Image<I>& input, const mln_value(I)& val,
+ value(const Image<I>& input, const mln_value(I)& val,
const Neighborhood<N>& nbh, L& nlabels);
@@ -72,7 +71,7 @@
template <typename I, typename N, typename L>
void
- level_tests(const Image<I>& input, const mln_value(I)& val, const Neighborhood<N>& nbh,
+ value_tests(const Image<I>& input, const mln_value(I)& val, const Neighborhood<N>& nbh,
L& nlabels)
{
mln_precondition(exact(input).is_valid());
@@ -94,7 +93,7 @@
// Generic functor.
template <typename I>
- struct level_functor
+ struct value_functor
{
typedef mln_psite(I) P;
@@ -127,7 +126,7 @@
// end of Requirements.
- level_functor(const Image<I>& input_, const mln_value(I)& val)
+ value_functor(const Image<I>& input_, const mln_value(I)& val)
: input(exact(input_)),
val(val)
{
@@ -143,18 +142,18 @@
template <typename I, typename N, typename L>
mln_ch_value(I, L)
- level(const Image<I>& input, const mln_value(I)& val, const Neighborhood<N>& nbh,
+ value(const Image<I>& input, const mln_value(I)& val, const Neighborhood<N>& nbh,
L& nlabels)
{
- trace::entering("labeling::level");
+ trace::entering("labeling::value");
- internal::level_tests(input, val, nbh, nlabels);
+ internal::value_tests(input, val, nbh, nlabels);
mln_ch_value(I, L) output;
- impl::level_functor<I> f(input, val);
+ impl::value_functor<I> f(input, val);
output = canvas::labeling_video(input, nbh, nlabels, f);
- trace::exiting("labeling::level");
+ trace::exiting("labeling::value");
return output;
}
@@ -165,4 +164,4 @@
} // end of namespace mln
-#endif // ! MLN_LABELING_LEVEL_HH
+#endif // ! MLN_LABELING_VALUE_HH
Index: mln/labeling/pack.hh
--- mln/labeling/pack.hh (revision 3927)
+++ mln/labeling/pack.hh (working copy)
@@ -38,8 +38,8 @@
# include <mln/make/relabelfun.hh>
-# include <mln/level/compute.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/compute.hh>
+# include <mln/data/transform.hh>
# include <mln/accu/label_used.hh>
@@ -106,11 +106,11 @@
internal::pack_tests(label, new_nlabels);
fun::i2v::array<bool>
- fv2b = level::compute(accu::meta::label_used(), label);
+ fv2b = data::compute(accu::meta::label_used(), label);
mln_value(I) tmp_nlabels = fv2b.size() - 1;
mln_concrete(I)
- output = level::transform(label,
+ output = data::transform(label,
make::relabelfun(fv2b,
tmp_nlabels,
new_nlabels));
@@ -130,10 +130,10 @@
internal::pack_tests(label, new_nlabels);
fun::i2v::array<bool>
- fv2b = level::compute(accu::meta::label_used(), label);
+ fv2b = data::compute(accu::meta::label_used(), label);
mln_value(I) tmp_nlabels = fv2b.size() - 1;
- exact(label) = level::transform(label,
+ exact(label) = data::transform(label,
make::relabelfun(fv2b,
tmp_nlabels,
new_nlabels));
Index: mln/labeling/background.hh
--- mln/labeling/background.hh (revision 3927)
+++ mln/labeling/background.hh (working copy)
@@ -34,7 +34,7 @@
/// Connected component labeling of the background in a binary
/// image.
-# include <mln/labeling/level.hh>
+# include <mln/labeling/value.hh>
namespace mln
@@ -53,10 +53,10 @@
*
* \pre The input image has to be binary (checked at compile-time).
*
- * This routine actually calls mln::labeling::level with the level
+ * This routine actually calls mln::labeling::value with the
* value set to \c false.
*
- * \see mln::labeling::level
+ * \see mln::labeling::value
*/
template <typename I, typename N, typename L>
mln_ch_value(I, L)
@@ -79,7 +79,7 @@
mln_precondition(exact(input).is_valid());
mln_precondition(exact(nbh).is_valid());
- mln_ch_value(I, L) output = labeling::level(input, false, nbh, nlabels);
+ mln_ch_value(I, L) output = labeling::value(input, false, nbh, nlabels);
trace::exiting("labeling::background");
return output;
Index: mln/util/tree_to_image.hh
--- mln/util/tree_to_image.hh (revision 3927)
+++ mln/util/tree_to_image.hh (working copy)
@@ -43,7 +43,7 @@
namespace mln
{
- namespace level
+ namespace data
{
template <typename I, typename D>
void fill(Image<I>& ima, const D& data);
Index: tools/seed2tiling.cc
--- tools/seed2tiling.cc (revision 3927)
+++ tools/seed2tiling.cc (working copy)
@@ -36,7 +36,7 @@
# include <mln/core/image/dmorph/sub_image.hh>
# include <mln/core/alias/neighb2d.hh>
# include <mln/value/int_u8.hh>
-# include <mln/level/stretch.hh>
+# include <mln/data/stretch.hh>
# include <mln/border/fill.hh>
# include <mln/io/pbm/load.hh>
# include <mln/io/pgm/save.hh>
@@ -80,7 +80,7 @@
image2d<unsigned> inte = geom::seeds2tiling(lab, c4());
border::fill(inte, 0);
- image2d<int_u8> inte2 = level::stretch(int_u8(), inte);
+ image2d<int_u8> inte2 = data::stretch(int_u8(), inte);
io::pgm::save(inte2, "ima1.pgm");
std::cout << "ima1 generate with seeds2tiling"
@@ -88,7 +88,7 @@
inte = geom::seeds2tiling_roundness(lab, w_win, max, c4());
border::fill(inte, 0);
- inte2 = level::stretch(int_u8(), inte);
+ inte2 = data::stretch(int_u8(), inte);
io::pgm::save(inte2, "ima2.pgm");
std::cout << "ima2 generate with seeds2tiling_roundness"
Index: tests/topo/skeleton/crest.cc
--- tests/topo/skeleton/crest.cc (revision 3927)
+++ tests/topo/skeleton/crest.cc (working copy)
@@ -32,7 +32,7 @@
# include <mln/core/alias/neighb2d.hh>
# include <mln/core/image/image2d.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
# include <mln/logical/not.hh>
Index: tests/debug/iota.cc
--- tests/debug/iota.cc (revision 3927)
+++ tests/debug/iota.cc (working copy)
@@ -35,7 +35,7 @@
#include <mln/value/int_u8.hh>
#include <mln/debug/iota.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
{
Index: tests/world/inter_pixel/compute.cc
--- tests/world/inter_pixel/compute.cc (revision 3927)
+++ tests/world/inter_pixel/compute.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/core/var.hh>
#include <mln/core/image/image2d.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/world/inter_pixel/immerse.hh>
#include <mln/world/inter_pixel/compute.hh>
Index: tests/world/inter_pixel/immerse.cc
--- tests/world/inter_pixel/immerse.cc (revision 3927)
+++ tests/world/inter_pixel/immerse.cc (working copy)
@@ -31,7 +31,7 @@
#include <mln/core/var.hh>
#include <mln/core/image/image2d.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/world/inter_pixel/immerse.hh>
Index: tests/world/inter_pixel/dim2/make_edge_image.cc
--- tests/world/inter_pixel/dim2/make_edge_image.cc (revision 3927)
+++ tests/world/inter_pixel/dim2/make_edge_image.cc (working copy)
@@ -35,7 +35,7 @@
#include <mln/value/int_u8.hh>
#include <mln/make/image.hh>
#include <mln/math/abs.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
namespace mln
Index: tests/world/inter_pixel/display_edge.cc
--- tests/world/inter_pixel/display_edge.cc (revision 3927)
+++ tests/world/inter_pixel/display_edge.cc (working copy)
@@ -32,7 +32,7 @@
#include <mln/core/var.hh>
#include <mln/core/image/image2d.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/world/inter_pixel/immerse.hh>
#include <mln/world/inter_pixel/compute.hh>
#include <mln/world/inter_pixel/display_edge.hh>
Index: tests/world/binary_2d/enlarge.cc
--- tests/world/binary_2d/enlarge.cc (revision 3927)
+++ tests/world/binary_2d/enlarge.cc (working copy)
@@ -1,5 +1,5 @@
#include <mln/core/image/image2d.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/world/binary_2d/enlarge.hh>
#include <mln/make/image.hh>
#include <mln/value/int_u8.hh>
Index: tests/core/other/clock_test.cc
--- tests/core/other/clock_test.cc (revision 3927)
+++ tests/core/other/clock_test.cc (working copy)
@@ -152,7 +152,7 @@
data::fill(ima, t);
- image2d<unsigned> out = labeling::level(ima, false, c8(), n);
+ image2d<unsigned> out = labeling::value(ima, false, c8(), n);
tmp = testc4(ima, p);
if (tmp != n)
{
@@ -172,11 +172,11 @@
/// 0 before
data::fill(ima, u);
- out = labeling::level(ima, false, c4(), m);
+ out = labeling::value(ima, false, c4(), m);
/// 1 after
data::fill(ima, t);
- image2d<unsigned> out2 = labeling::level(ima, false, c4(), n);
+ image2d<unsigned> out2 = labeling::value(ima, false, c4(), n);
int diff = n - m;
if (diff < 0)
Index: tests/core/image/sparse_image.cc
--- tests/core/image/sparse_image.cc (revision 3927)
+++ tests/core/image/sparse_image.cc (working copy)
@@ -37,9 +37,9 @@
#include <mln/core/alias/neighb2d.hh>
#include <mln/labeling/blobs.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/data/paste.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/io/pgm/save.hh>
#include <mln/core/image/sparse_encode.hh>
@@ -69,7 +69,7 @@
c4(), n);
sparse_image<point2d, int_u8> sparse =
- sparse_encode(level::transform(labels, fold_t()));
+ sparse_encode(data::transform(labels, fold_t()));
std::cout << n << ", compression ratio: " << sparse.compression()
<< std::endl;
@@ -77,5 +77,5 @@
data::fill(cmp, literal::zero);
data::paste(sparse, cmp);
- mln_assertion(cmp == level::transform(labels, fold_t()));
+ mln_assertion(cmp == data::transform(labels, fold_t()));
}
Index: tests/core/image/obased_rle_image.cc
--- tests/core/image/obased_rle_image.cc (revision 3927)
+++ tests/core/image/obased_rle_image.cc (working copy)
@@ -37,9 +37,9 @@
#include <mln/core/alias/neighb2d.hh>
#include <mln/labeling/blobs.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/data/paste.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/io/pgm/save.hh>
#include <mln/core/image/obased_rle_encode.hh>
@@ -69,12 +69,12 @@
c4(), n);
obased_rle_image<point2d, int_u8> rle =
- obased_rle_encode(level::transform(labels, fold_t()));
+ obased_rle_encode(data::transform(labels, fold_t()));
std::cout << n << ", compression ratio: " << rle.compression() << std::endl;
data::fill(cmp, literal::zero);
data::paste(rle, cmp);
- mln_assertion(cmp == level::transform(labels, fold_t()));
+ mln_assertion(cmp == data::transform(labels, fold_t()));
}
Index: tests/core/image/plain.cc
--- tests/core/image/plain.cc (revision 3927)
+++ tests/core/image/plain.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/core/image/imorph/plain.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/data/fill.hh>
Index: tests/core/image/value_enc_image.cc
--- tests/core/image/value_enc_image.cc (revision 3927)
+++ tests/core/image/value_enc_image.cc (working copy)
@@ -39,9 +39,9 @@
#include <mln/core/alias/neighb2d.hh>
#include <mln/labeling/blobs.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/data/paste.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/io/pgm/save.hh>
#include <mln/core/alias/p_runs2d.hh>
@@ -144,14 +144,14 @@
c4(), n);
value_enc_image<point2d, int_u8> val_enc =
- value_encode(level::transform(labels, fold_t()));
+ value_encode(data::transform(labels, fold_t()));
data::fill(cmp, literal::zero);
data::paste(val_enc, cmp);
std::cout << val_enc.values().size() << std::endl;
- mln_assertion(cmp == level::transform(labels, fold_t()));
+ mln_assertion(cmp == data::transform(labels, fold_t()));
//io::pgm::save(cmp, "output.pgm");
- //io::pgm::save(level::transform(labels, fold_t()), "output2.pgm");
+ //io::pgm::save(data::transform(labels, fold_t()), "output2.pgm");
}
}
Index: tests/core/image/dmorph/slice_image.cc
--- tests/core/image/dmorph/slice_image.cc (revision 3927)
+++ tests/core/image/dmorph/slice_image.cc (working copy)
@@ -35,7 +35,7 @@
#include <mln/core/image/dmorph/slice_image.hh>
#include <mln/debug/iota.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
Index: tests/core/image/fi_adaptor.cc
--- tests/core/image/fi_adaptor.cc (revision 3927)
+++ tests/core/image/fi_adaptor.cc (working copy)
@@ -36,7 +36,7 @@
#include <mln/value/rgb8.hh>
#include <mln/data/paste.hh>
-#include <mln/level/median.hh>
+#include <mln/data/median.hh>
#include <mln/display/show.hh>
#include <mln/display/save.hh>
@@ -73,7 +73,7 @@
image2d<int_u8> ima(adaptor.domain());
- level::median(adaptor, rect, ima);
+ data::median(adaptor, rect, ima);
data::paste(ima, adaptor);
Index: tests/core/image/mono_rle_image.cc
--- tests/core/image/mono_rle_image.cc (revision 3927)
+++ tests/core/image/mono_rle_image.cc (working copy)
@@ -37,9 +37,9 @@
#include <mln/core/alias/neighb2d.hh>
#include <mln/labeling/blobs.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/data/paste.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/io/pgm/save.hh>
#include <mln/core/image/mono_rle_encode.hh>
@@ -75,12 +75,12 @@
c4(), n);
mono_rle_image<point2d, int_u8> rle =
- mono_rle_encode(level::transform(labels, fold_t()), 2);
+ mono_rle_encode(data::transform(labels, fold_t()), 2);
std::cout << n << ", compression ratio: " << rle.compression() << std::endl;
data::fill(cmp, literal::zero);
data::paste(rle, cmp);
- mln_assertion(cmp == level::transform(labels, only_two_t()));
+ mln_assertion(cmp == data::transform(labels, only_two_t()));
}
Index: tests/core/image/rle_image.cc
--- tests/core/image/rle_image.cc (revision 3927)
+++ tests/core/image/rle_image.cc (working copy)
@@ -37,9 +37,9 @@
#include <mln/core/alias/neighb2d.hh>
#include <mln/labeling/blobs.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/data/paste.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/io/pgm/save.hh>
#include <mln/core/image/rle_encode.hh>
@@ -69,12 +69,12 @@
c4(), n);
rle_image<point2d, int_u8> rle =
- rle_encode(level::transform(labels, fold_t()));
+ rle_encode(data::transform(labels, fold_t()));
std::cout << n << ", compression ratio: " << rle.compression() << std::endl;
data::fill(cmp, literal::zero);
data::paste(rle, cmp);
- mln_assertion(cmp == level::transform(labels, fold_t()));
+ mln_assertion(cmp == data::transform(labels, fold_t()));
}
Index: tests/core/image/vmorph/cast_image.cc
--- tests/core/image/vmorph/cast_image.cc (revision 3927)
+++ tests/core/image/vmorph/cast_image.cc (working copy)
@@ -32,7 +32,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/image/vmorph/cast_image.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/make/image2d.hh>
#include <mln/data/fill.hh>
Index: tests/core/image/mono_obased_rle_image.cc
--- tests/core/image/mono_obased_rle_image.cc (revision 3927)
+++ tests/core/image/mono_obased_rle_image.cc (working copy)
@@ -37,9 +37,9 @@
#include <mln/core/alias/neighb2d.hh>
#include <mln/labeling/blobs.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/data/paste.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/io/pgm/save.hh>
#include <mln/core/image/mono_obased_rle_encode.hh>
@@ -69,12 +69,12 @@
c4(), n);
mono_obased_rle_image<point2d, int_u8> rle =
- mono_obased_rle_encode(level::transform(labels, fold_t()));
+ mono_obased_rle_encode(data::transform(labels, fold_t()));
std::cout << n << ", compression ratio: " << rle.compression() << std::endl;
data::fill(cmp, literal::zero);
data::paste(rle, cmp);
- mln_assertion(cmp == level::transform(labels, fold_t()));
+ mln_assertion(cmp == data::transform(labels, fold_t()));
}
Index: tests/draw/graph.cc
--- tests/draw/graph.cc (revision 3927)
+++ tests/draw/graph.cc (working copy)
@@ -42,7 +42,7 @@
#include <mln/core/site_set/p_vertices.hh>
#include <mln/core/site_set/p_vertices_psite.hh>
#include <mln/debug/draw_graph.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
/// Set of 2-D points.
Index: tests/draw/line.cc
--- tests/draw/line.cc (revision 3927)
+++ tests/draw/line.cc (working copy)
@@ -37,7 +37,7 @@
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/draw/line.hh>
#include <mln/debug/println.hh>
Index: tests/opt/at.cc
--- tests/opt/at.cc (revision 3927)
+++ tests/opt/at.cc (working copy)
@@ -43,7 +43,7 @@
#include <mln/data/fill.hh>
#include <mln/data/paste.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/opt/at.hh>
Index: tests/transformation/rotate.cc
--- tests/transformation/rotate.cc (revision 3927)
+++ tests/transformation/rotate.cc (working copy)
@@ -32,7 +32,7 @@
# include <mln/core/image/image2d.hh>
# include <mln/transformation/rotate.hh>
# include <mln/make/image.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
int main()
{
Index: tests/arith/minus.cc
--- tests/arith/minus.cc (revision 3927)
+++ tests/arith/minus.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/debug/iota.hh>
#include <mln/arith/minus.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
{
Index: tests/arith/diff_abs.cc
--- tests/arith/diff_abs.cc (revision 3927)
+++ tests/arith/diff_abs.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/debug/iota.hh>
#include <mln/arith/diff_abs.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
{
Index: tests/arith/times.cc
--- tests/arith/times.cc (revision 3927)
+++ tests/arith/times.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/debug/iota.hh>
#include <mln/arith/times.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
{
Index: tests/arith/plus.cc
--- tests/arith/plus.cc (revision 3927)
+++ tests/arith/plus.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/debug/iota.hh>
#include <mln/arith/plus.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
{
@@ -67,7 +67,7 @@
// #include <mln/arith/plus.hh>
// #include <mln/arith/times.hh>
-// #include <mln/level/compare.hh>
+// #include <mln/data/compare.hh>
// #include <mln/fun/v2v/cast.hh>
// #include <mln/debug/iota.hh>
Index: tests/arith/revert.cc
--- tests/arith/revert.cc (revision 3927)
+++ tests/arith/revert.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/debug/iota.hh>
#include <mln/arith/revert.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/println.hh>
int main()
Index: tests/data/transform_full.cc
--- tests/data/transform_full.cc (revision 3920)
+++ tests/data/transform_full.cc (working copy)
@@ -26,9 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/transform_full.cc
+/// \file tests/data/transform_full.cc
///
-/// Tests on mln::level::transform
+/// Tests on mln::data::transform
#include <cmath>
@@ -49,7 +49,7 @@
#include <mln/value/int_s16.hh>
#include <mln/data/fill.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/debug/iota.hh>
@@ -78,7 +78,7 @@
mln_ch_value(I, mln_result_(mysqrt)) out;
{
- out = level::transform(ref, mysqrt());
+ out = data::transform(ref, mysqrt());
mln_piter(I) p (ref.domain ());
for_all(p)
mln_assertion ((mln_value(I))(ref(p) % 42) == out(p) );
@@ -148,7 +148,7 @@
{
using namespace mln;
- std::cerr << "Tests level::transform:" << std::endl;
+ std::cerr << "Tests data::transform:" << std::endl;
std::cerr << "on int:" << std::endl;
chk<int>();
std::cerr << "on unsigned:" << std::endl;
Index: tests/data/median.cc
--- tests/data/median.cc (revision 3920)
+++ tests/data/median.cc (working copy)
@@ -26,19 +26,19 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/median.cc
+/// \file tests/data/median.cc
///
-/// Test on mln::level::median.
+/// Test on mln::data::median.
#include <mln/core/image/image2d.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/win/rectangle2d.hh>
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/median.hh>
+#include <mln/data/median.hh>
#include "tests/data.hh"
@@ -52,15 +52,15 @@
io::pgm::load(lena, MLN_IMG_DIR "/tiny.pgm");
{
win::rectangle2d rect(51, 51);
- image2d<int_u8> out = level::median(lena, rect);
+ image2d<int_u8> out = data::median(lena, rect);
io::pgm::save(out, "out_rect.pgm");
}
{
win::rectangle2d rect(1, 51);
win::hline2d line(51);
image2d<int_u8>
- ref = level::median(lena, rect),
- out = level::median(lena, line);
+ ref = data::median(lena, rect),
+ out = data::median(lena, line);
mln_assertion(out == ref);
io::pgm::save(out, "out_line.pgm");
}
Index: tests/data/compute_full.cc
--- tests/data/compute_full.cc (revision 3920)
+++ tests/data/compute_full.cc (working copy)
@@ -26,9 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/compute_full.cc
+/// \file tests/data/compute_full.cc
///
-/// Tests on mln::level::compute.
+/// Tests on mln::data::compute.
#include <mln/core/image/image1d.hh>
#include <mln/core/image/image2d.hh>
@@ -47,7 +47,7 @@
#include <mln/accu/max.hh>
#include <mln/debug/iota.hh>
#include <mln/debug/println.hh>
-#include <mln/level/compute.hh>
+#include <mln/data/compute.hh>
@@ -116,8 +116,8 @@
accu::min<I> acu_min;
accu::max<I> acu_max;
- I min = level::compute(acu_min, ima);
- I max = level::compute(acu_max, ima);
+ I min = data::compute(acu_min, ima);
+ I max = data::compute(acu_max, ima);
mln_assertion(min == real_min);
mln_assertion(max == real_max);
}
@@ -128,8 +128,8 @@
accu::min<I> acu_min;
accu::max<I> acu_max;
- I min = level::compute(acu_min, sub_ima);
- I max = level::compute(acu_max, sub_ima);
+ I min = data::compute(acu_min, sub_ima);
+ I max = data::compute(acu_max, sub_ima);
mln_assertion(min == real_min2);
mln_assertion(max == real_max2);
}
@@ -141,8 +141,8 @@
accu::min<I> acu_min;
accu::max<I> acu_max;
- I min = level::compute(acu_min, if_ima);
- I max = level::compute(acu_max, if_ima);
+ I min = data::compute(acu_min, if_ima);
+ I max = data::compute(acu_max, if_ima);
mln_assertion(min == real_min2);
mln_assertion(max == real_max2);
}
@@ -176,8 +176,8 @@
accu::min<I> acu_min;
accu::max<I> acu_max;
- I min = level::compute(acu_min, ima);
- I max = level::compute(acu_max, ima);
+ I min = data::compute(acu_min, ima);
+ I max = data::compute(acu_max, ima);
mln_assertion(min == real_min);
mln_assertion(max == real_max);
@@ -206,8 +206,8 @@
accu::min<I> acu_min;
accu::max<I> acu_max;
- I min = level::compute(acu_min, ima);
- I max = level::compute(acu_max, ima);
+ I min = data::compute(acu_min, ima);
+ I max = data::compute(acu_max, ima);
mln_assertion(min == real_min);
mln_assertion(max == real_max);
@@ -231,7 +231,7 @@
unsigned cols_end = 256;
- std::cerr << "Tests level::compute:" << std::endl;
+ std::cerr << "Tests data::compute:" << std::endl;
(std::cerr << "in 1d ... ").flush ();
{
Index: tests/data/all_headers.cc
--- tests/data/all_headers.cc (revision 3920)
+++ tests/data/all_headers.cc (working copy)
@@ -25,12 +25,12 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/level/all_headers.cc
+/*! \file tests/data/all_headers.cc
*
- * \brief Tests on mln::level.
+ * \brief Tests on mln::data.
*/
-#include <mln/level/all.hh>
+#include <mln/data/all.hh>
int main()
{
Index: tests/data/abs.cc
--- tests/data/abs.cc (revision 3920)
+++ tests/data/abs.cc (working copy)
@@ -25,13 +25,13 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/level/abs.cc
+/*! \file tests/data/abs.cc
*
- * \brief Tests on mln::level::abs.
+ * \brief Tests on mln::data::abs.
*/
# include <mln/core/image/image2d.hh>
-# include <mln/level/abs.hh>
+# include <mln/data/abs.hh>
int main()
{
@@ -53,7 +53,7 @@
image2d<int> ima(make::image(vs));
image2d<int> out(ima.domain());
- level::abs(ima, out);
+ data::abs(ima, out);
box_fwd_piter_<point2d> p(ima.domain());
for_all (p)
mln_assertion (out(p) >= 0);
Index: tests/data/transform_inplace.cc
--- tests/data/transform_inplace.cc (revision 3920)
+++ tests/data/transform_inplace.cc (working copy)
@@ -26,9 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/transform_inplace.cc
+/// \file tests/data/transform_inplace.cc
///
-/// Tests on mln::level::transform_inplace.
+/// Tests on mln::data::transform_inplace.
#include <mln/core/image/image1d.hh>
@@ -46,8 +46,8 @@
#include <mln/debug/iota.hh>
-#include <mln/level/transform_inplace.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/transform_inplace.hh>
+#include <mln/data/compare.hh>
@@ -64,8 +64,8 @@
debug::iota(ref);
image2d<T> ima = duplicate(ref);
- level::transform_inplace(ima, fun::v2v::inc<T>());
- level::transform_inplace(ima, fun::v2v::dec<T>());
+ data::transform_inplace(ima, fun::v2v::inc<T>());
+ data::transform_inplace(ima, fun::v2v::dec<T>());
mln_assertion(ima == ref);
}
@@ -77,8 +77,8 @@
debug::iota(ref);
image1d<T> ima = duplicate(ref);
- level::transform_inplace(ima, fun::v2v::inc<T>());
- level::transform_inplace(ima, fun::v2v::dec<T>());
+ data::transform_inplace(ima, fun::v2v::inc<T>());
+ data::transform_inplace(ima, fun::v2v::dec<T>());
mln_assertion(ima == ref);
}
@@ -91,8 +91,8 @@
debug::iota(ref);
image3d<T> ima = duplicate(ref);
- level::transform_inplace(ima, fun::v2v::inc<T>());
- level::transform_inplace(ima, fun::v2v::dec<T>());
+ data::transform_inplace(ima, fun::v2v::inc<T>());
+ data::transform_inplace(ima, fun::v2v::dec<T>());
mln_assertion(ima == ref);
}
@@ -104,8 +104,8 @@
ref(5, make::box2d(size, size)),
ima(5, make::box2d(size, size));
- level::transform_inplace(ima, fun::v2v::inc<T>());
- level::transform_inplace(ima, fun::v2v::dec<T>());
+ data::transform_inplace(ima, fun::v2v::inc<T>());
+ data::transform_inplace(ima, fun::v2v::dec<T>());
mln_assertion(ima == ref);
}
@@ -123,8 +123,8 @@
I ima = duplicate(ref);
II ima_if = ima | fun::p2b::chess();
- level::transform_inplace(ima_if, fun::v2v::inc<T>());
- level::transform_inplace(ima_if, fun::v2v::dec<T>());
+ data::transform_inplace(ima_if, fun::v2v::inc<T>());
+ data::transform_inplace(ima_if, fun::v2v::dec<T>());
mln_assertion(ima_if == ref_if);
}
@@ -142,8 +142,8 @@
I ima = duplicate(ref);
II sub_ima(ima, make::box2d(4,4, 10,10));
- level::transform_inplace(sub_ima, fun::v2v::inc<int>());
- level::transform_inplace(sub_ima, fun::v2v::dec<int>());
+ data::transform_inplace(sub_ima, fun::v2v::inc<int>());
+ data::transform_inplace(sub_ima, fun::v2v::dec<int>());
mln_assertion(sub_ima == sub_ref);
}
@@ -159,8 +159,8 @@
I ima = duplicate(ref);
II extend_ima(ima, 5);
- level::transform_inplace(extend_ima, fun::v2v::inc<T>());
- level::transform_inplace(extend_ima, fun::v2v::dec<T>());
+ data::transform_inplace(extend_ima, fun::v2v::inc<T>());
+ data::transform_inplace(extend_ima, fun::v2v::dec<T>());
mln_assertion(extend_ima == ref);
Index: tests/data/apply_full.cc
--- tests/data/apply_full.cc (revision 3920)
+++ tests/data/apply_full.cc (working copy)
@@ -25,9 +25,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/level/apply_full.cc
+/*! \file tests/data/apply_full.cc
*
- * \brief Tests on mln::level::apply.
+ * \brief Tests on mln::data::apply.
*/
#include <mln/core/image/image1d.hh>
@@ -41,7 +41,7 @@
#include <mln/core/routine/duplicate.hh>
-#include <mln/level/apply.hh>
+#include <mln/data/apply.hh>
#include <mln/debug/iota.hh>
#include <mln/debug/println.hh>
@@ -67,7 +67,7 @@
mln_piter(I) p (ref.domain ());
{
- level::apply(out, qrde());
+ data::apply(out, qrde());
for_all(p)
mln_assertion((mln_value(I))(ref(p) % 42) == out(p));
@@ -122,7 +122,7 @@
unsigned cols_end = 256;
- std::cerr << "Tests level::apply" << std::endl;
+ std::cerr << "Tests data::apply" << std::endl;
(std::cerr << "in 1d ... ").flush ();
{
Index: tests/data/median_fast.cc
--- tests/data/median_fast.cc (revision 3920)
+++ tests/data/median_fast.cc (working copy)
@@ -25,9 +25,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/level/median_fast.cc
+/*! \file tests/data/median_fast.cc
*
- * \brief Test on mln::level::fast_median.
+ * \brief Test on mln::data::fast_median.
*/
#include <mln/core/image/image2d.hh>
@@ -39,7 +39,7 @@
#include <mln/value/int_u8.hh>
#include <mln/debug/iota.hh>
#include <mln/debug/println.hh>
-#include <mln/level/fast_median.hh>
+#include <mln/data/fast_median.hh>
#include <mln/core/dpoints_pixter.hh>
#include <mln/core/pixel.hh>
@@ -100,7 +100,7 @@
io::pgm::load(lena, MLN_IMG_DIR "/lena.pgm");
image2d<int_u8> out(lena.domain());
- level::fast_median(lena, rect, out);
+ data::fast_median(lena, rect, out);
io::pgm::save(out, "out.pgm");
}
Index: tests/data/compute.cc
--- tests/data/compute.cc (revision 3920)
+++ tests/data/compute.cc (working copy)
@@ -26,12 +26,12 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/compute.cc
+/// \file tests/data/compute.cc
///
-/// Tests on mln::level::compute.
+/// Tests on mln::data::compute.
#include <mln/core/image/image2d.hh>
-#include <mln/level/compute.hh>
+#include <mln/data/compute.hh>
#include <mln/debug/iota.hh>
#include <mln/accu/min.hh>
#include <mln/accu/max.hh>
@@ -46,10 +46,10 @@
debug::iota(ima);
accu::min<int> m;
- int min = level::compute(m, ima);
+ int min = data::compute(m, ima);
mln_assertion(min == 1);
accu::max<int> M;
- int max = level::compute(M, ima);
+ int max = data::compute(M, ima);
mln_assertion(max == 40000);
}
Index: tests/data/sort_psites.cc
--- tests/data/sort_psites.cc (revision 3920)
+++ tests/data/sort_psites.cc (working copy)
@@ -26,13 +26,13 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/sort_psites.cc
+/// \file tests/data/sort_psites.cc
///
-/// Tests on mln::level::sort_psites.
+/// Tests on mln::data::sort_psites.
#include <mln/core/image/image2d.hh>
#include <mln/make/image2d.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/core/site_set/p_array.hh>
@@ -44,8 +44,8 @@
2, 2, 2,
0, 1, 4 };
image2d<int> ima = make::image2d(vals);
- p_array<point2d> array_inc = level::sort_psites_increasing(ima);
- p_array<point2d> array_dec = level::sort_psites_decreasing(ima);
+ p_array<point2d> array_inc = data::sort_psites_increasing(ima);
+ p_array<point2d> array_dec = data::sort_psites_decreasing(ima);
{
p_array<point2d>::fwd_piter p1(array_inc);
Index: tests/data/convert.cc
--- tests/data/convert.cc (revision 3920)
+++ tests/data/convert.cc (working copy)
@@ -26,13 +26,13 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/convert.cc
+/// \file tests/data/convert.cc
///
-/// Tests on mln::level::convert
+/// Tests on mln::data::convert
#include <mln/core/image/image2d.hh>
-#include <mln/level/convert.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/convert.hh>
+#include <mln/data/compare.hh>
#include <mln/value/rgb8.hh>
#include <mln/literal/grays.hh>
@@ -49,7 +49,7 @@
image2d<bool> ima(1, 2);
opt::at(ima, 0, 0) = false;
opt::at(ima, 0, 1) = true;
- image2d<rgb8> out = level::convert(rgb8(), ima);
+ image2d<rgb8> out = data::convert(rgb8(), ima);
mln_assertion(opt::at(out, 0, 0) == literal::black);
mln_assertion(opt::at(out, 0, 1) == literal::white);
}
@@ -58,7 +58,7 @@
image2d<bool> ima(1, 2);
data::fill(ima, true);
opt::at(ima, 0, 0) = false;
- image2d<bool> out = level::convert(bool(), ima);
+ image2d<bool> out = data::convert(bool(), ima);
mln_assertion(out == ima);
mln_assertion(out.buffer() != ima.buffer());
}
Index: tests/data/update.cc
--- tests/data/update.cc (revision 3920)
+++ tests/data/update.cc (working copy)
@@ -25,14 +25,14 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/level/update.cc
+/*! \file tests/data/update.cc
*
- * \brief Tests on mln::level::update.
+ * \brief Tests on mln::data::update.
*/
#include <mln/core/image/image2d.hh>
-#include <mln/level/update.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/update.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/iota.hh>
#include <mln/accu/min.hh>
#include <mln/accu/max.hh>
@@ -48,8 +48,8 @@
accu::max<int> M;
debug::iota(ima);
- level::update(m, ima);
- level::update(M, ima);
+ data::update(m, ima);
+ data::update(M, ima);
mln_assertion(m == 1);
mln_assertion(M == 40000);
Index: tests/data/fill_with_image.cc
--- tests/data/fill_with_image.cc (revision 3927)
+++ tests/data/fill_with_image.cc (working copy)
@@ -32,7 +32,7 @@
#include <mln/data/fill_with_value.hh>
#include <mln/data/fill_with_image.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/core/image/image1d.hh>
#include <mln/core/image/image2d.hh>
Index: tests/data/approx/median.cc
--- tests/data/approx/median.cc (revision 3927)
+++ tests/data/approx/median.cc (working copy)
@@ -26,9 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/approx/median.cc
+/// \file tests/data/approx/median.cc
///
-/// Test on mln::level::approx::median.
+/// Test on mln::data::approx::median.
#include <mln/core/image/image2d.hh>
@@ -36,7 +36,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/approx/median.hh>
+#include <mln/data/approx/median.hh>
#include "tests/data.hh"
@@ -51,12 +51,12 @@
{
win::octagon2d oct(49);
- image2d<int_u8> out = level::approx::median(lena, oct);
+ image2d<int_u8> out = data::approx::median(lena, oct);
io::pgm::save(out, "out_oct.pgm");
}
{
win::rectangle2d rec(51, 51);
- image2d<int_u8> out = level::approx::median(lena, rec);
+ image2d<int_u8> out = data::approx::median(lena, rec);
io::pgm::save(out, "out_rec.pgm");
}
}
Index: tests/data/abs_full.cc
--- tests/data/abs_full.cc (revision 3920)
+++ tests/data/abs_full.cc (working copy)
@@ -26,9 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/abs_full.cc
+/// \file tests/data/abs_full.cc
///
-/// Tests on mln::level::abs.
+/// Tests on mln::data::abs.
#include <mln/core/image/image1d.hh>
@@ -48,7 +48,7 @@
#include <mln/debug/iota.hh>
#include <mln/arith/times.hh>
-#include <mln/level/abs.hh>
+#include <mln/data/abs.hh>
@@ -103,7 +103,7 @@
const I& ref = exact(ref_);
I out (ref.domain ());
- level::abs(ref, out);
+ data::abs(ref, out);
mln_piter(I) p (ref.domain ());
for_all(p)
if (ref(p) > 0)
@@ -175,7 +175,7 @@
{
using namespace mln;
- std::cerr << "Tests level::abs:" << std::endl;
+ std::cerr << "Tests data::abs:" << std::endl;
std::cerr << "on int:" << std::endl;
chk<int>(4, 16, 64);
std::cerr << "on int_s8:" << std::endl;
Index: tests/data/paste_full.cc
--- tests/data/paste_full.cc (revision 3927)
+++ tests/data/paste_full.cc (working copy)
@@ -51,7 +51,7 @@
#include <mln/debug/iota.hh>
-#include <mln/level/saturate.hh>
+#include <mln/data/saturate.hh>
#include <mln/data/paste.hh>
@@ -111,7 +111,7 @@
J& output = exact(output_);
if (max_i > max_j)
- level::saturate_inplace(input, 0, (T)max_j);
+ data::saturate_inplace(input, 0, (T)max_j);
data::paste(input, output);
Index: tests/data/stretch_full.cc
--- tests/data/stretch_full.cc (revision 3920)
+++ tests/data/stretch_full.cc (working copy)
@@ -26,9 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/stretch_full.cc
+/// \file tests/data/stretch_full.cc
///
-/// Tests on mln::level::stretch.
+/// Tests on mln::data::stretch.
///
/// \todo Make it pass.
@@ -42,8 +42,8 @@
#include <mln/value/int_s16.hh>
#include <mln/debug/iota.hh>
-#include <mln/level/saturate.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/saturate.hh>
+#include <mln/data/stretch.hh>
@@ -55,7 +55,7 @@
{
I& input = exact(input_);
J& output = exact(output_);
- output = level::stretch(mln_value(J)(), input);
+ output = data::stretch(mln_value(J)(), input);
}
template <typename I, typename J>
@@ -149,7 +149,7 @@
unsigned rows = 4;
unsigned cols = 16;
- std::cerr << "Tests level::stretch:" << std::endl;
+ std::cerr << "Tests data::stretch:" << std::endl;
std::cerr << "on int:" << std::endl;
ch<int>(slis, rows, cols);
std::cerr << "on unsigned:" << std::endl;
Index: tests/data/compare_full.cc
--- tests/data/compare_full.cc (revision 3920)
+++ tests/data/compare_full.cc (working copy)
@@ -26,9 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/compare_full.cc
+/// \file tests/data/compare_full.cc
///
-/// Tests on mln::level::compare.
+/// Tests on mln::data::compare.
#include <mln/core/image/image1d.hh>
#include <mln/core/image/image2d.hh>
@@ -39,7 +39,7 @@
#include <mln/value/int_s8.hh>
#include <mln/value/int_s16.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/iota.hh>
#include <mln/arith/plus.hh>
@@ -210,7 +210,7 @@
unsigned cols_start = 1;
unsigned cols_end = 32;
- std::cerr << "Tests level::compare" << std::endl;
+ std::cerr << "Tests data::compare" << std::endl;
(std::cerr << "in 1d ... ").flush ();
{
Index: tests/data/saturate_full.cc
--- tests/data/saturate_full.cc (revision 3920)
+++ tests/data/saturate_full.cc (working copy)
@@ -26,9 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/saturate_full.cc
+/// \file tests/data/saturate_full.cc
///
-/// Tests on mln::level::saturate.
+/// Tests on mln::data::saturate.
#include <mln/core/image/image1d.hh>
#include <mln/core/image/image2d.hh>
@@ -41,7 +41,7 @@
#include <mln/core/routine/duplicate.hh>
-#include <mln/level/saturate.hh>
+#include <mln/data/saturate.hh>
#include <mln/debug/iota.hh>
#include <mln/debug/println.hh>
@@ -62,7 +62,7 @@
mln_piter(I) p (ref.domain ());
{
- level::saturate(ref, min, max, out);
+ data::saturate(ref, min, max, out);
for_all(p)
{
@@ -81,7 +81,7 @@
}
{
- level::saturate_inplace(ref, min, max);
+ data::saturate_inplace(ref, min, max);
for_all(p)
{
@@ -150,7 +150,7 @@
unsigned cols_end = 6;
- std::cerr << "Tests level::saturate" << std::endl;
+ std::cerr << "Tests data::saturate" << std::endl;
(std::cerr << "in 1d ... ").flush ();
{
Index: tests/data/transform.cc
--- tests/data/transform.cc (revision 3920)
+++ tests/data/transform.cc (working copy)
@@ -26,9 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/transform.cc
+/// \file tests/data/transform.cc
///
-/// Tests on mln::level::transform.
+/// Tests on mln::data::transform.
#include <cmath>
@@ -44,7 +44,7 @@
#include <mln/data/fill.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/data/paste.hh>
#include <mln/core/var.hh>
@@ -79,7 +79,7 @@
image1d<unsigned short> out(size);
debug::iota(ima);
- out = level::transform(ima, mysqrt());
+ out = data::transform(ima, mysqrt());
box_fwd_piter_<point1d> p(out.domain());
for_all(p)
@@ -93,7 +93,7 @@
image2d<unsigned short> out(size, size);
debug::iota(ima);
- out = level::transform(ima, mysqrt());
+ out = data::transform(ima, mysqrt());
box_fwd_piter_<point2d> p(out.domain());
for_all(p)
@@ -105,7 +105,7 @@
image2d<unsigned short> ima(size, size);
data::fill_with_value(ima, 51);
- level::transform(ima, mysqrt());
+ data::transform(ima, mysqrt());
}
@@ -115,7 +115,7 @@
image3d<unsigned short> out(size, size, size);
debug::iota(ima);
- out = level::transform(ima, mysqrt());
+ out = data::transform(ima, mysqrt());
box_fwd_piter_<point3d> p(out.domain());
for_all(p)
@@ -129,7 +129,7 @@
image2d<unsigned short> out(8, 8);
data::fill(out, (short unsigned int)0);
- out = level::transform(ima, mysqrt());
+ out = data::transform(ima, mysqrt());
}
// flat image test
@@ -138,7 +138,7 @@
image2d<unsigned short> out(size, size);
data::fill_with_value(ima, 51);
- out = level::transform(ima, mysqrt());
+ out = data::transform(ima, mysqrt());
box2d::piter p(out.domain());
for_all(p)
@@ -155,7 +155,7 @@
data::fill_with_value(ima, 0);
debug::iota(ima);
- II out = level::transform(ima_if, mysqrt());
+ II out = data::transform(ima_if, mysqrt());
II::piter p(ima_if.domain());
for_all(p)
@@ -175,7 +175,7 @@
data::fill(in, (unsigned short)51);
data::fill(out, (unsigned short)42);
- out = level::transform(cast, mysqrt());
+ out = data::transform(cast, mysqrt());
II::piter p(cast.domain());
for_all(p)
@@ -192,7 +192,7 @@
II sub_ima(ima, make::box2d(4,4, 10,10));
data::fill(ima, 51);
- III out = level::transform(sub_ima, mysqrt());
+ III out = data::transform(sub_ima, mysqrt());
II::piter p(sub_ima.domain());
for_all(p)
@@ -209,7 +209,7 @@
II extend_ima(ima, 5);
data::fill(ima, 51);
- III out = level::transform(extend_ima, mysqrt());
+ III out = data::transform(extend_ima, mysqrt());
II::piter p(extend_ima.domain());
for_all(p)
Index: tests/data/replace.cc
--- tests/data/replace.cc (revision 3920)
+++ tests/data/replace.cc (working copy)
@@ -25,14 +25,14 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/level/replace.cc
+/*! \file tests/data/replace.cc
*
- * \brief Tests on mln::level::replace.
+ * \brief Tests on mln::data::replace.
*/
#include <mln/core/image/image2d.hh>
-#include <mln/level/replace.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/replace.hh>
+#include <mln/data/compare.hh>
int main()
@@ -49,7 +49,7 @@
image2d<int> rhs = make::image(vs);
- level::replace(rhs, 10, 11);
+ data::replace(rhs, 10, 11);
int vs_ref[3][3] = {
Index: tests/data/paste.cc
--- tests/data/paste.cc (revision 3927)
+++ tests/data/paste.cc (working copy)
@@ -42,7 +42,7 @@
#include <mln/data/fill.hh>
#include <mln/data/paste.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/fun/p2b/chess.hh>
#include <mln/fun/p2v/iota.hh>
Index: tests/data/stretch.cc
--- tests/data/stretch.cc (revision 3920)
+++ tests/data/stretch.cc (working copy)
@@ -26,12 +26,12 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/stretch.cc
+/// \file tests/data/stretch.cc
///
-/// Tests on mln::level::stretch.
+/// Tests on mln::data::stretch.
#include <mln/core/image/image2d.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/debug/iota.hh>
#include <mln/value/int_u8.hh>
@@ -47,7 +47,7 @@
{ 1000, 2000, 3000 }
};
image2d<int> ima = make::image(vs);
- image2d<int_u8> out = level::stretch(int_u8(), ima);
+ image2d<int_u8> out = data::stretch(int_u8(), ima);
int_u8 ws[3][3] = {
{ 0, 127, 255 },
Index: tests/data/naive/median.cc
--- tests/data/naive/median.cc (revision 3927)
+++ tests/data/naive/median.cc (working copy)
@@ -26,9 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/naive/median.cc
+/// \file tests/data/naive/median.cc
///
-/// Test on mln::level::naive::median.
+/// Test on mln::data::naive::median.
#include <mln/core/image/image2d.hh>
#include <mln/win/rectangle2d.hh>
@@ -37,7 +37,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/naive/median.hh>
+#include <mln/data/naive/median.hh>
#include "tests/data.hh"
@@ -55,6 +55,6 @@
io::pgm::load(lena, MLN_IMG_DIR "/tiny.pgm");
image2d<int_u8> out(lena.domain());
- level::naive::median(lena, rec, out);
+ data::naive::median(lena, rec, out);
io::pgm::save(out, "out.pgm");
}
Index: tests/data/apply.cc
--- tests/data/apply.cc (revision 3920)
+++ tests/data/apply.cc (working copy)
@@ -25,13 +25,13 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/level/apply.cc
+/*! \file tests/data/apply.cc
*
- * \brief Tests on mln::level::apply.
+ * \brief Tests on mln::data::apply.
*/
#include <mln/core/image/image2d.hh>
-#include <mln/level/apply.hh>
+#include <mln/data/apply.hh>
#include <mln/debug/iota.hh>
#include <mln/fun/v2v/saturate.hh>
@@ -49,7 +49,7 @@
image2d<int> ref(make::image(vs));
debug::iota(ima);
- level::apply(ima, fun::v2v::saturate<int>(2, 6));
+ data::apply(ima, fun::v2v::saturate<int>(2, 6));
box_fwd_piter_<point2d> p(ima.domain());
for_all(p)
mln_assertion(ima(p) == ref(p));
Index: tests/data/Makefile.am
--- tests/data/Makefile.am (revision 3927)
+++ tests/data/Makefile.am (working copy)
@@ -2,20 +2,50 @@
include $(top_srcdir)/milena/tests/tests.mk
+SUBDIRS = approx naive
+
check_PROGRAMS = \
+ abs \
+ all_headers \
+ apply \
+ compare \
+ compute \
+ convert \
fill \
- fill_with_value \
fill_with_image \
+ fill_with_value \
+ median \
+ median_fast \
memcpy_ \
memset_ \
- paste
+ paste \
+ saturate \
+ sort_psites \
+ stretch \
+ transform \
+ transform_inplace \
+ update
+abs_SOURCES = abs.cc
+all_headers_SOURCES = all_headers.cc
+apply_SOURCES = apply.cc
+compare_SOURCES = compare.cc
+compute_SOURCES = compute.cc
+convert_SOURCES = convert.cc
fill_SOURCES = fill.cc
-fill_with_value_SOURCES = fill_with_value.cc
fill_with_image_SOURCES = fill_with_image.cc
+fill_with_value_SOURCES = fill_with_value.cc
+median_SOURCES = median.cc
+median_fast_SOURCES = median_fast.cc
memcpy__SOURCES = memcpy_.cc
memset__SOURCES = memset_.cc
paste_SOURCES = paste.cc
+saturate_SOURCES = saturate.cc
+sort_psites_SOURCES = sort_psites.cc
+stretch_SOURCES = stretch.cc
+transform_SOURCES = transform.cc
+transform_inplace_SOURCES = transform_inplace.cc
+update_SOURCES = update.cc
# Lengthy tests.
# FIXME: enable it when make full-check is enabled.
Index: tests/data/compare.cc
--- tests/data/compare.cc (revision 3920)
+++ tests/data/compare.cc (working copy)
@@ -26,12 +26,12 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/compare.cc
+/// \file tests/data/compare.cc
///
-/// Tests on mln::level::compare.
+/// Tests on mln::data::compare.
#include <mln/core/image/image2d.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/iota.hh>
Index: tests/data/saturate.cc
--- tests/data/saturate.cc (revision 3920)
+++ tests/data/saturate.cc (working copy)
@@ -26,13 +26,13 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/saturate.cc
+/// \file tests/data/saturate.cc
///
-/// Tests on mln::level::saturate.
+/// Tests on mln::data::saturate.
#include <mln/core/image/image2d.hh>
-#include <mln/level/saturate.hh>
+#include <mln/data/saturate.hh>
#include <mln/debug/iota.hh>
@@ -49,7 +49,7 @@
image2d<int> ref = make::image(vs);
debug::iota(ima);
- level::saturate_inplace(ima, 2, 6);
+ data::saturate_inplace(ima, 2, 6);
box_fwd_piter_<point2d> p(ima.domain());
for_all(p)
mln_assertion(ima(p) == ref(p));
Index: tests/linear/convolve.cc
--- tests/linear/convolve.cc (revision 3927)
+++ tests/linear/convolve.cc (working copy)
@@ -36,7 +36,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
#include <mln/math/round.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/core/alias/w_window2d_float.hh>
#include <mln/border/thickness.hh>
@@ -64,6 +64,6 @@
w_window2d_float w_win = make::w_window2d(ws);
image2d<float> tmp = linear::convolve(lena, w_win);
- io::pgm::save(level::transform(tmp, math::round<int_u8>()),
+ io::pgm::save(data::transform(tmp, math::round<int_u8>()),
"out.pgm");
}
Index: tests/linear/lap.cc
--- tests/linear/lap.cc (revision 3927)
+++ tests/linear/lap.cc (working copy)
@@ -37,7 +37,7 @@
#include <mln/border/thickness.hh>
#include <mln/linear/lap.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include "tests/data.hh"
@@ -52,6 +52,6 @@
image2d<int_u8> lena;
io::pgm::load(lena, MLN_IMG_DIR "/lena.pgm");
- io::pgm::save(level::stretch(int_u8(), linear::lap_4(lena)),
+ io::pgm::save(data::stretch(int_u8(), linear::lap_4(lena)),
"out.pgm");
}
Index: tests/linear/log.cc
--- tests/linear/log.cc (revision 3927)
+++ tests/linear/log.cc (working copy)
@@ -40,7 +40,7 @@
#include <mln/linear/log.hh>
#include <mln/estim/min_max.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include "tests/data.hh"
@@ -62,7 +62,7 @@
mln_assertion(min == -929 && max == 1260);
}
- out = level::stretch(int_u8(), tmp);
+ out = data::stretch(int_u8(), tmp);
io::pgm::save(out, "out.pgm");
{
int_u8 min, max;
Index: tests/linear/convolve_directional.cc
--- tests/linear/convolve_directional.cc (revision 3927)
+++ tests/linear/convolve_directional.cc (working copy)
@@ -36,7 +36,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
#include <mln/math/round.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/core/alias/w_window2d_float.hh>
#include <mln/border/thickness.hh>
@@ -59,6 +59,6 @@
float ws[] = { w, w, w, w, w, w, w, w, w };
image2d<float> tmp = linear::convolve_directional(lena, 1, ws);
- io::pgm::save(level::transform(tmp, math::round<int_u8>()),
+ io::pgm::save(data::transform(tmp, math::round<int_u8>()),
"out.pgm");
}
Index: tests/linear/convolve_2x1d.cc
--- tests/linear/convolve_2x1d.cc (revision 3927)
+++ tests/linear/convolve_2x1d.cc (working copy)
@@ -36,7 +36,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
#include <mln/math/round.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/core/alias/w_window2d_float.hh>
#include <mln/border/thickness.hh>
@@ -62,6 +62,6 @@
float vws[] = { v, v, v };
image2d<float> tmp = linear::convolve_2x1d(lena, hws, vws);
- io::pgm::save(level::transform(tmp, math::round<int_u8>()),
+ io::pgm::save(data::transform(tmp, math::round<int_u8>()),
"out.pgm");
}
Index: tests/linear/sobel_2d.cc
--- tests/linear/sobel_2d.cc (revision 3927)
+++ tests/linear/sobel_2d.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/var.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
@@ -56,5 +56,5 @@
io::pgm::load(input, MLN_IMG_DIR "/tiny.pgm");
image2d<float> output = linear::sobel_2d_l1_norm(input);
- io::pgm::save(level::stretch(int_u8(), output), "out.pgm");
+ io::pgm::save(data::stretch(int_u8(), output), "out.pgm");
}
Index: tests/linear/gaussian.cc
--- tests/linear/gaussian.cc (revision 3927)
+++ tests/linear/gaussian.cc (working copy)
@@ -37,7 +37,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/data/paste.hh>
#include <mln/math/round.hh>
Index: tests/accu/transform_snake.cc
--- tests/accu/transform_snake.cc (revision 3927)
+++ tests/accu/transform_snake.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/accu/count.hh>
#include <mln/win/rectangle2d.hh>
#include <mln/pw/all.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
Index: tests/accu/image/to_result.cc
--- tests/accu/image/to_result.cc (revision 3927)
+++ tests/accu/image/to_result.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/accu/image/init.hh>
#include <mln/accu/image/to_result.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/pw/cst.hh>
#include <mln/pw/image.hh>
Index: tests/accu/image/take_n_times.cc
--- tests/accu/image/take_n_times.cc (revision 3927)
+++ tests/accu/image/take_n_times.cc (working copy)
@@ -31,7 +31,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/pw/cst.hh>
#include <mln/pw/image.hh>
Index: tests/accu/image/init.cc
--- tests/accu/image/init.cc (revision 3927)
+++ tests/accu/image/init.cc (working copy)
@@ -30,7 +30,7 @@
/// Tests on mln::accu::image::init.
#include <mln/core/image/image2d.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/pw/cst.hh>
#include <mln/pw/image.hh>
Index: tests/accu/image/take.cc
--- tests/accu/image/take.cc (revision 3927)
+++ tests/accu/image/take.cc (working copy)
@@ -31,7 +31,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/pw/cst.hh>
#include <mln/pw/image.hh>
Index: tests/accu/image/set_value.cc
--- tests/accu/image/set_value.cc (revision 3927)
+++ tests/accu/image/set_value.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/accu/count.hh>
#include <mln/accu/image/set_value.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/pw/cst.hh>
#include <mln/pw/image.hh>
Index: tests/accu/image/untake.cc
--- tests/accu/image/untake.cc (revision 3927)
+++ tests/accu/image/untake.cc (working copy)
@@ -31,7 +31,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/pw/cst.hh>
#include <mln/pw/image.hh>
Index: tests/accu/image/take_as_init.cc
--- tests/accu/image/take_as_init.cc (revision 3927)
+++ tests/accu/image/take_as_init.cc (working copy)
@@ -30,7 +30,7 @@
/// Tests on mln::accu::image::take_as_init.
#include <mln/core/image/image2d.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/pw/cst.hh>
#include <mln/pw/image.hh>
Index: tests/accu/transform_diagonal.cc
--- tests/accu/transform_diagonal.cc (revision 3927)
+++ tests/accu/transform_diagonal.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/accu/transform_diagonal.hh>
#include <mln/accu/count.hh>
#include <mln/pw/all.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
Index: tests/accu/transform.cc
--- tests/accu/transform.cc (revision 3927)
+++ tests/accu/transform.cc (working copy)
@@ -36,7 +36,7 @@
#include <mln/win/rectangle2d.hh>
#include <mln/pw/all.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
Index: tests/accu/transform_line.cc
--- tests/accu/transform_line.cc (revision 3927)
+++ tests/accu/transform_line.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/accu/transform_line.hh>
#include <mln/accu/count.hh>
#include <mln/pw/all.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
Index: tests/accu/nil.cc
--- tests/accu/nil.cc (revision 3927)
+++ tests/accu/nil.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/value/int_u8.hh>
#include <mln/accu/nil.hh>
-#include <mln/level/compute.hh>
+#include <mln/data/compute.hh>
int main()
@@ -43,7 +43,7 @@
image2d<value::int_u8> ima(3, 3);
accu::nil<value::int_u8> a;
- level::compute(a, ima);
+ data::compute(a, ima);
- level::compute(accu::meta::nil(), ima);
+ data::compute(accu::meta::nil(), ima);
}
Index: tests/accu/min.cc
--- tests/accu/min.cc (revision 3927)
+++ tests/accu/min.cc (working copy)
@@ -39,7 +39,7 @@
#include <mln/accu/v.hh>
#include <mln/accu/compute.hh>
-#include <mln/level/compute.hh>
+#include <mln/data/compute.hh>
int main()
@@ -47,8 +47,8 @@
using namespace mln;
image2d<int> ima(3, 3);
debug::iota(ima);
- mln_assertion(level::compute(accu::meta::min(), ima) == 1);
+ mln_assertion(data::compute(accu::meta::min(), ima) == 1);
accu::min<int> m;
- mln_assertion(level::compute(m, ima) == 1);
+ mln_assertion(data::compute(m, ima) == 1);
}
Index: tests/accu/max.cc
--- tests/accu/max.cc (revision 3927)
+++ tests/accu/max.cc (working copy)
@@ -39,7 +39,7 @@
#include <mln/accu/v.hh>
#include <mln/accu/compute.hh>
-#include <mln/level/compute.hh>
+#include <mln/data/compute.hh>
int main()
@@ -47,9 +47,9 @@
using namespace mln;
image2d<int> ima(3, 3);
debug::iota(ima);
- mln_assertion(level::compute(accu::meta::max(), ima) == 9);
+ mln_assertion(data::compute(accu::meta::max(), ima) == 9);
accu::max<int> M;
- mln_assertion(level::compute(M, ima) == 9);
+ mln_assertion(data::compute(M, ima) == 9);
// mln::trait::accumulator::print(M);
}
Index: tests/accu/line.cc
--- tests/accu/line.cc (revision 3927)
+++ tests/accu/line.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/accu/min_h.hh>
#include <mln/core/image/image2d.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/iota.hh>
Index: tests/accu/transform_directional.cc
--- tests/accu/transform_directional.cc (revision 3927)
+++ tests/accu/transform_directional.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/accu/count.hh>
#include <mln/win/rectangle2d.hh>
#include <mln/pw/all.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
Index: tests/transform/distance_and_closest_point_geodesic.cc
--- tests/transform/distance_and_closest_point_geodesic.cc (revision 3927)
+++ tests/transform/distance_and_closest_point_geodesic.cc (working copy)
@@ -36,7 +36,7 @@
#include <mln/data/fill.hh>
#include <mln/debug/println.hh>
#include <mln/opt/at.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/transform/distance_and_closest_point_geodesic.hh>
Index: tests/make/image3d.cc
--- tests/make/image3d.cc (revision 3927)
+++ tests/make/image3d.cc (working copy)
@@ -32,7 +32,7 @@
#include <mln/make/image3d.hh>
#include <mln/debug/iota.hh>
#include <mln/core/routine/duplicate.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
Index: tests/convert/to_image.cc
--- tests/convert/to_image.cc (revision 3927)
+++ tests/convert/to_image.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/core/alias/window2d.hh>
#include <mln/core/site_set/p_if.hh>
#include <mln/fun/p2b/chess.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/convert/to_image.hh>
#include <mln/convert/to.hh>
Index: tests/geom/seed2tiling.cc
--- tests/geom/seed2tiling.cc (revision 3927)
+++ tests/geom/seed2tiling.cc (working copy)
@@ -34,7 +34,7 @@
# include <mln/core/image/image2d.hh>
# include <mln/core/alias/neighb2d.hh>
# include <mln/geom/seeds2tiling.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
int main()
{
Index: tests/geom/seed2tiling_roundness.cc
--- tests/geom/seed2tiling_roundness.cc (revision 3927)
+++ tests/geom/seed2tiling_roundness.cc (working copy)
@@ -35,7 +35,7 @@
# include <mln/core/alias/w_window2d_int.hh>
# include <mln/make/win_chamfer.hh>
# include <mln/geom/seeds2tiling_roundness.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
# include <mln/debug/println.hh>
int main()
Index: tests/fun/v2v/hsl_to_rgb.cc
--- tests/fun/v2v/hsl_to_rgb.cc (revision 3927)
+++ tests/fun/v2v/hsl_to_rgb.cc (working copy)
@@ -33,8 +33,8 @@
#include <mln/fun/v2v/hsl_to_rgb.hh>
-#include <mln/level/compare.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/compare.hh>
+#include <mln/data/transform.hh>
#include <mln/value/hsl.hh>
#include <mln/value/rgb8.hh>
@@ -57,7 +57,7 @@
image2d<rgb8> ref_ima = make::image(ref);
image2d<hsl_f> ima = make::image(dat);
- image2d<value::rgb8> ima_rgb = level::transform(ima,
+ image2d<value::rgb8> ima_rgb = data::transform(ima,
fun::v2v::f_hsl_to_rgb_3x8);
mln_assertion(ima_rgb == ref_ima);
Index: tests/fun/v2v/rgb_to_hsl.cc
--- tests/fun/v2v/rgb_to_hsl.cc (revision 3927)
+++ tests/fun/v2v/rgb_to_hsl.cc (working copy)
@@ -37,8 +37,8 @@
#include <mln/fun/v2v/rgb_to_hsl.hh>
-#include <mln/level/compare.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/compare.hh>
+#include <mln/data/transform.hh>
#include <mln/make/image.hh>
@@ -59,7 +59,7 @@
image2d<value::rgb8> ima = make::image(dat);
image2d<hsl_f> ref_ima = make::image(ref);
- image2d<hsl_f> ima_hsl = level::transform(ima,
+ image2d<hsl_f> ima_hsl = data::transform(ima,
fun::v2v::f_rgb_to_hsl_f);
mln_assertion(ima_hsl == ref_ima);
Index: tests/binarization/threshold.cc
--- tests/binarization/threshold.cc (revision 3927)
+++ tests/binarization/threshold.cc (working copy)
@@ -30,7 +30,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/binarization/threshold.hh>
-#include <mln/level/all.hh>
+#include <mln/data/all.hh>
#include <mln/io/pgm/load.hh>
#include <mln/io/ppm/load.hh>
Index: tests/morpho/artificial_line_graph_image_wst.cc
--- tests/morpho/artificial_line_graph_image_wst.cc (revision 3927)
+++ tests/morpho/artificial_line_graph_image_wst.cc (working copy)
@@ -62,7 +62,7 @@
#include <mln/morpho/line_gradient.hh>
#include <mln/morpho/closing/area_on_vertices.hh>
#include <mln/morpho/meyer_wst.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/value/int_u8.hh>
#include <mln/value/int_u16.hh>
Index: tests/morpho/watershed/flooding.cc
--- tests/morpho/watershed/flooding.cc (revision 3927)
+++ tests/morpho/watershed/flooding.cc (working copy)
@@ -39,7 +39,7 @@
#include <mln/value/int_u16.hh>
#include <mln/morpho/watershed/flooding.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
@@ -76,7 +76,7 @@
t.start();
image2d<L> output = morpho::watershed::impl::generic::flooding(input, c4(), n_basins);
std::cout << "gen: " << t << std::endl;
- io::pgm::save(level::transform(output, f_16_to_8()),
+ io::pgm::save(data::transform(output, f_16_to_8()),
"tmp_ref.pgm");
}
{
@@ -84,7 +84,7 @@
t.start();
image2d<L> output = morpho::watershed::impl::flooding_fastest(input, c4(), n_basins);
std::cout << "fast: " << t << std::endl;
- io::pgm::save(level::transform(output, f_16_to_8()),
+ io::pgm::save(data::transform(output, f_16_to_8()),
"tmp_out.pgm");
}
}
Index: tests/morpho/watershed/superpose.cc
--- tests/morpho/watershed/superpose.cc (revision 3927)
+++ tests/morpho/watershed/superpose.cc (working copy)
@@ -39,7 +39,7 @@
#include <mln/value/int_u8.hh>
#include <mln/morpho/watershed/superpose.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include "tests/data.hh"
Index: tests/morpho/closing/area.cc
--- tests/morpho/closing/area.cc (revision 3927)
+++ tests/morpho/closing/area.cc (working copy)
@@ -37,8 +37,8 @@
#include <mln/io/pgm/load.hh>
#include <mln/accu/max.hh>
-#include <mln/level/compute.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compute.hh>
+#include <mln/data/compare.hh>
#include <mln/pw/cst.hh>
#include <mln/pw/image.hh>
@@ -57,6 +57,6 @@
io::pgm::load(lena, MLN_IMG_DIR "/tiny.pgm");
clo = morpho::closing::area(lena, c4(), lena.nrows() * lena.ncols());
- int_u8 m = level::compute(accu::max<int_u8>(), lena);
+ int_u8 m = data::compute(accu::max<int_u8>(), lena);
mln_assertion(clo == (pw::cst(m) | lena.domain()));
}
Index: tests/morpho/tree/compute_attribute_image.cc
--- tests/morpho/tree/compute_attribute_image.cc (revision 3927)
+++ tests/morpho/tree/compute_attribute_image.cc (working copy)
@@ -32,7 +32,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/debug/println.hh>
#include <mln/core/var.hh>
@@ -58,7 +58,7 @@
debug::println(f);
typedef p_array<point2d> S;
- S s = level::sort_psites_increasing(f);
+ S s = data::sort_psites_increasing(f);
morpho::tree::data<I,S> t(f, s, c4());
debug::println(t.parent_image());
Index: tests/morpho/tree/filter/filter.cc
--- tests/morpho/tree/filter/filter.cc (revision 3927)
+++ tests/morpho/tree/filter/filter.cc (working copy)
@@ -45,7 +45,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/morpho/tree/data.hh>
#include <mln/morpho/tree/compute_attribute_image.hh>
#include <mln/morpho/attribute/card.hh>
@@ -72,7 +72,7 @@
typedef p_array< mln_site_(I) > S;
typedef morpho::tree::data<I,S> tree_t;
- S sorted_sites = level::sort_psites_decreasing(input);
+ S sorted_sites = data::sort_psites_decreasing(input);
tree_t tree(input, sorted_sites, c4());
// Test with increasing attribute -> area closing.
Index: tests/morpho/tree/compute_parent.cc
--- tests/morpho/tree/compute_parent.cc (revision 3927)
+++ tests/morpho/tree/compute_parent.cc (working copy)
@@ -35,8 +35,8 @@
#include <mln/core/image/dmorph/image_if.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/sort_psites.hh>
+#include <mln/data/compare.hh>
#include <mln/pw/value.hh>
#include <mln/debug/println.hh>
@@ -102,7 +102,7 @@
image2d<unsigned char> ima = make::image2d(vals);
typedef p_array<point2d> S;
- S s = level::sort_psites_increasing(ima);
+ S s = data::sort_psites_increasing(ima);
image2d<point2d> par = morpho::tree::compute_parent(ima, c4(), s);
mln_assertion(par == ref2());
}
Index: tests/morpho/tree/max.cc
--- tests/morpho/tree/max.cc (revision 3927)
+++ tests/morpho/tree/max.cc (working copy)
@@ -68,6 +68,6 @@
// std::cout << ". ";
// std::cout << std::endl;
- p_array<point2d> s = level::sort_psites_increasing(ima);
+ p_array<point2d> s = data::sort_psites_increasing(ima);
std::cout << morpho::tree::nodes(par, ima, s) << std::endl;
}
Index: tests/morpho/tree/data.cc
--- tests/morpho/tree/data.cc (revision 3927)
+++ tests/morpho/tree/data.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/core/alias/neighb2d.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/debug/println.hh>
#include <mln/morpho/tree/data.hh>
@@ -58,7 +58,7 @@
debug::println("ima = ", ima);
typedef p_array<point2d> S;
- S s = level::sort_psites_decreasing(ima);
+ S s = data::sort_psites_decreasing(ima);
typedef morpho::tree::data<I,S> tree_t;
tree_t t(ima, s, c4());
Index: tests/morpho/skeleton_constrained.cc
--- tests/morpho/skeleton_constrained.cc (revision 3927)
+++ tests/morpho/skeleton_constrained.cc (working copy)
@@ -52,7 +52,7 @@
#include <mln/arith/revert.hh>
#include <mln/transform/distance_geodesic.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include "tests/data.hh"
Index: tests/morpho/reconstruction/by_erosion/union_find.cc
--- tests/morpho/reconstruction/by_erosion/union_find.cc (revision 3927)
+++ tests/morpho/reconstruction/by_erosion/union_find.cc (working copy)
@@ -35,7 +35,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/morpho/reconstruction/by_erosion/union_find.hh>
Index: tests/morpho/reconstruction/by_dilation/union_find.cc
--- tests/morpho/reconstruction/by_dilation/union_find.cc (revision 3927)
+++ tests/morpho/reconstruction/by_dilation/union_find.cc (working copy)
@@ -35,7 +35,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/morpho/reconstruction/by_dilation/union_find.hh>
Index: tests/morpho/rank_filter.cc
--- tests/morpho/rank_filter.cc (revision 3927)
+++ tests/morpho/rank_filter.cc (working copy)
@@ -38,8 +38,8 @@
#include <mln/value/int_u8.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
-#include <mln/level/median.hh>
+#include <mln/data/compare.hh>
+#include <mln/data/median.hh>
#include <mln/morpho/rank_filter.hh>
#include <mln/morpho/dilation.hh>
Index: tests/morpho/lena_line_graph_image_wst2.cc
--- tests/morpho/lena_line_graph_image_wst2.cc (revision 3927)
+++ tests/morpho/lena_line_graph_image_wst2.cc (working copy)
@@ -64,7 +64,7 @@
#include <mln/morpho/line_gradient.hh>
#include <mln/morpho/closing/area_on_vertices.hh>
#include <mln/morpho/meyer_wst.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/value/int_u8.hh>
#include <mln/value/int_u16.hh>
Index: tests/io/pgm/pgm27.cc
--- tests/io/pgm/pgm27.cc (revision 3927)
+++ tests/io/pgm/pgm27.cc (working copy)
@@ -38,8 +38,8 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/transform.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/transform.hh>
+#include <mln/data/compare.hh>
#include "tests/data.hh"
@@ -79,14 +79,14 @@
image2d<int_u8> lena = io::pgm::load<int_u8>(MLN_IMG_DIR "/lena.pgm");
image2d<int_u27> out(lena.domain());
- out = level::transform(lena, to27bits());
+ out = data::transform(lena, to27bits());
io::pgm::save(out, "out27.pgm");
image2d<int_u27> lena2;
io::pgm::load(lena2, "out27.pgm");
image2d<int_u8> out2(lena.domain());
- out2 = level::transform(lena2, to8bits());
+ out2 = data::transform(lena2, to8bits());
io::pgm::save(out2, "out8.pgm");
assert(out2 == lena);
Index: tests/io/pgm/pgm19.cc
--- tests/io/pgm/pgm19.cc (revision 3927)
+++ tests/io/pgm/pgm19.cc (working copy)
@@ -37,8 +37,8 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/transform.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/transform.hh>
+#include <mln/data/compare.hh>
#include "tests/data.hh"
@@ -80,13 +80,13 @@
image2d<int_u8> lena = io::pgm::load<int_u8>(MLN_IMG_DIR "/lena.pgm");
image2d<int_u19> out(lena.domain());
- out = level::transform(lena, to19bits());
+ out = data::transform(lena, to19bits());
io::pgm::save(out, "out19.pgm");
image2d<int_u19> lena2 = io::pgm::load<int_u19>("out19.pgm");
image2d<int_u8> out2(lena.domain());
- out2 = level::transform(lena2, to8bits());
+ out2 = data::transform(lena2, to8bits());
io::pgm::save(out2, "out8.pgm");
assert(out2 == lena);
}
Index: tests/io/pgm/pgm.cc
--- tests/io/pgm/pgm.cc (revision 3927)
+++ tests/io/pgm/pgm.cc (working copy)
@@ -41,7 +41,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/literal/colors.hh>
Index: tests/io/pgm/pgm16.cc
--- tests/io/pgm/pgm16.cc (revision 3927)
+++ tests/io/pgm/pgm16.cc (working copy)
@@ -39,7 +39,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include "tests/data.hh"
@@ -82,13 +82,13 @@
image2d<int_u8> lena = io::pgm::load<int_u8>(MLN_IMG_DIR "/lena.pgm");
image2d<int_u16> out(lena.domain());
- out = level::transform(lena, to16bits());
+ out = data::transform(lena, to16bits());
io::pgm::save(out, "out16.pgm");
image2d<int_u16> lena2 = io::pgm::load<int_u16>("out16.pgm");
image2d<int_u8> out2(lena.domain());
- out2 = level::transform(lena2, to8bits());
+ out2 = data::transform(lena2, to8bits());
io::pgm::save(out2, "out8.pgm");
}
Index: tests/io/fits/fits.cc
--- tests/io/fits/fits.cc (revision 3927)
+++ tests/io/fits/fits.cc (working copy)
@@ -32,7 +32,7 @@
#include <mln/core/image/image2d.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/println.hh>
#include <mln/io/fits/load.hh>
Index: tests/io/dump/dump.cc
--- tests/io/dump/dump.cc (revision 3927)
+++ tests/io/dump/dump.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/io/dump/load.hh>
#include <mln/io/dump/save.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
Index: tests/io/tiff/load.cc
--- tests/io/tiff/load.cc (revision 3927)
+++ tests/io/tiff/load.cc (working copy)
@@ -32,7 +32,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/io/tiff/load.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
Index: tests/io/tiff/tiff2pbm.cc
--- tests/io/tiff/tiff2pbm.cc (revision 3927)
+++ tests/io/tiff/tiff2pbm.cc (working copy)
@@ -1,7 +1,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/io/tiff/load.hh>
#include <mln/io/pbm/save.hh>
-// #include <mln/level/convert.hh>
+// #include <mln/data/convert.hh>
int main(int argc, char *argv[])
@@ -19,5 +19,5 @@
io::pbm::save(ima, argv[2]);
// io::ppm::save(ima, argv[2]);
-// io::pbm::save(level::convert(bool(), ima), argv[2]);
+// io::pbm::save(data::convert(bool(), ima), argv[2]);
}
Index: tests/io/dicom/dicom.cc
--- tests/io/dicom/dicom.cc (revision 3927)
+++ tests/io/dicom/dicom.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/io/dicom/load.hh>
#include <mln/io/dump/save.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/value/int_u12.hh>
Index: tests/io/magick/save.cc
--- tests/io/magick/save.cc (revision 3927)
+++ tests/io/magick/save.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/io/magick/save.hh>
#include <mln/io/ppm/load.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/io/magick/load.hh>
Index: tests/io/magick/load.cc
--- tests/io/magick/load.cc (revision 3927)
+++ tests/io/magick/load.cc (working copy)
@@ -31,7 +31,7 @@
#include <mln/core/image/image2d.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/io/magick/load.hh>
#include <mln/io/ppm/load.hh>
Index: tests/io/ppm/ppm.cc
--- tests/io/ppm/ppm.cc (revision 3927)
+++ tests/io/ppm/ppm.cc (working copy)
@@ -38,7 +38,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/util/array.hh>
Index: tests/io/ppm/ppm23.cc
--- tests/io/ppm/ppm23.cc (revision 3927)
+++ tests/io/ppm/ppm23.cc (working copy)
@@ -38,7 +38,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include "tests/data.hh"
Index: tests/io/ppm/ppm16.cc
--- tests/io/ppm/ppm16.cc (revision 3927)
+++ tests/io/ppm/ppm16.cc (working copy)
@@ -39,7 +39,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include "tests/data.hh"
Index: tests/io/pbm/pbm.cc
--- tests/io/pbm/pbm.cc (revision 3927)
+++ tests/io/pbm/pbm.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/pbm/save.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include "tests/data.hh"
Index: tests/Makefile.am
--- tests/Makefile.am (revision 3927)
+++ tests/Makefile.am (working copy)
@@ -23,7 +23,6 @@
histo \
io \
labeling \
- level \
linear \
literal \
logical \
Index: tests/logical/not.cc
--- tests/logical/not.cc (revision 3927)
+++ tests/logical/not.cc (working copy)
@@ -32,7 +32,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/logical/not.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
Index: tests/logical/or.cc
--- tests/logical/or.cc (revision 3927)
+++ tests/logical/or.cc (working copy)
@@ -32,7 +32,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/logical/or.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
Index: tests/logical/and.cc
--- tests/logical/and.cc (revision 3927)
+++ tests/logical/and.cc (working copy)
@@ -32,7 +32,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/logical/and.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
Index: tests/logical/and_not.cc
--- tests/logical/and_not.cc (revision 3927)
+++ tests/logical/and_not.cc (working copy)
@@ -32,7 +32,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/logical/and_not.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
Index: tests/logical/xor.cc
--- tests/logical/xor.cc (revision 3927)
+++ tests/logical/xor.cc (working copy)
@@ -32,7 +32,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/logical/xor.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
int main()
Index: tests/canvas/chamfer.cc
--- tests/canvas/chamfer.cc (revision 3927)
+++ tests/canvas/chamfer.cc (working copy)
@@ -41,7 +41,7 @@
#include <mln/make/win_chamfer.hh>
#include <mln/geom/chamfer.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/opt/at.hh>
Index: tests/canvas/browsing/snake_generic_2d_vert.cc
--- tests/canvas/browsing/snake_generic_2d_vert.cc (revision 3927)
+++ tests/canvas/browsing/snake_generic_2d_vert.cc (working copy)
@@ -101,6 +101,6 @@
image2d<unsigned> ima2(3, 3);
std::cout << ima2.bbox() << std::endl;
- my_test(ima2, fun::p2v::iota, canvas::browsing::snake_generic);
+ my_test(ima2, fun::p2v::iota(), canvas::browsing::snake_generic);
debug::println(ima2);
}
Index: tests/canvas/browsing/snake_generic_2d_hori.cc
--- tests/canvas/browsing/snake_generic_2d_hori.cc (revision 3927)
+++ tests/canvas/browsing/snake_generic_2d_hori.cc (working copy)
@@ -101,6 +101,6 @@
image2d<unsigned> ima2(3, 3);
std::cout << ima2.bbox() << std::endl;
- my_test(ima2, fun::p2v::iota, canvas::browsing::snake_generic);
+ my_test(ima2, fun::p2v::iota(), canvas::browsing::snake_generic);
debug::println(ima2);
}
Index: tests/canvas/browsing/snake_generic_3d_vert.cc
--- tests/canvas/browsing/snake_generic_3d_vert.cc (revision 3927)
+++ tests/canvas/browsing/snake_generic_3d_vert.cc (working copy)
@@ -109,6 +109,6 @@
ima(point3d(0,0,0)) = 42;
std::cout << ima.bbox() << std::endl;
- my_test(ima, fun::p2v::iota, canvas::browsing::snake_generic);
+ my_test(ima, fun::p2v::iota(), canvas::browsing::snake_generic);
debug::println(ima);
}
Index: tests/canvas/browsing/diagonal2d.cc
--- tests/canvas/browsing/diagonal2d.cc (revision 3927)
+++ tests/canvas/browsing/diagonal2d.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,16 +26,16 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/canvas/browsing/diagonal2d.cc
- *
- * \brief Tests on mln::canvas::browsing::diagonal2d.
- */
+/// \file tests/canvas/browsing/diagonal2d.cc
+///
+/// \brief Tests on mln::canvas::browsing::diagonal2d.
#include <mln/core/image/image2d.hh>
#include <mln/canvas/browsing/diagonal2d.hh>
#include <mln/fun/p2v/iota.hh>
#include <mln/debug/println.hh>
+
template <typename I_, typename F>
struct assign_browsing_functor
{
@@ -92,6 +93,6 @@
image2d<unsigned> ima2(10, 10);
std::cout << ima2.bbox() << std::endl;
- my_test(ima2, fun::p2v::iota, canvas::browsing::diagonal2d);
+ my_test(ima2, fun::p2v::iota(), canvas::browsing::diagonal2d);
debug::println(ima2);
}
Index: tests/canvas/browsing/snake_generic_3d_hori.cc
--- tests/canvas/browsing/snake_generic_3d_hori.cc (revision 3927)
+++ tests/canvas/browsing/snake_generic_3d_hori.cc (working copy)
@@ -109,6 +109,6 @@
ima(point3d(0,0,0)) = 42;
std::cout << ima.bbox() << std::endl;
- my_test(ima, fun::p2v::iota, canvas::browsing::snake_generic);
+ my_test(ima, fun::p2v::iota(), canvas::browsing::snake_generic);
debug::println(ima);
}
Index: tests/canvas/browsing/backdiagonal2d.cc
--- tests/canvas/browsing/backdiagonal2d.cc (revision 3927)
+++ tests/canvas/browsing/backdiagonal2d.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,10 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/canvas/browsing/backdiagonal2d.cc
- *
- * \brief Tests on mln::canvas::browsing::backdiagonal2d.
- */
+/// \file tests/canvas/browsing/backdiagonal2d.cc
+///
+/// \brief Tests on mln::canvas::browsing::backdiagonal2d.
#include <mln/core/image/image2d.hh>
#include <mln/canvas/browsing/backdiagonal2d.hh>
@@ -92,6 +92,6 @@
image2d<unsigned> ima2(10, 10);
std::cout << ima2.bbox() << std::endl;
- my_test(ima2, fun::p2v::iota, canvas::browsing::backdiagonal2d);
+ my_test(ima2, fun::p2v::iota(), canvas::browsing::backdiagonal2d);
debug::println(ima2);
}
Index: tests/labeling/mean_values.cc
--- tests/labeling/mean_values.cc (revision 3927)
+++ tests/labeling/mean_values.cc (working copy)
@@ -31,7 +31,7 @@
#include <mln/core/image/image2d.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/labeling/mean_values.hh>
Index: tests/labeling/n_max.cc
--- tests/labeling/n_max.cc (revision 3927)
+++ tests/labeling/n_max.cc (working copy)
@@ -39,7 +39,7 @@
#include <mln/labeling/n_max.hh>
#include <mln/fun/v2b/threshold.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/accu/count.hh>
@@ -55,7 +55,7 @@
image2d<int_u8> lena = io::pgm::load<int_u8>(MLN_IMG_DIR "/tiny.pgm");
- image2d<bool> threshold = level::transform(lena, fun::v2b::threshold<int_u8>(100));
+ image2d<bool> threshold = data::transform(lena, fun::v2b::threshold<int_u8>(100));
label_8 nlabels;
image2d<label_8> labels = labeling::flat_zones(threshold, c4(), nlabels);
accu::count<int_u8> a_;
Index: tests/labeling/flat_zones.cc
--- tests/labeling/flat_zones.cc (revision 3927)
+++ tests/labeling/flat_zones.cc (working copy)
@@ -40,7 +40,7 @@
#include <mln/labeling/blobs.hh>
#include <mln/pw/all.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include "tests/data.hh"
Index: tests/labeling/wrap.cc
--- tests/labeling/wrap.cc (revision 3927)
+++ tests/labeling/wrap.cc (working copy)
@@ -36,7 +36,7 @@
#include <mln/value/int_u16.hh>
#include <mln/make/image2d.hh>
#include <mln/labeling/wrap.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/println.hh>
Index: tests/labeling/foreground.cc
--- tests/labeling/foreground.cc (revision 3927)
+++ tests/labeling/foreground.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/core/var.hh>
#include <mln/io/pbm/load.hh>
#include <mln/core/alias/neighb2d.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/labeling/foreground.hh>
#include "tests/data.hh"
@@ -56,11 +56,11 @@
mln_assertion(n == 33);
{
- // Note that labeling::foreground actually is labeling::level
+ // Note that labeling::foreground actually is labeling::value
// which calls canvas::labeling_video and its generic dispatch
// leads to canvas::impl::generic::labeling.
- labeling::impl::level_functor<I> f(pic, true);
+ labeling::impl::value_functor<I> f(pic, true);
unsigned n_;
ref = canvas::impl::generic::labeling(pic, nbh, n_,
Index: tests/labeling/value.cc
--- tests/labeling/value.cc (revision 3920)
+++ tests/labeling/value.cc (working copy)
@@ -26,9 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/labeling/level.cc
+/// \file tests/labeling/value.cc
///
-/// Test on mln::labeling::level.
+/// Test on mln::labeling::value.
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
@@ -37,7 +37,7 @@
#include <mln/accu/count.hh>
#include <mln/accu/compute.hh>
-#include <mln/labeling/level.hh>
+#include <mln/labeling/value.hh>
#include <mln/data/paste.hh>
#include <mln/pw/all.hh>
#include <mln/core/image/dmorph/image_if.hh>
@@ -58,7 +58,7 @@
unsigned n, npixels = 0;
for (unsigned l = 0; l <= 255; ++l)
{
- image2d<unsigned> labels = labeling::level(lena, l, c4(), n);
+ image2d<unsigned> labels = labeling::value(lena, l, c4(), n);
unsigned npix =
accu::compute(accu::meta::count(),
labels | (pw::value(labels) != pw::cst(0u)));
Index: tests/labeling/pack.cc
--- tests/labeling/pack.cc (revision 3927)
+++ tests/labeling/pack.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/labeling/pack.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/value/label_16.hh>
#include <mln/debug/println.hh>
Index: tests/labeling/Makefile.am
--- tests/labeling/Makefile.am (revision 3927)
+++ tests/labeling/Makefile.am (working copy)
@@ -10,13 +10,13 @@
fill_holes \
flat_zones \
foreground \
- level \
mean_values \
n_max \
pack \
regional_maxima \
regional_minima \
relabel \
+ value \
wrap
background_SOURCES = background.cc
@@ -26,13 +26,13 @@
fill_holes_SOURCES = fill_holes.cc
flat_zones_SOURCES = flat_zones.cc
foreground_SOURCES = foreground.cc
-level_SOURCES = level.cc
mean_values_SOURCES = mean_values.cc
n_max_SOURCES = n_max.cc
pack_SOURCES = pack.cc
regional_maxima_SOURCES = regional_maxima.cc
regional_minima_SOURCES = regional_minima.cc
relabel_SOURCES = relabel.cc
+value_SOURCES = value.cc
wrap_SOURCES = wrap.cc
TESTS = $(check_PROGRAMS)
Index: tests/labeling/colorize.cc
--- tests/labeling/colorize.cc (revision 3927)
+++ tests/labeling/colorize.cc (working copy)
@@ -33,7 +33,7 @@
# include <mln/value/rgb8.hh>
# include <mln/value/int_u8.hh>
# include <mln/labeling/colorize.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
int main()
Index: tests/util/tree_to_image.cc
--- tests/util/tree_to_image.cc (revision 3927)
+++ tests/util/tree_to_image.cc (working copy)
@@ -37,9 +37,9 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/site_set/p_set.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/io/pgm/save.hh>
#include <vector>
#include <mln/util/tree_to_image.hh>
Index: tests/util/tree_fast_to_image.cc
--- tests/util/tree_fast_to_image.cc (revision 3927)
+++ tests/util/tree_fast_to_image.cc (working copy)
@@ -35,9 +35,9 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/site_set/p_set.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/io/pgm/save.hh>
#include <vector>
#include <mln/util/tree_fast_to_image.hh>
Index: apps/statues/mesh-max-curv.cc
--- apps/statues/mesh-max-curv.cc (revision 3927)
+++ apps/statues/mesh-max-curv.cc (working copy)
@@ -96,7 +96,7 @@
OFF file format. */
std::vector<float> normalized_face_m(face_m.size(), 0.0f);
std::pair<float, float> min_max(acc);
- // FIXME: Taken from mln/level/stretch.hh (this should be factored).
+ // FIXME: Taken from mln/data/stretch.hh (this should be factored).
float min = min_max.first;
float max = min_max.second;
// Don't normalize actually if the curvature is constant (i.e.,
Index: apps/statues/mesh-complex-max-curv.cc
--- apps/statues/mesh-complex-max-curv.cc (revision 3927)
+++ apps/statues/mesh-complex-max-curv.cc (working copy)
@@ -46,7 +46,7 @@
#include <mln/math/sqr.hh>
#include <mln/accu/min_max.hh>
#include <mln/fun/v2v/linear.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/literal/white.hh>
@@ -140,7 +140,7 @@
ima_t output(max_curv.domain());
mln::data::fill(output, mln::literal::zero);
std::pair<float, float> min_max(acc);
- // FIXME: Taken from mln/level/stretch.hh (this should be factored).
+ // FIXME: Taken from mln/data/stretch.hh (this should be factored).
float min = min_max.first;
float max = min_max.second;
std::cout << min << std::endl;
@@ -154,7 +154,7 @@
float a = (M - m) / (max - min);
float b = (m * max - M * min) / (max - min);
mln::fun::v2v::linear<float, float, float> f(a, b);
- output = mln::level::transform(max_curv, f);
+ output = mln::data::transform(max_curv, f);
}
// Output.
Index: doc/benchmark/canvas.cc
--- doc/benchmark/canvas.cc (revision 3927)
+++ doc/benchmark/canvas.cc (working copy)
@@ -27,7 +27,7 @@
/// \file doc/benchmark/canvas.cc
///
-/// Test on mln::labeling::level.
+/// Test on mln::labeling::value.
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
@@ -253,7 +253,7 @@
level(const Image<I>& input, const mln_value(I)& val, const Neighborhood<N>& nbh,
L& nlabels)
{
- trace::entering("labeling::level");
+ trace::entering("labeling::value");
typedef level_functor<I,N,L> F;
F f(exact(input), val, exact(nbh));
@@ -261,7 +261,7 @@
nlabels = run.nlabels;
- trace::exiting("labeling::level");
+ trace::exiting("labeling::value");
return run.output;
}
@@ -285,7 +285,7 @@
t.start();
unsigned n;
for (unsigned l = 0; l <= 255; ++l)
- old_labeling::level(lena, l, c4(), n);
+ old_labeling::value(lena, l, c4(), n);
std::cout << "canvas as class: " << t.read() << std::endl;
}
@@ -294,7 +294,7 @@
t.start();
unsigned n;
for (unsigned l = 0; l <= 255; ++l)
- labeling::impl::generic::level(lena, l, c4(), n);
+ labeling::impl::generic::data(lena, l, c4(), n);
std::cout << "canvas as proc.: " << t.read() << std::endl;
}
Index: doc/benchmark/median/median_bench.cc
--- doc/benchmark/median/median_bench.cc (revision 3927)
+++ doc/benchmark/median/median_bench.cc (working copy)
@@ -38,9 +38,9 @@
#include <mln/debug/iota.hh>
#include <mln/debug/println.hh>
-#include <mln/level/approx/median.hh>
-#include <mln/level/fast_median.hh>
-#include <mln/level/median.hh>
+#include <mln/data/approx/median.hh>
+#include <mln/data/fast_median.hh>
+#include <mln/data/median.hh>
#include <mln/core/dpoints_pixter.hh>
#include <mln/core/pixel.hh>
@@ -88,17 +88,17 @@
timer chrono;
chrono.start();
- level::fast_median(input, win, output);
+ data::fast_median(input, win, output);
chrono.stop();
std::cout << "Fast median : " << chrono << std::endl;
chrono.start();
- level::median(input, win, output);
+ data::median(input, win, output);
chrono.stop();
std::cout << "Median : " << chrono << std::endl;
chrono.start();
- level::approx::median(input, exact(win), output);
+ data::approx::median(input, exact(win), output);
chrono.stop();
std::cout << "Approx median : " << chrono << std::endl;
Index: doc/examples/trash/tuto_one.cc
--- doc/examples/trash/tuto_one.cc (revision 3927)
+++ doc/examples/trash/tuto_one.cc (working copy)
@@ -11,7 +11,7 @@
# include <mln/core/alias/neighb2d.hh>
# include <mln/make/double_neighb2d.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/literal/black.hh>
# include <mln/debug/println.hh>
@@ -79,7 +79,7 @@
debug::println(labeling::regional_minima(clo, nbh, l));
debug::println(wst);
- io::ppm::save(level::transform(wst, colorize(l)), filename);
+ io::ppm::save(data::transform(wst, colorize(l)), filename);
}
Index: doc/examples/trash/labeling_algo.cc
--- doc/examples/trash/labeling_algo.cc (revision 3927)
+++ doc/examples/trash/labeling_algo.cc (working copy)
@@ -34,7 +34,7 @@
# include <mln/core/alias/neighb2d.hh>
# include <mln/value/int_u8.hh>
# include <mln/data/fill.hh>
-# include <mln/level/stretch.hh>
+# include <mln/data/stretch.hh>
# include <mln/border/fill.hh>
# include <mln/io/pbm/load.hh>
# include <mln/io/pgm/save.hh>
@@ -68,7 +68,7 @@
image2d<int_u8> inte2(inte.domain());
- level::stretch(inte, inte2);
+ data::stretch(inte, inte2);
io::pgm::save(inte2, "inte.pgm");
Index: doc/examples/trash/tuto_bis.cc
--- doc/examples/trash/tuto_bis.cc (revision 3927)
+++ doc/examples/trash/tuto_bis.cc (working copy)
@@ -20,7 +20,7 @@
# include <mln/data/paste.hh>
# include <mln/data/fill.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/extension/fill.hh>
# include <mln/morpho/meyer_wst.hh>
@@ -263,7 +263,7 @@
for (unsigned i = 1; i <= nbasins; ++i)
std::cout << "mean value of basin #" << i << " is " << m(i) << std::endl;
-// data::fill(cell, level::transform(lab, m));
+// data::fill(cell, data::transform(lab, m));
// debug::println(cell);
// // 2 2 2
// //
Index: doc/examples/trash/graph.cc
--- doc/examples/trash/graph.cc (revision 3927)
+++ doc/examples/trash/graph.cc (working copy)
@@ -100,7 +100,7 @@
p_vertices<G, fv2p_t> pv(g, fv2p);
#ifndef NOUT
- image2d<rgb8> gima = level::convert(rgb8(), ima);
+ image2d<rgb8> gima = data::convert(rgb8(), ima);
debug::draw_graph(gima,
pv,
pw::cst(literal::cyan),
@@ -123,7 +123,7 @@
pvlg_t pvlg(lg, convert::to<i2e_t>(lines));
#ifndef NOUT
- image2d<rgb8> lgima = level::convert(rgb8(), ima);
+ image2d<rgb8> lgima = data::convert(rgb8(), ima);
debug::draw_graph(lgima,
pvlg,
pw::cst(literal::cyan),
@@ -154,7 +154,7 @@
#ifndef NOUT
- image2d<rgb8> lgima2 = level::convert(rgb8(), ima);
+ image2d<rgb8> lgima2 = data::convert(rgb8(), ima);
debug::draw_graph(lgima2, pvlg, pw::cst(literal::cyan), ecolor);
io::ppm::save(lgima2, "05-line-graph-cleanup.ppm");
#endif
Index: doc/examples/accu-right-instanciation.cc
--- doc/examples/accu-right-instanciation.cc (revision 3927)
+++ doc/examples/accu-right-instanciation.cc (working copy)
@@ -2,7 +2,7 @@
#include <mln/value/int_u8.hh>
-#include <mln/level/compute.hh>
+#include <mln/data/compute.hh>
#include <mln/accu/max.hh>
@@ -13,6 +13,6 @@
image2d<value::int_u8> ima(2, 3);
// \{
- level::compute(accu::meta::max(), ima);
+ data::compute(accu::meta::max(), ima);
// \}
}
Index: doc/examples/extend.cc
--- doc/examples/extend.cc (revision 3927)
+++ doc/examples/extend.cc (working copy)
@@ -3,7 +3,7 @@
#include <mln/core/routine/extend.hh>
#include <mln/core/var.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/fun/p2b/big_chess.hh>
@@ -97,7 +97,7 @@
initialize(mask, lena);
data::fill(mask, true);
data::fill((mask | ima_roi.domain()).rw(), false);
- mln_VAR(ima_ext, level::transform(lena | (pw::value(mask) != false), saturate_rgb8()));
+ mln_VAR(ima_ext, data::transform(lena | (pw::value(mask) != false), saturate_rgb8()));
data::paste(ima_ext, lena);
data::paste(ima_roi, lena);
doc::ppmsave(lena, "extend");
Index: doc/examples/tuto3/first_routine.cc
--- doc/examples/tuto3/first_routine.cc (revision 3927)
+++ doc/examples/tuto3/first_routine.cc (working copy)
@@ -10,7 +10,7 @@
#include <mln/labeling/compute.hh>
#include <mln/labeling/blobs.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/util/array.hh>
1
0
* demat.hh,
* src/photo.cc,
* src/photo_basic.cc,
* src/table.cc: removed.
---
scribo/ChangeLog | 11 +-
scribo/demat.hh | 1601 ---------------------------------------------
scribo/src/photo.cc | 64 --
scribo/src/photo_basic.cc | 107 ---
scribo/src/table.cc | 66 --
5 files changed, 10 insertions(+), 1839 deletions(-)
delete mode 100644 scribo/demat.hh
delete mode 100644 scribo/src/photo.cc
delete mode 100644 scribo/src/photo_basic.cc
delete mode 100644 scribo/src/table.cc
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 2117f69..b48929a 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,4 +1,13 @@
-2009-05-28 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+2009-05-29 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ Remove unused files in Scribo.
+
+ * demat.hh,
+ * src/photo.cc,
+ * src/photo_basic.cc,
+ * src/table.cc: removed.
+
+2009-05-29 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
Make a sample extracting text in a photo.
diff --git a/scribo/demat.hh b/scribo/demat.hh
deleted file mode 100644
index e8c0e7b..0000000
--- a/scribo/demat.hh
+++ /dev/null
@@ -1,1601 +0,0 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
-// (LRDE)
-//
-// This file is part of the Olena Library. This library is free
-// software; you can redistribute it and/or modify it under the terms
-// of the GNU General Public License version 2 as published by the
-// Free Software Foundation.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this library; see the file COPYING. If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to
-// produce an executable, this file does not by itself cause the
-// resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
-
-#ifndef DEMAT_HH_
-# define DEMAT_HH_
-
-# define for_all_ncomponents(C, NCOMP) \
- for (unsigned C = 1; C <= NCOMP; ++C)
-
-# define for_all_components(C, S) \
- for (unsigned C = 1; C < S.nelements(); ++C)
-
-# define for_all_elements(E, S) \
- for (unsigned E = 0; E < S.nelements(); ++E)
-
-# include <libgen.h>
-# include <sstream>
-# include <queue>
-
-# include <mln/essential/1d.hh>
-# include <mln/essential/2d.hh>
-# include <mln/morpho/elementary/dilation.hh>
-# include <mln/labeling/background.hh>
-# include <mln/transform/influence_zone_geodesic.hh>
-# include <mln/debug/draw_graph.hh>
-# include <mln/make/graph.hh>
-# include <mln/make/region_adjacency_graph.hh>
-# include <mln/util/graph.hh>
-# include <mln/util/line_graph.hh>
-# include <mln/io/txt/save.hh>
-
-# include <mln/canvas/browsing/depth_first_search.hh>
-# include <mln/transform/distance_and_influence_zone_geodesic.hh>
-# include <mln/fun/l2l/wrap.hh>
-# include <mln/fun/meta/all.hh>
-
-# include <tesseract/baseapi.h>
-
-namespace scribo
-{
-
- namespace internal
- {
-
- using namespace mln;
- using value::label_16;
- using value::label_8;
- using value::rgb8;
- using value::int_u8;
-
-
- struct settings_t
- {
- settings_t()
- {
- ero_line_width = 51;
- rank_filter = 6;
- bbox_enlarge = 1 + ero_line_width / 2 - rank_filter;
- bbox_distance = 20;
- min_comp_size = 5;
- max_comp_size = 1000;
- max_dist_lines = 10;
- max_txt_box_height = 100;
- max_cos = 0.994;
- repair_max_dist = 51;
- }
-
- unsigned bbox_enlarge;
- unsigned ero_line_width;
- unsigned bbox_distance;
- unsigned min_comp_size;
- unsigned max_comp_size;
- unsigned max_dist_lines;
- unsigned repair_max_dist;
- int max_txt_box_height;
- unsigned rank_filter;
- bool treat_tables;
- float max_cos;
- };
-
-
-
- settings_t settings;
- char *input_file = 0;
-
-
-
- /// Returns a formated output file name.
- std::string output_file(const char *name)
- {
- static int file_id = 1;
-
- std::ostringstream os;
- os << "./"
- << input_file
- << "_";
-
- if (file_id < 10)
- os << "0";
-
- os << file_id++
- << "_"
- << name;
- return os.str();
- }
-
-
- /// Returns the edge central sites of a box
- ///
- /// \param[in] b the bbbox
- /// \param[in] dim the dimension used to compute the site.
- /*!
- **
- ** If dim == 0, returns the left and right central sites.
- **
- ** |-------|
- ** X X
- ** |-------|
- **
- ** If dim == 1, returns the top and bottom central sites.
- **
- ** |---X---|
- ** | |
- ** |---X---|
- **
- */
- util::couple<point2d, point2d>
- central_sites(const box2d& b, unsigned dim)
- {
- unsigned n = b.pmax()[dim] - b.pmin()[dim];
-
- point2d p1 = b.center();
- p1[dim] -= n / 2;
- point2d p2 = b.center();
- p2[dim] += n / 2;
-
- return make::couple(p1, p2);
- }
-
-
-
- /// Draw a list of bboxes and their center in a RGB8 image.
- void draw_component_boxes(image2d<rgb8>& output, const util::array<box2d>& boxes)
- {
- for_all_components(i, boxes)
- if (boxes[i].is_valid())
- {
- output(boxes[i].center()) = literal::red;
- draw::box(output, boxes[i], literal::red);
- }
- }
-
-
-
- /// Colorize and save a labeled image.
- template <typename V>
- void save_lbl_image(const image2d<V>& lbl, unsigned nlabels,
- const char *filename)
- {
- image2d<rgb8> output = labeling::colorize(rgb8(), lbl, nlabels);
- io::ppm::save(output, output_file(filename));
- }
-
-
-
-
-
-
-
- //-*****************************************
- /// Functions related to Text Recognition.
- //-*****************************************
- /// \{
-
- /// Passes the text bboxes to Tesseract and store the result in an image of
- /// char.
- /// \param[in] in image from where the text bboxes are extracted.
- /// \param[in] lbl labeled image.
- /// \param[in] tboxes array of text bboxes.
- ///
- /// FIXME: For each text bbox, we create a new image. We may like to avoid that.
- void
- text_recognition(const image2d<bool>& in, const image2d<label_16>& lbl,
- const util::array<box2d>& tboxes)
- {
- /// Use txt bboxes here with Tesseract
- std::cout << "Text recognition..." << std::endl;
-
- TessBaseAPI::InitWithLanguage(NULL, NULL, "fra", NULL, false, 0, NULL);
- image2d<char> txt(in.domain());
- data::fill(txt, ' ');
-
- for_all_components(i, tboxes)
- {
- if (tboxes[i].is_valid())
- {
- image2d<bool> b(tboxes[i], 0);
- data::fill(b, false);
- data::fill((b | (pw::value(lbl) == pw::cst(i))).rw(), true);
-
- char* s = TessBaseAPI::TesseractRect(
- (unsigned char*) b.buffer(),
- sizeof (bool), // Pixel size.
- b.ncols() * sizeof (bool), // Row_offset
- 0, // Left
- 0, // Top
- b.ncols(), // n cols
- b.nrows()); // n rows
-
-
-
- point2d p = tboxes[i].center();
- p.col() -= (tboxes[i].pmax().col() - tboxes[i].pmin().col()) / 2;
- if (s != 0)
- debug::put_word(txt, p, s);
- free(s);
- }
- }
- io::txt::save(txt, "out.txt");
- }
-
- /// \}
- //--------------------------------------------------
- /// End of functions related to Text Recognition.
- //--------------------------------------------------
-
-
-
-
-
- //-*********************************************
- /// Functions related to the table extraction
- //-*********************************************
- /// \{
-
- /// Align table lines bboxes according to a given dimension.
- ///
- /// \return A list of the resulting aligned cols. Each integer is actually
- /// a col number.
- /*
- **
- ** 0 1 3 4 5 6
- ** ------------ -------
- ** 0 |- - - - - | | {0,1} |
- ** 1 | - - | | {0,1} |
- ** 2 | | | {1} |
- ** 3 | | | |
- ** 4 | | | {2} |
- ** 5 |- - | | {2} |
- ** 6 | | | {2} |
- **
- ** \p hboxes contains all the table lines bboxes. Each bbox is
- ** associated with an id, its location in the array.
- **
- ** For each bbox, its id is marked in a vector. The location is defined,
- ** according to the given parameter \p dim, either by the row or the col
- ** value of the pmin site.
- **
- ** Ids are then propagated in the vector according a small delta value.
- ** if bbox ids are at the same location in the vector, their related bboxes
- ** are likely to be on the same line.
- **
- ** Finally, iterate over the vector until all bboxes have been treated.
- ** For each iteration, the set with a specific number of elements is found
- ** and all bboxes referenced in this set are aligned on the same row or col.
- **
- */
- template <typename P>
- util::array<int>
- align_lines(unsigned nsites,
- int min_coord,
- int max_coord,
- util::array<box<P> >& line_boxes,
- unsigned dim)
- {
- trace::entering("scribo::internal::align_lines");
-
- mln_precondition(nsites > 0);
-
- std::cout << "extracting table lines..." << std::endl;
- util::array< util::set<unsigned> > lines;
- lines.resize(nsites);
-
- // Map components with actual lines.
- for_all_components(i, line_boxes)
- {
- int minline = line_boxes[i].pmin()[dim] - 5;
- minline = (minline < min_coord ? min_coord : minline);
- int maxline = line_boxes[i].pmax()[dim] + 5;
- maxline = (maxline > max_coord ? max_coord : maxline);
-
- for (int line = minline;
- line <= maxline; ++line)
- lines[line].insert(i);
- }
-
- // Init box2line
- util::array<int> box2line;
- box2line.resize(line_boxes.nelements());
- for_all_elements(i, box2line)
- box2line[i] = -1;
-
- // Find the line with the highest element count.
- unsigned max_nelts = 0;
- for_all_elements(i, lines)
- if (max_nelts < lines[i].nelements())
- max_nelts = lines[i].nelements();
-
- // Aligning lines
- // FIXME: not optimal... Make it faster!
- // We may do too much iterations (while loop) and some of them may
- // be done for nothing...
- util::array<int> newlines;
- while (max_nelts > 0)
- {
- for_all_elements(i, lines)
- if (lines[i].nelements() == max_nelts)
- {
- accu::mean<unsigned> mean;
- for_all_elements(j, lines[i])
- if (box2line[lines[i][j]] == -1)
- mean.take(line_boxes[lines[i][j]].center()[dim]);
-
- if (mean.is_valid())
- {
- for_all_elements(j, lines[i])
- if (box2line[lines[i][j]] == -1)
- {
- line_boxes[lines[i][j]].pmin()[dim] = mean.to_result();
- line_boxes[lines[i][j]].pmax()[dim] = mean.to_result();
- box2line[lines[i][j]] = mean.to_result();
- }
- newlines.append(mean.to_result());
- }
- }
- --max_nelts;
- }
-
- trace::exiting("scribo::internal::align_lines");
- return newlines;
- }
-
-
- /// Align line bboxes verticaly.
- ///
- /// \param[in] input Image from which the line bboxes are
- /// extracted from.
- /// \param[in, out] lines_bboxes vertical lines bounding boxes.
- ///
- /// \return A list of the resulting aligned cols. Each integer is actually
- /// a col number.
- template <typename I>
- util::array<int>
- align_lines_verticaly(const Image<I>& input,
- util::array<box<mln_site(I)> >& lines_bboxes)
- {
- trace::entering("scribo::internal::align_lines_horizontaly");
-
- mln_precondition(exact(input).is_valid());
- util::array<int> res = align_lines(geom::ncols(input), geom::min_col(input),
- geom::max_col(input), lines_bboxes, 1);
-
- trace::exiting("scribo::internal::align_lines_horizontaly");
- return res;
-
- }
-
- /// Align line bboxes horizontaly.
- ///
- /// \param[in] input Image from which the line bboxes are
- /// extracted from.
- /// \param[in, out] lines_bboxes horizontal lines bounding boxes.
- ///
- /// \return A list of the resulting aligned rows. Each integer is actually
- /// a row number.
- template <typename I>
- util::array<int>
- align_lines_horizontaly(const Image<I>& input,
- util::array<box<mln_site(I)> >& lines_bboxes)
- {
- trace::entering("scribo::internal::align_lines_horizontaly");
-
- mln_precondition(exact(input).is_valid());
- util::array<int> res = align_lines(geom::nrows(input), geom::min_row(input),
- geom::max_row(input), lines_bboxes, 0);
-
- trace::exiting("scribo::internal::align_lines_horizontaly");
- return res;
- }
-
-
- /// Connect vertical and horizontal lines if they are close to each other.
- ///
- /// ------ ------
- /// ---> |
- /// | |
- /// | |
- ///
- template <typename P>
- void
- connect_lines(const util::array<int>& aligned_lines,
- util::array< box<P> >& boxes,
- unsigned dim,
- unsigned dim_size)
- {
- trace::entering("scribo::internal::connect_lines");
-
- image1d<int> l(dim_size);
- data::fill(l, -1);
-
- for_all_elements(i, aligned_lines)
- opt::at(l, aligned_lines[i]) = i;
-
- for (unsigned i = 0; i < settings.max_dist_lines; ++i)
- l = morpho::elementary::dilation(l, c2());
-
- for_all_components(i, boxes)
- {
- util::couple<point2d, point2d> cp = central_sites(boxes[i], dim);
- if (opt::at(l, cp.first()[dim]) != -1)
- boxes[i].pmin()[dim] = aligned_lines[opt::at(l, cp.first()[dim])];
- if (opt::at(l, cp.second()[dim]) != -1)
- boxes[i].pmax()[dim] = aligned_lines[opt::at(l, cp.second()[dim])];
- }
-
- trace::exiting("scribo::internal::connect_lines");
- }
-
-
- /// Connect vertical lines with the new aligned rows.
- template <typename I>
- void
- connect_vertical_lines(const util::array<int>& aligned_rows,
- util::couple<util::array<box<mln_site(I)> >,
- util::array<box<mln_site(I)> > > tblboxes,
- const Image<I>& input)
- {
- trace::entering("scribo::internal::connect_vertical_lines");
- mln_precondition(exact(input).is_valid());
-
- connect_lines(aligned_rows, tblboxes.first(), 0, exact(input).nrows());
-
- trace::exiting("scribo::internal::connect_vertical_lines");
- }
-
-
- /// Connect horizontal lines with the new aligned columns.
- template <typename I>
- void
- connect_horizontal_lines(const util::array<int>& aligned_cols,
- util::couple<util::array<box<mln_site(I)> >,
- util::array<box<mln_site(I)> > > tblboxes,
- const Image<I>& input)
- {
- trace::entering("scribo::internal::connect_horizontal_lines");
- mln_precondition(exact(input).is_valid());
-
- connect_lines(aligned_cols, tblboxes.second(), 1, exact(input).ncols());
-
- trace::exiting("scribo::internal::connect_horizontal_lines");
- }
-
-
- /// Repair lines with small discontinuities.
- /// FIXME: buggy. Sometimes few lines move or shrink!
- template <unsigned axis, typename I>
- void
- repair_lines(const Image<I>& input_,
- util::array<box<mln_site(I)> >& tblboxes)
- {
- std::cout << "repairing lines" << std::endl;
-
- const I& input = exact(input_);
- typedef mln_site(I) P;
- typedef win::line<mln_grid(P), axis, mln_coord(P)> line_t;
-
- // Initialization
- image2d<unsigned> l(input.domain());
- data::fill(l, 0u);
- for_all_components(i, tblboxes)
- {
- util::couple<point2d, point2d> cp = central_sites(tblboxes[i], axis);
- l(cp.first()) = i;
- l(cp.second()) = i;
- }
-
- // Repair
- extension_val<image2d<unsigned> > l_ext(l, 0u);
-
- util::array<box<P> > result;
- std::vector<bool> to_keep(tblboxes.nelements(), true);
-
- mln_VAR(tbb_ima, extend(l | pw::value(l) != 0u, l));
- line_t vl(settings.repair_max_dist); //FIXME: use a half window, just the bottom of the vertical line.
- mln_piter(tbb_ima_t) p(tbb_ima.domain());
- mln_qiter(line_t) q(vl, p);
- for_all(p)
- for_all(q)
- if (l_ext(q) != 0u && l_ext(q) != l_ext(p))
- {
- to_keep[l_ext(q)] = false;
-
- std::cout << "Merging " << tblboxes[l_ext(p)] << " with " << tblboxes[l_ext(q)] << std::endl;
- tblboxes[l_ext(p)].pmax() = tblboxes[l_ext(q)].pmax();
-
- util::couple<P,P> cp = central_sites(tblboxes[l_ext(q)], axis);
- l_ext(cp.first()) = l_ext(p);
- l_ext(cp.second()) = l_ext(p);
- }
-
-
- // Remove merged boxes.
- for_all_elements(i, tblboxes)
- if (to_keep[i])
- result.append(tblboxes[i]);
-
- std::cout << tblboxes[0] << " - " << result[0] << std::endl;
- std::cout << "previous box count = " << tblboxes.nelements() << " - " << " now = " << result.nelements() << std::endl;
- tblboxes = result;
- }
-
-
- template <typename I>
- void
- repair_vertical_lines(const Image<I>& input,
- util::couple<util::array<box<mln_site(I)> >,
- util::array<box<mln_site(I)> > >& tblboxes)
- {
- repair_lines<0>(input, tblboxes.first());
- }
-
-
- template <typename I>
- void
- repair_horizontal_lines(const Image<I>& input,
- util::couple<util::array<box<mln_site(I)> >,
- util::array<box<mln_site(I)> > >& tblboxes)
- {
- repair_lines<1>(input, tblboxes.second());
- }
-
-
-// void
-// connect_lines2(const util::array<int>& aligned_lines,
-// util::array<box2d>& boxes,
-// unsigned dim,
-// unsigned dim_size)
-// {
-// image1d<int> l(dim_size);
-// data::fill(l, -1);
-//
-// for_all_components(i, boxes)
-// {
-// opt::at(l, boxes[i].pmin()[dim]) = i;
-// opt::at(l, boxes[i].pmax()[dim]) = i;
-// }
-//
-// for (unsigned i = 0; i < settings.max_dist_lines; ++i)
-// l = morpho::elementary::dilation(l, c2());
-//
-// for_all_components(i, boxes)
-// {
-// util::couple<point2d, point2d> cp = central_sites(boxes[i], dim);
-//
-// win::segment1d seg(11);
-// {
-// mln_qiter_(win::segment1d) q(seg, point1d(cp.first()[dim]));
-// for_all(q)
-// if (opt::at(l, q[0]) != -1)
-// {
-// boxes[i].pmin()[dim] = boxes[opt::at(l, q[0])].pmin()[dim];
-// break;
-// }
-// }
-// {
-// mln_qiter_(win::segment1d) q(seg, point1d(cp.second()[dim]));
-// for_all(q)
-// if (opt::at(l, q[0]) != -1)
-// {
-// boxes[i].pmax()[dim] = boxes[opt::at(l, q[0])].pmax()[dim];
-// break;
-// }
-// }
-// }
-// }
-
-
- /// Save lines bounding boxes in an image filled with \p bg_color.
- /// Bounding boxes are displayed with \p bbox_color.
- template <typename I>
- void
- save_table(const Image<I>& input,
- util::couple<util::array<box<mln_site(I)> >,
- util::array<box<mln_site(I)> > > tblboxes,
- const std::string& filename,
- const value::rgb8& bg_color = literal::black,
- const value::rgb8& bbox_color = literal::red)
- {
- trace::entering("scribo::internal::save_table");
- mln_precondition(exact(input).is_valid());
-
- image2d<rgb8> out2(exact(input).domain());
- data::fill(out2, bg_color);
- for_all_components(i, tblboxes.first())
- {
- util::couple<mln_site(I), mln_site(I)> cp = central_sites(tblboxes.first()[i], 0);
- out2(cp.first()) = literal::green;
- out2(cp.second()) = literal::green;
- draw::box(out2, tblboxes.first()[i], bbox_color);
- }
- for_all_components(i, tblboxes.second())
- {
- util::couple<mln_site(I), mln_site(I)> cp = central_sites(tblboxes.second()[i], 1);
- out2(cp.first()) = literal::green;
- out2(cp.second()) = literal::green;
- draw::box(out2, tblboxes.second()[i], bbox_color);
- }
- io::ppm::save(out2, output_file(filename.c_str()));
-
- trace::exiting("scribo::internal::save_table");
- }
-
- /// Align line bboxes vertically and horizontally. Then, try to join
- /// vertical and horizontal lines in order to rebuild the table.
- template <typename I>
- mln_ch_value(I,bool)
- rebuild_table(const Image<I>& in_,
- util::couple<util::array<box2d>,
- util::array<box2d> >& tblboxes)
- {
- const I& in = exact(in_);
-
- mlc_equal(mln_value(I), bool)::check();
- mln_precondition(in.is_valid());
-
- std::cout << "Rebuild table" << std::endl;
-
- util::array<int> rows = align_lines_horizontaly(in, tblboxes.second());
- util::array<int> cols = align_lines_verticaly(in, tblboxes.first());
-
-# ifndef NOUT
- save_table(in, tblboxes, "after-alignment.ppm");
-# endif
-
-// repair_vertical_lines(in, tblboxes);
-// repair_horizontal_lines(in, tblboxes);
-
- // Connect vertical lines with horizontal lines.
- connect_vertical_lines(rows, tblboxes, in);
- connect_horizontal_lines(cols, tblboxes, in);
-
- image2d<bool> res;
- initialize(res, in);
- data::fill(res, false);
- for_all_components(i, tblboxes.first())
- draw::box(res, tblboxes.first()[i], true);
- for_all_components(i, tblboxes.second())
- draw::box(res, tblboxes.second()[i], true);
-
-# ifndef NOUT
- save_table(in, tblboxes, "table.ppm");
-# endif
-
- return res;
- }
-
-
-
- void draw_line(image2d<rgb8>& ima,
- unsigned dim,
- const box2d& box,
- const rgb8& v)
- {
- util::couple<point2d, point2d> cp = central_sites(box, dim);
-
- draw::line(ima, cp.first(), cp.second(), v);
- }
-
-
-
- void draw_row(image2d<rgb8>& ima,
- unsigned line,
- const rgb8& v)
- {
- draw::line(ima, point2d(line, 0), point2d(line, ima.ncols()), v);
- }
-
-
-
- void draw_col(image2d<rgb8>& ima,
- unsigned line,
- const rgb8& v)
- {
- draw::line(ima, point2d(0, line), point2d(ima.nrows(), line), v);
- }
-
- /// \}
- //-****************************************************
- /// End of functions related to the table extraction
- //-****************************************************
-
-
-
-
-
- //-*****************************************
- /// Functions related to the table removal
- //-*****************************************
- /// \{
-
-
-
- /// Extract the components bboxes.
- util::array<box2d>
- component_boxes(const image2d<bool>& filter)
- {
- std::cout << "component boxes" << std::endl;
- label_16 nlabels = 0;
- image2d<label_16> lbl = labeling::blobs(filter, c8(), nlabels);
-
- return labeling::compute(accu::meta::bbox(), lbl, nlabels);
- }
-
-
-
- /// Remove table bboxes from an image.
- void erase_table_boxes(image2d<bool>& output,
- util::array<box2d>& boxes,
- unsigned dim)
- {
- for_all_components(i, boxes)
- {
- boxes[i].enlarge(dim, settings.bbox_enlarge);
- boxes[i].crop_wrt(output.domain());
- data::paste((pw::cst(false) | boxes[i] |
- (pw::value(output) == true)), output);
- }
- }
-
-
-
- /// Find table bboxes and remove them from the image.
- /// Use rank filter.
- ///
- /// \return pair of array of bounding boxes. The first array holds the
- /// vertical lines bboxes and the second one the horizontal lines
- /// bboxes.
- template <typename I, typename HW, typename VW>
- util::couple<util::array<box<mln_site(I)> >,
- util::array<box<mln_site(I)> > >
- extract_table_lines_with_rank(const Image<I>& in,
- const Window<HW>& vwin,
- const Window<VW>& hwin,
- unsigned rank_k)
- {
- typedef accu::bbox<mln_psite(I)> A;
- typedef util::array<mln_result(A)> boxes_t;
-
- // Vertical lines
- std::cout << "Removing vertical lines" << std::endl;
- mln_ch_value(I,bool) vfilter = morpho::rank_filter(in, vwin, rank_k);
-
-#ifndef NOUT
- io::pbm::save(vfilter, output_file("vertical-erosion.pbm"));
-#endif
-
- boxes_t vboxes = component_boxes(vfilter);
-
- // Horizontal lines.
- std::cout << "Removing horizontal lines" << std::endl;
- mln_ch_value(I,bool) hfilter = morpho::rank_filter(in, hwin, rank_k);
-
-#ifndef NOUT
- io::pbm::save(hfilter, output_file("horizontal-erosion.pbm"));
-#endif
-
- boxes_t hboxes = component_boxes(hfilter);
-
- return make::couple(vboxes, hboxes);
- }
-
-
- /// Erase table line bboxes from an image.
- ///
- /// \param[in] line_bboxes vertical and horizontal line bounding
- /// boxes.
- ///
- /// \param[in, out] in input image in which the lines are
- /// erased.
- template <typename I>
- void
- erase_table(util::couple<util::array<box2d>,
- util::array<box2d> >& line_bboxes,
- Image<I>& in_)
- {
- trace::entering("scribo::internal::erase_table");
- I& in = exact(in_);
- mln_precondition(in.is_valid());
-
- erase_table_boxes(in, line_bboxes.first(), 0);
- erase_table_boxes(in, line_bboxes.second(), 1);
-
-#ifndef NOUT
- mln_ch_value(I,rgb8) tmp = level::convert(rgb8(), in);
- draw_component_boxes(tmp, line_bboxes.first());
- draw_component_boxes(tmp, line_bboxes.second());
- io::ppm::save(tmp, output_file("vertical-and-horizontal-erosion.ppm"));
- io::pbm::save(in, output_file("table_removed.pbm"));
-#endif
-
- trace::exiting("scribo::internal::erase_table");
- }
-
-
- /// \}
- //--------------------------------------------------
- /// End of functions related to the table removal.
- //--------------------------------------------------
-
-
-
-
-
- //-***************************************
- /// Function related to text extraction
- //-***************************************
- /// \{
-
- template <typename R>
- struct remove_small_comps
- : Function_l2b< remove_small_comps<R> >
- {
- remove_small_comps(const util::array<R>& nsitecomp)
- : nsitecomp_(nsitecomp)
- {
- }
-
- /// Return false if the components is smaller than a given size.
- bool operator()(const label_16& l) const
- {
- return nsitecomp_[l] >= settings.min_comp_size;
- }
-
- const util::array<R>& nsitecomp_;
- };
-
-
-
- template <typename R>
- struct remove_smallandlarge_comps
- : Function_l2b< remove_smallandlarge_comps<R> >
- {
- remove_smallandlarge_comps(const util::array<R>& nsitecomp)
- : nsitecomp_(nsitecomp)
- {
- }
-
- /// Return false if the components is smaller than a given size.
- bool operator()(const label_16& l) const
- {
- return nsitecomp_[l].first >= settings.min_comp_size
- && nsitecomp_[l].first < settings.max_comp_size
- && math::abs(nsitecomp_[l].second.pmax().row()
- - nsitecomp_[l].second.pmin().row())
- <= settings.max_txt_box_height;
- }
-
- const util::array<R>& nsitecomp_;
- };
-
-
-
- void
- cleanup_components(image2d<label_16>& lbl,
- label_16& nlabels)
- {
- std::cout << "Cleanup components..." << std::endl;
-
- typedef accu::count<mln_psite_(image2d<label_16>)> accu_count_t;
- typedef accu::bbox<mln_psite_(image2d<label_16>)> accu_bbox_t;
- typedef accu::pair<accu_count_t, accu_bbox_t> accu_pair_t;
- typedef mln_result_(accu_pair_t) accu_pair_res_t;
- typedef mln_result_(accu_count_t) accu_count_res_t;
-
- if (settings.treat_tables)
- {
- // Remove components which are too small
- typedef util::array<accu_count_res_t> nsitecomp_t;
- nsitecomp_t nsitecomp = labeling::compute(accu_count_t(), lbl, nlabels);
- remove_small_comps<accu_count_res_t> fl2b(nsitecomp);
- labeling::relabel_inplace(lbl, nlabels, fl2b);
- } else
- {
- // Remove components which have too much or not enough sites and which are
- // too heigh.
- typedef util::array<accu_pair_res_t> nsitecomp_t;
- nsitecomp_t nsitecomp = labeling::compute(accu_pair_t(), lbl, nlabels);
- remove_smallandlarge_comps<accu_pair_res_t> fl2b(nsitecomp);
- labeling::relabel_inplace(lbl, nlabels, fl2b);
- }
- }
-
-
- /// Functor to be passed to depth_first_search.
- /// Map each component vertex with its representative vertex id.
- struct make_relabel_fun_t
- {
- template <typename G>
- void init(const Graph<G>& g)
- {
- l2l.resize(exact(g).v_nmax(), mln_max(label_16));
- ncomp = 0;
- }
-
- void final()
- {}
-
- void next()
- { ++ncomp; }
-
- void update_treated(unsigned id)
- { l2l(id) = ncomp; }
-
- void update_queued(unsigned id)
- { update_treated(id); }
-
- bool to_be_treated(unsigned id)
- { return l2l(id) == mln_max(label_16); }
-
- bool to_be_queued(unsigned id)
- { return to_be_treated(id); }
-
- unsigned ncomp;
- fun::l2l::relabel<label_16> l2l;
- };
-
-
-
- /// Functor to be passed to depth_first_search.
- /// Computes the number of vertices per graph component.
- struct comp_size_t
- {
- template <typename G>
- void init(const Graph<G>& g)
- {
- treated.resize(exact(g).v_nmax(), mln_max(label_16));
- }
-
- void final()
- {}
-
- void next()
- {
- unsigned compsize = comp_vertices.nelements();
- std::cout << "compsize = " << compsize << std::endl;
- for (unsigned i = 0; i < comp_vertices.nelements(); ++i)
- treated[comp_vertices[i]] = compsize;
- comp_vertices.clear();
- }
-
- void update_treated(unsigned id)
- { comp_vertices.insert(id); }
-
- void update_queued(unsigned id)
- {
- std::cout << "update_queued_before " << comp_vertices << std::endl;
- update_treated(id);
- std::cout << "update_queued_after " << comp_vertices << std::endl;
- }
-
- bool to_be_treated(unsigned id)
- { return treated[id] == mln_max(label_16); }
-
- bool to_be_queued(unsigned id)
- { return comp_vertices.has(id); }
-
- util::set<unsigned> comp_vertices;
- util::array<unsigned> treated;
- };
-
- unsigned
- find_root(util::array<unsigned>& parent, unsigned x)
- {
- if (parent[x] == x)
- return x;
- else
- return parent[x] = find_root(parent, parent[x]);
- }
-
- /// Merge bboxes according to their left neighbor.
- util::array<box2d>
- group_bboxes_with_single_link(util::array<unsigned>& link_array,
- image2d<label_16>& lbl,
- util::array<box2d>& cboxes, label_16& nlabels)
- {
- for (unsigned i = 0; i < link_array.nelements(); ++i)
- link_array[i] = find_root(link_array, i);
-
- util::array< accu::bbox<point2d> > tboxes;
- tboxes.resize(nlabels.next());
- for_all_ncomponents(i, nlabels)
- tboxes[link_array[i]].take(cboxes[i]);
-
- //Update labels
- labeling::relabel_inplace(lbl, nlabels,
- convert::to<fun::l2l::relabel<label_16> >(link_array));
-
-#ifndef NOUT
- save_lbl_image(lbl, nlabels, "lbl-grouped-boxes.pgm");
-#endif
-
- util::array<box2d> result;
- convert::from_to(tboxes, result);
-
- nlabels = result.nelements();
-
- return result;
- }
-
-
- /// Merge bboxes according to their neighbors.
- util::array<box2d>
- group_bboxes_with_graph(const util::graph& g, image2d<label_16>& lbl,
- util::array<box2d>& cboxes, label_16& nlabels)
- {
- // Build relabel function.
- make_relabel_fun_t f;
- canvas::browsing::depth_first_search(g, f);
-
- util::array< accu::bbox<point2d> > tboxes;
- tboxes.resize(nlabels.next());
- for_all_ncomponents(i, nlabels)
- tboxes[f.l2l(i)].take(cboxes[i]);
-
- //Update labels
- labeling::relabel_inplace(lbl, nlabels, f.l2l);
-
-#ifndef NOUT
- save_lbl_image(lbl, nlabels, "lbl-grouped-boxes.pgm");
-#endif
-
- util::array<box2d> result(1);
- for_all_ncomponents(i, nlabels)
- if (tboxes[i].is_valid())
- result.append(tboxes[i].to_result());
-
- mln_assertion(result.nelements() == f.ncomp);
- nlabels = result.nelements();
-
-
-#ifndef NOUT
- image2d<label_16> lbl2 = duplicate(lbl);
- comp_size_t comp_size;
- canvas::browsing::depth_first_search(g, comp_size);
-
- std::cout << g << std::endl;
- for_all_ncomponents(i, nlabels)
- if (tboxes[i].is_valid())
- if (comp_size.treated[i] < 3)
- data::fill((lbl2 | (tboxes[i].to_result() | (pw::value(lbl2) == i))).rw(), 0u);
- save_lbl_image(lbl2, nlabels, "lbl-grouped-boxes-cleaned.ppm");
-#endif
-
- return result;
- }
-
-
-
- /// Add an edge if a valid neighbor is found
- void update_link(util::graph& g, image2d<label_16>& lbl,
- const point2d& p, const point2d& c,
- unsigned i, int dmax)
- {
- if (lbl.domain().has(p) && lbl(p) != 0u && lbl(p) != i
- && (math::abs(p.col() - c.col())) < dmax)
- g.add_edge(lbl(p), i);
- }
-
- /// Update the lookup table \p link_array if a neighbor is found on the right of
- /// the current bbox.
- void update_link_array(util::array<unsigned>& link_array, image2d<label_16>& lbl,
- const point2d& p, const point2d& c,
- unsigned i, int dmax)
- {
- if (lbl.domain().has(p) && lbl(p) != 0u && lbl(p) != i
- && (math::abs(p.col() - c.col())) < dmax && link_array[lbl(p)] == lbl(p))
- link_array[lbl(p)] = i;
- }
-
-
-
- void init_link_array(util::array<unsigned>& link_array)
- {
- for (unsigned i = 0; i < link_array.nelements(); ++i)
- link_array[i] = i;
- }
-
- /// Map each character bbox to its left bbox neighbor if possible.
- /// Iterate to the right but link boxes to the left.
- ///
- /// \return an util::array. Map a bbox to its left neighbor.
- util::array<unsigned>
- link_character_bboxes_with_single_link(image2d<label_16>& lbl,
- const util::array<box2d>& cboxes,
- unsigned ncomp)
- {
- util::array<unsigned> left_link(ncomp + 1);
- init_link_array(left_link);
-
- for_all_ncomponents(i, ncomp)
- {
- unsigned midcol = (cboxes[i].pmax().col() - cboxes[i].pmin().col()) / 2;
- int dmax = midcol + settings.bbox_distance;
- point2d c = cboxes[i].center();
-
- ///
- /// Find a neighbor on the right
- ///
-
- /// First site on the right of the central site
- point2d p = c + right;
-
- // FIXME: Lemmings with a condition on the distance => write a special version?
- while (lbl.domain().has(p) && (lbl(p) == 0u || lbl(p) == i)
- && math::abs(p.col() - c.col()) < dmax)
- ++p.col();
-
- update_link_array(left_link, lbl, p, c, i, dmax);
-
- }
-
- return left_link;
- }
-
-
- /// Map each character bbox to its left bbox neighbor if possible.
- /// Iterate to the right but link boxes to the left.
- ///
- /// \return a pair of util::array. The first one map a bbox to its left
- /// neighbor and the second one map a bbox to its right neighbor.
- util::couple<util::array<unsigned>, util::array<unsigned> >
- link_character_bboxes_with_double_link(image2d<label_16>& lbl,
- const util::array<box2d>& cboxes,
- unsigned ncomp)
- {
- util::array<unsigned> left_link(ncomp + 1), right_link(ncomp + 1);
- init_link_array(left_link);
- init_link_array(right_link);
-
- for_all_ncomponents(i, ncomp)
- {
- unsigned midcol = (cboxes[i].pmax().col() - cboxes[i].pmin().col()) / 2;
- int dmax = midcol + settings.bbox_distance;
- point2d c = cboxes[i].center();
-
- ///
- /// Find a neighbor on the right
- ///
-
- /// First site on the right of the central site
- point2d p = c + right;
-
- // FIXME: Lemmings with a condition on the distance => write a special version?
- while (lbl.domain().has(p) && (lbl(p) == 0u || lbl(p) == i)
- && math::abs(p.col() - c.col()) < dmax)
- ++p.col();
-
- update_link_array(left_link, lbl, p, c, i, dmax);
-
-
- ///
- /// Find a neighbor on the left
- ///
-
- /// First site on the left of the central site
- p = c + left;
-
- // FIXME: Lemmings with a condition on the distance => write a special version?
- while (lbl.domain().has(p) && (lbl(p) == 0u || lbl(p) == i)
- && math::abs(p.col() - c.col()) < dmax)
- --p.col();
-
- update_link_array(right_link, lbl, p, c, i, dmax);
- }
-
- return make::couple(left_link, right_link);
- }
-
-
- /// Map each character bbox to its left neighbors.
- util::graph
- link_character_bboxes_with_left_graph(image2d<label_16>& lbl,
- const util::array<box2d>& cboxes,
- unsigned ncomp)
- {
- util::graph g(ncomp + 1);
-
- for_all_ncomponents(i, ncomp)
- {
- unsigned midcol = (cboxes[i].pmax().col() - cboxes[i].pmin().col()) / 2;
- int dmax = midcol + settings.bbox_distance;
- point2d c = cboxes[i].center();
- /// First site on the right of the central site
- point2d p = c + right;
-
- // FIXME: Lemmings with a condition on the distance => write a special version?
- while (lbl.domain().has(p) && (lbl(p) == 0u || lbl(p) == i)
- && math::abs(p.col() - c.col()) < dmax)
- ++p.col();
-
- update_link(g, lbl, p, c, i, dmax);
- }
-
- return g;
- }
-
-
- /// Map each character bbox to its left and right neighbors.
- util::graph
- link_character_bboxes_with_left_and_right_graph(image2d<label_16>& lbl,
- const util::array<box2d>& cboxes,
- unsigned ncomp)
- {
- util::graph g(ncomp + 1);
-
- for_all_ncomponents(i, ncomp)
- {
- unsigned midcol = (cboxes[i].pmax().col() - cboxes[i].pmin().col()) / 2;
- int dmax = midcol + settings.bbox_distance;
- point2d c = cboxes[i].center();
-
- //
- // Find neighbors on the right
- //
-
- /// First site on the right of the central site
- point2d p = c + right;
-
- // FIXME: Lemmings with a condition on the distance => write a special version?
- while (lbl.domain().has(p) && (lbl(p) == 0u || lbl(p) == i)
- && math::abs(p.col() - c.col()) < dmax)
- ++p.col();
-
- update_link(g, lbl, p, c, i, dmax);
-
- //
- // Find neighbors on the left
- //
-
- /// First site on the right of the central site
- p = c + left;
-
- // FIXME: Lemmings with a condition on the distance => write a special version?
- while (lbl.domain().has(p) && (lbl(p) == 0u || lbl(p) == i)
- && math::abs(p.col() - c.col()) < dmax)
- --p.col();
-
- update_link(g, lbl, p, c, i, dmax);
-
- }
-
- return g;
- }
-
-
-
- util::array<box2d>
- extract_text(image2d<bool>& in,
- image2d<label_16>& lbl,
- label_16& nlabels)
- {
- std::cout << "extract text" << std::endl;
-
- typedef label_16 V;
- typedef image2d<V> I;
- typedef util::array<box2d> boxes_t;
-
- boxes_t cboxes = labeling::compute(accu::meta::bbox(), lbl, nlabels);
-
- image2d<label_16> lbl_bbox;
- initialize(lbl_bbox, lbl);
- data::fill(lbl_bbox, 0u);
-
- for_all_components(i, cboxes)
- draw::box(lbl_bbox, cboxes[i], i);
-
-#ifndef NOUT
- image2d<rgb8> tmp = level::convert(rgb8(), in);
- draw_component_boxes(tmp, cboxes);
- io::ppm::save(tmp, output_file("character-bboxes.ppm"));
-#endif
-
- //Link character bboxes to their left neighboor if possible.
- util::graph g = link_character_bboxes_with_left_graph(lbl_bbox, cboxes, nlabels);
-
- //Merge character bboxes through a graph.
- util::array<box2d> tboxes = group_bboxes_with_graph(g, lbl, cboxes, nlabels);
-
- return tboxes;
- }
-
-
-
-
- /// Function mapping value to sites of a line graph image.
- template <typename S>
- struct lg_vertex_values : public mln::Function_p2v< lg_vertex_values<S> >
- {
- /// Result is composed of a L2 distance between the two vertices of
- /// the edge, and the angle between the edge and the origin axis.
- typedef util::couple<unsigned,float> result;
-
- // Compute the angle between P and (0,1)
- util::couple<unsigned,float> operator()(const mln_psite(S)& p) const
- {
- unsigned distance = norm::l2_distance(p.to_site().begin().to_vec(),
- p.to_site().end().to_vec());
-
- /// Compute angle between the edge and the axis.
- mln::algebra::vec<2,float> v, pv;
- v[0] = 1;
- v[1] = 0;
- pv = p.to_site().to_vec().normalize();
-
- float pi = 3.14;
- float pi_div2 = pi / 2;
- float angle = v * pv;
- // Be sure the angle is between 0 and pi/2
-
- // up left part of the circle.
- if (angle > pi_div2 && angle < pi)
- angle = pi - angle;
- // down left part of the circle.
- else if (angle < 0 && angle < -pi_div2)
- angle += pi;
-
- // down right part of the circle.
- if (angle < 0)
- angle *= -1;
-
- return make::couple(distance, angle);
- }
-
- };
-
-
-
- void maptext_to_cells(const image2d<bool>& in, const image2d<bool>& table, const util::array<box2d>& tboxes)
- {
- std::cout << "map text to cells" << std::endl;
- label_16 nlabels;
- image2d<label_16> tblelbl = labeling::background(table, c8(), nlabels);
- image2d<rgb8> color = labeling::colorize(rgb8(), tblelbl, nlabels);
-# ifndef NOUT
- io::ppm::save(color, output_file("cells-labels.ppm"));
-
- image2d<rgb8> dbg = level::convert(rgb8(), logical::not_(table));
-
- for_all_elements(i, tboxes)
- if (tboxes[i].is_valid())
- data::paste(pw::cst(color(tboxes[i].center())) | (tboxes[i] | pw::value(in) == true),
- dbg);
- io::ppm::save(dbg, output_file("text2cell.ppm"));
-# endif
- }
-
-
- void merge_aligned_text_boxes(const image2d<bool>& in, util::array<box2d>& tboxes,
- image2d<label_16>& lbl, label_16& nlabels)
- {
- std::cout << "Merging aligned text boxes" << std::endl;
-
- io::ppm::save(labeling::colorize(rgb8(), lbl, nlabels),
- output_file("tboxes-lbl.ppm"));
-
- typedef util::couple<image2d<unsigned>, image2d<label_16> > cpl_t;
- cpl_t diz =
- transform::distance_and_influence_zone_geodesic(lbl, c8(),
- settings.bbox_distance);
-
-#ifndef NOUT
- io::pgm::save(level::transform(diz.first(), fun::l2l::wrap<label_8>()),
- output_file("tboxes-dmap.pgm"));
- io::ppm::save(labeling::colorize(rgb8(), diz.second(), nlabels),
- output_file("tboxes-iz.ppm"));
-#endif
-
- typedef util::graph G;
- G g = make::graph(diz.second() | (pw::value(diz.second()) != pw::cst(0u)),
- c8(), nlabels);
-
- // Compute the component centers and use them as vertex sites.
- //FIXME: Add fun::vertex2p
- typedef fun::i2v::array<point2d> fv2p_t;
- fv2p_t fv2p(nlabels.next());
-
- for_all_components(i, tboxes)
- fv2p(i) = tboxes[i].center();
-
- typedef util::line_graph<G> LG;
- LG lg(g);
-
- // Find lines (sites) associated to edges in g.
- typedef fun::i2v::array<p_line2d> i2e_t;
- util::array<p_line2d> lines;
- mln_edge_iter_(G) e(g);
- for_all(e)
- lines.append(p_line2d(fv2p(e.v1()), fv2p(e.v2())));
-
- // Map lines to vertices in lg.
- typedef p_vertices<LG, i2e_t> pvlg_t;
- pvlg_t pvlg(lg, convert::to<i2e_t>(lines));
-
- // Construct an image from a p_edges and a function mapping
- // lines to angles.
- typedef lg_vertex_values<pvlg_t> lgv2v_t;
- lgv2v_t lgv2v;
-
- mln_VAR(lg_ima, lgv2v | pvlg);
-
-// unsigned dmax = level::compute(accu::max<unsigned>(),
-// thru(meta::first<mln_value_(lg_ima_t)>(),
-// lg_ima));
-//
-// mln_VAR(angle_ima, level::stretch(int_u8(),
-// thru(meta::second<mln_value_(lg_ima_t)>(),
-// lg_ima)));
-//
-// image2d<unsigned> stats(make::box2d(dmax, 255));
-// data::fill(stats, 0u);
-//
-// mln_piter_(lg_ima_t) p(lg_ima.domain());
-// for_all(p)
-// ++stats(point2d(lg_ima(p).first(), angle_ima(p)));
-
-#ifndef NOUT
-// io::pgm::save(stats, "stats.pgm");
- {
- fun::i2v::array<value::rgb8> ecolor(pvlg.nsites(), literal::olive);
- mln_piter_(lg_ima_t) p(lg_ima.domain());
- for_all (p)
- {
- mln_value_(lg_ima_t) v = lg_ima(p);
- if ((v.second() > settings.max_cos) || (v.second() < - settings.max_cos))
- ecolor(p) = literal::cyan;
- }
-
- image2d<rgb8> output = level::convert(rgb8(), in);
- internal::draw_component_boxes(output, tboxes);
- debug::draw_graph(output, pvlg, pw::cst(literal::cyan), ecolor);
- io::ppm::save(output, internal::output_file("aligned-bboxes-merged.ppm"));
- }
-#endif
-
-
-
- }
-
- /// \}
- //-----------------------------------------------
- /// End of functions related to text extraction
- //-----------------------------------------------
-
-
-
-
- } // end of namespace scribo::internal
-
-
-
-
-
- // Facade
-
- void demat_table(char *argv[])
- {
- using namespace mln;
- using value::rgb8;
- using value::label_16;
-
- internal::settings.treat_tables = true;
- internal::input_file = basename(argv[1]);
-
- //Load image
- image2d<bool> in;
- io::pbm::load(in, argv[1]);
- logical::not_inplace(in);
-
-#ifndef NOUT
- image2d<bool> in_bak = duplicate(in);
-#endif
-
- internal::settings.max_comp_size = in.ncols() * in.nrows() * 0.05;
-
- // tblboxes.first() = vertical lines.
- // tblboxes.second() = horizontal lines.
- typedef util::couple<util::array<box2d>,util::array<box2d> > tblboxes_t;
-
- win::vline2d vline(internal::settings.ero_line_width);
- win::hline2d hline(internal::settings.ero_line_width);
- tblboxes_t tblboxes =
- internal::extract_table_lines_with_rank(in, vline, hline,
- internal::settings.rank_filter);
-
- internal::erase_table(tblboxes, in);
-
- image2d<bool> table = internal::rebuild_table(in, tblboxes);
-
- /// relabel since the table has been removed.
- label_16 nlabels;
- image2d<label_16> lbl = labeling::blobs(in, c8(), nlabels);
- internal::cleanup_components(lbl, nlabels);
-
-#ifndef NOUT
- internal::save_lbl_image(lbl, nlabels, "lbl-small-comps-removed.pgm");
-#endif
-
- util::array<box2d> tboxes = internal::extract_text(in, lbl, nlabels);
-
- internal::merge_aligned_text_boxes(in, tboxes, lbl, nlabels);
-
- internal::maptext_to_cells(in, table, tboxes);
-
-#ifndef NOUT
- std::cout << "Saving output" << std::endl;
- image2d<rgb8> output = level::convert(rgb8(), in_bak);
- internal::draw_component_boxes(output, tboxes);
- io::ppm::save(output, internal::output_file("out.ppm"));
-#endif
-
-// internal::text_recognition(in, lbl, tboxes);
- }
-
-
- void demat_photo(char *argv[])
- {
- using namespace mln;
- using value::rgb8;
- using value::label_16;
-
- internal::settings.treat_tables = false;
- internal::input_file = basename(argv[1]);
-
- //Load image
- image2d<bool> in;
- io::pbm::load(in, argv[1]);
- logical::not_inplace(in);
-
-#ifndef NOUT
- image2d<bool> in_bak = duplicate(in);
-#endif
-
- internal::settings.max_comp_size = in.ncols() * in.nrows() * 0.05;
-
- //Label and remove small components.
- label_16 nlabels;
- image2d<label_16> lbl = labeling::blobs(in, c8(), nlabels);
-
- internal::cleanup_components(lbl, nlabels);
-
- util::array<box2d> tboxes = internal::extract_text(in, lbl, nlabels);
- internal::merge_aligned_text_boxes(in, tboxes, lbl, nlabels);
-
-#ifndef NOUT
- std::cout << "Saving output" << std::endl;
- image2d<rgb8> output = level::convert(rgb8(), in_bak);
- internal::draw_component_boxes(output, tboxes);
- io::ppm::save(output, internal::output_file("out.ppm"));
-#endif
-
- internal::text_recognition(in, lbl, tboxes);
- }
-
-} // end of namespace scribo
-
-# endif // ! DEMAT_HH
diff --git a/scribo/src/photo.cc b/scribo/src/photo.cc
deleted file mode 100644
index a173750..0000000
--- a/scribo/src/photo.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
-//
-// This file is part of the Olena Library. This library is free
-// software; you can redistribute it and/or modify it under the terms
-// of the GNU General Public License version 2 as published by the
-// Free Software Foundation.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this library; see the file COPYING. If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to
-// produce an executable, this file does not by itself cause the
-// resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
-
-
-#include "demat.hh"
-
-int main(int argc, char*argv[])
-{
- using namespace mln;
- using value::int_u8;
-
- if (argc < 2)
- {
- std::cout << argv[0] << " <in.pbm> <out.pgm> <l> <bbox_larger> <bbox_distance> <min_comp_nsites>" << std::endl
- << std::endl << std::endl
- << std::endl
- << "=========="
- << std::endl << std::endl
- << "<in.pbm> B/W inverted input image."
- << std::endl << std::endl
-/* << "<out.ppm> RGB8 output image."
- << std::endl << std::endl
- << "<bbox_distance> Maximum distance between character bounding boxes. Used for bbox grouping."
- << std::endl << std::endl
- << "<min_comp_nsites> Minimum site count of a character/text component."
- << std::endl
- << " If a component have a site count lesser than this value, it is erased."
- << std::endl << std::endl
- << std::endl*/
- << "=========="
- << std::endl << std::endl
- << "HINT: compile with -DNOUT to avoid debug images."
- << std::endl << std::endl;
- return 1;
- }
-
- scribo::demat_photo(argv);
-
- return 0;
-}
diff --git a/scribo/src/photo_basic.cc b/scribo/src/photo_basic.cc
deleted file mode 100644
index 9b2767a..0000000
--- a/scribo/src/photo_basic.cc
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory
-//
-// This file is part of the Olena Library. This library is free
-// software; you can redistribute it and/or modify it under the terms
-// of the GNU General Public License version 2 as published by the
-// Free Software Foundation.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this library; see the file COPYING. If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to
-// produce an executable, this file does not by itself cause the
-// resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
-
-#include <iostream>
-
-#include <mln/essential/2d.hh>
-#include <mln/labeling/colorize.hh>
-
-#include <scribo/text/extract_bboxes.hh>
-#include <scribo/text/grouping/group_with_single_left_link.hh>
-#include <scribo/text/grouping/group_with_single_right_link.hh>
-#include <scribo/text/grouping/group_from_double_link.hh>
-#include <scribo/filter/small_components.hh>
-#include <scribo/filter/large_components.hh>
-#include <scribo/filter/thin_bboxes.hh>
-#include <scribo/filter/thick_bboxes.hh>
-#include <scribo/util/text.hh>
-
-#include <scribo/make/debug_filename.hh>
-#include <scribo/debug/save_textbboxes_image.hh>
-#include <scribo/debug/save_linked_textbboxes_image.hh>
-
-int usage(const char *name)
-{
- std::cout << "Usage: " << name << " <input.pbm> " << std::endl;
- return 1;
-}
-
-int main(int argc, char* argv[])
-{
- using namespace scribo;
- using namespace mln;
-
- scribo::make::internal::debug_filename_prefix = "photo_basic";
-
- image2d<bool> input;
- io::pbm::load(input, argv[1]);
- logical::not_inplace(input);
-
- typedef scribo::util::text<image2d<value::label_16> > text_t;
- value::label_16 nbboxes;
- text_t textbboxes = text::extract_bboxes(input, c8(), nbboxes);
-
- text_t filtered_textbboxes
- = scribo::filter::small_components(textbboxes, 6);
-
- filtered_textbboxes
- = scribo::filter::thin_bboxes(filtered_textbboxes, 3);
-
- filtered_textbboxes
- = scribo::filter::thick_bboxes(filtered_textbboxes,
- math::min(input.ncols(), input.nrows()) / 6);
-
-
- mln::util::array<unsigned> left_link
- = text::grouping::group_with_single_left_link(filtered_textbboxes, 30);
- mln::util::array<unsigned> right_link
- = text::grouping::group_with_single_right_link(filtered_textbboxes, 30);
-
- std::cout << "BEFORE - nbboxes = " << nbboxes << std::endl;
- scribo::debug::save_linked_textbboxes_image(input,
- filtered_textbboxes, left_link, right_link,
- literal::red, literal::cyan, literal::yellow,
- literal::green,
- scribo::make::debug_filename("links.ppm"));
-
- scribo::debug::save_textbboxes_image(input, filtered_textbboxes.bboxes(),
- literal::red,
- scribo::make::debug_filename("test_graph_filtered_text.ppm"));
- text_t grouped_textbboxes
- = text::grouping::group_from_double_link(filtered_textbboxes, left_link, right_link);
-
- std::cout << "AFTER - nbboxes = " << grouped_textbboxes.nbboxes().next() << std::endl;
-
-
- scribo::debug::save_textbboxes_image(input, grouped_textbboxes.bboxes(),
- literal::red,
- scribo::make::debug_filename("test_graph_grouped_text.ppm"));
-
- io::ppm::save(mln::labeling::colorize(value::rgb8(), grouped_textbboxes.label_image(), grouped_textbboxes.nbboxes()),
- scribo::make::debug_filename("grouped_text_comps.ppm"));
-}
-
diff --git a/scribo/src/table.cc b/scribo/src/table.cc
deleted file mode 100644
index 3a12c57..0000000
--- a/scribo/src/table.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
-//
-// This file is part of the Olena Library. This library is free
-// software; you can redistribute it and/or modify it under the terms
-// of the GNU General Public License version 2 as published by the
-// Free Software Foundation.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this library; see the file COPYING. If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to
-// produce an executable, this file does not by itself cause the
-// resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
-
-
-#include <demat.hh>
-
-int main(int argc, char*argv[])
-{
- using namespace mln;
- using value::int_u8;
-
- if (argc < 2)
- {
- std::cout << argv[0] << " <in.pbm> <out.pgm> <l> <bbox_larger> <bbox_distance> <min_comp_nsites>" << std::endl
- << std::endl << std::endl
- << std::endl
- << "=========="
- << std::endl << std::endl
- << "<in.pbm> B/W inverted input image."
- << std::endl << std::endl
-/* << "<out.ppm> RGB8 output image."
- << std::endl << std::endl
- << "<l> Line length"
- << std::endl << std::endl
- << "<bbox_distance> Maximum distance between character bounding boxes. Used for bbox grouping."
- << std::endl << std::endl
- << "<min_comp_nsites> Minimum site count of a character/text component."
- << std::endl
- << " If a component have a site count lesser than this value, it is erased."
- << std::endl << std::endl
- << std::endl*/
- << "=========="
- << std::endl << std::endl
- << "HINT: compile with -DNOUT to avoid debug images."
- << std::endl << std::endl;
- return 1;
- }
-
- scribo::demat_table(argv);
-
- return 0;
-}
--
1.5.6.5
1
0
* src/Makefile.am: add new files.
* src/text_in_photo.cc: new sample.
* text/grouping/group_with_single_left_link.hh,
* text/grouping/group_with_single_right_link.hh,
* text/grouping/internal/find_left_link.hh: make them compile and use
the new object_image type.
---
scribo/ChangeLog | 13 ++
scribo/src/Makefile.am | 2 +
scribo/src/text_in_photo.cc | 121 ++++++++++++++++++++
.../text/grouping/group_with_single_left_link.hh | 36 ++++--
.../text/grouping/group_with_single_right_link.hh | 39 ++++---
scribo/text/grouping/internal/find_left_link.hh | 2 +-
6 files changed, 184 insertions(+), 29 deletions(-)
create mode 100644 scribo/src/text_in_photo.cc
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 4e49716..2117f69 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,18 @@
2009-05-28 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+ Make a sample extracting text in a photo.
+
+ * src/Makefile.am: add new files.
+
+ * src/text_in_photo.cc: new sample.
+
+ * text/grouping/group_with_single_left_link.hh,
+ * text/grouping/group_with_single_right_link.hh,
+ * text/grouping/internal/find_left_link.hh: make them compile and use
+ the new object_image type.
+
+2009-05-28 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
Small fixes in Scribo.
* preprocessing/all.hh,
diff --git a/scribo/src/Makefile.am b/scribo/src/Makefile.am
index 7d02f86..af837ff 100644
--- a/scribo/src/Makefile.am
+++ b/scribo/src/Makefile.am
@@ -24,6 +24,7 @@ bin_PROGRAMS = \
superpose \
table_rebuild_opening \
table_rebuild_rank \
+ text_in_photo \
thin_bboxes
dmap_SOURCES = dmap.cc
@@ -39,5 +40,6 @@ recognition_SOURCES = recognition.cc
superpose_SOURCES = superpose.cc
table_rebuild_opening_SOURCES = table_rebuild_opening.cc
table_rebuild_rank_SOURCES = table_rebuild_rank.cc
+text_in_photo_SOURCES = text_in_photo.cc
thin_bboxes_SOURCES = thin_bboxes.cc
diff --git a/scribo/src/text_in_photo.cc b/scribo/src/text_in_photo.cc
new file mode 100644
index 0000000..94fe84e
--- /dev/null
+++ b/scribo/src/text_in_photo.cc
@@ -0,0 +1,121 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#include <iostream>
+
+#include <mln/core/image/image2d.hh>
+#include <mln/core/alias/neighb2d.hh>
+
+#include <mln/labeling/colorize.hh>
+
+#include <mln/io/pbm/all.hh>
+#include <mln/io/ppm/save.hh>
+
+#include <scribo/extract/primitive/objects.hh>
+#include <scribo/text/grouping/group_with_single_left_link.hh>
+#include <scribo/text/grouping/group_with_single_right_link.hh>
+#include <scribo/text/grouping/group_from_double_link.hh>
+#include <scribo/filter/small_objects.hh>
+#include <scribo/filter/thin_objects.hh>
+#include <scribo/filter/thick_objects.hh>
+
+#include <scribo/make/debug_filename.hh>
+#include <scribo/debug/save_textbboxes_image.hh>
+#include <scribo/debug/save_linked_textbboxes_image.hh>
+
+#include <scribo/debug/usage.hh>
+
+const char *args_desc[][2] =
+{
+ { "input.pbm", "A binary image. 'True' for objects, 'False'\
+for the background." },
+ {0, 0}
+};
+
+
+int main(int argc, char* argv[])
+{
+ using namespace scribo;
+ using namespace mln;
+
+ scribo::make::internal::debug_filename_prefix = "photo";
+
+ if (argc != 3)
+ return usage(argv, "Find text in a binarized photo.", "input.pbm output.ppm",
+ args_desc, "A color image where the text is highlighted.");
+
+ trace::entering("main");
+
+ image2d<bool> input;
+ io::pbm::load(input, argv[1]);
+
+ typedef image2d<value::label_16> L;
+ value::label_16 nobjects;
+ object_image(L) objects = scribo::extract::primitive::objects(input, c8(), nobjects);
+
+ object_image(L) filtered_objects
+ = scribo::filter::small_objects(objects, 6);
+
+ filtered_objects
+ = scribo::filter::thin_objects(filtered_objects, 3);
+
+ filtered_objects
+ = scribo::filter::thick_objects(filtered_objects,
+ math::min(input.ncols(), input.nrows()) / 6);
+
+
+ mln::util::array<unsigned> left_link
+ = text::grouping::group_with_single_left_link(objects, 30);
+ mln::util::array<unsigned> right_link
+ = text::grouping::group_with_single_right_link(objects, 30);
+
+ std::cout << "BEFORE - nobjects = " << nobjects << std::endl;
+// scribo::debug::save_linked_textbboxes_image(input,
+// filtered_textbboxes, left_link, right_link,
+// literal::red, literal::cyan, literal::yellow,
+// literal::green,
+// scribo::make::debug_filename("links.ppm"));
+//
+// scribo::debug::save_textbboxes_image(input, filtered_textbboxes.bboxes(),
+// literal::red,
+// scribo::make::debug_filename("test_graph_filtered_text.ppm"));
+ object_image(L) grouped_objects
+ = text::grouping::group_from_double_link(filtered_objects, left_link, right_link);
+
+ std::cout << "AFTER - nobjects = " << grouped_objects.nlabels() << std::endl;
+
+
+// scribo::debug::save_textbboxes_image(input, grouped_textbboxes.bboxes(),
+// literal::red,
+// scribo::make::debug_filename("test_graph_grouped_text.ppm"));
+//
+ io::ppm::save(mln::labeling::colorize(value::rgb8(), grouped_objects, grouped_objects.nlabels()),
+ argv[2]);
+ trace::exiting("main");
+}
+
diff --git a/scribo/text/grouping/group_with_single_left_link.hh b/scribo/text/grouping/group_with_single_left_link.hh
index 7375c93..d0f96e6 100644
--- a/scribo/text/grouping/group_with_single_left_link.hh
+++ b/scribo/text/grouping/group_with_single_left_link.hh
@@ -32,21 +32,25 @@
/// \file scribo/text/grouping/group_with_single_left_link.hh
///
-/// Link text bounding boxes with their left neighbor.
+/// Link text objects with their left neighbor.
///
/// Merge code with text::grouping::group_with_single_right_link.hh
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
+# include <mln/accu/center.hh>
+
+# include <mln/labeling/compute.hh>
+
# include <mln/math/abs.hh>
# include <mln/util/array.hh>
# include <scribo/core/macros.hh>
+# include <scribo/core/object_image.hh>
# include <scribo/text/grouping/internal/init_link_array.hh>
# include <scribo/text/grouping/internal/find_left_link.hh>
-# include <scribo/util/text.hh>
//FIXME: not generic.
# include <mln/core/alias/dpoint2d.hh>
@@ -60,15 +64,19 @@ namespace scribo
namespace grouping
{
- /// Map each character bounding box to its left bounding box neighbor
+ /// Map each text object to its left bounding box neighbor
/// if possible.
/// Iterate to the right but link boxes to the left.
///
+ /// \param[in] objects An object image.
+ /// \param[in] The maximum distance allowed to seach a neighbor object.
+ ///
/// \return an mln::util::array. Map a bounding box to its left neighbor.
+ //
template <typename L>
inline
mln::util::array<unsigned>
- group_with_single_left_link(const scribo::util::text<L>& text,
+ group_with_single_left_link(const object_image(L)& objects,
unsigned neighb_max_distance);
# ifndef MLN_INCLUDE_ONLY
@@ -76,25 +84,29 @@ namespace scribo
template <typename L>
inline
mln::util::array<unsigned>
- group_with_single_left_link(const scribo::util::text<L>& text,
+ group_with_single_left_link(const object_image(L)& objects,
unsigned neighb_max_distance)
{
trace::entering("scribo::text::grouping::group_with_single_left_link");
- mln_precondition(text.is_valid());
+ mln_precondition(objects.is_valid());
- mln::util::array<unsigned> left_link(text.nbboxes().next());
+ mln::util::array<unsigned> left_link(objects.nlabels().next());
internal::init_link_array(left_link);
- for_all_ncomponents(i, text.nbboxes())
+ mln::util::array<mln_result(accu::center<mln_psite(L)>)>
+ mass_centers = labeling::compute(accu::meta::center(),
+ objects, objects.nlabels());
+
+ for_all_ncomponents(i, objects.nlabels())
{
- unsigned midcol = (text.bbox(i).pmax().col()
- - text.bbox(i).pmin().col()) / 2;
+ unsigned midcol = (objects.bbox(i).pmax().col()
+ - objects.bbox(i).pmin().col()) / 2;
int dmax = midcol + neighb_max_distance;
- mln_site(L) c = text.mass_center(i);
+ mln_site(L) c = mass_centers(i);
/// Find a neighbor on the left
- internal::find_left_link(text, left_link, i, dmax, c);
+ internal::find_left_link(objects, left_link, i, dmax, c);
}
trace::exiting("scribo::text::grouping::group_with_single_left_link");
diff --git a/scribo/text/grouping/group_with_single_right_link.hh b/scribo/text/grouping/group_with_single_right_link.hh
index 0ad091f..8a11a5e 100644
--- a/scribo/text/grouping/group_with_single_right_link.hh
+++ b/scribo/text/grouping/group_with_single_right_link.hh
@@ -32,23 +32,25 @@
/// \file scribo/text/grouping/group_with_single_right_link.hh
///
-/// Link text bounding boxes with their right neighbor.
+/// Link text objects with their right neighbor.
///
/// \todo Merge code with text::grouping::group_with_single_right_link.hh
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
+# include <mln/accu/center.hh>
+
+# include <mln/labeling/compute.hh>
+
# include <mln/math/abs.hh>
# include <mln/util/array.hh>
# include <scribo/core/macros.hh>
+# include <scribo/core/object_image.hh>
# include <scribo/text/grouping/internal/init_link_array.hh>
-# include <scribo/text/grouping/internal/update_link_array.hh>
-# include <scribo/text/grouping/internal/find_root.hh>
# include <scribo/text/grouping/internal/find_right_link.hh>
-# include <scribo/util/text.hh>
//FIXME: not generic.
# include <mln/core/alias/dpoint2d.hh>
@@ -62,15 +64,18 @@ namespace scribo
namespace grouping
{
- /// Map each character bounding box to its right bounding box neighbor
+ /// Map each text object to its right bounding box neighbor
/// if possible.
/// Iterate to the right but link boxes to the right.
///
+ /// \param[in] objects An object image.
+ /// \param[in] The maximum distance allowed to seach a neighbor object.
+ ///
/// \return an mln::util::array. Map a bounding box to its right neighbor.
template <typename L>
inline
mln::util::array<unsigned>
- group_with_single_right_link(const scribo::util::text<L>& text,
+ group_with_single_right_link(const object_image(L)& objects,
unsigned neighb_max_distance);
# ifndef MLN_INCLUDE_ONLY
@@ -78,27 +83,29 @@ namespace scribo
template <typename L>
inline
mln::util::array<unsigned>
- group_with_single_right_link(const scribo::util::text<L>& text,
+ group_with_single_right_link(const object_image(L)& objects,
unsigned neighb_max_distance)
{
trace::entering("scribo::text::grouping::group_with_single_right_link");
- mln_precondition(text.is_valid());
+ mln_precondition(objects.is_valid());
- mln::util::array<unsigned> right_link(text.nbboxes().next());
+ mln::util::array<unsigned> right_link(objects.nlabels().next());
internal::init_link_array(right_link);
- for_all_ncomponents(i, text.nbboxes())
+ mln::util::array<mln_result(accu::center<mln_psite(L)>)>
+ mass_centers = labeling::compute(accu::meta::center(),
+ objects, objects.nlabels());
+
+ for_all_ncomponents(i, objects.nlabels())
{
- unsigned midcol = (text.bbox(i).pmax().col()
- - text.bbox(i).pmin().col()) / 2;
+ unsigned midcol = (objects.bbox(i).pmax().col()
+ - objects.bbox(i).pmin().col()) / 2;
int dmax = midcol + neighb_max_distance;
- mln_site(L) c = text.mass_center(i);
+ mln_site(L) c = mass_centers(i);
- ///
/// Find a neighbor on the right
- ///
- internal::find_right_link(text, right_link, i, dmax, c);
+ internal::find_right_link(objects, right_link, i, dmax, c);
}
trace::exiting("scribo::text::grouping::group_with_single_right_link");
diff --git a/scribo/text/grouping/internal/find_left_link.hh b/scribo/text/grouping/internal/find_left_link.hh
index f598115..e3a6b4b 100644
--- a/scribo/text/grouping/internal/find_left_link.hh
+++ b/scribo/text/grouping/internal/find_left_link.hh
@@ -39,7 +39,7 @@
# include <mln/util/array.hh>
-# include <scribo/util/text.hh>
+# include <scribo/core/object_image.hh>
# include <scribo/text/grouping/internal/update_link_array.hh>
//FIXME: not generic.
--
1.5.6.5
1
0
* doc/doxyfuns.sty: add new functions.
* doc/examples/tuto3/colorize.cc: change saved file names.
* doc/figures/colorize-1.pgm,
* doc/figures/colorize-2.ppm: move...
* doc/figures/tuto3_colorize-1.pgm,
* doc/figures/tuto3_colorize-2.ppm:... here.
* doc/tutorial/tutorial.tex: fix typos and invalid figure includes.
---
milena/ChangeLog | 16 ++
milena/doc/doxyfuns.sty | 14 ++
milena/doc/examples/tuto3/colorize.cc | 4 +-
.../{colorize-1.pgm => tuto3_colorize-1.pgm} | Bin 141 -> 141 bytes
.../{colorize-2.ppm => tuto3_colorize-2.ppm} | Bin 191 -> 191 bytes
milena/doc/tutorial/tutorial.tex | 235 ++++++++++++--------
6 files changed, 178 insertions(+), 91 deletions(-)
rename milena/doc/figures/{colorize-1.pgm => tuto3_colorize-1.pgm} (100%)
rename milena/doc/figures/{colorize-2.ppm => tuto3_colorize-2.ppm} (100%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 538f285..a7caba7 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,21 @@
2009-05-29 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+ Fix tutorial typos and issues.
+
+ * doc/doxyfuns.sty: add new functions.
+
+ * doc/examples/tuto3/colorize.cc: change saved file names.
+
+ * doc/figures/colorize-1.pgm,
+ * doc/figures/colorize-2.ppm: move...
+
+ * doc/figures/tuto3_colorize-1.pgm,
+ * doc/figures/tuto3_colorize-2.ppm:... here.
+
+ * doc/tutorial/tutorial.tex: fix typos and invalid figure includes.
+
+2009-05-29 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
Improve pretty check.
* tests/tools/pretty_check.sh: make the C++ compiler depend on
diff --git a/milena/doc/doxyfuns.sty b/milena/doc/doxyfuns.sty
index a5fd47b..6abd049 100644
--- a/milena/doc/doxyfuns.sty
+++ b/milena/doc/doxyfuns.sty
@@ -142,6 +142,18 @@
\end{center}%
}
+\newcommand{\tutotocnext}[1]{%
+\begin{center}%
+ Go to \doxyref{#1}~ \longrightarrow%
+\end{center}%
+}
+
+\newcommand{\tutotocprev}[1]{%
+\begin{center}%
+ \longleftarrow ~Go to \doxyref{#1} \hspace{1cm}%
+\end{center}%
+}
+
\newenvironment{doxymath}
{
%\backslash endhtmlonly%
@@ -181,6 +193,8 @@ $$
\renewcommand{\doxyref}[1]{\ref{#1}}
\renewcommand{\doxysee}[1]{\ref{#1}}
\renewcommand{\tutotoc}[2]{}
+\renewcommand{\tutotocnext}[1]{}
+\renewcommand{\tutotocprev}[1]{}
\renewenvironment{doxymath}
{
$$
diff --git a/milena/doc/examples/tuto3/colorize.cc b/milena/doc/examples/tuto3/colorize.cc
index f611908..b74a192 100644
--- a/milena/doc/examples/tuto3/colorize.cc
+++ b/milena/doc/examples/tuto3/colorize.cc
@@ -20,6 +20,6 @@ int main()
image2d<rgb8> ima_color = labeling::colorize(rgb8(), ima, 230);
// \}
- doc::pgmsave(ima, "colorize");
- doc::ppmsave(ima_color, "colorize");
+ doc::pgmsave(ima, "tuto3_colorize");
+ doc::ppmsave(ima_color, "tuto3_colorize");
}
diff --git a/milena/doc/figures/colorize-1.pgm b/milena/doc/figures/tuto3_colorize-1.pgm
similarity index 100%
rename from milena/doc/figures/colorize-1.pgm
rename to milena/doc/figures/tuto3_colorize-1.pgm
diff --git a/milena/doc/figures/colorize-2.ppm b/milena/doc/figures/tuto3_colorize-2.ppm
similarity index 100%
rename from milena/doc/figures/colorize-2.ppm
rename to milena/doc/figures/tuto3_colorize-2.ppm
diff --git a/milena/doc/tutorial/tutorial.tex b/milena/doc/tutorial/tutorial.tex
index 9905e57..1a383e2 100644
--- a/milena/doc/tutorial/tutorial.tex
+++ b/milena/doc/tutorial/tutorial.tex
@@ -127,13 +127,13 @@ out and commented by the documentation.
Taking a look at the test suite is also a good idea. The tests usually focus on
a single functionality and handle several use cases which may overlap your needs.
-The test suite is located at \hpath{milena/tests} (FIXME: ref?).
+The test suite is located in \hpath{milena/tests} (FIXME: ref?).
-Still not enough information? More information about all the functions is
+Still not enough information? More information about all the routines is
available in the User HTML documentation (FIXME:ref).
It mainly targets \textit{designers} and \textit{providers}.
The latter may also be interested by the Developer HTML documentation
-(FIXME:ref).
+(not available yet).
@@ -178,7 +178,7 @@ First, be sure that SVN is already installed on your system.
Open a terminal and type:
\begin{verbatim}
-\$ svn --version --quiet
+$ svn --version --quiet
1.4.6
\end{verbatim}
@@ -187,34 +187,42 @@ then you need to install SVN.
Usually, systems providing packages reference SVN's package as 'subversion'.
-Once you have SVN installed, go to the directory where you woudl like to
+To install SVN on Debian or Ubuntu, run:
+
+\begin{verbatim}
+$ sudo apt-get install subversion
+\end{verbatim}
+
+For other distributions, please refer to the user documentation of your system.
+
+Once you have SVN installed, go to the directory where you would like to
download Olena and create a new directory.
\begin{verbatim}
-\$ cd $HOME
-\$ mkdir olena
-\$ cd olena
+$ cd $HOME
+$ mkdir olena
+$ cd olena
\end{verbatim}
Then 'checkout' (download) the repository with the following command.
\begin{verbatim}
-\$ svn co https://svn.lrde.epita.fr/svn/oln/trunk
+$ svn co https://svn.lrde.epita.fr/svn/oln/trunk
\end{verbatim}
Enter the 'trunk' directory.
\begin{verbatim}
-\$ cd trunk
+$ cd trunk
\end{verbatim}
You are now ready to configure the directory and install Milena as described
in section \ref{tuto2}.
We invite you to take a look at the description of the directory structure
-(\ref{tuto1dirstruct}.
+(section \ref{tuto1dirstruct}).
If you encounter any issues in the installation process or if you have any
-question, do not forget to join the mailing lists (\ref{tuto1mailinglists}
-and/or use the other documentations ressources (\ref{tuto1documentation}).
+question, do not forget to join the mailing lists (section \ref{tuto1mailinglists})
+and/or use the other documentations ressources (section ref{tuto1documentation}).
@@ -232,7 +240,7 @@ Milena's packages can be downloaded from:
On this page you will find the latest and past releases.
Currently, we provide only '.tar.gz' and 'tar.bz2' archives.
-Once download, you just need to uncompress the archive.
+Once downloaded, you just need to uncompress the archive.
For the '.tar.gz' archive:
\begin{verbatim}
@@ -253,10 +261,11 @@ $ cd olena-1.0
You are now ready to configure the directory and install Milena as described
in section \ref{tuto2}.
We invite you to take a look at the description of the directory structure
-(\ref{tuto1dirstruct}.
+(section \ref{tuto1dirstruct}).
If you encounter any issues in the installation process or if you have any
-question, do not forget to join the mailing lists (\ref{tuto1mailinglists}
-and/or use the other documentations ressources (\ref{tuto1documentation}).
+question, do not forget to join the mailing lists (section
+\ref{tuto1mailinglists}) and/or use the other documentations ressources
+(section \ref{tuto1documentation})).
@@ -299,6 +308,7 @@ you finding what you need, you will find a description of all these
subdirectories.
+\vspace{0.5cm}
List of \hpath{milena}'s subdirectories:
\begin{itemize}
@@ -324,7 +334,7 @@ List of \hpath{milena}'s subdirectories:
\end{itemize}
-
+\vspace{0.5cm}
List of \hpath{mln}'s subdirectories:
\begin{itemize}
\item \dir{accu} --- Set of Accumulators.
@@ -337,21 +347,21 @@ List of \hpath{mln}'s subdirectories:
\item \dir{convert} --- Automatic conversion mechanism.
\item \dir{core} --- Core of the library. Here you can find the image types,
the site set types and basic concepts.
- \item \dir{data} --- Routine that modify image data.
+ \item \dir{data} --- Routines that modify image data.
\item \dir{debug} --- Debug related routines.
\item \dir{display} --- Display images on the screen.
\item \dir{draw} --- Draw geometric objects in an image.
\item \dir{essential} --- Set of essential headers for 1,2,3-D manipulations.
\item \dir{estim} --- Compute data on image values.
\item \dir{extension} --- Image extension manipulation.
- \item \dir{extract} --- FIXME: extract will be removed and replaced by thru().
+% \item \dir{extract} --- FIXME: extract will be removed and replaced by thru().
\item \dir{fun} --- Set of functions applying on sites, values, \ldots
\item \dir{geom} --- Functions related to image geometry.
\item \dir{graph} --- Graph related routines.
\item \dir{histo} --- Histogram related functions.
\item \dir{io} --- I/O related routines.
\item \dir{labeling} --- Labeling related routines.
- \item \dir{level} --- Point-wise operators on levels.
+% \item \dir{level} --- Point-wise operators on levels.
\item \dir{linear} --- Linear operators.
\item \dir{literal} --- Generic image values such as zero, black, white \ldots
\item \dir{logical} --- Logical operators.
@@ -360,7 +370,7 @@ List of \hpath{mln}'s subdirectories:
\item \dir{metal} --- Metalic macros/structures. Static library helping
developing doing static tests.
\item \dir{morpho} --- Mathematical morphology.
- \item \dir{norm} --- Norm computation
+ \item \dir{norm} --- Norm computation.
\item \dir{opt} --- Optional routines. Routines which may work on a
specific image type only.
\item \dir{pw} --- Point-wise image related routines.
@@ -390,7 +400,7 @@ List of \hpath{doc}'s subdirectories:
\item \dir{tutorial} --- Tutorial sources.
\item \dir{white\_paper} --- White paper sources.
-\item \dir{technical} --- Technical documentation. (DEPRECATED)
+%\item \dir{technical} --- Technical documentation. (DEPRECATED)
\item \dir{ref\_guide} --- Reference guide sources.
\item \dir{figures} --- Reference figures for documentation generation.
\item \dir{outputs} --- Reference outputs for documentation examples.
@@ -406,14 +416,14 @@ List of \hpath{doc}'s subdirectories:
This tutorial is not the only documentation of Milena. Other documents are available:
\begin{itemize}
- \item \dir{White paper} --- a small document of few pages presenting the key
+ \item \dir{White paper} --- A small document of few pages presenting the key
features of the library. It intents to give a big picture of the library.
- \item \dir{Quick tour} --- it aims giving an overview of Milena's possibilities.
+ \item \dir{Quick tour} --- It aims at giving an overview of Milena's possibilities.
It does not only give the concepts but illustrate them with small sample
codes.
- \item \dir{Quick reference guide} --- Present in details all the main
+ \item \dir{Quick reference guide} --- Presents in details all the main
functionalities of Milena.
Hints and full examples are also provided. The sample codes are commented
and each concept in the library is detailed. This is the reference document for any
@@ -440,8 +450,8 @@ for new contributors.
\item If you are a user, please send us feedback about the library.
Did you find what you wanted? Do you miss something?
- \item Please report bugs and defect in the API. Mailing lists are the best
- way for reporting that.
+ \item Please report bugs and defects in the API. Mailing lists are the best
+ way for reporting that (section \ref{tuto1mailinglists}).
\item Developers, if you write cool open source programs or algorithms with Milena,
send them to us. We may ship your code with Olena and/or add it to
@@ -460,7 +470,7 @@ for new contributors.
\doxysection{tuto1projectstatus}{Project status}
If you want to stay tuned to Milena's development, the best way is probably
-the mailing-lists (\ref{tuto1mailinglists}).
+the mailing-lists (section \ref{tuto1mailinglists}).
There are other ways to get to know what is the status of the project.
@@ -476,7 +486,7 @@ There are other ways to get to know what is the status of the project.
are compiled and run. The buildfarm can show you whether it is safe
to update your svn copy of Milena or not\ldots
-\item Test failures
+\item Test failures \\
\href{http://www.lrde.epita.fr/dload/olena/test-failures-daily.html}{http://www.lrde.epita.fr/dload/olena/test-failures-daily.html} \\
Through this page, you can see exactly which tests do not compile or pass.
This page is updated every night.
@@ -523,6 +533,10 @@ If you want to reach us directly, you can contact one of the following people:
+\vspace{2cm}
+\begin{center}
+ \tutotocnext{tuto2}
+\end{center}
@@ -606,9 +620,9 @@ We are now about to configure the build directory. This process will create
the necessary files to compile documentation, examples and tools and prepare the
installation.
-\textbf{Important Note}: the Install path prefix must be chosen at this step.
+\textbf{Important Note}: the installation path prefix must be chosen at this step.
By default, Milena will be installed in /usr/local but you may like to install
-it elsewhere. To do so, pass the option \textit{--prefix=/installation/path/prefix}
+it elsewhere. To do so, pass the option \textit{-{}-prefix=/installation/path/prefix}
to the configure script (see below). Replace '/installation/path/prefix' with the
wanted installation path prefix.
@@ -630,6 +644,13 @@ config.status: executing depfiles commands
$
\end{verbatim}
+And if you type the following command, a '0' is printed out.
+\begin{verbatim}
+$ echo $?
+0
+$
+\end{verbatim}
+
The build directory is now configured, the library can be installed.
@@ -650,6 +671,7 @@ perform the installation. Then, you may type:
\begin{verbatim}
$ sudo make install
\end{verbatim}
+You will be prompted for the administrator password.
Otherwise, if you set the install path prefix to a directory own by your
user, simply type:
@@ -659,7 +681,7 @@ $ make install
When the installation is finished, you are done. Milena is installed on your
system. But maybe you would like to build the examples? This is described
-in the next section \ref{tuto2optionalcomp}.
+in section \ref{tuto2optionalcomp}.
A description of the installation content is also available in section
\ref{tuto2installcontent}.
@@ -725,6 +747,8 @@ $ make
\doxysubsection{tuto2tests}{Tests}
The test suite used for Milena's development is shipped with the library.
+It is usually useless for simple users and tends to be used by developers
+extending the library.
In order to build and run it, just do the following:
\begin{verbatim}
@@ -741,7 +765,7 @@ Running the test suite is memory and CPU consumming and will take a while.
Once installed, Milena's files are located in the installed path prefix
you passed to the configure script or in the default path /usr/local.
-In the installed path prefix, Milena's files are located in:
+In the installation path prefix, Milena's files are located in:
\begin{itemize}
\item include/mln/ --- The library. All the headers are located here.
@@ -749,6 +773,10 @@ In the installed path prefix, Milena's files are located in:
example programs.
\end{itemize}
+\vspace{2cm}
+\begin{center}
+ \tutotoc{tuto1}{tuto3}
+\end{center}
%====================================
@@ -762,7 +790,7 @@ take benefit of it, let's see what genericity really means for us and how it is
illustrated in the library.
A \B{Generic algorithm} is written once, without duplicates, and works on
-different kind of input.
+different kinds of input.
Let's have a look to a small example. In any image processing library, we may be
interested in a small routine to fill an image with data. A common
@@ -781,7 +809,7 @@ So, what would happen if we would like to use it for 3D images, use rgb8 as
value or even work on a region of interest?
This implementation would require to be reimplemented and the user would have to
-deal with the various version of the fill routine. For the developer, it is error
+deal with the various versions of the fill routine. For the developer, it is error
prone, redundant and hard to maintain. For the user, it is confusing and forces
to always think about what he is manipulating.
According to our definition, this algorithm is clearly \B{not} generic.
@@ -794,7 +822,7 @@ With Milena, the previous example would be written as follow:
\doxycode{fill}
In this version, the routine can take any kind of image types as arguments. So
-it is for the values: The expected type depends on the value used in the
+it is for the values: the expected type depends on the value used in the
given image.
The \code{for\_all} loop is also significantly generic to support any kind of
images since the iterator guarantees it will pass through every sites.
@@ -803,13 +831,13 @@ This code is more generic and remains really close to the common description of
the generic algorithm.
As a result, with this algorithm we can fill an image,...
-\doxycode[2]{fill}
-\doxyfigure[1]{fill}{3cm}
-
-... Or fill only a region of interest (a set of points).
\doxycode[3]{fill}
\doxyfigure[2]{fill}{3cm}
+... Or fill only a region of interest (a set of points).
+\doxycode[2]{fill}
+\doxyfigure[1]{fill}{3cm}
+
%**************************
@@ -829,8 +857,8 @@ Let's see the different parts of the algorithm.
The prototype is restrictive enough, readable and still generic.
We use concepts to statically check that the generic type passed as
parameter is what the routine expects. The ``exact'' image type is \type{I}. For
-instance an image of type \type{image2d} inherits from \type{Image<image2d>}. So
-an \type{image2d} is an \type{Image<I>}.
+instance an image of type \type{image2d} inherits from \type{Image$<$image2d$>$}. So
+an \type{image2d} is an \type{Image$<$I$>$}.
Note that the return type of this function is defined by a macro.
\code{mln\_concrete} is a macro hidding tricky mechanisms (traits) used in Milena.
The important point to remember is that a generic function should not return
@@ -843,7 +871,7 @@ will be detailled in section \ref{tuto3debughints}.
\doxycode[4]{tuto3_first_routine}
-Since the function take some arguments thanks their concept, these object cannot
+Since the function take some arguments as concept objects, these object cannot
be used as such. Indeed, concepts are empty shells only used for dispatching and
concept checking, that's the reason why they are parameterized with their exact
type. The exact type let us know what is the real type of the object. To get an
@@ -853,30 +881,32 @@ debug.
\doxycode[5]{tuto3_first_routine}
-In this portion of code, the image is labeled and the number of site per label
+In this portion of code, the image is labeled and the number of sites per label
is computed. This code does not depend on the image type at all. Again, a macro
-\code{mln\_ch\_value} (``mln change value'') helps us. \code{labeling::blobs} is a routine returning an
-image of the same kind as the input image but with a different value.
-\code{mln\_ch\_value} enables the possibility of doing that, whatever the image type
-\type{I} and whatever its value type, it returns the same image type with a
-different value type.
+\code{mln\_ch\_value} (``mln change value'') helps us. \code{labeling::blobs} is
+a routine returning an image of the same kind as the input image but with a
+different value. \code{mln\_ch\_value} enables the possibility of doing that,
+whatever the image type \type{I} and whatever its value type, it returns the
+same image type with a different value type.
\doxycode[6]{tuto3_first_routine}
The output image is declared here. Like any variable, it must be initialized at
some point. To do so, \code{initialize()} is provided. It is a generic routine
-which can initialize the geometry any kind of image with another image of the
+which can initialize the geometry of any image kind with another image of the
same kind.
After this call, \var{output} has a valid domain and is valid. It can be used in
an algorithm, here \code{data::fill}, to have its values modified.
Note that the value passed to \code{data::fill} is also generic. The library
includes few generic common values from which any value type can convert to.
+\code{literal::one} is one of them. It is a generic one value which can convert
+to every value type in the library.
\doxycode[7]{tuto3_first_routine}
In this part, every region from the labeled image, of which cardinality is lower
than 10 sites, is set to \val{literal::zero} in \var{output}.
-Once again, a generic value is used in order to avoid a constraints on the image
+Once again, a generic value is used in order to avoid constraints on the image
value type.
@@ -899,7 +929,7 @@ If Milena has been installed in a custom directory, e.g. not /usr/include or
/usr/local/include, the path to the library headers must be passed to the
compiler.
-With g++ and MinGW, the option is \B{-I<path>}.
+With g++ and MinGW, the option is \B{-I$<$path$>$}.
\begin{verbatim}
$ g++ -Ipath/to/mln my_program.cc
\end{verbatim}
@@ -948,8 +978,8 @@ their impact on the compilation and execution time.
\doxysubsubsection{tuto3compoptimother}{Other compilers}
-Currently, have not tested different optimization flags with other compilers. If
-you did, please report us your results.
+Currently, we have not tested different optimization flags with other
+compilers. If you did, please report us your results.
@@ -959,15 +989,15 @@ you did, please report us your results.
\doxysubsection{tuto3gdbhints}{Using assertions and GDB}
As said above, Milena already includes a lot of post and pre conditions.
Thus, if you made a mistake in your code there is a high probability that it
-will be detected at run time. If an assertion fail, we advice you to compile
+will be detected at run time. If an assertion fails, we advice you to compile
with the following options:
\begin{verbatim}
$ g++ -ggdb -Ipath/to/mln my_program.cc
\end{verbatim}
-Note that you \B{MUST NOT} compile \var{-DNDEBUG} other the assertions will be
-deactivated.
+Note that you \B{MUST NOT} compile with \var{-DNDEBUG} since assertions will be
+disabled.
Once compiled, restart the program with GDB.
\begin{verbatim}
@@ -1005,7 +1035,7 @@ are printed out in the backtrace as you can see in the following example:
\doxysubsection{tuto3traces}{Traces}
Sometimes, compiling for GDB without optimization flags and with debug
assertions enabled could lead to execution time dramaticaly high.
-If the function parameter values are not necessary for debbuging,
+If the function parameter values are not necessary for debugging,
a good alternative is the trace system provided in Milena.
Each time a routine is called, a trace log is written.
@@ -1072,17 +1102,28 @@ Milena also provides a lot of debug tools. Here is a small list of the tools:
\doxyfigure[2]{tuto3_colorize}{3cm} \\
\end{tabular}
\end{center}
-\end{itemize}
-A very simple processing chain; the target is the end-user!
+ \item mln::labeling::superpose, Superpose two images.
+
+ \item mln::labeling::filename, easily format debug file names.
+
+\end{itemize}
+
-OR (?)
-this chain plus a sample tiny generic algorithm
+%A very simple processing chain; the target is the end-user!
+%
+%OR (?)
+%this chain plus a sample tiny generic algorithm
+%
+%** misc
+%/!\ step by step...
+%compilation time w.r.t compilation options (O1, DNDEBUG).
-** misc
-/!\ step by step...
-compilation time w.r.t compilation options (O1, DNDEBUG).
+\vspace{2cm}
+\begin{center}
+ \tutotoc{tuto2}{tuto4}
+\end{center}
%====================================
@@ -1097,7 +1138,7 @@ then the image itself which stores the values.
\doxysection{tuto4images}{Sites}
A pixel is an element having both information, localization and
-pixels. In Milena, we make a difference between a pixel, a pixel value and a pixel
+value. In Milena, we make a difference between a pixel, a pixel value and a pixel
location. Thus, in order to refer to a pixel location, we have the site concept.
A site can be any kind of localization element.
For instance, in an image defined on a 2D regular grid, it is a 2D point with
@@ -1105,7 +1146,7 @@ For instance, in an image defined on a 2D regular grid, it is a 2D point with
\doxycode{tuto4_point2d}
-The site type in an image is defined by its underlying site set.
+The image site type is defined by its underlying site set.
@@ -1119,6 +1160,9 @@ Site sets can used as standalone containers.
A list of available site sets is available in section \ref{siteset}.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% MOVE PARTS OF THE NEXT CHAPTERS RIGHT HERE. %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%--------------------------
\doxysubsection{tuto4createsiteset}{Creating a site set}
@@ -1154,7 +1198,7 @@ In this section, we will detail how to create common images.
%====================================
-\doxychapter{tuto4}{Step 4: Load and save images}
+\doxychapter{tuto5}{Load and save images}
After this step you shoud know how to:
\begin{itemize}
@@ -1188,12 +1232,12 @@ The supported file formats and their associated image value types are listed
in section \doxyref{imaio}.
\vspace{2cm}
-\tutotoc{tuto3}{tuto5}
+\tutotoc{tuto4}{tuto6}
%====================================
-\doxychapter{tuto5}{Step 5: Create your first image}
+\doxychapter{tuto6}{Create your first image}
After this step you should know how to:
\begin{itemize}
@@ -1237,12 +1281,12 @@ though. A more detailed description can be found in section
\vspace{2cm}
\begin{center}
- \tutotoc{tuto4}{tuto6}
+ \tutotoc{tuto5}{tuto7}
\end{center}
%====================================
-\doxychapter{tuto6}{Step 6: Read and write images}
+\doxychapter{tuto7}{Read and write images}
After this step you should know how to:
\begin{itemize}
@@ -1281,7 +1325,7 @@ If we want to initialize \var{ima} with \var{lena}, we can use \code{data::fill}
\doxycode[6]{tuto3_rw_image}
Output: \\
-\doxyfigure[2]{tuto3_rw_image}{3cm}
+\doxyfigure[2]{tuto3_rw_image}{3cm} \\
Note that to fill an image with some data, the image domain \must be smaller
or equal to the data.
@@ -1296,12 +1340,12 @@ the reference guide.
\vspace{2cm}
\begin{center}
- \tutotoc{tuto5}{tuto7}
+ \tutotoc{tuto6}{tuto8}
\end{center}
%====================================
-\doxychapter{tuto7}{Step 7: Regions of interest}
+\doxychapter{tuto8}{Regions of interest}
After this step you should know how to:
\begin{itemize}
@@ -1314,7 +1358,7 @@ After this step you should know how to:
In the previous step, we used the routine \code{data::fill} in order to change
the values of an image. It was convenient since we did not need to write any
-loop by hand. The problem was that we could not specificy which region to fill
+loop by hand. The problem was that we could not specify which region to fill
with data. This point leads us to talk about the genericity in Olena.
All along this example we will use the routine \code{data::fill} to illustrate
the possibilities in Olena but note that every image types passed to the
@@ -1351,12 +1395,12 @@ First, we just need to declare this square which is actually a site set, a
Then, we just need to tell \code{data::fill} that we would like to fill the
image \var{lena} but only in this restricted part of the image domain.
\doxycode[3]{tuto4_genericity_and_algorithms}
-Operator '|' can be read 'restricted to'. So below, we wrote 'image \var{lena}
+Operator '$|$' can be read 'restricted to'. So below, we wrote 'image \var{lena}
restricted to the region of interest \var{roi}'. Actually this is not directly
\var{lena} which is restricted but its domain.
Note the use of \code{rw()} which is mandatory due to C++ limitations. In C++,
-the image created by \code{lena | roi} is \code{const}, e.g. read-only, though
+the image created by \code{lena $|$ roi} is \code{const}, e.g. read-only, though
\code{data::fill} expect a \code{non-const} image, e.g. read-write. \code{rw()}
is a workaround to make it read-write.
@@ -1379,10 +1423,14 @@ image, we \textbf{do not want} to write anyloop or construct any site set by han
\doxycode[5]{tuto4_genericity_and_algorithms}
A shorter way to get exactly the same result, is to define that behavior by a
-function. In Milena, a function \code{fun::p2v::chess} is available and does
+function. In Milena, a function \code{fun::p2b::chess} is available and does
exactly what we want. Like if it was a site set, simply restrict the image with
the function.
+%
+%Paste code of p2b::chess?
+%
+
\doxycode[6]{tuto4_genericity_and_algorithms}
\begin{center}
\begin{tabular}{c c c}
@@ -1394,10 +1442,10 @@ the function.
Note that the functions provided by default in Olena are actually functors.
Thus, they must be constructed like any object which why it is written
-\code{lena | fun::p2v::chess()} and not \code{lena | fun::p2v::chess}.
+\code{lena $|$ fun::p2v::chess()} and not \code{lena $|$ fun::p2v::chess}.
-FIXME: Talk about C functions once it is possible in Milena.
+%FIXME: Talk about C functions once it is possible in Milena.
%**************************
@@ -1414,7 +1462,7 @@ We construct a mask, \var{mask}. It is initialized with the same geometry proper
\doxycode[7]{tuto4_genericity_and_algorithms}
Then, we cannot restrict directly \var{lena} with \var{mask}. These two images
-have the same domain, so \code{lena | mask.domain()} would not do anything.
+have the same domain, so \code{lena $|$ mask.domain()} would not do anything.
\var{mask} is a classical image, there is not specific type for mask images.
Therefore, we need to express that we want that binary image to be considered as
a mask.
@@ -1456,7 +1504,7 @@ The two routines are :
Let's see a common use case.
First, we binarize lena according to specific criterions, only site values with
-specific colors are set to true in \var{lena_bw}. Others are set to false. This
+specific colors are set to true in \var{lena\_bw}. Others are set to false. This
image will be used in order to label the components.
Let's consider a labeled image \var{label}. Each component of \var{lena} is labeled with a unique index.
Now, we consider that that our region of interest is a component with id 16.
@@ -1482,6 +1530,13 @@ value in \var{label} is equal to 16'.
%**************************
\doxysection{tuto4component}{Image component restricted to a domain}
+%FIXME: be more verbose?
+
+It is also possible to restrict an image to one of its component and apply
+various operators upon it. In the following code, the green component of
+this color image is extracted and filled with the maximum value allowed.
+Other components such as red and blue are left unchanged.
+
\doxycode[11]{tuto4_genericity_and_algorithms}
\begin{center}
@@ -1490,12 +1545,14 @@ value in \var{label} is equal to 16'.
% \doxyfigure[7]{tuto4_genericity_and_algorithms}{3cm} &
~\huge{$\rightarrow$}~ &
\doxyfigure[8]{tuto4_genericity_and_algorithms}{3cm} \\
- \multicolumn{4}{c}{Fill with green a region of interest defined by its
- label.} \\
+ \multicolumn{4}{c}{Set the image green component to its maximum value.} \\
\end{tabular}
\end{center}
+Thanks to Milena's genericity, it is also possible to combine this operator
+with others. Here the green component is extracted from a region of interest
+and only that part is modified.
\doxycode[12]{tuto4_genericity_and_algorithms}
@@ -1504,15 +1561,15 @@ value in \var{label} is equal to 16'.
\doxyimg{small-enlarged}{3cm} &
~\huge{$\rightarrow$}~ &
\doxyfigure[9]{tuto4_genericity_and_algorithms}{3cm} \\
- \multicolumn{4}{c}{Fill with green a region of interest defined by its
- label.} \\
+ \multicolumn{4}{c}{Set the green component of a region of interest
+ to its maximum value.} \\
\end{tabular}
\end{center}
\vspace{2cm}
\begin{center}
- \tutotoc{tuto6}{tuto8}
+ \tutotocprev{tuto7}
\end{center}
--
1.5.6.5
1
0
29 May '09
https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Updating level/ to data/ and labeling::level to ::value.
* duhamel/labeling_level_generic_10000x1000.cc,
* duhamel/slow_seed2tiling.cc,
* duhamel/labeling_algo.cc,
* duhamel/level.hh,
* duhamel/main.cc,
* duhamel/paste.hh,
* duhamel/labeling_level_fast.cc,
* duhamel/canvas_labeling.hh,
* duhamel/level_cpy_from_mln.hh,
* duhamel/mem.hh,
* duhamel/fill.hh,
* duhamel/abr_to_image.cc,
* duhamel/labeling_cpy_from_mln.hh,
* duhamel/labeling.hh,
* levillain/morpho/shortest_path_watershed.hh,
* fred/old/accuprops.cc,
* fred/old/leveling.cc,
* fred/old/algebraic.cc,
* fred/old/accuprops2.cc,
* fred/old/leveling_filter.hh,
* fred/old/accu_trait.hh,
* igr/code/test.cc,
* icdar/2009/dibco/quasi.cc,
* icdar/2009/dibco/svg.1.binarization.cc,
* icdar/2009/dibco/svg.2.binarization.cc,
* icdar/2009/dibco/svg.3.binarization.cc,
* icdar/2009/dibco/binarization.cc,
* icdar/2009/hsc/icdar2ppm.hh,
* icdar/2009/hsc/icdar_io.cc,
* icdar/2009/hsc/clean_input.hh,
* icdar/2009/hsc/lines_to_boxes.cc,
* icdar/2009/hsc/first_attempts/exec/iz_lines.cc,
* icdar/2009/hsc/first_attempts/exec/relabel_lines.cc,
* icdar/2009/hsc/first_attempts/boxes.cc,
* icdar/2009/hsc/first_attempts/main.cc,
* icdar/2009/hsc/input_to_ws.hh,
* icdar/2009/hsc/old_input_to_lines.cc,
* icdar/2009/hsc/lines_to_words.cc,
* icdar/2009/hsc/ws_to_wsl.hh,
* nivault/plugin-gimp/src/build-image.hh,
* nivault/extract_score.cc,
* nivault/extract_character.cc,
* nivault/median.hh,
* exec/bw_negate_in_color.cc,
* fabien/igr/time_max_norm.cc,
* fabien/igr/smooth_fixed_seg/main.cc,
* fabien/igr/time_max.cc,
* fabien/igr/fun_labels.cc,
* fabien/igr/norm.cc,
* fabien/igr/watershed2d.cc,
* fabien/igr/watershed3d.cc,
* fabien/igr/min_max_float.cc,
* fabien/igr/seg_vol_irm.hh,
* fabien/igr/wst_edges.cc,
* fabien/igr/mat2mln/raw2mlndata.cc,
* fabien/igr/mat2mln/mat2mln.cc,
* fabien/igr/label2gif.cc,
* fabien/igr/plot_label.hh,
* fabien/igr/space_smooth/morpho.cc,
* fabien/igr/watershed.hh,
* fabien/igr/matlab.cc,
* fabien/igr/graph.cc,
* fabien/igr/time_smooth/morpho.cc,
* fabien/igr/med.cc,
* fabien/igr/fixed_seg/main.cc,
* fabien/igr/dist_edges.cc,
* fabien/igr/igr.cc,
* fabien/igr/mean_slices.cc,
* fabien/igr/nbasins_finder.cc,
* fabien/igr/filter.cc,
* fabien/level.hh,
* fabien/regional_minima.hh,
* fabien/bin/dump_mask.cc,
* fabien/bin/dicom_mask.cc,
* fabien/bin/dumpi12_to_pgm.cc,
* fabien/binarization/test.cc,
* fabien/regional_maxima.hh,
* fabien/labeling.hh,
* fabien/level.cc,
* jardonnet/n_cmpt/tikz.hh,
* jardonnet/n_cmpt/nwst.hh,
* jardonnet/n_cmpt/test_attribute_watershed.cc,
* jardonnet/n_cmpt/fused_filter.cc,
* jardonnet/n_cmpt/n_cmpt2.hh,
* jardonnet/n_cmpt/n_cmpt3.hh,
* jardonnet/n_cmpt/n_cmpt4.hh,
* jardonnet/n_cmpt/n_cmpt5.hh,
* jardonnet/n_cmpt/ref_filter.cc,
* jardonnet/n_cmpt/n_cmpt.hh,
* jardonnet/igr/src/igr.cc,
* dalila/plop.cc,
* garrigues/level_set.hh,
* garrigues/fllt/fllt_simple.svg.3.cc,
* garrigues/fllt/fllt_simple.cc,
* garrigues/fllt/compute_level_set_fast2.hh,
* garrigues/fllt/fllt_optimized.hh,
* garrigues/fllt/debug.hh,
* garrigues/fllt/compute_level_set_fast.hh,
* garrigues/fllt/fllt.hh,
* garrigues/fllt/give_confs.cc,
* garrigues/fllt/compute_level_set.hh,
* garrigues/union_find/reconstructions_on_function.hh,
* garrigues/union_find/reconstructions_on_set.hh,
* garrigues/union_find/self_dual_reconstruction.hh,
* garrigues/factures/extract_array_highlight.cc,
* garrigues/factures/extract_array.cc,
* abraham/tests/morpho/test_watershed.cc,
* abraham/tests/morpho/test_watershed_topo.cc,
* abraham/mln/morpho/najman_wst.hh,
* abraham/mln/morpho/basic_najman.hh,
* abraham/mln/morpho/topo_wst.hh,
* abraham/mln/level/thru.hh,
* inim/2010/boxes/boxes.cc,
* inim/2010/morpho/main_dilation-n.cc,
* inim/2010/morpho/morpho.cc,
* inim/2010/rag/rag.hh,
* inim/2010/cag/superpose.hh,
* inim/2011/fredwin/inim.cc,
* inim/2009/classif/src/max_tree.hh,
* inim/2009/classif/src/iccvg04.cc,
* inim/2009/binarization/snake2d.cc,
* inim/2009/color/min_tree_volume_filter.cc,
* inim/2009/color/reference.cc,
* inim/2009/color/min_tree_area_filter.cc,
* inim/2009/color/min_tree_height_filter.cc,
* inim/2009/color/min_tree_color.cc,
* inim/2009/color/reference2.cc,
* inim/2009/color/min_tree_color_v2.cc,
* inim/2009/nature/nature.cc,
* inim/2009/nature/hom.cc,
* inim/2009/nature/histo_hsi.cc,
* theo/igr/irm_seg_with_mm_and_rag.cc,
* theo/igr/irm_anat_segm.cc,
* theo/igr/irm_anat_segm__2D_ONLY.cc,
* theo/igr/segment_2d_t.cc,
* theo/igr/dump_to_dist.cc,
* theo/rush/exo2/exo2.cc,
* theo/rush/exo3/exo3_fun_generator.cc,
* theo/rush/exo3/exo3_fun_area.cc,
* theo/exec/diff_abs.cc,
* theo/exec/gaussian_directional_2d__float.cc,
* theo/exec/watershed_flooding.cc,
* theo/exec/dump_12bit_to_pgm.cc,
* theo/exec/color_labeling_mean.cc,
* theo/exec/gaussian_directional_2d.cc,
* theo/exec/distance_thick.cc,
* theo/test_attribute.cc,
* theo/fllt.svg.6.cc,
* theo/esiee/laurent/presentation/wst_edge.cc,
* theo/esiee/laurent/presentation/wst2d.cc,
* theo/esiee/laurent/presentation/wst3d.cc,
* theo/esiee/laurent/presentation/segmentation.hh,
* theo/esiee/laurent/ismm09/trash.hh,
* theo/esiee/laurent/ismm09/extinct_attributes.hh,
* theo/esiee/laurent/ismm09/main.ext.cc,
* theo/esiee/laurent/ismm09/main.cc,
* theo/esiee/laurent/ismm09/util.hh,
* theo/esiee/laurent/ismm09/pseudo_tree.hh,
* theo/cs2d/cs2d.cc,
* theo/cs2d/kruskal.cc,
* theo/cs2d/cs2d_morpho.hh,
* theo/publis/icip2009/compute_a.cc,
* theo/publis/icip2009/regmin_count.cc,
* theo/fllt/fllt.hh,
* theo/fllt/fllt.svg.7.hh,
* theo/fllt/fllt.svg.4.cc,
* theo/fllt/fllt.svg.5.cc,
* theo/fllt/fllt.svg.6.cc,
* theo/fllt/fllt_test.hh,
* theo/fllt.svg.7.hh,
* theo/dmap.cc,
* theo/Rd/diff.cc,
* theo/Rd/utils.hh,
* theo/Rd/diff_pgm.cc,
* theo/tufa_2008/steps.0.cc,
* theo/tufa_2008/steps.1.cc,
* theo/tufa_2008/steps.2.cc,
* theo/tufa_2008/steps.3.cc,
* theo/tufa_2008/steps.2b.cc,
* theo/tufa_2008/filter_n.cc,
* theo/tufa_2008/wst_f_equal_wst_a.cc,
* theo/tufa_2008/wst.cc,
* theo/tufa_2008/experiment.cc,
* theo/tufa_2008/n_cmpt.cc,
* theo/tufa_2008/filter.cc,
* theo/tufa_2008/fz_count.cc,
* theo/color/segment.hh,
* theo/color/segment_rgb_pixels.cc,
* theo/color/segment_rgb_edges.cc,
* theo/color/change_attributes.hh,
* theo/color/filter_blen_rgb_edges.cc,
* theo/color/filter_meandist_rgb_pixels.cc,
* theo/color/segment_gl_pixels.cc,
* theo/csi/edwin.cc,
* bugs/lut.cc,
* lazzara/igr/irm_seg_with_mm_and_rag.mine.cc,
* lazzara/igr/igr-biggest-comp.cc,
* lazzara/igr/irm/wst_rag_hsl.cc,
* lazzara/igr/irm/grad_clo_and_wshd.cc,
* lazzara/igr/irm/hsl_grad_and_wst.cc,
* lazzara/igr/irm/wst_rag.cc,
* edwin/tree/tree.cc,
* edwin/tree/propagation.cc,
* edwin/rush/leaves/test/export.cc,
* edwin/rush/leaves/get_leaves.cc,
* edwin/rush/granulometry/test.cc,
* edwin/rush/exo2/wst_from_closing.cc,
* edwin/rush/exo2/test.cc,
* edwin/rush/exo2/wst_from_tree.cc,
* edwin/rush/exo2/color_labeling_mean.hh,
* edwin/tests/sharp.cc,
* camille/graph-wst.cc,
* camille/graph-line-gradient-closing.cc,
* vigouroux/convert/stretch.hh,
* vigouroux/yuv/test.cc,
* vigouroux/yuv/testfun.cc,
* vigouroux/cmy/test.cc,
* vigouroux/cmy/testfun.cc,
* vigouroux/xyz/test.cc,
* vigouroux/xyz/testfun.cc,
* vigouroux/moyenne.cc,
* vigouroux/lap.cc,
* vigouroux/yiq/test.cc,
* vigouroux/yiq/testfun.cc,
* vigouroux/load.cc,
* vigouroux/conv/test.cc,
* vigouroux/testfun.cc,
* folio/test/histo/compute_histo_rgb_from_ppm.cc,
* folio/test/histo/projected3d.cc,
* folio/test/histo/classify_with_histo_rgb.cc,
* folio/test/dt/psn.cc,
* folio/test/dt/psn_log.cc,
* folio/test/dt/dt_maze.cc,
* folio/test/dt/chamfer.cc,
* folio/test/dt/dt_bench.cc,
* folio/test/dt/dt.cc,
* folio/test/value/hsv.cc,
* folio/mln/dt/dt_old/psn.cc,
* folio/mln/dt/dt_old/psn_log.cc,
* folio/mln/dt/dt_old/distance_front.cc,
* folio/mln/dt/dt_old/chamfer.cc,
* folio/mln/dt/dt_old/dt.cc,
* beguin/irm_g.cc,
* beguin/segm_to_pregraph.hh,
* beguin/irm.cc,
* laurent/ismm2009.cc,
* laurent/playing_with_attributes.cc,
* delmon/minsurf/main.cc (level): Update to data.
(labeling::level): Update to labeling::value.
abraham/mln/level/thru.hh | 22 +++++++--------
abraham/mln/morpho/basic_najman.hh | 6 ++--
abraham/mln/morpho/najman_wst.hh | 6 ++--
abraham/mln/morpho/topo_wst.hh | 4 +-
abraham/tests/morpho/test_watershed.cc | 2 -
abraham/tests/morpho/test_watershed_topo.cc | 2 -
beguin/irm.cc | 14 +++++-----
beguin/irm_g.cc | 8 ++---
beguin/segm_to_pregraph.hh | 2 -
bugs/lut.cc | 8 ++---
camille/graph-line-gradient-closing.cc | 2 -
camille/graph-wst.cc | 2 -
dalila/plop.cc | 4 +-
delmon/minsurf/main.cc | 4 +-
duhamel/abr_to_image.cc | 4 +-
duhamel/canvas_labeling.hh | 2 -
duhamel/fill.hh | 2 -
duhamel/labeling.hh | 2 -
duhamel/labeling_algo.cc | 4 +-
duhamel/labeling_cpy_from_mln.hh | 2 -
duhamel/labeling_level_fast.cc | 2 -
duhamel/labeling_level_generic_10000x1000.cc | 2 -
duhamel/level.hh | 6 ++--
duhamel/level_cpy_from_mln.hh | 6 ++--
duhamel/main.cc | 2 -
duhamel/mem.hh | 2 -
duhamel/paste.hh | 2 -
duhamel/slow_seed2tiling.cc | 8 ++---
edwin/rush/exo2/color_labeling_mean.hh | 4 +-
edwin/rush/exo2/test.cc | 4 +-
edwin/rush/exo2/wst_from_closing.cc | 4 +-
edwin/rush/exo2/wst_from_tree.cc | 12 ++++----
edwin/rush/granulometry/test.cc | 4 +-
edwin/rush/leaves/get_leaves.cc | 4 +-
edwin/rush/leaves/test/export.cc | 4 +-
edwin/tests/sharp.cc | 8 ++---
edwin/tree/propagation.cc | 4 +-
edwin/tree/tree.cc | 8 ++---
exec/bw_negate_in_color.cc | 2 -
fabien/bin/dicom_mask.cc | 4 +-
fabien/bin/dump_mask.cc | 4 +-
fabien/bin/dumpi12_to_pgm.cc | 6 ++--
fabien/binarization/test.cc | 8 ++---
fabien/igr/dist_edges.cc | 10 +++----
fabien/igr/filter.cc | 14 +++++-----
fabien/igr/fixed_seg/main.cc | 18 ++++++------
fabien/igr/fun_labels.cc | 12 ++++----
fabien/igr/graph.cc | 10 +++----
fabien/igr/igr.cc | 10 +++----
fabien/igr/label2gif.cc | 6 ++--
fabien/igr/mat2mln/mat2mln.cc | 4 +-
fabien/igr/mat2mln/raw2mlndata.cc | 4 +-
fabien/igr/matlab.cc | 6 ++--
fabien/igr/mean_slices.cc | 2 -
fabien/igr/med.cc | 6 ++--
fabien/igr/min_max_float.cc | 4 +-
fabien/igr/nbasins_finder.cc | 8 ++---
fabien/igr/norm.cc | 6 ++--
fabien/igr/plot_label.hh | 4 +-
fabien/igr/seg_vol_irm.hh | 24 ++++++++---------
fabien/igr/smooth_fixed_seg/main.cc | 18 ++++++------
fabien/igr/space_smooth/morpho.cc | 6 ++--
fabien/igr/time_max.cc | 8 ++---
fabien/igr/time_max_norm.cc | 8 ++---
fabien/igr/time_smooth/morpho.cc | 6 ++--
fabien/igr/watershed.hh | 28 ++++++++++----------
fabien/igr/watershed2d.cc | 28 ++++++++++----------
fabien/igr/watershed3d.cc | 28 ++++++++++----------
fabien/igr/wst_edges.cc | 6 ++--
fabien/labeling.hh | 12 ++++----
fabien/level.cc | 4 +-
fabien/level.hh | 8 ++---
fabien/regional_maxima.hh | 2 -
fabien/regional_minima.hh | 2 -
folio/mln/dt/dt_old/chamfer.cc | 4 +-
folio/mln/dt/dt_old/distance_front.cc | 2 -
folio/mln/dt/dt_old/dt.cc | 4 +-
folio/mln/dt/dt_old/psn.cc | 4 +-
folio/mln/dt/dt_old/psn_log.cc | 4 +-
folio/test/dt/chamfer.cc | 4 +-
folio/test/dt/dt.cc | 2 -
folio/test/dt/dt_bench.cc | 4 +-
folio/test/dt/dt_maze.cc | 2 -
folio/test/dt/psn.cc | 4 +-
folio/test/dt/psn_log.cc | 4 +-
folio/test/histo/classify_with_histo_rgb.cc | 4 +-
folio/test/histo/compute_histo_rgb_from_ppm.cc | 2 -
folio/test/histo/projected3d.cc | 10 +++----
folio/test/value/hsv.cc | 6 ++--
fred/old/accu_trait.hh | 2 -
fred/old/accuprops.cc | 16 +++++------
fred/old/accuprops2.cc | 16 +++++------
fred/old/algebraic.cc | 12 ++++----
fred/old/leveling.cc | 6 ++--
fred/old/leveling_filter.hh | 26 +++++++++---------
garrigues/factures/extract_array.cc | 4 +-
garrigues/factures/extract_array_highlight.cc | 6 ++--
garrigues/fllt/compute_level_set.hh | 6 ++--
garrigues/fllt/compute_level_set_fast.hh | 6 ++--
garrigues/fllt/compute_level_set_fast2.hh | 6 ++--
garrigues/fllt/debug.hh | 2 -
garrigues/fllt/fllt.hh | 6 ++--
garrigues/fllt/fllt_optimized.hh | 6 ++--
garrigues/fllt/fllt_simple.cc | 2 -
garrigues/fllt/fllt_simple.svg.3.cc | 2 -
garrigues/fllt/give_confs.cc | 4 +-
garrigues/level_set.hh | 12 ++++----
garrigues/union_find/reconstructions_on_function.hh | 8 ++---
garrigues/union_find/reconstructions_on_set.hh | 2 -
garrigues/union_find/self_dual_reconstruction.hh | 8 ++---
icdar/2009/dibco/binarization.cc | 22 +++++++--------
icdar/2009/dibco/quasi.cc | 8 ++---
icdar/2009/dibco/svg.1.binarization.cc | 6 ++--
icdar/2009/dibco/svg.2.binarization.cc | 14 +++++-----
icdar/2009/dibco/svg.3.binarization.cc | 16 +++++------
icdar/2009/hsc/clean_input.hh | 4 +-
icdar/2009/hsc/first_attempts/boxes.cc | 2 -
icdar/2009/hsc/first_attempts/exec/iz_lines.cc | 2 -
icdar/2009/hsc/first_attempts/exec/relabel_lines.cc | 4 +-
icdar/2009/hsc/first_attempts/main.cc | 8 ++---
icdar/2009/hsc/icdar2ppm.hh | 4 +-
icdar/2009/hsc/icdar_io.cc | 2 -
icdar/2009/hsc/input_to_ws.hh | 10 +++----
icdar/2009/hsc/lines_to_boxes.cc | 4 +-
icdar/2009/hsc/lines_to_words.cc | 4 +-
icdar/2009/hsc/old_input_to_lines.cc | 8 ++---
icdar/2009/hsc/ws_to_wsl.hh | 8 ++---
igr/code/test.cc | 2 -
inim/2009/binarization/snake2d.cc | 2 -
inim/2009/classif/src/iccvg04.cc | 2 -
inim/2009/classif/src/max_tree.hh | 4 +-
inim/2009/color/min_tree_area_filter.cc | 6 ++--
inim/2009/color/min_tree_color.cc | 6 ++--
inim/2009/color/min_tree_color_v2.cc | 4 +-
inim/2009/color/min_tree_height_filter.cc | 4 +-
inim/2009/color/min_tree_volume_filter.cc | 4 +-
inim/2009/color/reference.cc | 4 +-
inim/2009/color/reference2.cc | 4 +-
inim/2009/nature/histo_hsi.cc | 14 +++++-----
inim/2009/nature/hom.cc | 2 -
inim/2009/nature/nature.cc | 8 ++---
inim/2010/boxes/boxes.cc | 4 +-
inim/2010/cag/superpose.hh | 4 +-
inim/2010/morpho/main_dilation-n.cc | 8 ++---
inim/2010/morpho/morpho.cc | 8 ++---
inim/2010/rag/rag.hh | 2 -
inim/2011/fredwin/inim.cc | 10 +++----
jardonnet/igr/src/igr.cc | 6 ++--
jardonnet/n_cmpt/fused_filter.cc | 6 ++--
jardonnet/n_cmpt/n_cmpt.hh | 4 +-
jardonnet/n_cmpt/n_cmpt2.hh | 4 +-
jardonnet/n_cmpt/n_cmpt3.hh | 4 +-
jardonnet/n_cmpt/n_cmpt4.hh | 4 +-
jardonnet/n_cmpt/n_cmpt5.hh | 4 +-
jardonnet/n_cmpt/nwst.hh | 2 -
jardonnet/n_cmpt/ref_filter.cc | 6 ++--
jardonnet/n_cmpt/test_attribute_watershed.cc | 2 -
jardonnet/n_cmpt/tikz.hh | 8 ++---
laurent/ismm2009.cc | 4 +-
laurent/playing_with_attributes.cc | 8 ++---
lazzara/igr/igr-biggest-comp.cc | 4 +-
lazzara/igr/irm/grad_clo_and_wshd.cc | 4 +-
lazzara/igr/irm/hsl_grad_and_wst.cc | 12 ++++----
lazzara/igr/irm/wst_rag.cc | 6 ++--
lazzara/igr/irm/wst_rag_hsl.cc | 8 ++---
lazzara/igr/irm_seg_with_mm_and_rag.mine.cc | 14 +++++-----
levillain/morpho/shortest_path_watershed.hh | 4 +-
nivault/extract_character.cc | 10 +++----
nivault/extract_score.cc | 12 ++++----
nivault/median.hh | 8 ++---
nivault/plugin-gimp/src/build-image.hh | 2 -
theo/Rd/diff.cc | 2 -
theo/Rd/diff_pgm.cc | 2 -
theo/Rd/utils.hh | 2 -
theo/color/change_attributes.hh | 4 +-
theo/color/filter_blen_rgb_edges.cc | 6 ++--
theo/color/filter_meandist_rgb_pixels.cc | 4 +-
theo/color/segment.hh | 8 ++---
theo/color/segment_gl_pixels.cc | 4 +-
theo/color/segment_rgb_edges.cc | 2 -
theo/color/segment_rgb_pixels.cc | 4 +-
theo/cs2d/cs2d.cc | 2 -
theo/cs2d/cs2d_morpho.hh | 8 ++---
theo/cs2d/kruskal.cc | 4 +-
theo/csi/edwin.cc | 4 +-
theo/dmap.cc | 4 +-
theo/esiee/laurent/ismm09/extinct_attributes.hh | 2 -
theo/esiee/laurent/ismm09/main.cc | 2 -
theo/esiee/laurent/ismm09/main.ext.cc | 2 -
theo/esiee/laurent/ismm09/pseudo_tree.hh | 8 ++---
theo/esiee/laurent/ismm09/trash.hh | 2 -
theo/esiee/laurent/ismm09/util.hh | 4 +-
theo/esiee/laurent/presentation/segmentation.hh | 2 -
theo/esiee/laurent/presentation/wst2d.cc | 4 +-
theo/esiee/laurent/presentation/wst3d.cc | 4 +-
theo/esiee/laurent/presentation/wst_edge.cc | 6 ++--
theo/exec/color_labeling_mean.cc | 8 ++---
theo/exec/diff_abs.cc | 4 +-
theo/exec/distance_thick.cc | 4 +-
theo/exec/dump_12bit_to_pgm.cc | 4 +-
theo/exec/gaussian_directional_2d.cc | 6 ++--
theo/exec/gaussian_directional_2d__float.cc | 6 ++--
theo/exec/watershed_flooding.cc | 4 +-
theo/fllt.svg.6.cc | 2 -
theo/fllt.svg.7.hh | 2 -
theo/fllt/fllt.hh | 6 ++--
theo/fllt/fllt.svg.4.cc | 2 -
theo/fllt/fllt.svg.5.cc | 2 -
theo/fllt/fllt.svg.6.cc | 2 -
theo/fllt/fllt.svg.7.hh | 2 -
theo/fllt/fllt_test.hh | 2 -
theo/igr/dump_to_dist.cc | 4 +-
theo/igr/irm_anat_segm.cc | 4 +-
theo/igr/irm_anat_segm__2D_ONLY.cc | 4 +-
theo/igr/irm_seg_with_mm_and_rag.cc | 8 ++---
theo/igr/segment_2d_t.cc | 6 ++--
theo/publis/icip2009/compute_a.cc | 8 ++---
theo/publis/icip2009/regmin_count.cc | 4 +-
theo/rush/exo2/exo2.cc | 4 +-
theo/rush/exo3/exo3_fun_area.cc | 4 +-
theo/rush/exo3/exo3_fun_generator.cc | 4 +-
theo/test_attribute.cc | 14 +++++-----
theo/tufa_2008/experiment.cc | 16 +++++------
theo/tufa_2008/filter.cc | 6 ++--
theo/tufa_2008/filter_n.cc | 4 +-
theo/tufa_2008/fz_count.cc | 4 +-
theo/tufa_2008/n_cmpt.cc | 4 +-
theo/tufa_2008/steps.0.cc | 8 ++---
theo/tufa_2008/steps.1.cc | 8 ++---
theo/tufa_2008/steps.2.cc | 6 ++--
theo/tufa_2008/steps.2b.cc | 6 ++--
theo/tufa_2008/steps.3.cc | 6 ++--
theo/tufa_2008/wst.cc | 2 -
theo/tufa_2008/wst_f_equal_wst_a.cc | 10 +++----
vigouroux/cmy/test.cc | 6 ++--
vigouroux/cmy/testfun.cc | 6 ++--
vigouroux/conv/test.cc | 6 ++--
vigouroux/convert/stretch.hh | 4 +-
vigouroux/lap.cc | 4 +-
vigouroux/load.cc | 2 -
vigouroux/moyenne.cc | 6 ++--
vigouroux/testfun.cc | 6 ++--
vigouroux/xyz/test.cc | 6 ++--
vigouroux/xyz/testfun.cc | 6 ++--
vigouroux/yiq/test.cc | 6 ++--
vigouroux/yiq/testfun.cc | 6 ++--
vigouroux/yuv/test.cc | 6 ++--
vigouroux/yuv/testfun.cc | 6 ++--
248 files changed, 744 insertions(+), 744 deletions(-)
Index: duhamel/labeling_level_generic_10000x1000.cc
--- duhamel/labeling_level_generic_10000x1000.cc (revision 3923)
+++ duhamel/labeling_level_generic_10000x1000.cc (working copy)
@@ -57,7 +57,7 @@
unsigned n;
image2d_b<value::int_u8> out(i1.domain(), border);
- labeling::level(i1, 2, c4(), out, n);
+ labeling::value(i1, 2, c4(), out, n);
mln_assertion (n == 1);
}
Index: duhamel/slow_seed2tiling.cc
--- duhamel/slow_seed2tiling.cc (revision 3923)
+++ duhamel/slow_seed2tiling.cc (working copy)
@@ -36,7 +36,7 @@
# include <mln/core/alias/neighb2d.hh>
# include <mln/value/int_u8.hh>
# include <mln/data/fill.hh>
-# include <mln/level/stretch.hh>
+# include <mln/data/stretch.hh>
# include <mln/border/fill.hh>
# include <mln/io/pbm/load.hh>
# include <mln/io/pgm/save.hh>
@@ -129,14 +129,14 @@
inte = geom::slow_seeds2tiling(lab, max);
border::fill (inte, 0);
- level::stretch (inte, inte2);
+ data::stretch (inte, inte2);
io::pgm::save(inte2, "ima_slow.pgm");
std::cout << "ima_slow generate with seeds2tiling"
<< std::endl;
inte = geom::seeds2tiling(lab, c4 ());
border::fill (inte, 0);
- level::stretch (inte, inte2);
+ data::stretch (inte, inte2);
io::pgm::save(inte2, "ima1.pgm");
std::cout << "ima1 generate with seeds2tiling"
<< std::endl;
@@ -146,7 +146,7 @@
// << std::endl;
// inte = geom::seeds2tiling_with_chamfer(lab, w_win, max, c4 ());
// border::fill (inte, 0);
-// level::stretch (inte, inte2);
+// data::stretch (inte, inte2);
// io::pgm::save(inte2, "ima2.pgm");
// std::cout << "ima2 generate with seeds2tiling_with_chamfer"
Index: duhamel/labeling_algo.cc
--- duhamel/labeling_algo.cc (revision 3923)
+++ duhamel/labeling_algo.cc (working copy)
@@ -35,7 +35,7 @@
# include <mln/core/alias/neighb2d.hh>
# include <mln/value/int_u8.hh>
# include <mln/data/fill.hh>
-# include <mln/level/stretch.hh>
+# include <mln/data/stretch.hh>
# include <mln/border/fill.hh>
# include <mln/io/pbm/load.hh>
# include <mln/io/pgm/save.hh>
@@ -71,7 +71,7 @@
image2d_b<int_u8> inte2(inte.domain());
- level::stretch (inte, inte2);
+ data::stretch (inte, inte2);
io::pgm::save(inte2, "inte.pgm");
Index: duhamel/level.hh
--- duhamel/level.hh (revision 3923)
+++ duhamel/level.hh (working copy)
@@ -73,7 +73,7 @@
bool level_(const Image<I>& input, const mln_value(I)& val, const Neighborhood<N>& nbh,
Image<O>& output, unsigned& nlabels)
{
- typedef impl::level_t<I,N,O> F;
+ typedef impl::data_t<I,N,O> F;
F f(exact(input), val, exact(nbh), exact(output));
canvas::labeling<F> run(f);
nlabels = f.nlabels;
@@ -86,7 +86,7 @@
bool level_(const Fast_Image<I>& input, const mln_value(I)& val, const Neighborhood<N>& nbh,
Fast_Image<O>& output, unsigned& nlabels)
{
- typedef impl::level_t<I,N,O> F;
+ typedef impl::data_t<I,N,O> F;
F f(exact(input), val, exact(nbh), exact(output));
canvas::labeling_fast<F> run(f);
nlabels = f.nlabels;
@@ -104,7 +104,7 @@
Image<O>& output, unsigned& nlabels)
{
mln_precondition(exact(output).domain() == exact(input).domain());
- return impl::level_(exact(input), val, nbh, output, nlabels);
+ return impl::data_(exact(input), val, nbh, output, nlabels);
}
# endif // ! MLN_INCLUDE_ONLY
Index: duhamel/main.cc
--- duhamel/main.cc (revision 3923)
+++ duhamel/main.cc (working copy)
@@ -3,7 +3,7 @@
#include <mln/core/alias/neighb2d.hh>
#include <mln/value/int_u8.hh>
#include <mln/data/fill.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
#include <mln/io/pgm/save.hh>
Index: duhamel/paste.hh
--- duhamel/paste.hh (revision 3923)
+++ duhamel/paste.hh (working copy)
@@ -9,7 +9,7 @@
namespace mln
{
- namespace level
+ namespace data
{
template <typename I>
Index: duhamel/labeling_level_fast.cc
--- duhamel/labeling_level_fast.cc (revision 3923)
+++ duhamel/labeling_level_fast.cc (working copy)
@@ -56,7 +56,7 @@
unsigned n;
image2d_b<value::int_u8> out(i1.domain(), border);
- labeling::level_fast(i1, 2, c4(), out, n);
+ labeling::value_fast(i1, 2, c4(), out, n);
std::cout << "n = " << n << std::endl;
debug::println(out);
Index: duhamel/canvas_labeling.hh
--- duhamel/canvas_labeling.hh (revision 3923)
+++ duhamel/canvas_labeling.hh (working copy)
@@ -35,7 +35,7 @@
*/
# include <mln/data/fill.hh>
-# include <mln/level/sort_points.hh>
+# include <mln/data/sort_points.hh>
# include <mln/convert/to_window.hh>
Index: duhamel/level_cpy_from_mln.hh
--- duhamel/level_cpy_from_mln.hh (revision 3923)
+++ duhamel/level_cpy_from_mln.hh (working copy)
@@ -99,7 +99,7 @@
bool level_(const Image<I>& input, const mln_value(I)& val, const Neighborhood<N>& nbh,
Image<O>& output, unsigned& nlabels)
{
- typedef impl::level_t<I,N,O> F;
+ typedef impl::data_t<I,N,O> F;
F f(exact(input), val, exact(nbh), exact(output));
canvas::labeling<F> run(f);
nlabels = f.nlabels;
@@ -114,7 +114,7 @@
bool level_(const Fast_Image<I>& input, const mln_value(I)& val, const Neighborhood<N>& nbh,
Image<O>& output, unsigned& nlabels)
{
- typedef impl::level_t<I,N,O> F;
+ typedef impl::data_t<I,N,O> F;
F f(exact(input), val, exact(nbh), exact(output));
canvas::labeling_fast<F> run(f);
nlabels = f.nlabels;
@@ -134,7 +134,7 @@
Image<O>& output, unsigned& nlabels)
{
mln_precondition(exact(output).domain() == exact(input).domain());
- return impl::level_(exact(input), val, nbh, output, nlabels);
+ return impl::data_(exact(input), val, nbh, output, nlabels);
}
# endif // ! MLN_INCLUDE_ONLY
Index: duhamel/mem.hh
--- duhamel/mem.hh (revision 3923)
+++ duhamel/mem.hh (working copy)
@@ -18,7 +18,7 @@
namespace mln
{
- namespace level
+ namespace data
{
template <typename I>
Index: duhamel/fill.hh
--- duhamel/fill.hh (revision 3923)
+++ duhamel/fill.hh (working copy)
@@ -23,7 +23,7 @@
namespace mln
{
- namespace level
+ namespace data
{
template <typename I>
Index: duhamel/abr_to_image.cc
--- duhamel/abr_to_image.cc (revision 3923)
+++ duhamel/abr_to_image.cc (working copy)
@@ -37,7 +37,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/set_p.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/io/pgm/save.hh>
#include <vector>
@@ -135,7 +135,7 @@
image2d<int_u8> out(output.domain());
- level::stretch (output, out);
+ data::stretch (output, out);
io::pgm::save(out, "out.pgm");
Index: duhamel/labeling_cpy_from_mln.hh
--- duhamel/labeling_cpy_from_mln.hh (revision 3923)
+++ duhamel/labeling_cpy_from_mln.hh (working copy)
@@ -35,7 +35,7 @@
*/
# include <mln/data/fill.hh>
-# include <mln/level/sort_points.hh>
+# include <mln/data/sort_points.hh>
# include <mln/convert/to_window.hh>
Index: duhamel/labeling.hh
--- duhamel/labeling.hh (revision 3923)
+++ duhamel/labeling.hh (working copy)
@@ -9,7 +9,7 @@
# include <mln/data/fill.hh>
# include "fill.hh"
-# include <mln/level/sort_points.hh>
+# include <mln/data/sort_points.hh>
namespace mln
Index: levillain/morpho/shortest_path_watershed.hh
--- levillain/morpho/shortest_path_watershed.hh (revision 3923)
+++ levillain/morpho/shortest_path_watershed.hh (working copy)
@@ -44,7 +44,7 @@
# include <queue>
# include <mln/data/fill.hh>
-# include <mln/level/extrema_components.hh>
+# include <mln/data/extrema_components.hh>
# include <mln/morpho/lower_completion.hh>
# include <mln/trait/value_.hh>
@@ -101,7 +101,7 @@
// Initialize output with the minima components.
typename ch_value_type<I, DestValue>::ret output =
- level::minima_components<DestValue>(input);
+ data::minima_components<DestValue>(input);
// Distance.
typedef ntg_cumul_type(DestValue) cumul_type;
Index: fred/old/accuprops.cc
--- fred/old/accuprops.cc (revision 3923)
+++ fred/old/accuprops.cc (working copy)
@@ -25,7 +25,7 @@
# define mln_trait_accu_has_stop(A) typename mln::trait::accu_< A >::has_stop
/// Shortcut to the accumulator property about behavior when pixel is given as take() value
-/// Used for instance in mln::canvas::morpho::leveling
+/// Used for instance in mln::canvas::morpho::dataing
# define mln_trait_accu_when_pix(A) typename mln::trait::accu_< A >::when_pix
namespace mln {
@@ -151,7 +151,7 @@
const Image<I>& input,
Accumulator<A>& acc)
{
- impl::generic::leveling(input, acc);
+ impl::generic::dataing(input, acc);
}
template <typename I, typename A>
@@ -161,7 +161,7 @@
const Image<I>& input,
Accumulator<A>& acc)
{
- impl::leveling_fastest(input, acc);
+ impl::dataing_fastest(input, acc);
}
template <typename I, typename A>
@@ -177,7 +177,7 @@
mlc_equal(mln_trait_accu_when_pix(A),
trait::accu::when_pix::use_v)::value
};
- internal::leveling_dispatch(metal::bool_<test>(),
+ internal::dataing_dispatch(metal::bool_<test>(),
input, acc);
}
@@ -190,7 +190,7 @@
leveling(const Image<I>& input,
Accumulator< A< util::pix<I> > >& acc)
{
- internal::leveling_dispatch(input, acc);
+ internal::dataing_dispatch(input, acc);
}
} // end of namespace mln::canvas::morpho
@@ -308,7 +308,7 @@
acc.init();
chrono.start();
for (int i = 0; i < 50; i++)
- mln::canvas::morpho::leveling(ima, acc);
+ mln::canvas::morpho::dataing(ima, acc);
elapsed = chrono.stop();
std::cout << "(auto) " << elapsed << "s : " << acc.to_result() << std::endl;
@@ -316,7 +316,7 @@
acc.init();
chrono.start();
for (int i = 0; i < 50; i++)
- mln::canvas::morpho::impl::generic::leveling(ima, acc);
+ mln::canvas::morpho::impl::generic::dataing(ima, acc);
elapsed = chrono.stop();
std::cout << "(generic) " << elapsed << "s : " << acc.to_result() << std::endl;
@@ -324,7 +324,7 @@
acc.init();
chrono.start();
for (int i = 0; i < 50; i++)
- mln::canvas::morpho::impl::leveling_fastest(ima, acc);
+ mln::canvas::morpho::impl::dataing_fastest(ima, acc);
elapsed = chrono.stop();
std::cout << "(fast) " << elapsed << "s : " << acc.to_result() << std::endl;
Index: fred/old/leveling.cc
--- fred/old/leveling.cc (revision 3923)
+++ fred/old/leveling.cc (working copy)
@@ -26,20 +26,20 @@
I out;
chrono.start();
- out = mln::canvas::morpho::leveling_filter(lena, c4(), c, lambda, true);
+ out = mln::canvas::morpho::dataing_filter(lena, c4(), c, lambda, true);
elapsed = chrono.stop();
std::cout << "(auto) " << elapsed << "s" << std::endl;
mln::io::pgm::save(out, "auto.pgm");
chrono.start();
- out = mln::canvas::morpho::internal::leveling_filter_dispatch(mln::metal::true_(), lena, c4(), c, lambda, true);
+ out = mln::canvas::morpho::internal::dataing_filter_dispatch(mln::metal::true_(), lena, c4(), c, lambda, true);
elapsed = chrono.stop();
std::cout << "(fast) " << elapsed << "s" << std::endl;
mln::io::pgm::save(out, "fast.pgm");
chrono.start();
- out = mln::canvas::morpho::internal::leveling_filter_dispatch(mln::metal::false_(), lena, c4(), c, lambda, true);
+ out = mln::canvas::morpho::internal::dataing_filter_dispatch(mln::metal::false_(), lena, c4(), c, lambda, true);
elapsed = chrono.stop();
std::cout << "(slow) " << elapsed << "s" << std::endl;
Index: fred/old/algebraic.cc
--- fred/old/algebraic.cc (revision 3923)
+++ fred/old/algebraic.cc (working copy)
@@ -41,8 +41,8 @@
# include <mln/convert/to_upper_window.hh>
# include <mln/extension/adjust_fill.hh>
-# include <mln/level/sort_psites.hh>
-# include <mln/level/sort_offsets.hh>
+# include <mln/data/sort_psites.hh>
+# include <mln/data/sort_offsets.hh>
# include <mln/core/alias/neighb2d.hh>
# include "../edwin/accu_trait.hh"
@@ -304,8 +304,8 @@
{
p_array < mln_psite(I) > s =
increasing ?
- level::sort_psites_increasing(input) :
- level::sort_psites_decreasing(input);
+ data::sort_psites_increasing(input) :
+ data::sort_psites_decreasing(input);
return impl::generic::algebraic(input, nbh, s, a, lambda);
}
@@ -317,8 +317,8 @@
{
util::array<unsigned> s =
increasing ?
- level::sort_offsets_increasing(input) :
- level::sort_offsets_decreasing(input);
+ data::sort_offsets_increasing(input) :
+ data::sort_offsets_decreasing(input);
return impl::algebraic_fastest(input, nbh, s, a, lambda);
}
Index: fred/old/accuprops2.cc
--- fred/old/accuprops2.cc (revision 3923)
+++ fred/old/accuprops2.cc (working copy)
@@ -25,7 +25,7 @@
# define mln_trait_accu_has_stop(A) typename mln::trait::accu_< A >::has_stop
/// Shortcut to the accumulator property about behavior when pixel is given as take() value
-/// Used for instance in mln::canvas::morpho::leveling
+/// Used for instance in mln::canvas::morpho::dataing
# define mln_trait_accu_when_pix(A) typename mln::trait::accu_< A >::when_pix
namespace mln {
@@ -151,7 +151,7 @@
const Image<I>& input,
Accumulator<A>& acc)
{
- impl::generic::leveling(input, acc);
+ impl::generic::dataing(input, acc);
}
template <typename I, typename A>
@@ -161,7 +161,7 @@
const Image<I>& input,
Accumulator<A>& acc)
{
- impl::leveling_fastest(input, acc);
+ impl::dataing_fastest(input, acc);
}
template <typename I, typename A>
@@ -177,7 +177,7 @@
mlc_equal(mln_trait_accu_when_pix(A),
trait::accu::when_pix::use_v)::value
};
- internal::leveling_dispatch(metal::bool_<test>(),
+ internal::dataing_dispatch(metal::bool_<test>(),
input, acc);
}
@@ -190,7 +190,7 @@
leveling(const Image<I>& input,
Accumulator< A< util::pix<I> > >& acc)
{
- internal::leveling_dispatch(input, acc);
+ internal::dataing_dispatch(input, acc);
}
} // end of namespace mln::canvas::morpho
@@ -357,7 +357,7 @@
acc.init();
chrono.start();
for (int i = 0; i < 50; i++)
- mln::canvas::morpho::leveling(ima, acc);
+ mln::canvas::morpho::dataing(ima, acc);
elapsed = chrono.stop();
std::cout << "(auto) " << elapsed << "s : " << acc.to_result() << std::endl;
@@ -365,7 +365,7 @@
acc.init();
chrono.start();
for (int i = 0; i < 50; i++)
- mln::canvas::morpho::impl::generic::leveling(ima, acc);
+ mln::canvas::morpho::impl::generic::dataing(ima, acc);
elapsed = chrono.stop();
std::cout << "(generic) " << elapsed << "s : " << acc.to_result() << std::endl;
@@ -373,7 +373,7 @@
acc.init();
chrono.start();
for (int i = 0; i < 50; i++)
- mln::canvas::morpho::impl::leveling_fastest(ima, acc);
+ mln::canvas::morpho::impl::dataing_fastest(ima, acc);
elapsed = chrono.stop();
std::cout << "(fast) " << elapsed << "s : " << acc.to_result() << std::endl;
Index: fred/old/leveling_filter.hh
--- fred/old/leveling_filter.hh (revision 3923)
+++ fred/old/leveling_filter.hh (working copy)
@@ -41,8 +41,8 @@
# include <mln/data/fill.hh>
# include <mln/extension/adjust_fill.hh>
-# include <mln/level/sort_psites.hh>
-# include <mln/level/sort_offsets.hh>
+# include <mln/data/sort_psites.hh>
+# include <mln/data/sort_offsets.hh>
@@ -93,7 +93,7 @@
const Site_Set<S>& s_,
const Accumulator<A>& a_, const typename A::result& lambda)
{
- trace::entering("canvas::morpho::impl::generic::leveling_filter");
+ trace::entering("canvas::morpho::impl::generic::dataing_filter");
// FIXME: Test?!
const I& input = exact(input_);
@@ -185,7 +185,7 @@
output(p) = output(parent(p));
}
- trace::exiting("canvas::morpho::impl::generic::leveling_filter");
+ trace::exiting("canvas::morpho::impl::generic::dataing_filter");
return output;
}
@@ -212,7 +212,7 @@
const util::array<unsigned>& s,
const Accumulator<A>& a_, const typename A::result& lambda)
{
- trace::entering("canvas::morpho::impl::leveling_fastest");
+ trace::entering("canvas::morpho::impl::dataing_fastest");
// FIXME: Tests?
@@ -297,7 +297,7 @@
}
}
- trace::exiting("canvas::morpho::impl::leveling_fastest");
+ trace::exiting("canvas::morpho::impl::dataing_fastest");
return output;
}
@@ -317,9 +317,9 @@
{
p_array < mln_psite(I) > s =
increasing ?
- level::sort_psites_increasing(input) :
- level::sort_psites_decreasing(input);
- return impl::generic::leveling_filter(input, nbh, s, a, lambda);
+ data::sort_psites_increasing(input) :
+ data::sort_psites_decreasing(input);
+ return impl::generic::dataing_filter(input, nbh, s, a, lambda);
}
template <typename I, typename N, typename A>
@@ -331,9 +331,9 @@
{
util::array<unsigned> s =
increasing ?
- level::sort_offsets_increasing(input) :
- level::sort_offsets_decreasing(input);
- return impl::leveling_filter_fastest(input, nbh, s, a, lambda);
+ data::sort_offsets_increasing(input) :
+ data::sort_offsets_decreasing(input);
+ return impl::dataing_filter_fastest(input, nbh, s, a, lambda);
}
template <typename I, typename N, typename A>
@@ -370,7 +370,7 @@
bool increasing)
{
//FIXME: Do we need to check input validity ?
- return internal::leveling_filter_dispatch(input, nbh, a, lambda, increasing);
+ return internal::dataing_filter_dispatch(input, nbh, a, lambda, increasing);
}
} // end of namespace mln::canvas::morpho
Index: fred/old/accu_trait.hh
--- fred/old/accu_trait.hh (revision 3923)
+++ fred/old/accu_trait.hh (working copy)
@@ -14,7 +14,7 @@
# define mln_trait_accu_has_stop(A) typename mln::trait::accu_< A >::has_stop
/// Shortcut to the accumulator property about behavior when pixel is given as take() value
-/// Used for instance in mln::canvas::morpho::leveling
+/// Used for instance in mln::canvas::morpho::dataing
# define mln_trait_accu_when_pix(A) typename mln::trait::accu_< A >::when_pix
namespace mln {
Index: igr/code/test.cc
--- igr/code/test.cc (revision 3923)
+++ igr/code/test.cc (working copy)
@@ -17,7 +17,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/data/paste.hh>
-#include <mln/level/apply.hh>
+#include <mln/data/apply.hh>
#include <mln/fun/v2v/rgb_to_hsi.hh>
#include <mln/fun/v2v/abs.hh>
Index: icdar/2009/dibco/quasi.cc
--- icdar/2009/dibco/quasi.cc (revision 3923)
+++ icdar/2009/dibco/quasi.cc (working copy)
@@ -20,8 +20,8 @@
#include <mln/labeling/regional_minima.hh>
#include <mln/labeling/wrap.hh>
-#include <mln/level/transform.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/transform.hh>
+#include <mln/data/convert.hh>
#include <mln/math/diff_abs.hh>
@@ -54,7 +54,7 @@
mln_precondition(input.is_valid());
typedef mln_psite(I) P;
- p_array<P> s = level::sort_psites_increasing(input);
+ p_array<P> s = data::sort_psites_increasing(input);
std::vector<bool> valid;
valid.push_back(false); // For valid[0] where 0 is the non-label value.
@@ -135,7 +135,7 @@
fun::i2v::array<bool> f_valid;
convert::from_to(valid, f_valid);
- mln_ch_value(I, bool) out = level::transform(lab, f_valid);
+ mln_ch_value(I, bool) out = data::transform(lab, f_valid);
io::pgm::save(labeling::wrap(value::int_u8(), lab),
"tmp_lab.pgm");
Index: icdar/2009/dibco/svg.1.binarization.cc
--- icdar/2009/dibco/svg.1.binarization.cc (revision 3923)
+++ icdar/2009/dibco/svg.1.binarization.cc (working copy)
@@ -361,7 +361,7 @@
fun::i2v::array<int_u8> f_med;
convert::from_to(basin_med, f_med);
- // io::pgm::save(level::transform(wst, f_med), "basin_med.pgm");
+ // io::pgm::save(data::transform(wst, f_med), "basin_med.pgm");
p_vertices<util::graph, fun::i2v::array<point2d> >
pv = make::common_pvertices(wst, nbasins, rag_data.first());
@@ -406,7 +406,7 @@
}
}
- io::pgm::save(level::transform(wst, out.function()),
+ io::pgm::save(data::transform(wst, out.function()),
"temp_out.pgm");
// Enqueuing.
@@ -458,7 +458,7 @@
out(p_) = id; // object or background.
}
- io::pgm::save(level::transform(wst, out.function()),
+ io::pgm::save(data::transform(wst, out.function()),
"temp_out_2.pgm");
}
Index: icdar/2009/dibco/svg.2.binarization.cc
--- icdar/2009/dibco/svg.2.binarization.cc (revision 3923)
+++ icdar/2009/dibco/svg.2.binarization.cc (working copy)
@@ -46,8 +46,8 @@
#include <mln/labeling/regional_minima.hh>
#include <mln/labeling/wrap.hh>
-#include <mln/level/transform.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/transform.hh>
+#include <mln/data/convert.hh>
#include <mln/linear/gaussian_1d.hh>
@@ -622,9 +622,9 @@
if (echo)
{
- io::pgm::save(level::transform(w_all, f_med),
+ io::pgm::save(data::transform(w_all, f_med),
"temp_w_all.pgm");
- io::pgm::save(level::transform(ws, f_med), "temp_basin_med.pgm");
+ io::pgm::save(data::transform(ws, f_med), "temp_basin_med.pgm");
}
p_vertices<util::graph, fun::i2v::array<point2d> >
@@ -672,7 +672,7 @@
if (echo)
{
- io::pgm::save(level::transform(ws, out.function()),
+ io::pgm::save(data::transform(ws, out.function()),
"temp_out.pgm");
}
@@ -727,11 +727,11 @@
if (echo)
{
- io::pgm::save(level::transform(ws, out.function()),
+ io::pgm::save(data::transform(ws, out.function()),
"temp_out_2.pgm");
}
- io::pbm::save((pw::value(level::transform(ws,
+ io::pbm::save((pw::value(data::transform(ws,
out.function())) == pw::cst(255))
| input.domain(),
argv[4]);
Index: icdar/2009/dibco/svg.3.binarization.cc
--- icdar/2009/dibco/svg.3.binarization.cc (revision 3923)
+++ icdar/2009/dibco/svg.3.binarization.cc (working copy)
@@ -48,8 +48,8 @@
#include <mln/labeling/regional_minima.hh>
#include <mln/labeling/wrap.hh>
-#include <mln/level/transform.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/transform.hh>
+#include <mln/data/convert.hh>
#include <mln/linear/gaussian_1d.hh>
@@ -725,9 +725,9 @@
if (echo)
{
- io::pgm::save(level::transform(w_all, f_med),
+ io::pgm::save(data::transform(w_all, f_med),
"temp_w_all.pgm");
- io::pgm::save(level::transform(ws, f_med), "temp_basin_med.pgm");
+ io::pgm::save(data::transform(ws, f_med), "temp_basin_med.pgm");
}
p_vertices<util::graph, fun::i2v::array<point2d> >
@@ -746,7 +746,7 @@
mln_VAR( lab, labeling__quasi_regional_minima(med, nbh, threshold, n_objects) );
- io::pbm::save((pw::value(level::transform(ws,
+ io::pbm::save((pw::value(data::transform(ws,
lab.function())) != pw::cst(0))
| input.domain(),
argv[4]);
@@ -790,7 +790,7 @@
if (echo)
{
- io::pgm::save(level::transform(ws, out.function()),
+ io::pgm::save(data::transform(ws, out.function()),
"temp_out.pgm");
}
@@ -846,11 +846,11 @@
if (echo)
{
- io::pgm::save(level::transform(ws, out.function()),
+ io::pgm::save(data::transform(ws, out.function()),
"temp_out_2.pgm");
}
- io::pbm::save((pw::value(level::transform(ws,
+ io::pbm::save((pw::value(data::transform(ws,
out.function())) == pw::cst(255))
| input.domain(),
argv[4]);
Index: icdar/2009/dibco/binarization.cc
--- icdar/2009/dibco/binarization.cc (revision 3923)
+++ icdar/2009/dibco/binarization.cc (working copy)
@@ -48,8 +48,8 @@
#include <mln/labeling/regional_minima.hh>
#include <mln/labeling/wrap.hh>
-#include <mln/level/transform.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/transform.hh>
+#include <mln/data/convert.hh>
#include <mln/linear/gaussian_1d.hh>
@@ -509,7 +509,7 @@
mln_precondition(input.is_valid());
typedef mln_psite(I) P;
- p_array<P> s = level::sort_psites_increasing(input);
+ p_array<P> s = data::sort_psites_increasing(input);
std::vector<bool> valid;
valid.push_back(false); // For valid[0] where 0 is the non-label value.
@@ -564,7 +564,7 @@
fun::i2v::array<bool> f_valid;
convert::from_to(valid, f_valid);
- mln_ch_value(I, bool) out = level::transform(lab, f_valid);
+ mln_ch_value(I, bool) out = data::transform(lab, f_valid);
trace::exiting("labeling__quasi_regional_minima");
return out;
@@ -702,9 +702,9 @@
if (echo)
{
- io::pgm::save(level::transform(w_all, f_med),
+ io::pgm::save(data::transform(w_all, f_med),
"temp_w_all.pgm");
- io::pgm::save(level::transform(ws, f_med), "temp_basin_med.pgm");
+ io::pgm::save(data::transform(ws, f_med), "temp_basin_med.pgm");
}
p_vertices<util::graph, fun::i2v::array<point2d> >
@@ -722,11 +722,11 @@
mln_VAR( lab, labeling__quasi_regional_minima(med, nbh, threshold, n_objects) );
- io::pbm::save(pw::value(level::transform(ws, lab.function()))
+ io::pbm::save(pw::value(data::transform(ws, lab.function()))
| input.domain(),
argv[4]);
-// io::pbm::save((pw::value(level::transform(ws,
+// io::pbm::save((pw::value(data::transform(ws,
// lab.function())) != pw::cst(0))
// | input.domain(),
// argv[4]);
@@ -770,7 +770,7 @@
if (echo)
{
- io::pgm::save(level::transform(ws, out.function()),
+ io::pgm::save(data::transform(ws, out.function()),
"temp_out.pgm");
}
@@ -826,11 +826,11 @@
if (echo)
{
- io::pgm::save(level::transform(ws, out.function()),
+ io::pgm::save(data::transform(ws, out.function()),
"temp_out_2.pgm");
}
- io::pbm::save((pw::value(level::transform(ws,
+ io::pbm::save((pw::value(data::transform(ws,
out.function())) == pw::cst(255))
| input.domain(),
argv[4]);
Index: icdar/2009/hsc/icdar2ppm.hh
--- icdar/2009/hsc/icdar2ppm.hh (revision 3923)
+++ icdar/2009/hsc/icdar2ppm.hh (working copy)
@@ -4,7 +4,7 @@
# include <mln/core/image/image2d.hh>
# include <mln/value/label_8.hh>
# include <mln/value/rgb8.hh>
-# include <mln/level/compute.hh>
+# include <mln/data/compute.hh>
# include <mln/accu/count_labels.hh>
# include <mln/labeling/colorize.hh>
# include <mln/io/ppm/save.hh>
@@ -25,7 +25,7 @@
image2d<value::label_8> ima;
io::icdar::load(ima, icdarfile, ref.nrows(), ref.ncols());
- value::label_8 nlines = level::compute(accu::meta::count_labels(), ima);
+ value::label_8 nlines = data::compute(accu::meta::count_labels(), ima);
io::ppm::save(labeling::colorize(value::rgb8(), ima, nlines), ppmfile);
}
Index: icdar/2009/hsc/icdar_io.cc
--- icdar/2009/hsc/icdar_io.cc (revision 3923)
+++ icdar/2009/hsc/icdar_io.cc (working copy)
@@ -3,7 +3,7 @@
#include <mln/make/image2d.hh>
#include <mln/debug/println.hh>
#include <mln/io/pgm/load.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include "io/icdar/save.hh"
#include "io/icdar/load.hh"
Index: icdar/2009/hsc/clean_input.hh
--- icdar/2009/hsc/clean_input.hh (revision 3923)
+++ icdar/2009/hsc/clean_input.hh (working copy)
@@ -8,7 +8,7 @@
#include <mln/accu/bbox.hh>
#include <mln/fun/i2v/array.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
namespace mln
@@ -39,7 +39,7 @@
center_col <= 3)
ok(l) = true;
}
- return level::transform(lab, ok);
+ return data::transform(lab, ok);
}
} // mln
Index: icdar/2009/hsc/lines_to_boxes.cc
--- icdar/2009/hsc/lines_to_boxes.cc (revision 3923)
+++ icdar/2009/hsc/lines_to_boxes.cc (working copy)
@@ -4,7 +4,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/literal/colors.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/convert.hh>
#include <mln/value/label_8.hh>
#include <mln/estim/min_max.hh>
@@ -48,7 +48,7 @@
input_,
n);
- image2d<rgb8> out = level::convert(rgb8(), input);
+ image2d<rgb8> out = data::convert(rgb8(), input);
scribo::draw::bounding_boxes(out, boxes, literal::red);
io::ppm::save(out, argv[2]);
}
Index: icdar/2009/hsc/first_attempts/exec/iz_lines.cc
--- icdar/2009/hsc/first_attempts/exec/iz_lines.cc (revision 3923)
+++ icdar/2009/hsc/first_attempts/exec/iz_lines.cc (working copy)
@@ -13,7 +13,7 @@
#include <mln/transform/influence_zone_geodesic.hh>
-// #include <mln/level/transform.hh>
+// #include <mln/data/transform.hh>
// #include <mln/fun/v2v/wrap.hh>
Index: icdar/2009/hsc/first_attempts/exec/relabel_lines.cc
--- icdar/2009/hsc/first_attempts/exec/relabel_lines.cc (revision 3923)
+++ icdar/2009/hsc/first_attempts/exec/relabel_lines.cc (working copy)
@@ -16,7 +16,7 @@
#include <mln/labeling/colorize.hh>
#include <mln/transform/influence_zone_geodesic.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/fun/v2v/wrap.hh>
@@ -190,7 +190,7 @@
image2d<L2> line_lab = labeling::blobs(lines, c8(), n_lines);
{
- io::pgm::save(level::transform(line_lab,
+ io::pgm::save(data::transform(line_lab,
fun::v2v::wrap<value::int_u8>()),
"tmp_lines.pgm");
}
Index: icdar/2009/hsc/first_attempts/boxes.cc
--- icdar/2009/hsc/first_attempts/boxes.cc (revision 3923)
+++ icdar/2009/hsc/first_attempts/boxes.cc (working copy)
@@ -97,7 +97,7 @@
io::dump::save(grouped_text.label_image(), argv[2]);
- io::pgm::save(level::transform(grouped_text.label_image(),
+ io::pgm::save(data::transform(grouped_text.label_image(),
fun::v2v::wrap<value::int_u8>()),
"tmp.pgm");
Index: icdar/2009/hsc/first_attempts/main.cc
--- icdar/2009/hsc/first_attempts/main.cc (revision 3923)
+++ icdar/2009/hsc/first_attempts/main.cc (working copy)
@@ -7,8 +7,8 @@
#include <mln/pw/all.hh>
#include <mln/data/fill.hh>
-#include <mln/level/saturate.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/saturate.hh>
+#include <mln/data/convert.hh>
#include <mln/arith/revert.hh>
#include <mln/value/int_u8.hh>
@@ -321,7 +321,7 @@
out = linear::gaussian_directional_2d(temp, 1, h_sigma, 0);
out = linear::gaussian_directional_2d(out, 0, v_sigma, 0);
- fuzzy = level::saturate(int_u8(), out);
+ fuzzy = data::saturate(int_u8(), out);
# ifdef LOG
io::pgm::save(fuzzy, "tmp_fuzzy.pgm");
@@ -350,7 +350,7 @@
io::pgm::save(ws, "tmp_ws.pgm");
- image2d<rgb8> cool = level::convert(rgb8(), small);
+ image2d<rgb8> cool = data::convert(rgb8(), small);
data::fill((cool | (pw::value(ws) == pw::cst(0))).rw(),
literal::red);
io::ppm::save(cool, "tmp_ws.ppm");
Index: icdar/2009/hsc/input_to_ws.hh
--- icdar/2009/hsc/input_to_ws.hh (revision 3923)
+++ icdar/2009/hsc/input_to_ws.hh (working copy)
@@ -2,7 +2,7 @@
#include <mln/core/alias/neighb2d.hh>
#include <mln/data/fill.hh>
-#include <mln/level/saturate.hh>
+#include <mln/data/saturate.hh>
#include <mln/value/int_u8.hh>
@@ -17,7 +17,7 @@
#include <mln/io/ppm/save.hh>
#include <mln/literal/colors.hh>
#include <mln/labeling/colorize.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/convert.hh>
#include <mln/labeling/wrap.hh>
#include <mln/pw/all.hh>
#include <mln/core/image/dmorph/image_if.hh>
@@ -59,7 +59,7 @@
out = linear::gaussian_directional_2d(temp, 1, h_sigma, 0);
out = linear::gaussian_directional_2d(out, 0, v_sigma, 0);
- fuzzy = level::saturate(value::int_u8(), out);
+ fuzzy = data::saturate(value::int_u8(), out);
#ifdef LOG
io::pgm::save(small, "temp_small.pgm");
@@ -78,14 +78,14 @@
# ifdef LOG
{
// Watershed line (red) over small image.
- image2d<value::rgb8> cool = level::convert(value::rgb8(), small);
+ image2d<value::rgb8> cool = data::convert(value::rgb8(), small);
data::fill((cool | (pw::value(ws) == pw::cst(0))).rw(),
literal::red);
io::ppm::save(cool, "temp_small_ws.ppm");
}
{
// Watershed line (red) over fuzzy image.
- image2d<value::rgb8> cool = level::convert(value::rgb8(), fuzzy);
+ image2d<value::rgb8> cool = data::convert(value::rgb8(), fuzzy);
data::fill((cool | (pw::value(ws) == pw::cst(0))).rw(),
literal::red);
io::ppm::save(cool, "temp_fuzzy_ws.ppm");
Index: icdar/2009/hsc/old_input_to_lines.cc
--- icdar/2009/hsc/old_input_to_lines.cc (revision 3923)
+++ icdar/2009/hsc/old_input_to_lines.cc (working copy)
@@ -7,8 +7,8 @@
#include <mln/pw/all.hh>
#include <mln/data/fill.hh>
-#include <mln/level/saturate.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/saturate.hh>
+#include <mln/data/convert.hh>
#include <mln/arith/revert.hh>
#include <mln/value/int_u8.hh>
@@ -324,7 +324,7 @@
out = linear::gaussian_directional_2d(temp, 1, h_sigma, 0);
out = linear::gaussian_directional_2d(out, 0, v_sigma, 0);
- fuzzy = level::saturate(int_u8(), out);
+ fuzzy = data::saturate(int_u8(), out);
# ifdef LOG
io::pgm::save(fuzzy, "tmp_fuzzy.pgm");
@@ -353,7 +353,7 @@
io::pgm::save(ws, "tmp_ws.pgm");
- image2d<rgb8> cool = level::convert(rgb8(), small);
+ image2d<rgb8> cool = data::convert(rgb8(), small);
data::fill((cool | (pw::value(ws) == pw::cst(0))).rw(),
literal::red);
io::ppm::save(cool, "tmp_ws.ppm");
Index: icdar/2009/hsc/lines_to_words.cc
--- icdar/2009/hsc/lines_to_words.cc (revision 3923)
+++ icdar/2009/hsc/lines_to_words.cc (working copy)
@@ -7,7 +7,7 @@
#include <mln/io/pbm/all.hh>
#include <mln/io/ppm/all.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/convert.hh>
#include <mln/labeling/relabel.hh>
#include "get_line_images.hh"
@@ -39,7 +39,7 @@
image2d<int_u8> lines_;
io::pgm::load(lines_, argv[2]);
- image2d<label_16> lines = level::convert(label_16(), lines_);
+ image2d<label_16> lines = data::convert(label_16(), lines_);
label_16 nlines;
labeling::relabel_inplace(lines, nlines);
Index: icdar/2009/hsc/ws_to_wsl.hh
--- icdar/2009/hsc/ws_to_wsl.hh (revision 3923)
+++ icdar/2009/hsc/ws_to_wsl.hh (working copy)
@@ -10,7 +10,7 @@
#include <mln/value/int_u8.hh>
#include <mln/util/array.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/accu/internal/base.hh>
@@ -31,12 +31,12 @@
#include <mln/io/ppm/save.hh>
#include <mln/literal/colors.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/convert.hh>
#include <mln/pw/all.hh>
#include <mln/core/image/dmorph/image_if.hh>
#include <mln/fun/i2v/array.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/labeling/colorize.hh>
@@ -406,7 +406,7 @@
for (L l = 1; l <= n_basins; ++l)
f_relab(l) = parent[l];
- image2d<L> ws_ = level::transform(ws, f_relab);
+ image2d<L> ws_ = data::transform(ws, f_relab);
image2d<rgb8> cool = labeling::colorize(rgb8(), ws_, n_basins);
data::fill((cool | (pw::value(ws) == pw::cst(0))).rw(),
literal::white);
Index: nivault/plugin-gimp/src/build-image.hh
--- nivault/plugin-gimp/src/build-image.hh (revision 3923)
+++ nivault/plugin-gimp/src/build-image.hh (working copy)
@@ -38,7 +38,7 @@
# include <mln/value/rgb8.hh>
# include <mln/literal/all.hh>
# include <mln/core/concept/function.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/border/resize.hh>
# include <mln/io/ppm/save.hh>
Index: nivault/extract_score.cc
--- nivault/extract_score.cc (revision 3923)
+++ nivault/extract_score.cc (working copy)
@@ -63,8 +63,8 @@
# include <mln/core/mesh_p.hh>
# include <mln/draw/mesh.hh>
-# include <mln/level/stretch.hh>
-# include <mln/level/threshold.hh>
+# include <mln/data/stretch.hh>
+# include <mln/data/threshold.hh>
# include <mln/linear/gaussian.hh>
# include <mln/core/image_if_value.hh>
@@ -160,7 +160,7 @@
pt2[coord] = 0;
projected(pt2) += ima(p);
}
- level::stretch(projected, projected_stretched);
+ data::stretch(projected, projected_stretched);
return projected_stretched;
}
@@ -190,10 +190,10 @@
// linear::gaussian(histo_col, 5, histo_col_blur);
// io::pgm::save(histo_col_blur, "histo_col_blur.pgm");
-// level::stretch(histo_col, histo_col);
+// data::stretch(histo_col, histo_col);
// io::pgm::save(histo_col, "histo_col.pgm");
// IB histo_col_b(histo_col.domain());
-// histo_col_b = level::threshold(histo_col, mln_value_(IU8)(175));
+// histo_col_b = data::threshold(histo_col, mln_value_(IU8)(175));
// io::pbm::save(histo_col_b, "histo_col_b.pbm");
// }
@@ -205,7 +205,7 @@
// unsigned nlabels;
// IU inter_labeled = labeling::blobs(only_big, c4(), nlabels); // labelling blobs don't use algo(input, output) formalism
// IU8 labeled(inter_labeled.domain()); // and it should return int_u8 ?
-// level::stretch(inter_labeled, labeled);
+// data::stretch(inter_labeled, labeled);
// io::pgm::save(labeled, "labeled.pgm");
// }
Index: nivault/extract_character.cc
--- nivault/extract_character.cc (revision 3923)
+++ nivault/extract_character.cc (working copy)
@@ -61,7 +61,7 @@
# include <mln/core/mesh_p.hh>
# include <mln/draw/mesh.hh>
-# include <mln/level/stretch.hh>
+# include <mln/data/stretch.hh>
# include <mln/core/image_if_value.hh>
# include <mln/core/image/dmorph/sub_image.hh>
@@ -335,17 +335,17 @@
image2d<int_u8> out (label_image.domain ());
// // Save the influence area of the node of the graphe (seed2tiling result).
-// level::stretch (zi_image, out);
+// data::stretch (zi_image, out);
// io::pgm::save(out, path_output + ".text_area.approx.pgm");
// std::cout << path_output + ".text_area.approx.pgm" << " generated" << std::endl;
// // Save the graph of the text.
-// level::stretch (gr_image, out);
+// data::stretch (gr_image, out);
// io::pgm::save(out, path_output + ".text_graph.pgm");
// std::cout << path_output + ".text_graph.pgm" << " generated" << std::endl;
// Save the the text image.
- level::stretch (text_image, out);
+ data::stretch (text_image, out);
io::pgm::save(out, path_output + ".text.pgm");
std::cout << path_output + ".text.pgm" << " generated" << std::endl;
@@ -354,7 +354,7 @@
std::cout << path_output + ".ppm" << " generated" << std::endl;
// image2d<int_u8> process (input.domain ());
-// level::stretch (output_2, process);
+// data::stretch (output_2, process);
// io::pgm::save(process, "process.pgm");
}
Index: nivault/median.hh
--- nivault/median.hh (revision 3923)
+++ nivault/median.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef MLN_LEVEL_MEDIAN_HH
# define MLN_LEVEL_MEDIAN_HH
-/*! \file mln/level/median.hh
+/*! \file mln/data/median.hh
*
* \brief Median filtering of an image.
*/
@@ -56,7 +56,7 @@
namespace mln
{
- namespace level
+ namespace data
{
/*! Compute in \p output the median filter of image \p input by
@@ -223,7 +223,7 @@
# endif
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
// Facades.
@@ -249,7 +249,7 @@
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: exec/bw_negate_in_color.cc
--- exec/bw_negate_in_color.cc (revision 3923)
+++ exec/bw_negate_in_color.cc (working copy)
@@ -42,5 +42,5 @@
io::ppm::load(input, argv[1]);
bw_negate_in_color f;
- io::ppm::save(level::transform(input, f), argv[2]);
+ io::ppm::save(data::transform(input, f), argv[2]);
}
Index: fabien/igr/time_max_norm.cc
--- fabien/igr/time_max_norm.cc (revision 3923)
+++ fabien/igr/time_max_norm.cc (working copy)
@@ -24,8 +24,8 @@
#include <mln/data/fill.hh>
#include <mln/data/paste.hh>
-#include <mln/level/compute.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/compute.hh>
+#include <mln/data/stretch.hh>
#include <mln/math/abs.hh>
#include <mln/pw/all.hh>
@@ -66,8 +66,8 @@
std::ostringstream stime;
stime << desc << "_time.pgm";
- image2d<int_u8> result_c = level::stretch(int_u8(), ima_c);
- image2d<int_u8> result_t = level::stretch(int_u8(), ima_t);
+ image2d<int_u8> result_c = data::stretch(int_u8(), ima_c);
+ image2d<int_u8> result_t = data::stretch(int_u8(), ima_t);
io::pgm::save(result_c, smax.str());
io::pgm::save(result_t, stime.str());
}
Index: fabien/igr/smooth_fixed_seg/main.cc
--- fabien/igr/smooth_fixed_seg/main.cc (revision 3923)
+++ fabien/igr/smooth_fixed_seg/main.cc (working copy)
@@ -28,9 +28,9 @@
#include <mln/fun/v2v/fit.hh>
#include <mln/labeling/compute.hh>
#include <mln/labeling/wrap.hh>
-#include <mln/level/compute.hh>
-#include <mln/level/convert.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/compute.hh>
+#include <mln/data/convert.hh>
+#include <mln/data/stretch.hh>
#include <mln/linear/convolve.hh>
#include <mln/make/image2d.hh>
#include <mln/make/w_window1d.hh>
@@ -111,12 +111,12 @@
image1d<V> tmp_ima;
convert::from_to(v1, tmp_ima);
image1d<float> morpho_ima = mean_image(tmp_ima);
- float sum_v1 = level::compute(accu_sum, morpho_ima);
+ float sum_v1 = data::compute(accu_sum, morpho_ima);
image1d<V> tmp_ima2;
convert::from_to(v2, tmp_ima2);
image1d<float> morpho_ima2 = mean_image(tmp_ima2);
- float sum_v2 = level::compute(accu_sum, morpho_ima2);
+ float sum_v2 = data::compute(accu_sum, morpho_ima2);
mln_piter(image1d<float>) p(morpho_ima.domain());
for_all(p)
@@ -168,14 +168,14 @@
// Edges distance computation.
mln_VAR(edges, world::inter_pixel::compute(imax, dist));
- mln_VAR(e, level::transform(edges, fun::v2v::fit<float>(SATURATION)));
+ mln_VAR(e, data::transform(edges, fun::v2v::fit<float>(SATURATION)));
io::dump::save(e.unmorph_(), "edges_int_u12.dump");
typedef int_u12 E_TYPE;
{
// Display.
mln_VAR(display_ima, world::inter_pixel::display_edge(e.unmorph_(), 0.0, 3));
- io::pgm::save(level::stretch(int_u8(), display_ima), "01_edges.pgm");
+ io::pgm::save(data::stretch(int_u8(), display_ima), "01_edges.pgm");
}
@@ -186,7 +186,7 @@
{
// Display.
mln_VAR(display_clo, world::inter_pixel::display_edge(clo.unmorph_(), 0.0, 3));
- io::pgm::save(level::stretch(int_u8(), display_clo), "03_closing.pgm");
+ io::pgm::save(data::stretch(int_u8(), display_clo), "03_closing.pgm");
}
@@ -233,7 +233,7 @@
for (unsigned i = 1; i < means.nelements(); ++i)
data::fill((ima_means | pw::value(ima_means) == pw::cst(i)).rw(), means[i]);
mln_VAR(display_means, world::inter_pixel::display_edge(ima_means.unmorph_(), 0.0, 3));
- io::pgm::save(level::stretch(int_u8(), display_means), "04_means.pgm");
+ io::pgm::save(data::stretch(int_u8(), display_means), "04_means.pgm");
}
Index: fabien/igr/time_max.cc
--- fabien/igr/time_max.cc (revision 3923)
+++ fabien/igr/time_max.cc (working copy)
@@ -22,8 +22,8 @@
#include <mln/data/fill.hh>
#include <mln/data/paste.hh>
-#include <mln/level/compute.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/compute.hh>
+#include <mln/data/stretch.hh>
#include <mln/math/abs.hh>
#include <mln/pw/all.hh>
@@ -108,8 +108,8 @@
ima_t(p) = k;
}
- image2d<int_u8> result_c = level::stretch(int_u8(), ima_c);
- image2d<int_u8> result_t = level::stretch(int_u8(), ima_t);
+ image2d<int_u8> result_c = data::stretch(int_u8(), ima_c);
+ image2d<int_u8> result_t = data::stretch(int_u8(), ima_t);
io::magick::save(result_c, "result_max.png");
io::magick::save(result_t, "result_time.png");
Index: fabien/igr/fun_labels.cc
--- fabien/igr/fun_labels.cc (revision 3923)
+++ fabien/igr/fun_labels.cc (working copy)
@@ -28,8 +28,8 @@
#include <mln/accu/mean.hh>
#include <mln/accu/median_h.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compute.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/compute.hh>
+#include <mln/data/stretch.hh>
#include <mln/make/box3d.hh>
#include <mln/morpho/elementary/dilation.hh>
#include <mln/pw/all.hh>
@@ -72,7 +72,7 @@
sli, max_row, max_col);
mln_VAR(slice_label, vol_label | slice);
accu::mean<mln_value(I)> accu_mean;
- float mean = level::compute(accu_mean, slice_label);
+ float mean = data::compute(accu_mean, slice_label);
arr.append(mean);
}
@@ -105,7 +105,7 @@
{
image2d<int_u12> ima_slice = duplicate(slice(ima, sli));
image2d<label_16> lbl_slice = duplicate(slice(ima_labels, sli));
- float mean = level::compute(accu_mean, ima_slice | pw::value(lbl_slice) == pw::cst(l));
+ float mean = data::compute(accu_mean, ima_slice | pw::value(lbl_slice) == pw::cst(l));
arrays[l].append(mean);
}
}
@@ -168,7 +168,7 @@
}
// Taking the median value of the region.
accu::mean<mln_value(I)> accu_mean;
- mln_value(I) mean = level::compute(accu_mean, ima_slice | pw::value(lbl_slice) == pw::cst(lbl_slice(point)));
+ mln_value(I) mean = data::compute(accu_mean, ima_slice | pw::value(lbl_slice) == pw::cst(lbl_slice(point)));
arr.append(mean);
prev_lbl = lbl_slice(point);
@@ -181,7 +181,7 @@
if (sli < 10)
str_ima << "0";
str_ima << sli << ".pgm";
- io::pgm::save(level::stretch(int_u8(), ima_slice), str_ima.str());*/
+ io::pgm::save(data::stretch(int_u8(), ima_slice), str_ima.str());*/
}
if (!arr.is_empty())
Index: fabien/igr/norm.cc
--- fabien/igr/norm.cc (revision 3923)
+++ fabien/igr/norm.cc (working copy)
@@ -21,11 +21,11 @@
#include <mln/core/var.hh>
#include <mln/estim/min_max.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/value/int_u8.hh>
/*#include <mln/accu/min.hh>
#include <mln/accu/max.hh>
-#include <mln/level/compute.hh>*/
+#include <mln/data/compute.hh>*/
using namespace mln;
using value::int_u12;
@@ -65,7 +65,7 @@
image2d<float> ima_ini = mean_slices(ima_f, first, last);
// Debug.
- //io::pgm::save(level::stretch(value::int_u8(), ima_ini), "mean_slices.pgm");
+ //io::pgm::save(data::stretch(value::int_u8(), ima_ini), "mean_slices.pgm");
image3d<float> ima_result;
initialize(ima_result, ima);
Index: fabien/igr/watershed2d.cc
--- fabien/igr/watershed2d.cc (revision 3923)
+++ fabien/igr/watershed2d.cc (working copy)
@@ -17,8 +17,8 @@
#include <mln/value/int_u12.hh>
#include <mln/value/label_16.hh>
-#include <mln/level/transform.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/transform.hh>
+#include <mln/data/stretch.hh>
#include <mln/labeling/mean_values.hh>
@@ -50,7 +50,7 @@
#include <mln/accu/compute.hh>
#include <mln/core/alias/dpoint2d.hh>
#include <mln/draw/box.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/fun/v2v/id.hh>
#include <mln/fun/l2l/wrap.hh>
#include <mln/core/image/line_graph_elt_neighborhood.hh>
@@ -132,7 +132,7 @@
convert::from_to(m_3f, m);
m[0] = 150u;
- /*io::ppm::save(level::transform(w,
+ /*io::ppm::save(data::transform(w,
convert::to< fun::i2v::array<mln_value(I)> >(m)),
"wst_rag_wshd_color.ppm");*/
@@ -259,7 +259,7 @@
image2d<int_u12> dcm;
io::dicom::load(dcm, argv[1]);
- io::pgm::save(level::stretch(int_u8(), dcm), "wsd_01_src.pgm");
+ io::pgm::save(data::stretch(int_u8(), dcm), "wsd_01_src.pgm");
image2d<int_u12> grad = morpho::gradient(dcm, win_c4p());
image2d<int_u12> clo = morpho::closing::area(grad, c4(), closure_lambda);
@@ -267,14 +267,14 @@
label_16 nbasins;
image2d<label_16> wshed = morpho::meyer_wst(clo, c4(), nbasins);
- io::pgm::save(level::stretch(int_u8(), clo), "wsd_02.pgm");
- io::pgm::save(level::transform(wshed, fun::l2l::wrap<int_u8>()), "wsd_03.pgm");
+ io::pgm::save(data::stretch(int_u8(), clo), "wsd_02.pgm");
+ io::pgm::save(data::transform(wshed, fun::l2l::wrap<int_u8>()), "wsd_03.pgm");
mln_VAR(vol2_, morpho::elementary::dilation(extend(wshed | (pw::value(wshed) == 0u), wshed), c8()));
data::fill((wshed | (pw::value(wshed) == 0u)).rw(), vol2_);
- io::pgm::save(level::transform(wshed, fun::l2l::wrap<int_u8>()), "wsd_04.pgm");
+ io::pgm::save(data::transform(wshed, fun::l2l::wrap<int_u8>()), "wsd_04.pgm");
/// Build graph
util::graph g = make::graph(wshed, c4(), nbasins);
@@ -309,9 +309,9 @@
}
mln_invariant(f(0) == 0u);
--nbasins2; // nbasins2 does not count the basin with label 0.
- image2d<label_16> wsd2 = level::transform(wshed, f);
+ image2d<label_16> wsd2 = data::transform(wshed, f);
- io::pgm::save(level::transform(wsd2, fun::l2l::wrap<int_u8>()), "wsd_05.pgm");
+ io::pgm::save(data::transform(wsd2, fun::l2l::wrap<int_u8>()), "wsd_05.pgm");
/// Reconstruct a graph from the simplified image.
util::graph g2 = make::graph(wsd2, c4(), nbasins2);
@@ -324,8 +324,8 @@
data::fill((wsd2 | (pw::value(wsd2) == 0u)).rw(), wsd2_);
- io::pgm::save(level::transform(labeling::mean_values(dcm, wsd2, nbasins2), fun::l2l::wrap<int_u8>()), "wsd_06_mean_colors.pgm");
- io::pgm::save(level::stretch(int_u8(), make_debug_graph_image(dcm, ima_v2, ima_e2, box_size, 4095)), "wsd_07_graph_image2_white.pgm");
- io::pgm::save(level::stretch(int_u8(), make_debug_graph_image(dcm, ima_v2, ima_e2, box_size, 0)), "wsd_08_graph_image2_black.pgm");
- io::pgm::save(level::transform(wsd2, fun::l2l::wrap<int_u8>()), "wsd_99_result.pgm");
+ io::pgm::save(data::transform(labeling::mean_values(dcm, wsd2, nbasins2), fun::l2l::wrap<int_u8>()), "wsd_06_mean_colors.pgm");
+ io::pgm::save(data::stretch(int_u8(), make_debug_graph_image(dcm, ima_v2, ima_e2, box_size, 4095)), "wsd_07_graph_image2_white.pgm");
+ io::pgm::save(data::stretch(int_u8(), make_debug_graph_image(dcm, ima_v2, ima_e2, box_size, 0)), "wsd_08_graph_image2_black.pgm");
+ io::pgm::save(data::transform(wsd2, fun::l2l::wrap<int_u8>()), "wsd_99_result.pgm");
}
Index: fabien/igr/watershed3d.cc
--- fabien/igr/watershed3d.cc (revision 3923)
+++ fabien/igr/watershed3d.cc (working copy)
@@ -21,8 +21,8 @@
#include <mln/value/label_16.hh>
#include <mln/value/label_32.hh>
-#include <mln/level/transform.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/transform.hh>
+#include <mln/data/stretch.hh>
#include <mln/labeling/mean_values.hh>
@@ -54,7 +54,7 @@
#include <mln/accu/compute.hh>
#include <mln/core/alias/dpoint2d.hh>
#include <mln/draw/box.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/fun/v2v/id.hh>
#include <mln/fun/l2l/wrap.hh>
#include <mln/core/image/line_graph_elt_neighborhood.hh>
@@ -136,7 +136,7 @@
convert::from_to(m_3f, m);
m[0] = 150u;
- /*io::ppm::save(level::transform(w,
+ /*io::ppm::save(data::transform(w,
convert::to< fun::i2v::array<mln_value(I)> >(m)),
"wst_rag_wshd_color.ppm");*/
@@ -266,7 +266,7 @@
// Debug
assert(mln_max(label_32) == 4294967295);
- io::dump::save(level::stretch(int_u8(), dcm), "wsd_01_src.dump");
+ io::dump::save(data::stretch(int_u8(), dcm), "wsd_01_src.dump");
// Gradient
image3d<int_u12> grad = morpho::elementary::gradient(dcm, c6());
@@ -280,13 +280,13 @@
std::cout << "nbasins = " << nbasins << std::endl;
// Debug
- io::dump::save(level::stretch(int_u8(), clo), "wsd_02.dump");
- io::dump::save(level::transform(wshed, fun::l2l::wrap<int_u8>()), "wsd_03.dump");
+ io::dump::save(data::stretch(int_u8(), clo), "wsd_02.dump");
+ io::dump::save(data::transform(wshed, fun::l2l::wrap<int_u8>()), "wsd_03.dump");
//mln_VAR(vol2_, morpho::elementary::dilation(extend(wshed | (pw::value(wshed) == 0u), wshed), c26()));
//data::fill((wshed | (pw::value(wshed) == 0u)).rw(), vol2_);
- io::dump::save(level::transform(wshed, fun::l2l::wrap<int_u8>()), "wsd_04.dump");
+ io::dump::save(data::transform(wshed, fun::l2l::wrap<int_u8>()), "wsd_04.dump");
/// Graph
trace::quiet = false;
@@ -322,9 +322,9 @@
}
mln_invariant(f(0) == 0u);
--nbasins2; // nbasins2 does not count the basin with label 0.
- image3d<label_32> wsd2 = level::transform(wshed, f);
+ image3d<label_32> wsd2 = data::transform(wshed, f);
- io::dump::save(level::transform(wsd2, fun::l2l::wrap<int_u8>()), "wsd_05.dump");
+ io::dump::save(data::transform(wsd2, fun::l2l::wrap<int_u8>()), "wsd_05.dump");
/// Reconstruct a graph from the simplified image.
util::graph g2 = make::graph(wsd2, c6(), nbasins2);
@@ -337,8 +337,8 @@
data::fill((wsd2 | (pw::value(wsd2) == 0u)).rw(), wsd2_);
- io::dump::save(level::transform(labeling::mean_values(dcm, wsd2, nbasins2), fun::l2l::wrap<int_u8>()), "wsd_06_mean_colors.dump");
- //io::dump::save(level::stretch(int_u8(), make_debug_graph_image(dcm, ima_v2, ima_e2, box_size, 4095)), "wsd_07_graph_image2_white.dump");
- //io::dump::save(level::stretch(int_u8(), make_debug_graph_image(dcm, ima_v2, ima_e2, box_size, 0)), "wsd_08_graph_image2_black.dump");
- io::dump::save(level::transform(wsd2, fun::l2l::wrap<int_u8>()), "wsd_99_result.dump");*/
+ io::dump::save(data::transform(labeling::mean_values(dcm, wsd2, nbasins2), fun::l2l::wrap<int_u8>()), "wsd_06_mean_colors.dump");
+ //io::dump::save(data::stretch(int_u8(), make_debug_graph_image(dcm, ima_v2, ima_e2, box_size, 4095)), "wsd_07_graph_image2_white.dump");
+ //io::dump::save(data::stretch(int_u8(), make_debug_graph_image(dcm, ima_v2, ima_e2, box_size, 0)), "wsd_08_graph_image2_black.dump");
+ io::dump::save(data::transform(wsd2, fun::l2l::wrap<int_u8>()), "wsd_99_result.dump");*/
}
Index: fabien/igr/min_max_float.cc
--- fabien/igr/min_max_float.cc (revision 3923)
+++ fabien/igr/min_max_float.cc (working copy)
@@ -10,7 +10,7 @@
#include <mln/histo/array.hh>
#include <mln/histo/compute.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
namespace mln
@@ -78,7 +78,7 @@
std::cout << "min: " << min << std::endl;
std::cout << "max: " << max << std::endl;
- /*image3d<value::int_u12> quantified = level::transform(input, int_u12_from_float(min, max));
+ /*image3d<value::int_u12> quantified = data::transform(input, int_u12_from_float(min, max));
histo::array<value::int_u12> histogram = histo::compute(quantified);
image1d<value::int_u12> hist_ima;
Index: fabien/igr/seg_vol_irm.hh
--- fabien/igr/seg_vol_irm.hh (revision 3923)
+++ fabien/igr/seg_vol_irm.hh (working copy)
@@ -61,16 +61,16 @@
#include <mln/labeling/fill_holes.hh>
#include <mln/labeling/n_max.hh>
-#include <mln/level/compare.hh>
-#include <mln/level/compute.hh>
-#include <mln/level/convert.hh>
-#include <mln/level/stretch.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/compare.hh>
+#include <mln/data/compute.hh>
+#include <mln/data/convert.hh>
+#include <mln/data/stretch.hh>
+#include <mln/data/transform.hh>
#include <mln/fun/internal/selector.hh>
#include <mln/fun/v2b/threshold.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/accu/count.hh>
#include <mln/accu/center.hh>
@@ -198,7 +198,7 @@
ima_histo(point1d(i)) += ima_histo(point1d(i - 1));
}
accu::max<unsigned> max_accu;
- unsigned max = level::compute(max_accu, ima_histo);
+ unsigned max = data::compute(max_accu, ima_histo);
bool low_done = false;
bool high_done = false;
for (unsigned int i = 0; i < ima_histo.nelements(); ++i)
@@ -246,7 +246,7 @@
data::fill((ima_obj | (pw::value(obj_labels) != pw::cst(arr_o_big[1]))).rw(), false);*/
// Debug output images
- mln_ch_value(I, rgb8) out = level::convert(rgb8(), level::stretch(int_u8(), input));
+ mln_ch_value(I, rgb8) out = data::convert(rgb8(), level::stretch(int_u8(), input));
data::fill((out | pw::value(morpho::elementary::gradient_internal(ima_bg, nbh)) == true).rw(), literal::red);
data::fill((out | pw::value(morpho::elementary::gradient_internal(ima_obj, nbh)) == true).rw(), literal::green);
save_regions_color(out, metal::int_<I::site::dim>());
@@ -269,7 +269,7 @@
image1d<unsigned> ima_bg_histo;
convert::from_to(bg_histo, ima_bg_histo);
ima_bg_histo(point1d(0)) = 0;
- unsigned bg_sum = level::compute(sum_accu, ima_bg_histo);
+ unsigned bg_sum = data::compute(sum_accu, ima_bg_histo);
std::ofstream fout_bg("bg_histo.plot");
std::ofstream fout_p_bg("bg_histo_norm.plot");
for (unsigned int i = 0; i < ima_bg_histo.nelements(); ++i)
@@ -282,7 +282,7 @@
image1d<unsigned> ima_obj_histo;
convert::from_to(obj_histo, ima_obj_histo);
- unsigned obj_sum = level::compute(sum_accu, ima_obj_histo);
+ unsigned obj_sum = data::compute(sum_accu, ima_obj_histo);
std::ofstream fout_obj("obj_histo.plot");
std::ofstream fout_p_obj("obj_histo_norm.plot");
for (unsigned int i = 0; i < ima_obj_histo.nelements(); ++i)
@@ -316,10 +316,10 @@
unsigned coef = 1;
accu::mean<unsigned> mean_accu;
- unsigned mean = level::compute(mean_accu, (input | (pw::value(input) != 0)));
+ unsigned mean = data::compute(mean_accu, (input | (pw::value(input) != 0)));
accu::stat::deviation<unsigned, unsigned, float> dev_accu(mean);
- float deviation = level::compute(dev_accu, (input | pw::value(input) != 0));
+ float deviation = data::compute(dev_accu, (input | pw::value(input) != 0));
std::cout << "[mean = " << mean << " | deviation = " << deviation << "]";
return floor(mean + coef * deviation);
Index: fabien/igr/wst_edges.cc
--- fabien/igr/wst_edges.cc (revision 3923)
+++ fabien/igr/wst_edges.cc (working copy)
@@ -32,9 +32,9 @@
#include <mln/fun/v2v/fit.hh>
#include <mln/labeling/compute.hh>
#include <mln/labeling/wrap.hh>
-#include <mln/level/compute.hh>
-#include <mln/level/convert.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/compute.hh>
+#include <mln/data/convert.hh>
+#include <mln/data/stretch.hh>
#include <mln/make/image2d.hh>
#include <mln/make/w_window1d.hh>
#include <mln/math/diff_abs.hh>
Index: fabien/igr/mat2mln/raw2mlndata.cc
--- fabien/igr/mat2mln/raw2mlndata.cc (revision 3923)
+++ fabien/igr/mat2mln/raw2mlndata.cc (working copy)
@@ -6,7 +6,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/core/image/dmorph/slice_image.hh>
#include <mln/core/routine/duplicate.hh>
#include <mln/core/image/image2d.hh>
@@ -123,7 +123,7 @@
// Debug.
image2d<V> ima_debug;
ima_debug = duplicate(slice(ima, 50));
- //io::pgm::save(level::stretch(value::int_u8(), ima_debug), "debug.pgm");
+ //io::pgm::save(data::stretch(value::int_u8(), ima_debug), "debug.pgm");
io::pgm::save(ima_debug, "debug.pgm");
return 0;
Index: fabien/igr/mat2mln/mat2mln.cc
--- fabien/igr/mat2mln/mat2mln.cc (revision 3923)
+++ fabien/igr/mat2mln/mat2mln.cc (working copy)
@@ -8,7 +8,7 @@
#include <mln/debug/slices_2d.hh>
#include <mln/value/int_u8.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
using namespace mln;
using value::int_u8;
@@ -53,7 +53,7 @@
io::dump::save(ima, argv[2]);
- image2d<int_u8> ima_flat = debug::slices_2d(level::stretch(int_u8(), ima), 1.f, 0);
+ image2d<int_u8> ima_flat = debug::slices_2d(data::stretch(int_u8(), ima), 1.f, 0);
io::pgm::save(ima_flat, "debug.pgm");
return 0;
Index: fabien/igr/label2gif.cc
--- fabien/igr/label2gif.cc (revision 3923)
+++ fabien/igr/label2gif.cc (working copy)
@@ -27,8 +27,8 @@
#include <mln/accu/mean.hh>
#include <mln/accu/median_h.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compute.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/compute.hh>
+#include <mln/data/stretch.hh>
#include <mln/make/box3d.hh>
#include <mln/morpho/elementary/dilation.hh>
#include <mln/pw/all.hh>
@@ -64,7 +64,7 @@
str_ima << "0";
str_ima << sli << ".pgm";
- io::pgm::save(level::stretch(int_u8(), ima_slice), str_ima.str());
+ io::pgm::save(data::stretch(int_u8(), ima_slice), str_ima.str());
}
}
Index: fabien/igr/plot_label.hh
--- fabien/igr/plot_label.hh (revision 3923)
+++ fabien/igr/plot_label.hh (working copy)
@@ -15,7 +15,7 @@
#include <mln/accu/mean.hh>
#include <mln/accu/median_h.hh>
-#include <mln/level/compute.hh>
+#include <mln/data/compute.hh>
#include <mln/pw/all.hh>
#include <mln/util/array.hh>
@@ -38,7 +38,7 @@
{
image2d<I> slice_ima = duplicate(slice(ima, sli));
accu::mean<I> accu_mean;
- float mean = level::compute(accu_mean, slice_ima | ima_label.domain());
+ float mean = data::compute(accu_mean, slice_ima | ima_label.domain());
arr.append(mean);
}
Index: fabien/igr/space_smooth/morpho.cc
--- fabien/igr/space_smooth/morpho.cc (revision 3923)
+++ fabien/igr/space_smooth/morpho.cc (working copy)
@@ -20,8 +20,8 @@
/*#include <mln/draw/line.hh>
#include <mln/io/magick/save.hh>
-#include <mln/level/convert.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/convert.hh>
+#include <mln/data/stretch.hh>
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
#include <mln/literal/all.hh>
@@ -73,7 +73,7 @@
// Outputs //
// //
/////////////
- /*image2d<rgb8> ima_color = level::convert(rgb8(), level::stretch(int_u8(), slice(input, 0)));
+ /*image2d<rgb8> ima_color = data::convert(rgb8(), level::stretch(int_u8(), slice(input, 0)));
algebra::vec<2, unsigned int> vmin;
algebra::vec<2, unsigned int> vmax;
vmin[0] = 160;
Index: fabien/igr/watershed.hh
--- fabien/igr/watershed.hh (revision 3923)
+++ fabien/igr/watershed.hh (working copy)
@@ -17,8 +17,8 @@
#include <mln/value/int_u12.hh>
#include <mln/value/label_16.hh>
-#include <mln/level/transform.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/transform.hh>
+#include <mln/data/stretch.hh>
#include <mln/labeling/mean_values.hh>
@@ -50,7 +50,7 @@
#include <mln/accu/compute.hh>
#include <mln/core/alias/dpoint2d.hh>
#include <mln/draw/box.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/fun/v2v/id.hh>
#include <mln/fun/l2l/wrap.hh>
#include <mln/core/image/line_graph_elt_neighborhood.hh>
@@ -132,7 +132,7 @@
convert::from_to(m_3f, m);
m[0] = 150u;
- /*io::ppm::save(level::transform(w,
+ /*io::ppm::save(data::transform(w,
convert::to< fun::i2v::array<mln_value(I)> >(m)),
"wst_rag_wshd_color.ppm");*/
@@ -259,7 +259,7 @@
image2d<int_u12> dcm;
io::dicom::load(dcm, argv[1]);
- io::pgm::save(level::stretch(int_u8(), dcm), "wsd_01_src.pgm");
+ io::pgm::save(data::stretch(int_u8(), dcm), "wsd_01_src.pgm");
image2d<int_u12> grad = morpho::gradient(dcm, win_c4p());
image2d<int_u12> clo = morpho::closing::area(grad, c4(), closure_lambda);
@@ -267,14 +267,14 @@
label_16 nbasins;
image2d<label_16> wshed = morpho::meyer_wst(clo, c4(), nbasins);
- io::pgm::save(level::stretch(int_u8(), clo), "wsd_02.pgm");
- io::pgm::save(level::transform(wshed, fun::l2l::wrap<int_u8>()), "wsd_03.pgm");
+ io::pgm::save(data::stretch(int_u8(), clo), "wsd_02.pgm");
+ io::pgm::save(data::transform(wshed, fun::l2l::wrap<int_u8>()), "wsd_03.pgm");
mln_VAR(vol2_, morpho::elementary::dilation(extend(wshed | (pw::value(wshed) == 0u), wshed), c8()));
data::fill((wshed | (pw::value(wshed) == 0u)).rw(), vol2_);
- io::pgm::save(level::transform(wshed, fun::l2l::wrap<int_u8>()), "wsd_04.pgm");
+ io::pgm::save(data::transform(wshed, fun::l2l::wrap<int_u8>()), "wsd_04.pgm");
/// Build graph
util::graph g = make::graph(wshed, c4(), nbasins);
@@ -309,9 +309,9 @@
}
mln_invariant(f(0) == 0u);
--nbasins2; // nbasins2 does not count the basin with label 0.
- image2d<label_16> wsd2 = level::transform(wshed, f);
+ image2d<label_16> wsd2 = data::transform(wshed, f);
- io::pgm::save(level::transform(wsd2, fun::l2l::wrap<int_u8>()), "wsd_05.pgm");
+ io::pgm::save(data::transform(wsd2, fun::l2l::wrap<int_u8>()), "wsd_05.pgm");
/// Reconstruct a graph from the simplified image.
util::graph g2 = make::graph(wsd2, c4(), nbasins2);
@@ -324,8 +324,8 @@
data::fill((wsd2 | (pw::value(wsd2) == 0u)).rw(), wsd2_);
- io::pgm::save(level::transform(labeling::mean_values(dcm, wsd2, nbasins2), fun::l2l::wrap<int_u8>()), "wsd_06_mean_colors.pgm");
- io::pgm::save(level::stretch(int_u8(), make_debug_graph_image(dcm, ima_v2, ima_e2, box_size, 4095)), "wsd_07_graph_image2_white.pgm");
- io::pgm::save(level::stretch(int_u8(), make_debug_graph_image(dcm, ima_v2, ima_e2, box_size, 0)), "wsd_08_graph_image2_black.pgm");
- io::pgm::save(level::transform(wsd2, fun::l2l::wrap<int_u8>()), "wsd_99_result.pgm");
+ io::pgm::save(data::transform(labeling::mean_values(dcm, wsd2, nbasins2), fun::l2l::wrap<int_u8>()), "wsd_06_mean_colors.pgm");
+ io::pgm::save(data::stretch(int_u8(), make_debug_graph_image(dcm, ima_v2, ima_e2, box_size, 4095)), "wsd_07_graph_image2_white.pgm");
+ io::pgm::save(data::stretch(int_u8(), make_debug_graph_image(dcm, ima_v2, ima_e2, box_size, 0)), "wsd_08_graph_image2_black.pgm");
+ io::pgm::save(data::transform(wsd2, fun::l2l::wrap<int_u8>()), "wsd_99_result.pgm");
}
Index: fabien/igr/matlab.cc
--- fabien/igr/matlab.cc (revision 3923)
+++ fabien/igr/matlab.cc (working copy)
@@ -17,7 +17,7 @@
#include <mln/arith/all.hh>
#include <mln/data/fill.hh>
#include <mln/data/paste.hh>
-#include <mln/level/compute.hh>
+#include <mln/data/compute.hh>
#include <mln/math/abs.hh>
#include <mln/pw/all.hh>
#include <mln/trait/concrete.hh>
@@ -81,7 +81,7 @@
// calculé sur la première image
image2d<bool> roi_noise; // FIXME: init this ROI, should be a domain
accu::count<bool> accu_nbrpix1;
- unsigned nbrpix1 = level::compute(accu_nbrpix1, roi_noise);
+ unsigned nbrpix1 = data::compute(accu_nbrpix1, roi_noise);
image2d<float> datasli = arr_ima[0];
image2d<float> prodsignal1;
@@ -94,7 +94,7 @@
// //
/////////////
accu::mean<float> accu_mean;
- float moysignal1 = level::compute(accu_mean, prodsignal1 | pw::value(roi_noise) == pw::cst(true));
+ float moysignal1 = data::compute(accu_mean, prodsignal1 | pw::value(roi_noise) == pw::cst(true));
////////////////
// //
Index: fabien/igr/graph.cc
--- fabien/igr/graph.cc (revision 3923)
+++ fabien/igr/graph.cc (working copy)
@@ -46,7 +46,7 @@
#include <mln/accu/compute.hh>
#include <mln/core/alias/dpoint2d.hh>
#include <mln/draw/box.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/fun/v2v/id.hh>
#include <mln/fun/l2l/wrap.hh>
#include <mln/core/image/line_graph_elt_neighborhood.hh>
@@ -130,7 +130,7 @@
convert::from_to(m_3f, m);
m[0] = 150u;
- /*io::ppm::save(level::transform(w,
+ /*io::ppm::save(data::transform(w,
convert::to< fun::i2v::array<mln_value(I)> >(m)),
"wst_rag_wshd_color.ppm");*/
@@ -305,7 +305,7 @@
}
mln_invariant(f(0) == 0u);
--nbasins2; // nbasins2 does not count the basin with label 0.
- image2d<label_16> wsd2 = level::transform(wshed, f);
+ image2d<label_16> wsd2 = data::transform(wshed, f);
/// Reconstruct a graph from the simplified image.
util::graph g2 = make::graph(wsd2, c4(), nbasins2);
@@ -320,8 +320,8 @@
mln_VAR(wsd2_, morpho::elementary::dilation(extend(wsd2 | (pw::value(wsd2) == 0u), wsd2), c8()));
data::fill((wsd2 | (pw::value(wsd2) == 0u)).rw(), wsd2_);
- mln_VAR(original, level::stretch(int_u8(), labeling::mean_values(dcm, wshed, nbasins)));
- mln_VAR(mean, level::stretch(int_u8(), labeling::mean_values(dcm, wsd2, nbasins2)));
+ mln_VAR(original, data::stretch(int_u8(), labeling::mean_values(dcm, wshed, nbasins)));
+ mln_VAR(mean, data::stretch(int_u8(), labeling::mean_values(dcm, wsd2, nbasins2)));
io::pgm::save(original, "wsd_original.pgm");
io::pgm::save(mean, "wsd_mean_colors.pgm");
io::ppm::save(labeling::colorize(rgb8(), wshed, nbasins), "wsd_colorize_01.ppm");
Index: fabien/igr/time_smooth/morpho.cc
--- fabien/igr/time_smooth/morpho.cc (revision 3923)
+++ fabien/igr/time_smooth/morpho.cc (working copy)
@@ -20,8 +20,8 @@
/*#include <mln/draw/line.hh>
#include <mln/io/magick/save.hh>
-#include <mln/level/convert.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/convert.hh>
+#include <mln/data/stretch.hh>
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
#include <mln/literal/all.hh>
@@ -82,7 +82,7 @@
// Outputs //
// //
/////////////
- /*image2d<rgb8> ima_color = level::convert(rgb8(), level::stretch(int_u8(), slice(input, 0)));
+ /*image2d<rgb8> ima_color = data::convert(rgb8(), level::stretch(int_u8(), slice(input, 0)));
algebra::vec<2, unsigned int> vmin;
algebra::vec<2, unsigned int> vmax;
vmin[0] = 160;
Index: fabien/igr/med.cc
--- fabien/igr/med.cc (revision 3923)
+++ fabien/igr/med.cc (working copy)
@@ -23,7 +23,7 @@
#include <mln/histo/compute.hh>
#include <mln/labeling/compute.hh>
#include <mln/labeling/mean_values.hh>
-#include <mln/level/compute.hh>
+#include <mln/data/compute.hh>
#include <mln/morpho/elementary/dilation.hh>
#include <mln/pw/all.hh>
#include <mln/util/array.hh>
@@ -87,7 +87,7 @@
image1d<unsigned> ima_histo;
convert::from_to(histogram, ima_histo);
accu::median_h<int_u12> accu_med;
- median = level::compute(accu_med, ima_histo | pw::value(ima_histo) != pw::cst(0));
+ median = data::compute(accu_med, ima_histo | pw::value(ima_histo) != pw::cst(0));
for (int i = 0; i < histogram.nvalues(); ++i)
{
@@ -123,7 +123,7 @@
image1d<unsigned> ima_histo;
convert::from_to(histogram, ima_histo);
accu::median_h<int_u12> accu_med;
- median = level::compute(accu_med, ima_histo | pw::value(ima_histo) != pw::cst(0));
+ median = data::compute(accu_med, ima_histo | pw::value(ima_histo) != pw::cst(0));
for (int i = 0; i < histogram.nvalues(); ++i)
{
Index: fabien/igr/fixed_seg/main.cc
--- fabien/igr/fixed_seg/main.cc (revision 3923)
+++ fabien/igr/fixed_seg/main.cc (working copy)
@@ -32,9 +32,9 @@
#include <mln/fun/v2v/fit.hh>
#include <mln/labeling/compute.hh>
#include <mln/labeling/wrap.hh>
-#include <mln/level/compute.hh>
-#include <mln/level/convert.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/compute.hh>
+#include <mln/data/convert.hh>
+#include <mln/data/stretch.hh>
#include <mln/make/image2d.hh>
#include <mln/make/w_window1d.hh>
#include <mln/math/diff_abs.hh>
@@ -138,10 +138,10 @@
accu::sum<V> accu_sum;
convert::from_to(v1, tmp_ima);
- float sum_v1 = level::compute(accu_sum, tmp_ima);
+ float sum_v1 = data::compute(accu_sum, tmp_ima);
convert::from_to(v2, tmp_ima2);
- float sum_v2 = level::compute(accu_sum, tmp_ima2);
+ float sum_v2 = data::compute(accu_sum, tmp_ima2);
if (sum_v1 == 0 && sum_v2 == 0)
return 1;
@@ -173,14 +173,14 @@
image1d<float> morpho_ima = mean_image(tmp_ima, 15);
morpho_ima = mean_image(morpho_ima, 11);
morpho_ima = mean_image(morpho_ima, 7);
- float sum_v1 = level::compute(accu_sum, morpho_ima);
+ float sum_v1 = data::compute(accu_sum, morpho_ima);
image1d<V> tmp_ima2;
convert::from_to(v2, tmp_ima2);
image1d<float> morpho_ima2 = mean_image(tmp_ima2, 15);
morpho_ima2 = mean_image(tmp_ima2, 11);
morpho_ima2 = mean_image(tmp_ima2, 7);
- float sum_v2 = level::compute(accu_sum, morpho_ima2);
+ float sum_v2 = data::compute(accu_sum, morpho_ima2);
mln_piter(image1d<float>) p(morpho_ima.domain());
for_all(p)
@@ -292,7 +292,7 @@
for (unsigned i = 1; i < means.nelements(); ++i)
data::fill((ima_means | pw::value(ima_means) == pw::cst(i)).rw(), means[i]);
mln_VAR(display_means, world::inter_pixel::display_edge(ima_means.unmorph_(), 0.0, 3));
- io::pgm::save(level::stretch(int_u8(), display_means), "04_means.pgm");
+ io::pgm::save(data::stretch(int_u8(), display_means), "04_means.pgm");
}*/
/*typedef accu::mean<int_u12,float,int_u12> A;
@@ -307,7 +307,7 @@
if (m_[l] < 2) m_[l] == 2;
// basin <=> 2..255
}
- mln_VAR(d_m, level::transform(wst, m_));
+ mln_VAR(d_m, data::transform(wst, m_));
mln_VAR(out, world::inter_pixel::display_edge(d_m.unmorph_(),
0, // background <=> 0
3));
Index: fabien/igr/dist_edges.cc
--- fabien/igr/dist_edges.cc (revision 3923)
+++ fabien/igr/dist_edges.cc (working copy)
@@ -19,9 +19,9 @@
#include <mln/accu/sum.hh>
#include <mln/arith/div.hh>
#include <mln/convert/from_to.hh>
-#include <mln/level/compute.hh>
-#include <mln/level/convert.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/compute.hh>
+#include <mln/data/convert.hh>
+#include <mln/data/stretch.hh>
#include <mln/make/image2d.hh>
#include <mln/math/diff_abs.hh>
#include <mln/morpho/dilation.hh>
@@ -85,10 +85,10 @@
accu::sum<V> accu_sum;
convert::from_to(v1, tmp_ima);
- float sum_v1 = level::compute(accu_sum, tmp_ima);
+ float sum_v1 = data::compute(accu_sum, tmp_ima);
convert::from_to(v2, tmp_ima2);
- float sum_v2 = level::compute(accu_sum, tmp_ima2);
+ float sum_v2 = data::compute(accu_sum, tmp_ima2);
if (sum_v1 == 0 && sum_v2 == 0)
return 1;
Index: fabien/igr/igr.cc
--- fabien/igr/igr.cc (revision 3923)
+++ fabien/igr/igr.cc (working copy)
@@ -55,13 +55,13 @@
#include <mln/labeling/fill_holes.hh>
#include <mln/labeling/n_max.hh>
-#include <mln/level/compare.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/compare.hh>
+#include <mln/data/transform.hh>
#include <mln/fun/internal/selector.hh>
#include <mln/fun/v2b/threshold.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/accu/count.hh>
#include <mln/accu/center.hh>
#include <mln/set/compute.hh>
@@ -106,7 +106,7 @@
// Threshold.
- mln_ch_value(I, bool) threshold = level::transform(input, fun::v2b::threshold<int_u8>(25));
+ mln_ch_value(I, bool) threshold = data::transform(input, fun::v2b::threshold<int_u8>(25));
// Labeling.
@@ -133,7 +133,7 @@
mln_ch_value(I, bool) gradient = morpho::elementary::gradient_internal(big_second, nbh);
mln_VAR(gradient_map, gradient | pw::value(gradient) == true);
- mln_ch_value(I, rgb8) result = level::convert(rgb8(), input);
+ mln_ch_value(I, rgb8) result = data::convert(rgb8(), input);
data::fill((result | gradient_map.domain()).rw(), literal::red);
// Center.
Index: fabien/igr/mean_slices.cc
--- fabien/igr/mean_slices.cc (revision 3923)
+++ fabien/igr/mean_slices.cc (working copy)
@@ -27,7 +27,7 @@
#include <mln/accu/median_h.hh>
#include <mln/labeling/relabel.hh>
#include <mln/labeling/mean_values.hh>
-#include <mln/level/compute.hh>
+#include <mln/data/compute.hh>
#include <mln/make/image3d.hh>
#include <mln/morpho/elementary/dilation.hh>
#include <mln/pw/all.hh>
Index: fabien/igr/nbasins_finder.cc
--- fabien/igr/nbasins_finder.cc (revision 3923)
+++ fabien/igr/nbasins_finder.cc (working copy)
@@ -18,8 +18,8 @@
#include <mln/labeling/regional_minima.hh>
-#include <mln/level/transform.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/transform.hh>
+#include <mln/data/stretch.hh>
#include <mln/morpho/elementary/gradient.hh>
#include <mln/morpho/closing/volume.hh>
@@ -72,8 +72,8 @@
// Visualization
std::cout << " nbasins = " << nbasins << std::endl;
- //io::dump::save(level::transform(wshed, fun::l2l::wrap<int_u8>()), "result_nbasins.dump");
- //io::dump::save(level::stretch(int_u8(), wshed), "result_nbasins.dump");
+ //io::dump::save(data::transform(wshed, fun::l2l::wrap<int_u8>()), "result_nbasins.dump");
+ //io::dump::save(data::stretch(int_u8(), wshed), "result_nbasins.dump");
io::dump::save(labeling::colorize(rgb8(), wshed, nbasins), "result_nbasins.dump");
return 0;
Index: fabien/igr/filter.cc
--- fabien/igr/filter.cc (revision 3923)
+++ fabien/igr/filter.cc (working copy)
@@ -32,9 +32,9 @@
#include <mln/fun/v2v/fit.hh>
#include <mln/labeling/compute.hh>
#include <mln/labeling/wrap.hh>
-#include <mln/level/compute.hh>
-#include <mln/level/convert.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/compute.hh>
+#include <mln/data/convert.hh>
+#include <mln/data/stretch.hh>
#include <mln/make/image2d.hh>
#include <mln/make/w_window1d.hh>
#include <mln/math/diff_abs.hh>
@@ -114,10 +114,10 @@
accu::sum<V> accu_sum;
convert::from_to(v1, tmp_ima);
- float sum_v1 = level::compute(accu_sum, tmp_ima);
+ float sum_v1 = data::compute(accu_sum, tmp_ima);
convert::from_to(v2, tmp_ima2);
- float sum_v2 = level::compute(accu_sum, tmp_ima2);
+ float sum_v2 = data::compute(accu_sum, tmp_ima2);
if (sum_v1 == 0 && sum_v2 == 0)
return 1;
@@ -149,14 +149,14 @@
image1d<float> morpho_ima = mean_image(tmp_ima, 15);
morpho_ima = mean_image(morpho_ima, 11);
morpho_ima = mean_image(morpho_ima, 7);
- float sum_v1 = level::compute(accu_sum, morpho_ima);
+ float sum_v1 = data::compute(accu_sum, morpho_ima);
image1d<V> tmp_ima2;
convert::from_to(v2, tmp_ima2);
image1d<float> morpho_ima2 = mean_image(tmp_ima2, 15);
morpho_ima2 = mean_image(tmp_ima2, 11);
morpho_ima2 = mean_image(tmp_ima2, 7);
- float sum_v2 = level::compute(accu_sum, morpho_ima2);
+ float sum_v2 = data::compute(accu_sum, morpho_ima2);
mln_piter(image1d<float>) p(morpho_ima.domain());
for_all(p)
Index: fabien/level.hh
--- fabien/level.hh (revision 3923)
+++ fabien/level.hh (working copy)
@@ -148,15 +148,15 @@
level(const Image<I>& input, const mln_value(I)& val, const Neighborhood<N>& nbh,
L& nlabels)
{
- trace::entering("labeling::level");
+ trace::entering("labeling::value");
- internal::level_tests(input, val, nbh, nlabels);
+ internal::data_tests(input, val, nbh, nlabels);
mln_ch_value(I, L) output;
- impl::level_functor<I> f(input, val);
+ impl::data_functor<I> f(input, val);
output = canvas::labeling_video(input, nbh, nlabels, f);
- trace::exiting("labeling::level");
+ trace::exiting("labeling::value");
return output;
}
Index: fabien/regional_minima.hh
--- fabien/regional_minima.hh (revision 3923)
+++ fabien/regional_minima.hh (working copy)
@@ -39,7 +39,7 @@
# include "labeling.hh"
# include <mln/data/fill.hh>
-# include <mln/level/sort_psites.hh>
+# include <mln/data/sort_psites.hh>
namespace mln
Index: fabien/bin/dump_mask.cc
--- fabien/bin/dump_mask.cc (revision 3923)
+++ fabien/bin/dump_mask.cc (working copy)
@@ -16,7 +16,7 @@
#include <mln/literal/colors.hh>
#include <mln/morpho/elementary/gradient_internal.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/fun/v2b/threshold.hh>
#include <mln/data/fill.hh>
@@ -42,7 +42,7 @@
image3d<int_u8> input;
io::dump::load(input, argv[1]);
- image3d<bool> ima = level::transform(input, fun::v2b::threshold<int_u8>(1));
+ image3d<bool> ima = data::transform(input, fun::v2b::threshold<int_u8>(1));
mln_VAR(grad_int, morpho::elementary::gradient_internal(ima, c6()));
util::array<unsigned> xproj(ima.nrows(), 0);
Index: fabien/bin/dicom_mask.cc
--- fabien/bin/dicom_mask.cc (revision 3923)
+++ fabien/bin/dicom_mask.cc (working copy)
@@ -13,7 +13,7 @@
#include <mln/literal/colors.hh>
#include <mln/morpho/elementary/gradient_internal.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/fun/v2b/threshold.hh>
#include <mln/data/fill.hh>
@@ -59,7 +59,7 @@
fout_ysrc << i << " " << ysrcproj[i] << std::endl;
}
- image2d<bool> ima = level::transform(input, fun::v2b::threshold<int_u8>(1));
+ image2d<bool> ima = data::transform(input, fun::v2b::threshold<int_u8>(1));
io::pbm::save(ima, argv[2]);
mln_VAR(grad_int, morpho::elementary::gradient_internal(ima, c4()));
Index: fabien/bin/dumpi12_to_pgm.cc
--- fabien/bin/dumpi12_to_pgm.cc (revision 3923)
+++ fabien/bin/dumpi12_to_pgm.cc (working copy)
@@ -8,7 +8,7 @@
#include <mln/io/dump/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
int usage(char* argv[])
@@ -41,14 +41,14 @@
{
image2d<int_u12> ima2d;
io::dump::load(ima2d, argv[1]);
- image2d<int_u8> ima_pgm = level::stretch(int_u8(), ima2d);
+ image2d<int_u8> ima_pgm = data::stretch(int_u8(), ima2d);
io::pgm::save(ima_pgm, argv[3]);
}
else
{
image3d<int_u12> ima3d;
io::dump::load(ima3d, argv[1]);
- image3d<int_u8> ima_pgm = level::stretch(int_u8(), ima3d);
+ image3d<int_u8> ima_pgm = data::stretch(int_u8(), ima3d);
image2d<int_u8> ima_result = debug::slices_2d(ima_pgm, 1.f, 0);
io::pgm::save(ima_result, argv[3]);
Index: fabien/binarization/test.cc
--- fabien/binarization/test.cc (revision 3923)
+++ fabien/binarization/test.cc (working copy)
@@ -15,8 +15,8 @@
#include <mln/io/magick/all.hh>
-#include <mln/level/convert.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/convert.hh>
+#include <mln/data/stretch.hh>
#include <mln/literal/colors.hh>
@@ -88,7 +88,7 @@
image1d<int> ima_lines;
convert::from_to(inter_lines, ima_lines);
accu::median_h<int_u12> accu_med;
- median = level::compute(accu_med, ima_lines);
+ median = data::compute(accu_med, ima_lines);
// Gnuplot files creation
/*std::ofstream fout_row("row.plot");
@@ -113,7 +113,7 @@
image2d<bool> ima;
io::magick::load(ima, argv[1]);
- image2d<rgb8> ima_color = level::convert(rgb8(), ima);
+ image2d<rgb8> ima_color = data::convert(rgb8(), ima);
//image2d<int_u8> ima_sampled = world::binary_2d::subsample(ima, 3);
//io::pgm::save(ima_sampled, argv[2]);
Index: fabien/regional_maxima.hh
--- fabien/regional_maxima.hh (revision 3923)
+++ fabien/regional_maxima.hh (working copy)
@@ -39,7 +39,7 @@
# include "labeling.hh"
# include <mln/data/fill.hh>
-# include <mln/level/sort_psites.hh>
+# include <mln/data/sort_psites.hh>
namespace mln
Index: fabien/labeling.hh
--- fabien/labeling.hh (revision 3923)
+++ fabien/labeling.hh (working copy)
@@ -41,8 +41,8 @@
# include <mln/convert/to_upper_window.hh>
# include <mln/extension/adjust_fill.hh>
-# include <mln/level/sort_psites.hh>
-# include <mln/level/sort_offsets.hh>
+# include <mln/data/sort_psites.hh>
+# include <mln/data/sort_offsets.hh>
namespace mln
@@ -511,8 +511,8 @@
{
p_array<mln_psite(I)> s =
increasing ?
- level::sort_psites_increasing(input) :
- level::sort_psites_decreasing(input);
+ data::sort_psites_increasing(input) :
+ data::sort_psites_decreasing(input);
return impl::generic::labeling(input, nbh, nlabels,
s, functor);
}
@@ -526,8 +526,8 @@
{
util::array<unsigned> s =
increasing ?
- level::sort_offsets_increasing(input) :
- level::sort_offsets_decreasing(input);
+ data::sort_offsets_increasing(input) :
+ data::sort_offsets_decreasing(input);
return impl::labeling_sorted_fastest(input, nbh, nlabels,
s, functor);
}
Index: fabien/level.cc
--- fabien/level.cc (revision 3923)
+++ fabien/level.cc (working copy)
@@ -28,7 +28,7 @@
/// \file tests/labeling/level.cc
///
-/// Test on mln::labeling::level.
+/// Test on mln::labeling::value.
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
@@ -59,7 +59,7 @@
unsigned n, npixels = 0;
for (unsigned l = 0; l <= 255; ++l)
{
- image2d<unsigned> labels = labeling::level(lena, l, c4(), n);
+ image2d<unsigned> labels = labeling::value(lena, l, c4(), n);
unsigned npix =
accu::compute(accu::meta::count(),
labels | (pw::value(labels) != pw::cst(0u)));
Index: jardonnet/n_cmpt/tikz.hh
--- jardonnet/n_cmpt/tikz.hh (revision 3923)
+++ jardonnet/n_cmpt/tikz.hh (working copy)
@@ -44,7 +44,7 @@
# include <mln/morpho/tree/compute_attribute_image.hh>
# include <mln/data/paste.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
namespace mln
{
@@ -111,14 +111,14 @@
typedef mln_ch_value(I, value::int_u<16>) V;
typedef accu::volume<I> A;
- S sp = level::sort_psites_decreasing(ima);
+ S sp = data::sort_psites_decreasing(ima);
morpho::tree::data<I,S> t(ima, sp, nbh);
V volume(ima.domain());
data::paste(morpho::tree::compute_attribute_image(A(), t),
volume);
- sp = level::sort_psites_increasing(volume);
+ sp = data::sort_psites_increasing(volume);
std::cout << "/volume/" << std::endl;
debug::println(volume);
io::tikz::save(volume, "volume.tex");
@@ -271,7 +271,7 @@
tik(d) = tik(parent(d));
}
- //mln_ch_value(I, value::rgb8) tik_rgb = level::transform(tik, col);
+ //mln_ch_value(I, value::rgb8) tik_rgb = data::transform(tik, col);
//tik_rgb(p) = literal::red;
tik(p) = 255;
Index: jardonnet/n_cmpt/nwst.hh
--- jardonnet/n_cmpt/nwst.hh (revision 3923)
+++ jardonnet/n_cmpt/nwst.hh (working copy)
@@ -81,7 +81,7 @@
// sort ima psites
typedef mln_psite(I) P;
typedef p_array<P> S;
- S sp = level::sort_psites_increasing(ima);
+ S sp = data::sort_psites_increasing(ima);
// init watershed image
mln_ch_value(I, value::rgb8) wst(ima.domain());
Index: jardonnet/n_cmpt/test_attribute_watershed.cc
--- jardonnet/n_cmpt/test_attribute_watershed.cc (revision 3923)
+++ jardonnet/n_cmpt/test_attribute_watershed.cc (working copy)
@@ -49,7 +49,7 @@
typedef mln_ch_value_(I,unsigned) V;
typedef accu::volume<I> A;
- S sp = level::sort_psites_decreasing(ima);
+ S sp = data::sort_psites_decreasing(ima);
morpho::tree::data<I,S> t(ima, sp, c4());
V volume = morpho::tree::compute_attribute_image(A(), t);
Index: jardonnet/n_cmpt/fused_filter.cc
--- jardonnet/n_cmpt/fused_filter.cc (revision 3923)
+++ jardonnet/n_cmpt/fused_filter.cc (working copy)
@@ -4,7 +4,7 @@
#include <mln/debug/println.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/morpho/tree/data.hh>
@@ -62,7 +62,7 @@
debug::println("f =", f);
typedef p_array<mln_psite(I)> S;
- S s = level::sort_psites_increasing(a);
+ S s = data::sort_psites_increasing(a);
// s maps increasing attributes.
mln_ch_value(I, mln_site(I)) par;
@@ -237,7 +237,7 @@
usage(argv);
typedef p_array<point2d> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
// Children go towards lower levels so leafs are regional minima.
// We get a min-tree so that we can perform morphological closings.
Index: jardonnet/n_cmpt/n_cmpt2.hh
--- jardonnet/n_cmpt/n_cmpt2.hh (revision 3923)
+++ jardonnet/n_cmpt/n_cmpt2.hh (working copy)
@@ -30,7 +30,7 @@
# include <mln/data/fill.hh>
# include <mln/core/site_set/p_vaccess.hh>
-# include <mln/level/sort_psites.hh>
+# include <mln/data/sort_psites.hh>
# include <mln/accu/volume.hh>
# include <mln/morpho/tree/data.hh>
# include <mln/morpho/tree/compute_attribute_image.hh>
@@ -74,7 +74,7 @@
// compute volume image
typedef p_array<mln_psite(I)> S;
typedef accu::volume<I> A;
- S sp = level::sort_psites_increasing(input);
+ S sp = data::sort_psites_increasing(input);
morpho::tree::data<I,S> t(input, sp, c4());
image2d<unsigned> volume = morpho::tree::compute_attribute_image(A(), t);
Index: jardonnet/n_cmpt/n_cmpt3.hh
--- jardonnet/n_cmpt/n_cmpt3.hh (revision 3923)
+++ jardonnet/n_cmpt/n_cmpt3.hh (working copy)
@@ -81,10 +81,10 @@
typedef mln_ch_value(I,unsigned) V;
typedef accu::volume<I> A;
- S sp = level::sort_psites_decreasing(ima);
+ S sp = data::sort_psites_decreasing(ima);
morpho::tree::data<I,S> t(ima, sp, nbh);
V volume = morpho::tree::compute_attribute_image(A(), t);
- sp = level::sort_psites_increasing(volume);
+ sp = data::sort_psites_increasing(volume);
std::cout << "/volume/" << std::endl;
debug::println(volume);
Index: jardonnet/n_cmpt/n_cmpt4.hh
--- jardonnet/n_cmpt/n_cmpt4.hh (revision 3923)
+++ jardonnet/n_cmpt/n_cmpt4.hh (working copy)
@@ -81,10 +81,10 @@
typedef mln_ch_value(I,unsigned) V;
typedef accu::volume<I> A;
- S sp = level::sort_psites_decreasing(ima);
+ S sp = data::sort_psites_decreasing(ima);
morpho::tree::data<I,S> t(ima, sp, nbh);
V volume = morpho::tree::compute_attribute_image(A(), t);
- sp = level::sort_psites_increasing(volume);
+ sp = data::sort_psites_increasing(volume);
std::cout << "/volume/" << std::endl;
debug::println(volume);
Index: jardonnet/n_cmpt/n_cmpt5.hh
--- jardonnet/n_cmpt/n_cmpt5.hh (revision 3923)
+++ jardonnet/n_cmpt/n_cmpt5.hh (working copy)
@@ -81,10 +81,10 @@
typedef mln_ch_value(I,unsigned) V;
typedef accu::volume<I> A;
- S sp = level::sort_psites_decreasing(ima);
+ S sp = data::sort_psites_decreasing(ima);
morpho::tree::data<I,S> t(ima, sp, nbh);
V volume = morpho::tree::compute_attribute_image(A(), t);
- sp = level::sort_psites_increasing(volume);
+ sp = data::sort_psites_increasing(volume);
std::cout << "/volume/" << std::endl;
debug::println(volume);
Index: jardonnet/n_cmpt/ref_filter.cc
--- jardonnet/n_cmpt/ref_filter.cc (revision 3923)
+++ jardonnet/n_cmpt/ref_filter.cc (working copy)
@@ -4,7 +4,7 @@
#include <mln/debug/println.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/morpho/tree/data.hh>
@@ -58,7 +58,7 @@
debug::println("f =", f);
typedef p_array<mln_psite(I)> S;
- S s = level::sort_psites_increasing(a);
+ S s = data::sort_psites_increasing(a);
// s maps increasing attributes.
mln_ch_value(I, mln_site(I)) par;
@@ -210,7 +210,7 @@
usage(argv);
typedef p_array<point2d> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
// Children go towards lower levels so leafs are regional minima.
// We get a min-tree so that we can perform morphological closings.
Index: jardonnet/n_cmpt/n_cmpt.hh
--- jardonnet/n_cmpt/n_cmpt.hh (revision 3923)
+++ jardonnet/n_cmpt/n_cmpt.hh (working copy)
@@ -32,7 +32,7 @@
# include <mln/core/concept/neighborhood.hh>
# include <mln/data/fill.hh>
# include <mln/util/pix.hh>
-# include <mln/level/sort_psites.hh>
+# include <mln/data/sort_psites.hh>
# include <mln/accu/count.hh>
# include <mln/accu/volume.hh>
@@ -80,7 +80,7 @@
typedef mln_psite(I) P;
typedef p_array<P> S;
- const S s(level::sort_psites_increasing(input));
+ const S s(data::sort_psites_increasing(input));
// Auxiliary data.
mln_ch_value(O, bool) deja_vu;
Index: jardonnet/igr/src/igr.cc
--- jardonnet/igr/src/igr.cc (revision 3923)
+++ jardonnet/igr/src/igr.cc (working copy)
@@ -17,7 +17,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/data/paste.hh>
-#include <mln/level/apply.hh>
+#include <mln/data/apply.hh>
#include <mln/fun/v2v/rgb_to_hsi.hh>
#include <mln/fun/v2v/abs.hh>
@@ -51,7 +51,7 @@
// RGB -> GS
////////////////////
- image2d<hsi_f> hsi = level::transform(ima, fun::v2v::f_rgb_to_hsi_f);
+ image2d<hsi_f> hsi = data::transform(ima, fun::v2v::f_rgb_to_hsi_f);
//FIXME: fix and use alexandre stuff
/* thru<to_hsi, image2d<hsi_f> > tmp(hsi_f);
@@ -74,7 +74,7 @@
image2d<int_u8> mg_ima(g_ima.domain());
mg_ima = morpho::elementary::gradient(g_ima, c4());
- //level::apply(mg_ima, fun::v2v::abs<int_u8>());
+ //data::apply(mg_ima, fun::v2v::abs<int_u8>());
io::pgm::save(mg_ima, "mg_ima.ppm");
Index: dalila/plop.cc
--- dalila/plop.cc (revision 3923)
+++ dalila/plop.cc (working copy)
@@ -7,8 +7,8 @@
image2d<bool> ima1(2, 3);
image2d<bool> ima2(2, 3);
- level::fill(ima1, 2);
- level::fill(ima2, 3);
+ data::fill(ima1, 2);
+ data::fill(ima2, 3);
// debug::println(ima1);
// debug::println(ima2);
Index: garrigues/level_set.hh
--- garrigues/level_set.hh (revision 3923)
+++ garrigues/level_set.hh (working copy)
@@ -60,7 +60,7 @@
# include <mln/border/fill.hh>
-# include <mln/level/compute.hh>
+# include <mln/data/compute.hh>
# include <mln/data/fill.hh>
# include <mln/accu/min.hh>
# include <mln/accu/max.hh>
@@ -83,8 +83,8 @@
# include <mln/util/tree_to_image.hh>
# include <mln/value/int_u8.hh>
-# include <mln/level/stretch.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/stretch.hh>
+# include <mln/data/compare.hh>
# include <mln/io/pgm/save.hh>
namespace mln
@@ -290,7 +290,7 @@
// gn <- min u(x) x belongs to N.
if ((env.u | set::inter(env.N, env.u.domain())).nsites() > 0)
- env.gn = level::compute< typename F::accu_for_gn >(env.u | set::inter(env.N, env.u.domain()));
+ env.gn = data::compute< typename F::accu_for_gn >(env.u | set::inter(env.N, env.u.domain()));
else
{
finished = true;
@@ -351,7 +351,7 @@
border_ima(z) = true;
}
unsigned n;
- labeling::level(border_ima, true, F::bdr_nbh(), tmp, n);
+ labeling::value(border_ima, true, F::bdr_nbh(), tmp, n);
// std::cout << "labeling : " << n << std::endl;
// std::cout << "nous : " << env.n_cc << std::endl;
@@ -367,7 +367,7 @@
// follow each border to find which is the exterior border
// and which are the holes. Keep one pixel of each holes.
- // WARNING : We trust labeling::level to label the exterior border with 1.
+ // WARNING : We trust labeling::value to label the exterior border with 1.
env.current_region->elt().holes.insert(a_point_of(tmp | pw::value(tmp) == pw::cst(i)));
// FIXME : [optimisation] Remove from N border of holes???.
Index: garrigues/fllt/fllt_simple.svg.3.cc
--- garrigues/fllt/fllt_simple.svg.3.cc (revision 3923)
+++ garrigues/fllt/fllt_simple.svg.3.cc (working copy)
@@ -41,7 +41,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/println.hh>
#include <mln/labeling/regional_minima.hh>
#include <mln/accu/bbox.hh>
Index: garrigues/fllt/fllt_simple.cc
--- garrigues/fllt/fllt_simple.cc (revision 3923)
+++ garrigues/fllt/fllt_simple.cc (working copy)
@@ -46,7 +46,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/println.hh>
#include <mln/labeling/regional_minima.hh>
#include <mln/accu/bbox.hh>
Index: garrigues/fllt/compute_level_set_fast2.hh
--- garrigues/fllt/compute_level_set_fast2.hh (revision 3923)
+++ garrigues/fllt/compute_level_set_fast2.hh (working copy)
@@ -133,7 +133,7 @@
finished = tmp.nsites() == 0;
if (!finished)
- gn = level::compute< typename F::accu_for_gn >(u | tmp.domain());
+ gn = data::compute< typename F::accu_for_gn >(u | tmp.domain());
if (finished)
gn += F::inc;
@@ -254,7 +254,7 @@
// border_ima(z) = true;
// }
// unsigned n;
-// tmp = labeling::level(border_ima, true, F::bdr_nbh(), n);
+// tmp = labeling::value(border_ima, true, F::bdr_nbh(), n);
// // debug::println(border_ima);
// //std::cout << "nb composantes :" << n << std::endl;
@@ -268,7 +268,7 @@
// // follow each border to find which is the exterior border
// // and which are the holes. Keep one pixel of each holes.
-// // WARNING : We trust labeling::level to label the exterior border with 1.
+// // WARNING : We trust labeling::value to label the exterior border with 1.
// current_region->elt().holes.insert(a_point_of(tmp | pw::value(tmp) == pw::cst(i)));
// // FIXME : [optimisation] Remove from N border of holes???.
Index: garrigues/fllt/fllt_optimized.hh
--- garrigues/fllt/fllt_optimized.hh (revision 3923)
+++ garrigues/fllt/fllt_optimized.hh (working copy)
@@ -44,8 +44,8 @@
# include <mln/util/tree_to_image.hh>
# include <mln/value/int_u8.hh>
-# include <mln/level/stretch.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/stretch.hh>
+# include <mln/data/compare.hh>
# include <mln/io/pgm/save.hh>
namespace mln
@@ -143,7 +143,7 @@
image2d<value::int_u8> out(ima.domain());
image2d<value::int_u8> out2(ima.domain());
visualize_deepness(out, tree);
- level::stretch(out, out2);
+ data::stretch(out, out2);
io::pgm::save(out2, "fllt_deepnees.pgm");
visualize_bounds(out, tree, 800);
Index: garrigues/fllt/debug.hh
--- garrigues/fllt/debug.hh (revision 3923)
+++ garrigues/fllt/debug.hh (working copy)
@@ -151,7 +151,7 @@
// image2d<value::int_u8> viz2(ima.domain());
// visualize_deepness(viz, lower_tree);
- // level::stretch(viz, viz2);
+ // data::stretch(viz, viz2);
// debug::println(viz);
// debug::println(viz2);
// io::pgm::save(viz2, "fllt.pgm");
Index: garrigues/fllt/compute_level_set_fast.hh
--- garrigues/fllt/compute_level_set_fast.hh (revision 3923)
+++ garrigues/fllt/compute_level_set_fast.hh (working copy)
@@ -123,7 +123,7 @@
finished = N.nsites() == 0;
if (!finished)
- gn = level::compute< typename F::accu_for_gn >(u | N);
+ gn = data::compute< typename F::accu_for_gn >(u | N);
else
gn += F::inc;
@@ -248,7 +248,7 @@
// border_ima(z) = true;
// }
// unsigned n;
-// tmp = labeling::level(border_ima, true, F::bdr_nbh(), n);
+// tmp = labeling::value(border_ima, true, F::bdr_nbh(), n);
// // debug::println(border_ima);
// //std::cout << "nb composantes :" << n << std::endl;
@@ -262,7 +262,7 @@
// // follow each border to find which is the exterior border
// // and which are the holes. Keep one pixel of each holes.
-// // WARNING : We trust labeling::level to label the exterior border with 1.
+// // WARNING : We trust labeling::value to label the exterior border with 1.
// current_region->elt().holes.insert(a_point_of(tmp | pw::value(tmp) == pw::cst(i)));
// // FIXME : [optimisation] Remove from N border of holes???.
Index: garrigues/fllt/fllt.hh
--- garrigues/fllt/fllt.hh (revision 3923)
+++ garrigues/fllt/fllt.hh (working copy)
@@ -51,7 +51,7 @@
# include <mln/border/fill.hh>
-# include <mln/level/compute.hh>
+# include <mln/data/compute.hh>
# include <mln/data/fill.hh>
# include <mln/accu/min.hh>
# include <mln/accu/max.hh>
@@ -74,8 +74,8 @@
# include <mln/util/tree_to_image.hh>
# include <mln/value/int_u8.hh>
-# include <mln/level/stretch.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/stretch.hh>
+# include <mln/data/compare.hh>
# include <mln/io/pgm/save.hh>
# include "types.hh"
Index: garrigues/fllt/give_confs.cc
--- garrigues/fllt/give_confs.cc (revision 3923)
+++ garrigues/fllt/give_confs.cc (working copy)
@@ -36,11 +36,11 @@
int x, y;
- labeling::level(ima, false, c8(), x);
+ labeling::value(ima, false, c8(), x);
ima(p) = true;
- labeling::level(ima, false, c8(), y);
+ labeling::value(ima, false, c8(), y);
// std::cout << "----- conf no " << i << "------" << std::endl;
// debug::println(ima);
Index: garrigues/fllt/compute_level_set.hh
--- garrigues/fllt/compute_level_set.hh (revision 3923)
+++ garrigues/fllt/compute_level_set.hh (working copy)
@@ -114,7 +114,7 @@
// gn <- min u(x) x belongs to N.
if ((u | set::inter(N, u.domain())).nsites() > 0)
- gn = level::compute< typename F::accu_for_gn >(u | set::inter(N, u.domain()));
+ gn = data::compute< typename F::accu_for_gn >(u | set::inter(N, u.domain()));
else
{
finished = true;
@@ -189,7 +189,7 @@
border_ima(z) = true;
}
unsigned n;
- tmp = labeling::level(border_ima, true, F::bdr_nbh(), n);
+ tmp = labeling::value(border_ima, true, F::bdr_nbh(), n);
// debug::println(border_ima);
//std::cout << "nb composantes :" << n << std::endl;
@@ -203,7 +203,7 @@
// follow each border to find which is the exterior border
// and which are the holes. Keep one pixel of each holes.
- // WARNING : We trust labeling::level to label the exterior border with 1.
+ // WARNING : We trust labeling::value to label the exterior border with 1.
current_region->elt().holes.insert(a_point_of(tmp | pw::value(tmp) == pw::cst(i)));
// FIXME : [optimisation] Remove from N border of holes???.
Index: garrigues/union_find/reconstructions_on_function.hh
--- garrigues/union_find/reconstructions_on_function.hh (revision 3923)
+++ garrigues/union_find/reconstructions_on_function.hh (working copy)
@@ -33,9 +33,9 @@
# include <mln/core/alias/neighb2d.hh>
# include <mln/core/routine/duplicate.hh>
# include <mln/data/fill.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
# include <mln/data/paste.hh>
-# include <mln/level/sort_psites.hh>
+# include <mln/data/sort_psites.hh>
# include <mln/literal/zero.hh>
# include <mln/math/max.hh>
# include <mln/math/min.hh>
@@ -62,7 +62,7 @@
: marker(marker),
mask(mask),
output(output),
- s(level::sort_psites_decreasing(mask))
+ s(data::sort_psites_decreasing(mask))
{
}
@@ -94,7 +94,7 @@
: marker(marker),
mask(mask),
output(output),
- s(level::sort_psites_increasing(mask))
+ s(data::sort_psites_increasing(mask))
{
}
Index: garrigues/union_find/reconstructions_on_set.hh
--- garrigues/union_find/reconstructions_on_set.hh (revision 3923)
+++ garrigues/union_find/reconstructions_on_set.hh (working copy)
@@ -33,7 +33,7 @@
# include <mln/core/alias/neighb2d.hh>
# include <mln/data/fill.hh>
# include <mln/data/paste.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
# include "canvas/reconstruction_on_set.hh"
Index: garrigues/union_find/self_dual_reconstruction.hh
--- garrigues/union_find/self_dual_reconstruction.hh (revision 3923)
+++ garrigues/union_find/self_dual_reconstruction.hh (working copy)
@@ -33,9 +33,9 @@
# include <mln/core/alias/neighb2d.hh>
# include <mln/core/routine/duplicate.hh>
# include <mln/data/fill.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
# include <mln/data/paste.hh>
-# include <mln/level/sort_psites.hh>
+# include <mln/data/sort_psites.hh>
# include <mln/literal/zero.hh>
# include <mln/math/max.hh>
# include <mln/math/min.hh>
@@ -71,8 +71,8 @@
: marker(marker),
mask(mask),
output(output),
- d1_s(level::sort_psites_decreasing(mask | (pw::value(marker) <= pw::value(mask)))),
- d2_s(level::sort_psites_increasing(mask | (pw::value(marker) > pw::value(mask))))
+ d1_s(data::sort_psites_decreasing(mask | (pw::value(marker) <= pw::value(mask)))),
+ d2_s(data::sort_psites_increasing(mask | (pw::value(marker) > pw::value(mask))))
{
}
Index: garrigues/factures/extract_array_highlight.cc
--- garrigues/factures/extract_array_highlight.cc (revision 3923)
+++ garrigues/factures/extract_array_highlight.cc (working copy)
@@ -39,8 +39,8 @@
#include <mln/pw/all.hh>
-#include <mln/level/stretch.hh>
-#include <mln/level/median.hh>
+#include <mln/data/stretch.hh>
+#include <mln/data/median.hh>
#include <mln/morpho/gradient.hh>
#include <mln/labeling/level.hh>
@@ -63,7 +63,7 @@
{
// Labeling.
unsigned nlabels;
- image2d<unsigned> labels = labeling::level(in, true, c4(), nlabels);
+ image2d<unsigned> labels = labeling::value(in, true, c4(), nlabels);
// Get the caracteristics of the connected components.
std::vector< accu::pair_< accu::bbox<point2d>, accu::count_<point2d> > > caracteristics(nlabels + 1);
Index: garrigues/factures/extract_array.cc
--- garrigues/factures/extract_array.cc (revision 3923)
+++ garrigues/factures/extract_array.cc (working copy)
@@ -36,7 +36,7 @@
#include <mln/pw/all.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/labeling/level.hh>
#include <mln/literal/all.hh>
@@ -67,7 +67,7 @@
// Labeling.
unsigned nlabels;
- image2d<unsigned> labels = labeling::level(bin, true, c4(), nlabels);
+ image2d<unsigned> labels = labeling::value(bin, true, c4(), nlabels);
// Get the caracteristics of the connected components.
std::vector< accu::pair_< accu::bbox<point2d>, accu::count_<point2d> > > caracteristics(nlabels);
Index: abraham/tests/morpho/test_watershed.cc
--- abraham/tests/morpho/test_watershed.cc (revision 3923)
+++ abraham/tests/morpho/test_watershed.cc (working copy)
@@ -3,7 +3,7 @@
#include <mln/core/alias/neighb2d.hh>
#include <mln/core/site_set/p_set.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
Index: abraham/tests/morpho/test_watershed_topo.cc
--- abraham/tests/morpho/test_watershed_topo.cc (revision 3923)
+++ abraham/tests/morpho/test_watershed_topo.cc (working copy)
@@ -4,7 +4,7 @@
#include <mln/core/site_set/p_set.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
Index: abraham/mln/morpho/najman_wst.hh
--- abraham/mln/morpho/najman_wst.hh (revision 3923)
+++ abraham/mln/morpho/najman_wst.hh (working copy)
@@ -30,7 +30,7 @@
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/data/fill.hh>
#include <mln/core/image/image2d.hh>
#include <mln/core/site_set/p_set.hh>
@@ -236,7 +236,7 @@
// Sort the sites in increasing order
p_array<mln_site(I)> S;
- S = level::sort_psites_increasing(pima);
+ S = data::sort_psites_increasing(pima);
// Clear the marker map
data::fill(isproc, false);
@@ -552,7 +552,7 @@
{
mln::p_priority< mln_value(I), p_queue_fast<site> > L;
- mln_value(I) max = level::compute(accu::meta::max(), pima);
+ mln_value(I) max = data::compute(accu::meta::max(), pima);
// I K(pima.domain(), pima.border());
mln_ch_value(I, unsigned) K(pima.domain(), pima.border());
Index: abraham/mln/morpho/basic_najman.hh
--- abraham/mln/morpho/basic_najman.hh (revision 3923)
+++ abraham/mln/morpho/basic_najman.hh (working copy)
@@ -26,7 +26,7 @@
// Public License.
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/data/fill.hh>
#include <mln/core/image/image2d.hh>
#include <mln/core/site_set/p_set.hh>
@@ -158,7 +158,7 @@
void init()
{
// Sort the sites in increasing order
- S = level::sort_psites_increasing(pima);
+ S = data::sort_psites_increasing(pima);
// Clear the marker map
data::fill(isproc, false);
@@ -526,7 +526,7 @@
{
mln::p_priority< mln_value(I), p_queue_fast<site> > L;
- mln_value(I) max = level::compute(accu::meta::max(), pima);
+ mln_value(I) max = data::compute(accu::meta::max(), pima);
// I K(pima.domain(), pima.border());
mln_ch_value(I, unsigned) K(pima.domain(), pima.border());
Index: abraham/mln/morpho/topo_wst.hh
--- abraham/mln/morpho/topo_wst.hh (revision 3923)
+++ abraham/mln/morpho/topo_wst.hh (working copy)
@@ -30,7 +30,7 @@
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/data/fill.hh>
#include <mln/core/image/image2d.hh>
#include <mln/core/site_set/p_set.hh>
@@ -260,7 +260,7 @@
// Sort the sites in increasing order
p_array<mln_site(I)> S;
- S = level::sort_psites_increasing(ima);
+ S = data::sort_psites_increasing(ima);
// Clear the marker map
data::fill(isproc, false);
Index: abraham/mln/level/thru.hh
--- abraham/mln/level/thru.hh (revision 3923)
+++ abraham/mln/level/thru.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef MLN_LEVEL_APPLY_HH
# define MLN_LEVEL_APPLY_HH
-/*! \file mln/level/apply.hh
+/*! \file mln/data/apply.hh
*
* \brief Apply a function-object onto image pixel values.
*/
@@ -37,13 +37,13 @@
# include <mln/core/concept/function.hh>
// Specializations are in:
-# include <mln/level/apply.spe.hh>
+# include <mln/data/apply.spe.hh>
namespace mln
{
- namespace level
+ namespace data
{
/*! Apply a function-object to the image \p input.
@@ -54,7 +54,7 @@
* This routine runs: \n
* for all p of \p input, \p input(p) = \p f( \p input(p) ) \n
*
- * This routine is equivalent to level::tranform(input, f, input)
+ * This routine is equivalent to data::tranform(input, f, input)
* but it is faster since a single iterator is required.
*
* \todo Add versions for lowq images.
@@ -76,18 +76,18 @@
inline
void apply_(I& input, const F& f)
{
- trace::entering("level::impl::generic::apply_");
+ trace::entering("data::impl::generic::apply_");
mln_piter(I) p(input.domain());
for_all(p)
input(p) = f(input(p));
- trace::exiting("level::impl::generic::apply_");
+ trace::exiting("data::impl::generic::apply_");
}
- } // end of namespace mln::level::impl::generic
+ } // end of namespace mln::data::impl::generic
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
// Facade.
@@ -96,18 +96,18 @@
inline
void apply(Image<I>& input, const Function_v2v<F>& f)
{
- trace::entering("level::apply");
+ trace::entering("data::apply");
mln_precondition(exact(input).is_valid());
impl::apply_(mln_trait_image_speed(I)(), exact(input),
exact(f));
- trace::exiting("level::apply");
+ trace::exiting("data::apply");
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Index: inim/2010/boxes/boxes.cc
--- inim/2010/boxes/boxes.cc (revision 3923)
+++ inim/2010/boxes/boxes.cc (working copy)
@@ -168,7 +168,7 @@
<< " boxes" << std::endl;
/// Save grouped text image
- io::pgm::save(level::transform(grouped_text.label_image(),
+ io::pgm::save(data::transform(grouped_text.label_image(),
fun::v2v::wrap<value::int_u8>()),
"words.pgm");
@@ -210,7 +210,7 @@
scribo::make::debug_filename("boxes.ppm"));
/// Does not seem to work (FIXME)
- io::pgm::save(level::transform(grouped_lines.label_image(),
+ io::pgm::save(data::transform(grouped_lines.label_image(),
fun::l2l::wrap<value::int_u8>()),
"fixme.ppm");
Index: inim/2010/morpho/main_dilation-n.cc
--- inim/2010/morpho/main_dilation-n.cc (revision 3923)
+++ inim/2010/morpho/main_dilation-n.cc (working copy)
@@ -7,8 +7,8 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/convert.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/convert.hh>
+#include <mln/data/stretch.hh>
#include <mln/core/alias/window2d.hh>
@@ -33,8 +33,8 @@
io::pbm::load(in, argv[1]);
value::int_u8 k = 1;
- image2d<value::int_u8> ima = level::convert(k, in);
- ima = level::stretch(k, ima);
+ image2d<value::int_u8> ima = data::convert(k, in);
+ ima = data::stretch(k, ima);
std::cout << " => create window..." << std::endl;
window2d it;
Index: inim/2010/morpho/morpho.cc
--- inim/2010/morpho/morpho.cc (revision 3923)
+++ inim/2010/morpho/morpho.cc (working copy)
@@ -8,8 +8,8 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
#include <mln/labeling/regional_maxima.hh>
-#include <mln/level/convert.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/convert.hh>
+#include <mln/data/stretch.hh>
#include <mln/linear/gaussian.hh>
#include <mln/morpho/rank_filter.hh>
#include <mln/value/label_8.hh>
@@ -28,8 +28,8 @@
// convert and stretch.
int_u8 k = 1;
- ima = level::convert(k, in);
- ima = level::stretch(k, ima);
+ ima = data::convert(k, in);
+ ima = data::stretch(k, ima);
}
void
Index: inim/2010/rag/rag.hh
--- inim/2010/rag/rag.hh (revision 3923)
+++ inim/2010/rag/rag.hh (working copy)
@@ -18,7 +18,7 @@
# include <mln/morpho/closing/area.hh>
# include <mln/morpho/opening/area.hh>
# include <mln/morpho/elementary/gradient.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/make/region_adjacency_graph.hh>
# include <mln/util/graph.hh>
Index: inim/2010/cag/superpose.hh
--- inim/2010/cag/superpose.hh (revision 3923)
+++ inim/2010/cag/superpose.hh (working copy)
@@ -36,7 +36,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/image/dmorph/image_if.hh>
-# include <mln/level/convert.hh>
+# include <mln/data/convert.hh>
# include <mln/data/fill.hh>
# include <mln/value/rgb8.hh>
# include <mln/literal/colors.hh>
@@ -95,7 +95,7 @@
mln_precondition(ws_ima.is_valid());
mln_ch_value(I,value::rgb8) output =
- level::convert(value::rgb8(), input);
+ data::convert(value::rgb8(), input);
data::fill((output |
(pw::value(ws_ima) != pw::cst(mln_max(mln_value(J))))).rw(),
Index: inim/2011/fredwin/inim.cc
--- inim/2011/fredwin/inim.cc (revision 3923)
+++ inim/2011/fredwin/inim.cc (working copy)
@@ -13,7 +13,7 @@
/* Site set */
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
/* Component trees */
#include <mln/morpho/tree/data.hh>
@@ -42,7 +42,7 @@
#include <mln/pw/all.hh>
/* labeling */
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/value/label_8.hh>
#include <mln/labeling/blobs.hh>
#include <mln/labeling/colorize.hh>
@@ -50,7 +50,7 @@
/* Draw debug */
#include <mln/draw/box.hh>
#include <mln/literal/colors.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/convert.hh>
/* std */
#include <string>
@@ -168,7 +168,7 @@
typedef p_array< mln_site_(I) > S;
typedef morpho::tree::data<I,S> tree_t;
- S sorted_sites = level::sort_psites_decreasing(input);
+ S sorted_sites = data::sort_psites_decreasing(input);
tree_t tree(input, sorted_sites, c4());
@@ -247,7 +247,7 @@
/* Now store output image image */
O out, distance;
initialize(out, input);
- distance = level::convert(value::rgb8 (), input);
+ distance = data::convert(value::rgb8 (), input);
data::fill(out, literal::black_t());
data::paste(output | pw::value(input_), out);
Index: inim/2009/classif/src/max_tree.hh
--- inim/2009/classif/src/max_tree.hh (revision 3923)
+++ inim/2009/classif/src/max_tree.hh (working copy)
@@ -6,7 +6,7 @@
# include <mln/data/fill.hh>
# include <mln/util/pix.hh>
# include <mln/morpho/includes.hh>
-# include <mln/level/sort_psites.hh>
+# include <mln/data/sort_psites.hh>
# include <mln/core/image/image2d.hh>
# include <mln/core/image/image3d.hh>
@@ -57,7 +57,7 @@
mln::data::fill(deja_vu, false);
initialize(parent, f);
initialize(zpar, f);
- s = level::sort_psites_decreasing(f);
+ s = data::sort_psites_decreasing(f);
}
// first pass
Index: inim/2009/classif/src/iccvg04.cc
--- inim/2009/classif/src/iccvg04.cc (revision 3923)
+++ inim/2009/classif/src/iccvg04.cc (working copy)
@@ -31,7 +31,7 @@
#include <mln/literal/all.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <sys/stat.h>
#include <sstream>
Index: inim/2009/binarization/snake2d.cc
--- inim/2009/binarization/snake2d.cc (revision 3923)
+++ inim/2009/binarization/snake2d.cc (working copy)
@@ -1,7 +1,7 @@
#include <mln/win/rectangle2d.hh>
#include <mln/accu/maj_h.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/make/image2d.hh>
#include <mln/border/thickness.hh>
#include "snake2d.hh"
Index: inim/2009/color/min_tree_volume_filter.cc
--- inim/2009/color/min_tree_volume_filter.cc (revision 3923)
+++ inim/2009/color/min_tree_volume_filter.cc (working copy)
@@ -29,7 +29,7 @@
# include <mln/data/paste.hh>
# include <mln/data/fill.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/extension/fill.hh>
# include <mln/morpho/closing_area.hh>
@@ -94,7 +94,7 @@
mln::data::fill(color, value::rgb8(255, 255, 255));
mln::data::fill(volume, 0);
- s = level::sort_psites_increasing(f);
+ s = data::sort_psites_increasing(f);
}
// first pass
Index: inim/2009/color/reference.cc
--- inim/2009/color/reference.cc (revision 3923)
+++ inim/2009/color/reference.cc (working copy)
@@ -30,7 +30,7 @@
# include <mln/data/paste.hh>
# include <mln/data/fill.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/extension/fill.hh>
# include <mln/convert/to.hh>
@@ -517,7 +517,7 @@
image2d<value::rgb8> cells(ima.domain());
data::fill(cells, literal::white);
- data::paste(level::transform(edge, colors), cells);
+ data::paste(data::transform(edge, colors), cells);
io::ppm::save(display_edge_with_bg(cells, 3, literal::white), "tmp_edge.ppm");
// Move the color of an edge which is non black in the cell
Index: inim/2009/color/min_tree_area_filter.cc
--- inim/2009/color/min_tree_area_filter.cc (revision 3923)
+++ inim/2009/color/min_tree_area_filter.cc (working copy)
@@ -30,7 +30,7 @@
# include <mln/data/paste.hh>
# include <mln/data/fill.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/extension/fill.hh>
# include <mln/morpho/meyer_wst.hh>
@@ -45,7 +45,7 @@
# include <mln/core/concept/neighborhood.hh>
# include <mln/util/pix.hh>
# include <mln/morpho/includes.hh>
-# include <mln/level/sort_psites.hh>
+# include <mln/data/sort_psites.hh>
#endif
# include "src/distance.hh"
@@ -104,7 +104,7 @@
//mln::data::fill(resp, false);
mln::data::fill(area, 0);
- s = level::sort_psites_increasing(f);
+ s = data::sort_psites_increasing(f);
}
// first pass
Index: inim/2009/color/min_tree_height_filter.cc
--- inim/2009/color/min_tree_height_filter.cc (revision 3923)
+++ inim/2009/color/min_tree_height_filter.cc (working copy)
@@ -29,7 +29,7 @@
# include <mln/data/paste.hh>
# include <mln/data/fill.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/extension/fill.hh>
# include <mln/opt/at.hh>
@@ -94,7 +94,7 @@
mln::data::fill(color, value::rgb8(255, 255, 255));
mln::data::fill(height, 0);
- s = level::sort_psites_increasing(f);
+ s = data::sort_psites_increasing(f);
}
// first pass
Index: inim/2009/color/min_tree_color.cc
--- inim/2009/color/min_tree_color.cc (revision 3923)
+++ inim/2009/color/min_tree_color.cc (working copy)
@@ -30,7 +30,7 @@
# include <mln/data/paste.hh>
# include <mln/data/fill.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/extension/fill.hh>
# include <mln/morpho/closing_area.hh>
@@ -44,7 +44,7 @@
# include <mln/core/concept/neighborhood.hh>
# include <mln/util/pix.hh>
# include <mln/morpho/includes.hh>
-# include <mln/level/sort_psites.hh>
+# include <mln/data/sort_psites.hh>
#endif
# include "src/distance.hh"
@@ -103,7 +103,7 @@
//mln::data::fill(resp, false);
mln::data::fill(color, value::rgb8(0, 0, 0));
- s = level::sort_psites_increasing(f);
+ s = data::sort_psites_increasing(f);
}
// first pass
Index: inim/2009/color/reference2.cc
--- inim/2009/color/reference2.cc (revision 3923)
+++ inim/2009/color/reference2.cc (working copy)
@@ -30,7 +30,7 @@
# include <mln/data/paste.hh>
# include <mln/data/fill.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/extension/fill.hh>
# include <mln/morpho/meyer_wst.hh>
@@ -371,7 +371,7 @@
image2d<value::rgb8> cells(ima.domain());
data::fill(cells, literal::white);
- data::paste(level::transform(edge, colors), cells);
+ data::paste(data::transform(edge, colors), cells);
io::ppm::save(display_edge(cells, literal::white, 3), "tmp_edge.ppm");
// Move the color of an edge which is non black in the cell
Index: inim/2009/color/min_tree_color_v2.cc
--- inim/2009/color/min_tree_color_v2.cc (revision 3923)
+++ inim/2009/color/min_tree_color_v2.cc (working copy)
@@ -29,7 +29,7 @@
# include <mln/data/paste.hh>
# include <mln/data/fill.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/extension/fill.hh>
# include <mln/morpho/closing_area.hh>
@@ -92,7 +92,7 @@
mln::data::fill(deja_vu, false);
mln::data::fill(color, value::rgb8(255, 255, 255));
- s = level::sort_psites_increasing(f);
+ s = data::sort_psites_increasing(f);
}
// first pass
Index: inim/2009/nature/nature.cc
--- inim/2009/nature/nature.cc (revision 3923)
+++ inim/2009/nature/nature.cc (working copy)
@@ -37,9 +37,9 @@
#include <mln/histo/compute.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/data/paste.hh>
-#include <mln/level/to_enc.hh>
+#include <mln/data/to_enc.hh>
#include <mln/value/rgb8.hh>
#include <mln/value/hsi.hh>
@@ -125,7 +125,7 @@
// First, we get the HSI histograms and corresponding greyscale versions of the picture
- image2d<hsi_f> hsi = level::transform(input, fun::v2v::f_rgb_to_hsi_f);
+ image2d<hsi_f> hsi = data::transform(input, fun::v2v::f_rgb_to_hsi_f);
thru<mln::meta::hue<hsi_f>, image2d<hsi_f> > hue(hsi);
thru<mln::meta::sat<hsi_f>, image2d<hsi_f> > sat(hsi);
@@ -164,7 +164,7 @@
dpoint2d d(0, 1);
image2d<int_u8> uinty (qinty.domain());
{
- image2d<unsigned char> tmp = level::transform(qinty, fun::v2v::enc< float01_8 >());
+ image2d<unsigned char> tmp = data::transform(qinty, fun::v2v::enc< float01_8 >());
data::paste(tmp, uinty);
/* mln_piter_(image2d<unsigned char>) p(tmp.domain());
for_all(p)
Index: inim/2009/nature/hom.cc
--- inim/2009/nature/hom.cc (revision 3923)
+++ inim/2009/nature/hom.cc (working copy)
@@ -39,7 +39,7 @@
# include <mln/core/alias/window2d.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/binarization/threshold.hh>
#include <mln/estim/mean.hh>
#include <mln/morpho/hit_or_miss.hh>
Index: inim/2009/nature/histo_hsi.cc
--- inim/2009/nature/histo_hsi.cc (revision 3923)
+++ inim/2009/nature/histo_hsi.cc (working copy)
@@ -39,12 +39,12 @@
#include <mln/value/hsi.hh>
#include <mln/fun/v2v/rgb_to_hsi.hh>
-#include <mln/level/to_enc.hh>
+#include <mln/data/to_enc.hh>
#include <mln/fun/meta/hue.hh>
#include <mln/fun/meta/sat.hh>
#include <mln/fun/meta/inty.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/io/ppm/load.hh>
#include <mln/io/pbm/save.hh>
@@ -52,7 +52,7 @@
#include <mln/accu/histo.hh>
#include <mln/histo/compute.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/data/fill.hh>
using namespace mln;
@@ -106,14 +106,14 @@
image2d<rgb8> input;
io::ppm::load(input, argv[i]);
- image2d<hsi_f> hsi = level::transform(input, fun::v2v::f_rgb_to_hsi_f);
+ image2d<hsi_f> hsi = data::transform(input, fun::v2v::f_rgb_to_hsi_f);
thru<mln::meta::hue<hsi_f>, image2d<hsi_f> > h(hsi);
cast_image_<float01_8, thru<mln::meta::hue<hsi_f>, image2d<hsi_f> > > hue(h);
std::string n(argv[i]);
n.erase(n.length() - 4);
image2d<int_u8> henc;
- level::transform(hue, fun::v2v::enc< float01_8 >(), henc);
+ data::transform(hue, fun::v2v::enc< float01_8 >(), henc);
io::pgm::save(henc, n.append("_hue.pgm"));
image2d<hsi_f>::piter p(hsi.domain());
@@ -138,7 +138,7 @@
n = argv[i];
n.erase(n.length() - 4);
image2d<int_u8> senc;
- level::transform(sat, fun::v2v::enc< float01_8 >(), senc);
+ data::transform(sat, fun::v2v::enc< float01_8 >(), senc);
io::pgm::save(senc, n.append("_sat.pgm"));
m = 0;
@@ -160,7 +160,7 @@
n = argv[i];
n.erase(n.length() - 4);
image2d<int_u8> ienc;
- level::transform(inty, fun::v2v::enc< float01_8 >(), ienc);
+ data::transform(inty, fun::v2v::enc< float01_8 >(), ienc);
io::pgm::save(ienc, n.append("_inty.pgm"));
Index: theo/igr/irm_seg_with_mm_and_rag.cc
--- theo/igr/irm_seg_with_mm_and_rag.cc (revision 3923)
+++ theo/igr/irm_seg_with_mm_and_rag.cc (working copy)
@@ -14,7 +14,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/convert/to_window.hh>
#include <mln/convert/to_image.hh>
@@ -25,7 +25,7 @@
#include <mln/morpho/meyer_wst.hh>
#include <mln/accu/mean.hh>
-#include <mln/level/take.hh>
+#include <mln/data/take.hh>
#include <mln/util/graph.hh>
@@ -56,7 +56,7 @@
// if (lbl(p) == 82)
// m.take(irm(p));
-// level::take(irm | (pw::value(lbl) == pw::cst(82)), m);
+// data::take(irm | (pw::value(lbl) == pw::cst(82)), m);
// std::cout << "reg 82 has mean = " << m << std::endl;
}
@@ -167,7 +167,7 @@
unsigned nbasins;
image2d<unsigned> wshed = morpho::meyer_wst(clo, c4(), nbasins);
std::cout << "nbasins = " << nbasins << std::endl;
- io::pgm::save( level::transform(wshed, convert::to_fun(foo)),
+ io::pgm::save( data::transform(wshed, convert::to_fun(foo)),
"tmp_wshed.pgm" );
// doit(irm, wshed, nbasins);
Index: theo/igr/irm_anat_segm.cc
--- theo/igr/irm_anat_segm.cc (revision 3923)
+++ theo/igr/irm_anat_segm.cc (working copy)
@@ -13,7 +13,7 @@
#include <mln/accu/mean.hh>
#include <mln/labeling/compute.hh>
#include <mln/fun/i2v/array.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
@@ -61,7 +61,7 @@
fun::i2v::array<int_u8> f;
convert::from_to(a, f);
- image3d<int_u8> out = level::transform(wst, f);
+ image3d<int_u8> out = data::transform(wst, f);
io::dump::save(out, argv[3]);
Index: theo/igr/irm_anat_segm__2D_ONLY.cc
--- theo/igr/irm_anat_segm__2D_ONLY.cc (revision 3923)
+++ theo/igr/irm_anat_segm__2D_ONLY.cc (working copy)
@@ -12,7 +12,7 @@
#include <mln/accu/mean.hh>
#include <mln/labeling/compute.hh>
#include <mln/fun/i2v/array.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
@@ -51,7 +51,7 @@
fun::i2v::array<int_u8> f;
convert::from_to(a, f);
- image2d<int_u8> out = level::transform(wst, f);
+ image2d<int_u8> out = data::transform(wst, f);
io::pgm::save(out, argv[2]);
}
Index: theo/igr/segment_2d_t.cc
--- theo/igr/segment_2d_t.cc (revision 3923)
+++ theo/igr/segment_2d_t.cc (working copy)
@@ -14,7 +14,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/int_u12.hh>
#include <mln/value/label.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/morpho/closing/height.hh>
#include <mln/morpho/watershed/flooding.hh>
@@ -92,7 +92,7 @@
std::cout << "min = " << min << " max = " << max << std::endl;
}
- mln_VAR(d, level::transform(df, int_u12_from_float()));
+ mln_VAR(d, data::transform(df, int_u12_from_float()));
// debug_println("d", d);
io_save_edges_int_u12(d, 0, "d.pgm");
@@ -119,7 +119,7 @@
if (m_[l] < 2) m_[l] == 2;
// basin <=> 2..255
}
- mln_VAR(d_m, level::transform(w, m_));
+ mln_VAR(d_m, data::transform(w, m_));
mln_VAR(out, world::inter_pixel::display_edge(d_m.unmorph_(),
0, // background <=> 0
3));
Index: theo/igr/dump_to_dist.cc
--- theo/igr/dump_to_dist.cc (revision 3923)
+++ theo/igr/dump_to_dist.cc (working copy)
@@ -14,7 +14,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/util/array.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/data/paste.hh>
#include <mln/morpho/elementary/closing.hh>
@@ -152,7 +152,7 @@
io::dump::save(d_, argv[2]);
-// mln_VAR(d_8, level::transform(d, int_u8_from_float()));
+// mln_VAR(d_8, data::transform(d, int_u8_from_float()));
// io::pgm::save(display_edge(d_8.unmorph_(), 0, 3),
// argv[2]);
Index: theo/rush/exo2/exo2.cc
--- theo/rush/exo2/exo2.cc (revision 3923)
+++ theo/rush/exo2/exo2.cc (working copy)
@@ -10,7 +10,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/pbm/save.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/morpho/tree/data.hh>
#include <mln/morpho/tree/compute_attribute_image.hh>
@@ -61,7 +61,7 @@
Accumulator<A> a_,
double lambda1,
double lambda2)
- : sorted_sites_(level::sort_psites_decreasing(exact(f_))),
+ : sorted_sites_(data::sort_psites_decreasing(exact(f_))),
tree_(exact(f_), sorted_sites_, c4())
{
mln_VAR(a, morpho::tree::compute_attribute_image(a_, tree_));
Index: theo/rush/exo3/exo3_fun_generator.cc
--- theo/rush/exo3/exo3_fun_generator.cc (revision 3923)
+++ theo/rush/exo3/exo3_fun_generator.cc (working copy)
@@ -10,7 +10,7 @@
#include <mln/fun/internal/resolve.hh>
#include <mln/morpho/attribute/card.hh>
#include <mln/morpho/attribute/sharpness.hh>
-#include <mln/level/sort_offsets.hh>
+#include <mln/data/sort_offsets.hh>
#include <mln/canvas/morpho/attribute_filter.hh>
#include <mln/canvas/morpho/internal/find_root.hh>
@@ -353,7 +353,7 @@
l_minarea = atoi(argv[4]);
mln_VAR(sharp, exo3_filter::attribute_filter(input, c4(),
- level::sort_psites_decreasing(input),
+ data::sort_psites_decreasing(input),
morpho::attribute::sharpness<I>(), l_sharpness));
mln_VAR(s, pw::value(sharp));
Index: theo/rush/exo3/exo3_fun_area.cc
--- theo/rush/exo3/exo3_fun_area.cc (revision 3923)
+++ theo/rush/exo3/exo3_fun_area.cc (working copy)
@@ -10,7 +10,7 @@
#include <mln/fun/internal/resolve.hh>
#include <mln/morpho/attribute/card.hh>
#include <mln/morpho/attribute/sharpness.hh>
-#include <mln/level/sort_offsets.hh>
+#include <mln/data/sort_offsets.hh>
#include <mln/canvas/morpho/attribute_filter.hh>
#include <mln/canvas/morpho/internal/find_root.hh>
@@ -303,7 +303,7 @@
l_maxarea = atoi(argv[4]);
mln_VAR(sharp, exo3_filter::attribute_filter(input, c4(),
- level::sort_psites_decreasing(input),
+ data::sort_psites_decreasing(input),
morpho::attribute::sharpness<I>(), l_sharpness));
mln_VAR(s, pw::value(sharp));
Index: theo/exec/diff_abs.cc
--- theo/exec/diff_abs.cc (revision 3923)
+++ theo/exec/diff_abs.cc (working copy)
@@ -1,7 +1,7 @@
#include "filetype.hh"
#include <mln/fun/vv2v/diff_abs.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
@@ -29,7 +29,7 @@
io::pgm::load(input1, argv[1]);
io::pgm::load(input2, argv[2]);
- io::pgm::save(level::transform(input1,
+ io::pgm::save(data::transform(input1,
input2,
fun::vv2v::diff_abs<int_u8>()),
argv[3]);
Index: theo/exec/gaussian_directional_2d__float.cc
--- theo/exec/gaussian_directional_2d__float.cc (revision 3923)
+++ theo/exec/gaussian_directional_2d__float.cc (working copy)
@@ -10,7 +10,7 @@
#include <mln/pw/all.hh>
#include <mln/data/fill.hh>
-#include <mln/level/saturate.hh>
+#include <mln/data/saturate.hh>
@@ -66,7 +66,7 @@
out = linear::gaussian_directional_2d(temp, dir, sigma, bdr);
- io::pgm::save(level::saturate(int_u8(),
+ io::pgm::save(data::saturate(int_u8(),
(pw::value(out) * pw::cst(255.f)) | out.domain()),
argv[5]);
}
@@ -86,7 +86,7 @@
out = linear::gaussian_directional_2d(temp, dir, sigma, bdr);
- io::pgm::save(level::saturate(int_u8(), out), argv[5]);
+ io::pgm::save(data::saturate(int_u8(), out), argv[5]);
}
break;
Index: theo/exec/watershed_flooding.cc
--- theo/exec/watershed_flooding.cc (revision 3923)
+++ theo/exec/watershed_flooding.cc (working copy)
@@ -3,7 +3,7 @@
#include <mln/morpho/watershed/flooding.hh>
#include <mln/value/label_16.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/convert/to_fun.hh>
@@ -57,7 +57,7 @@
}
else if (get_filetype(argv[2]) == filetype::pgm)
{
- io::pgm::save( level::transform(wst, convert::to_fun(L_to_int_u8)),
+ io::pgm::save( data::transform(wst, convert::to_fun(L_to_int_u8)),
argv[2] );
}
else if (get_filetype(argv[2]) == filetype::pbm)
Index: theo/exec/dump_12bit_to_pgm.cc
--- theo/exec/dump_12bit_to_pgm.cc (revision 3923)
+++ theo/exec/dump_12bit_to_pgm.cc (working copy)
@@ -1,7 +1,7 @@
#include "filetype.hh"
#include <mln/value/int_u12.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
@@ -28,7 +28,7 @@
io::dump::load(vol, argv[1]);
using value::int_u8;
- image3d<int_u8> out = level::stretch(int_u8(), vol);
+ image3d<int_u8> out = data::stretch(int_u8(), vol);
io::dump::save(out, argv[2]);
trace::exiting("main");
Index: theo/exec/color_labeling_mean.cc
--- theo/exec/color_labeling_mean.cc (revision 3923)
+++ theo/exec/color_labeling_mean.cc (working copy)
@@ -3,11 +3,11 @@
#include <mln/estim/min_max.hh>
#include <mln/labeling/compute.hh>
#include <mln/accu/mean.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/value/label_8.hh>
#include <mln/value/int_u16.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/convert.hh>
#include <mln/io/pgm/load.hh>
#include <mln/io/ppm/load.hh>
@@ -42,7 +42,7 @@
image2d<int_u8> lab;
io::pgm::load(lab, argv[2]);
- image2d<int_u16> lab_ = level::convert(int_u16(), lab);
+ image2d<int_u16> lab_ = data::convert(int_u16(), lab);
int_u16 min, nlabels;
estim::min_max(lab_, min, nlabels);
@@ -63,5 +63,5 @@
c[l].blue() = m[l][2];
}
- io::ppm::save(level::transform(lab, c), argv[3]);
+ io::ppm::save(data::transform(lab, c), argv[3]);
}
Index: theo/exec/gaussian_directional_2d.cc
--- theo/exec/gaussian_directional_2d.cc (revision 3923)
+++ theo/exec/gaussian_directional_2d.cc (working copy)
@@ -10,7 +10,7 @@
#include <mln/pw/all.hh>
#include <mln/data/fill.hh>
-#include <mln/level/saturate.hh>
+#include <mln/data/saturate.hh>
@@ -66,7 +66,7 @@
out = linear::gaussian_directional_2d(temp, dir, sigma, bdr);
- io::pgm::save(level::saturate(int_u8(),
+ io::pgm::save(data::saturate(int_u8(),
(pw::value(out) * pw::cst(255.f)) | out.domain()),
argv[5]);
}
@@ -86,7 +86,7 @@
out = linear::gaussian_directional_2d(temp, dir, sigma, bdr);
- io::pgm::save(level::saturate(int_u8(), out), argv[5]);
+ io::pgm::save(data::saturate(int_u8(), out), argv[5]);
}
break;
Index: theo/exec/distance_thick.cc
--- theo/exec/distance_thick.cc (revision 3923)
+++ theo/exec/distance_thick.cc (working copy)
@@ -2,7 +2,7 @@
#include <mln/transform/distance_front.hh>
#include <mln/make/w_window2d_int.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
@@ -39,7 +39,7 @@
c4(), make::w_window2d_int(ws),
mln_max(int_u12));
- io::pgm::save(level::stretch(int_u8(), dmap),
+ io::pgm::save(data::stretch(int_u8(), dmap),
argv[2]);
trace::exiting("main");
Index: theo/test_attribute.cc
--- theo/test_attribute.cc (revision 3923)
+++ theo/test_attribute.cc (working copy)
@@ -32,8 +32,8 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/sort_psites.hh>
+#include <mln/data/transform.hh>
#include <mln/debug/println.hh>
#include <mln/core/var.hh>
@@ -82,25 +82,25 @@
image2d<unsigned> area_inc, area_dec;
{
- S s = level::sort_psites_increasing(f);
+ S s = data::sort_psites_increasing(f);
morpho::tree::data<I,S> t(f, s, c4());
accu::count<Px> a;
area_inc = morpho::tree::compute_attribute_image(a, t);
debug::println("area_inc =", area_inc);
}
{
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
morpho::tree::data<I,S> t(f, s, c4());
accu::count<Px> a;
area_dec = morpho::tree::compute_attribute_image(a, t);
debug::println("area_dec =", area_dec);
}
- io::pgm::save(level::transform(area_inc, sat), "inc.pgm");
- io::pgm::save(level::transform(area_dec, sat), "dec.pgm");
+ io::pgm::save(data::transform(area_inc, sat), "inc.pgm");
+ io::pgm::save(data::transform(area_dec, sat), "dec.pgm");
image2d<unsigned> area = arith::min(area_inc, area_dec);
- io::pgm::save(level::transform(area, sat), "min.pgm");
+ io::pgm::save(data::transform(area, sat), "min.pgm");
unsigned lambda = 20;
Index: theo/fllt.svg.6.cc
--- theo/fllt.svg.6.cc (revision 3923)
+++ theo/fllt.svg.6.cc (working copy)
@@ -44,7 +44,7 @@
#include <mln/io/ppm/save.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/println.hh>
#include <mln/labeling/regional_minima.hh>
#include <mln/labeling/regional_maxima.hh>
Index: theo/esiee/laurent/presentation/wst_edge.cc
--- theo/esiee/laurent/presentation/wst_edge.cc (revision 3923)
+++ theo/esiee/laurent/presentation/wst_edge.cc (working copy)
@@ -29,7 +29,7 @@
# include <mln/data/paste.hh>
# include <mln/data/fill.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/extension/fill.hh>
# include <mln/morpho/meyer_wst.hh>
@@ -344,7 +344,7 @@
image2d<value::rgb8> temp(label.domain());
data::fill(temp, literal::white);
- data::paste( level::transform(label | is_edge,
+ data::paste( data::transform(label | is_edge,
colors),
temp );
@@ -367,7 +367,7 @@
//
// 1 1 1
- io::ppm::save(level::transform(cells2image(label),
+ io::ppm::save(data::transform(cells2image(label),
colors),
filename);
}
Index: theo/esiee/laurent/presentation/wst2d.cc
--- theo/esiee/laurent/presentation/wst2d.cc (revision 3923)
+++ theo/esiee/laurent/presentation/wst2d.cc (working copy)
@@ -12,7 +12,7 @@
# include <mln/core/alias/neighb2d.hh>
# include <mln/make/double_neighb2d.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/literal/black.hh>
# include <mln/debug/println.hh>
@@ -113,7 +113,7 @@
// debug::println(labeling::regional_minima(clo, nbh, l));
// debug::println(wst);
- io::ppm::save(level::transform(wst, colorize(l)), filename);
+ io::ppm::save(data::transform(wst, colorize(l)), filename);
}
Index: theo/esiee/laurent/presentation/wst3d.cc
--- theo/esiee/laurent/presentation/wst3d.cc (revision 3923)
+++ theo/esiee/laurent/presentation/wst3d.cc (working copy)
@@ -3,7 +3,7 @@
# include <mln/value/int_u16.hh>
# include <mln/value/int_u8.hh>
-# include <mln/level/stretch.hh>
+# include <mln/data/stretch.hh>
# include <mln/io/pgm/load.hh>
# include <mln/io/ppm/save.hh>
@@ -63,7 +63,7 @@
abort();
image3d<int_u8> ima(ima16.domain());
- level::stretch(ima16, ima);
+ data::stretch(ima16, ima);
ima16.destroy();
int lambda = atoi(argv[2]);
Index: theo/esiee/laurent/presentation/segmentation.hh
--- theo/esiee/laurent/presentation/segmentation.hh (revision 3923)
+++ theo/esiee/laurent/presentation/segmentation.hh (working copy)
@@ -10,5 +10,5 @@
unsigned nbasins;
mln_ch_value(I, unsigned) wst = morpho::wst_meyer(filtered, nbh, nbasins);
- return level::transform(wst, colorize(nbasins));
+ return data::transform(wst, colorize(nbasins));
}
Index: theo/esiee/laurent/ismm09/trash.hh
--- theo/esiee/laurent/ismm09/trash.hh (revision 3923)
+++ theo/esiee/laurent/ismm09/trash.hh (working copy)
@@ -13,7 +13,7 @@
mln_ch_value(F,L) regmins = labeling::regional_minima(f, nbh, n_basins);
typedef p_array<mln_psite(F)> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
typedef morpho::tree::data<F,S> tree_t;
tree_t t(f, s, nbh);
Index: theo/esiee/laurent/ismm09/extinct_attributes.hh
--- theo/esiee/laurent/ismm09/extinct_attributes.hh (revision 3923)
+++ theo/esiee/laurent/ismm09/extinct_attributes.hh (working copy)
@@ -122,7 +122,7 @@
node_only.t = &t;
typedef p_array<P> S;
- S s = level::sort_psites_increasing(f | node_only);
+ S s = data::sort_psites_increasing(f | node_only);
if (echo)
{
Index: theo/esiee/laurent/ismm09/main.ext.cc
--- theo/esiee/laurent/ismm09/main.ext.cc (revision 3923)
+++ theo/esiee/laurent/ismm09/main.ext.cc (working copy)
@@ -55,7 +55,7 @@
{
typedef p_array<point2d> s_t;
- s_t s = level::sort_psites_decreasing(g); // min-tree
+ s_t s = data::sort_psites_decreasing(g); // min-tree
typedef morpho::tree::data<g_t,s_t> tree_t;
tree_t t(g, s, cplx2d::e2e());
Index: theo/esiee/laurent/ismm09/main.cc
--- theo/esiee/laurent/ismm09/main.cc (revision 3923)
+++ theo/esiee/laurent/ismm09/main.cc (working copy)
@@ -94,7 +94,7 @@
{
typedef p_array<point2d> s_t;
- s_t s = level::sort_psites_decreasing(g); // min-tree
+ s_t s = data::sort_psites_decreasing(g); // min-tree
typedef morpho::tree::data<g_t,s_t> tree_t;
tree_t t(g, s, cplx2d::e2e());
Index: theo/esiee/laurent/ismm09/util.hh
--- theo/esiee/laurent/ismm09/util.hh (revision 3923)
+++ theo/esiee/laurent/ismm09/util.hh (working copy)
@@ -2,7 +2,7 @@
#include <mln/core/concept/function.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/morpho/tree/data.hh>
#include <mln/morpho/tree/compute_attribute_image.hh>
@@ -58,7 +58,7 @@
node_only.t = &t;
typedef p_array<mln_site(A)> S;
- S s = level::sort_psites_increasing(a | node_only);
+ S s = data::sort_psites_increasing(a | node_only);
mln_fwd_piter(S) p(s);
for_all(p)
Index: theo/esiee/laurent/ismm09/pseudo_tree.hh
--- theo/esiee/laurent/ismm09/pseudo_tree.hh (revision 3923)
+++ theo/esiee/laurent/ismm09/pseudo_tree.hh (working copy)
@@ -17,8 +17,8 @@
#include <mln/core/image/image2d.hh>
#include <mln/value/int_u8.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/stretch.hh>
-#include <mln/level/compute.hh>
+#include <mln/data/stretch.hh>
+#include <mln/data/compute.hh>
#include <mln/accu/max.hh>
@@ -554,7 +554,7 @@
// Outputing.
{
- A aa_max = level::compute(accu::max<A>(), aa);
+ A aa_max = data::compute(accu::max<A>(), aa);
using value::int_u8;
if (aa_max < 256)
{
@@ -570,7 +570,7 @@
image2d<int_u8> output(aa_ext.domain());
data::fill(output, 0);
data::paste(aa_ext, output);
- io::pgm::save(level::stretch(int_u8(), output),
+ io::pgm::save(data::stretch(int_u8(), output),
"aa_line.pgm");
}
}
Index: theo/cs2d/cs2d.cc
--- theo/cs2d/cs2d.cc (revision 3923)
+++ theo/cs2d/cs2d.cc (working copy)
@@ -103,7 +103,7 @@
std::vector<int_u8> v(l + 1);
accu::compute<accu::mean>(cs_.cell, label, v);
- data::fill(cs_.cell, level::transform(label, v));
+ data::fill(cs_.cell, data::transform(label, v));
io::pgm::save(cell_image(cs_), argv[3]);
// io::ppm::save(pack(cs_, colorize, 7), "log.ppm");
Index: theo/cs2d/kruskal.cc
--- theo/cs2d/kruskal.cc (revision 3923)
+++ theo/cs2d/kruskal.cc (working copy)
@@ -17,7 +17,7 @@
# include <mln/morpho/gradient.hh>
# include <mln/morpho/meyer_wst.hh>
-# include <mln/level/sort_points.hh>
+# include <mln/data/sort_points.hh>
# include <mln/io/pgm/load.hh>
# include <mln/io/ppm/save.hh>
@@ -280,7 +280,7 @@
typedef typeof(edge) edge_t;
typedef p_array<point2d> Arr;
- Arr E = level::sort_points_increasing(edge);
+ Arr E = data::sort_points_increasing(edge);
// Aux data.
mln_ch_value_(edge_t, bool) T;
Index: theo/cs2d/cs2d_morpho.hh
--- theo/cs2d/cs2d_morpho.hh (revision 3923)
+++ theo/cs2d/cs2d_morpho.hh (working copy)
@@ -345,14 +345,14 @@
} // mln::accu
- namespace level
+ namespace data
{
template<typename I, typename R>
mln_ch_value(I, R)
transform(const Image<I>& input_, const std::vector<R>& v)
{
- trace::entering("level::transform");
+ trace::entering("data::transform");
const I& input = exact(input_);
mln_ch_value(I, R) output;
@@ -362,11 +362,11 @@
for_all(p)
output(p) = v[input(p)];
- trace::exiting("level::transform");
+ trace::exiting("data::transform");
return output;
}
- } // mln::level
+ } // mln::data
} // mln
Index: theo/publis/icip2009/compute_a.cc
--- theo/publis/icip2009/compute_a.cc (revision 3923)
+++ theo/publis/icip2009/compute_a.cc (working copy)
@@ -39,10 +39,10 @@
#include <mln/core/routine/duplicate.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/data/fill.hh>
#include <mln/data/paste.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/morpho/tree/data.hh>
#include <mln/morpho/tree/compute_attribute_image.hh>
@@ -131,7 +131,7 @@
{
typedef mln_site(I) P;
typedef p_array<P> S;
- S s = level::sort_psites_increasing(f);
+ S s = data::sort_psites_increasing(f);
// s maps increasing attributes.
mln_ch_value(I, P) par;
@@ -448,7 +448,7 @@
// NOW attributes are sorted increasingly!
- S s_a = level::sort_psites_increasing(a);
+ S s_a = data::sort_psites_increasing(a);
mln_fwd_piter(S) p(s_a);
Index: theo/publis/icip2009/regmin_count.cc
--- theo/publis/icip2009/regmin_count.cc (revision 3923)
+++ theo/publis/icip2009/regmin_count.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/debug/println.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/labeling/regional_minima.hh>
@@ -76,7 +76,7 @@
unsigned regmin_count(const I& f, const N& nbh)
{
typedef p_array<mln_psite(I)> S;
- S s = level::sort_psites_increasing(f);
+ S s = data::sort_psites_increasing(f);
// s maps increasing attributes.
mln_ch_value(I, mln_site(I)) par;
Index: theo/fllt/fllt.hh
--- theo/fllt/fllt.hh (revision 3923)
+++ theo/fllt/fllt.hh (working copy)
@@ -47,8 +47,8 @@
#include <mln/data/fill.hh>
#include <mln/data/paste.hh>
-#include <mln/level/stretch.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/stretch.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/println.hh>
#include <mln/labeling/regional_minima.hh>
#include <mln/labeling/regional_maxima.hh>
@@ -222,7 +222,7 @@
//save is
image2d<value::int_u8> is_out(is.domain());
- level::stretch(cast_image<value::int_u8>(is), is_out);
+ data::stretch(cast_image<value::int_u8>(is), is_out);
io::pgm::save(is_out, is_filename.str());
//io::pgm::save(out, filename.str());
}
Index: theo/fllt/fllt.svg.7.hh
--- theo/fllt/fllt.svg.7.hh (revision 3923)
+++ theo/fllt/fllt.svg.7.hh (working copy)
@@ -50,7 +50,7 @@
#include <mln/io/ppm/save.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/println.hh>
#include <mln/labeling/regional_minima.hh>
#include <mln/labeling/regional_maxima.hh>
Index: theo/fllt/fllt.svg.4.cc
--- theo/fllt/fllt.svg.4.cc (revision 3923)
+++ theo/fllt/fllt.svg.4.cc (working copy)
@@ -40,7 +40,7 @@
#include <mln/io/ppm/save.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/println.hh>
#include <mln/labeling/regional_minima.hh>
#include <mln/accu/bbox.hh>
Index: theo/fllt/fllt.svg.5.cc
--- theo/fllt/fllt.svg.5.cc (revision 3923)
+++ theo/fllt/fllt.svg.5.cc (working copy)
@@ -40,7 +40,7 @@
#include <mln/io/ppm/save.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/println.hh>
#include <mln/labeling/regional_minima.hh>
#include <mln/accu/bbox.hh>
Index: theo/fllt/fllt.svg.6.cc
--- theo/fllt/fllt.svg.6.cc (revision 3923)
+++ theo/fllt/fllt.svg.6.cc (working copy)
@@ -44,7 +44,7 @@
#include <mln/io/ppm/save.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/println.hh>
#include <mln/labeling/regional_minima.hh>
#include <mln/labeling/regional_maxima.hh>
Index: theo/fllt/fllt_test.hh
--- theo/fllt/fllt_test.hh (revision 3923)
+++ theo/fllt/fllt_test.hh (working copy)
@@ -46,7 +46,7 @@
#include <mln/io/ppm/save.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/println.hh>
#include <mln/labeling/regional_minima.hh>
#include <mln/labeling/regional_maxima.hh>
Index: theo/fllt.svg.7.hh
--- theo/fllt.svg.7.hh (revision 3923)
+++ theo/fllt.svg.7.hh (working copy)
@@ -48,7 +48,7 @@
#include <mln/io/ppm/save.hh>
#include <mln/data/fill.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/debug/println.hh>
#include <mln/labeling/regional_minima.hh>
#include <mln/labeling/regional_maxima.hh>
Index: theo/dmap.cc
--- theo/dmap.cc (revision 3923)
+++ theo/dmap.cc (working copy)
@@ -4,7 +4,7 @@
#include <mln/core/alias/w_window2d_int.hh>
#include <mln/debug/println.hh>
#include <mln/data/fill.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/accu/max.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
@@ -126,6 +126,6 @@
debug::println(d);
// image2d<int_u8> out;
-// level::stretch(d, out);
+// data::stretch(d, out);
// io::pgm::save(out, "out.pgm");
}
Index: theo/Rd/diff.cc
--- theo/Rd/diff.cc (revision 3923)
+++ theo/Rd/diff.cc (working copy)
@@ -1,6 +1,6 @@
#include <oln/core/2d/image2d.hh>
#include <oln/io/load_pgm.hh>
-#include <oln/level/compare.hh>
+#include <oln/data/compare.hh>
void usage(char* argv[])
Index: theo/Rd/utils.hh
--- theo/Rd/utils.hh (revision 3923)
+++ theo/Rd/utils.hh (working copy)
@@ -37,7 +37,7 @@
# include <mln/data/fill_with_value.hh>
# include <mln/data/paste.hh>
-# include <mln/level/compare.hh>
+# include <mln/data/compare.hh>
Index: theo/Rd/diff_pgm.cc
--- theo/Rd/diff_pgm.cc (revision 3923)
+++ theo/Rd/diff_pgm.cc (working copy)
@@ -1,7 +1,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/value/int_u8.hh>
Index: theo/tufa_2008/steps.0.cc
--- theo/tufa_2008/steps.0.cc (revision 3923)
+++ theo/tufa_2008/steps.0.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/debug/println.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/morpho/tree/data.hh>
@@ -78,7 +78,7 @@
mln_concrete(I) filtering(const I& f, const A& a, const N& nbh, mln_value(A) lambda)
{
typedef p_array<mln_psite(I)> S;
- S s = level::sort_psites_increasing(a);
+ S s = data::sort_psites_increasing(a);
// s maps increasing attributes.
@@ -148,7 +148,7 @@
debug::println("ref =", morpho::closing_area(f, c4(), 10));
typedef p_array<point2d> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
// Children go towards lower levels so leafs are regional minima.
// We get a min-tree so that we can perform morphological closings.
@@ -161,7 +161,7 @@
debug::println("g =", g);
{
- S s = level::sort_psites_decreasing(g);
+ S s = data::sort_psites_decreasing(g);
morpho::tree::data<I,S> t(g, s, c4());
image2d<unsigned> a_g = morpho::tree::compute_attribute_image(attr, t);
debug::println("a(f) =", a);
Index: theo/tufa_2008/steps.1.cc
--- theo/tufa_2008/steps.1.cc (revision 3923)
+++ theo/tufa_2008/steps.1.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/debug/println.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/morpho/tree/data.hh>
@@ -80,7 +80,7 @@
void run_run(const I& f, const A& a, const N& nbh)
{
typedef p_array<mln_psite(I)> S;
- S s = level::sort_psites_increasing(a);
+ S s = data::sort_psites_increasing(a);
// s maps increasing attributes.
mln_ch_value(I, mln_site(I)) par;
@@ -252,7 +252,7 @@
// debug::println("f =", f);
typedef p_array<point2d> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
// Children go towards lower levels so leafs are regional minima.
// We get a min-tree so that we can perform morphological closings.
@@ -264,7 +264,7 @@
run_run(f, a, c4());
// {
-// S s = level::sort_psites_decreasing(g);
+// S s = data::sort_psites_decreasing(g);
// morpho::tree::data<I,S> t(g, s, c4());
// image2d<unsigned> a_g = morpho::tree::compute_attribute_image(attr, t);
// debug::println("a(f) =", a);
Index: theo/tufa_2008/steps.2.cc
--- theo/tufa_2008/steps.2.cc (revision 3923)
+++ theo/tufa_2008/steps.2.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/debug/println.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/morpho/tree/data.hh>
@@ -86,7 +86,7 @@
debug::println("f =", f);
typedef p_array<mln_psite(I)> S;
- S s = level::sort_psites_increasing(a);
+ S s = data::sort_psites_increasing(a);
// s maps increasing attributes.
mln_ch_value(I, mln_site(I)) par;
@@ -227,7 +227,7 @@
usage(argv);
typedef p_array<point2d> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
// Children go towards lower levels so leafs are regional minima.
// We get a min-tree so that we can perform morphological closings.
Index: theo/tufa_2008/steps.3.cc
--- theo/tufa_2008/steps.3.cc (revision 3923)
+++ theo/tufa_2008/steps.3.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/debug/println.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/morpho/tree/data.hh>
@@ -81,7 +81,7 @@
void run_run(const I& f, const A& a, const N& nbh)
{
typedef p_array<mln_psite(I)> S;
- S s = level::sort_psites_increasing(a);
+ S s = data::sort_psites_increasing(a);
// s maps increasing attributes.
mln_ch_value(I, mln_site(I)) par;
@@ -172,7 +172,7 @@
io::pgm::load(f, argv[1]);
typedef p_array<point2d> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
// Children go towards lower levels so leafs are regional minima.
// We get a min-tree so that we can perform morphological closings.
Index: theo/tufa_2008/steps.2b.cc
--- theo/tufa_2008/steps.2b.cc (revision 3923)
+++ theo/tufa_2008/steps.2b.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/debug/println.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/morpho/tree/data.hh>
@@ -80,7 +80,7 @@
void run_run(const I& f, const A& a, const N& nbh)
{
typedef p_array<mln_psite(I)> S;
- S s = level::sort_psites_increasing(a);
+ S s = data::sort_psites_increasing(a);
// s maps increasing attributes.
mln_ch_value(I, mln_site(I)) par;
@@ -171,7 +171,7 @@
io::pgm::load(f, argv[1]);
typedef p_array<point2d> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
// Children go towards lower levels so leafs are regional minima.
// We get a min-tree so that we can perform morphological closings.
Index: theo/tufa_2008/filter_n.cc
--- theo/tufa_2008/filter_n.cc (revision 3923)
+++ theo/tufa_2008/filter_n.cc (working copy)
@@ -35,7 +35,7 @@
#include <mln/debug/println.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/morpho/tree/data.hh>
@@ -327,7 +327,7 @@
neighb2d nbh = c4();
typedef p_array<point2d> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
// Children go towards lower levels so leafs are regional minima.
// We get a min-tree so that we can perform morphological closings.
Index: theo/tufa_2008/wst_f_equal_wst_a.cc
--- theo/tufa_2008/wst_f_equal_wst_a.cc (revision 3923)
+++ theo/tufa_2008/wst_f_equal_wst_a.cc (working copy)
@@ -37,8 +37,8 @@
#include <mln/literal/black.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/sort_psites.hh>
+#include <mln/data/transform.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/morpho/tree/data.hh>
@@ -106,14 +106,14 @@
image2d<unsigned> wst_f = morpho::meyer_wst(f, c4(), n);
mln_assertion(n == nref);
- io::ppm::save(level::transform(wst_f, colorize(n)),
+ io::ppm::save(data::transform(wst_f, colorize(n)),
"wst_f.ppm");
mln_VAR(WST_f, (pw::value(wst_f) == pw::cst(0u)) | f.domain());
io::pbm::save(WST_f, "wst_f.pbm");
typedef p_array<point2d> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
// Children go towards lower levels so leafs are regional minima.
// We get a min-tree so that we can perform morphological closings.
@@ -129,7 +129,7 @@
image2d<unsigned> wst_a = morpho::meyer_wst(a, c4(), n);
mln_assertion(n == nref);
- io::ppm::save(level::transform(wst_a, colorize(n)),
+ io::ppm::save(data::transform(wst_a, colorize(n)),
"wst_a.ppm");
mln_VAR(WST_a, (pw::value(wst_a) == pw::cst(0u)) | f.domain());
io::pbm::save(WST_a, "wst_a.pbm");
Index: theo/tufa_2008/wst.cc
--- theo/tufa_2008/wst.cc (revision 3923)
+++ theo/tufa_2008/wst.cc (working copy)
@@ -36,7 +36,7 @@
#include <mln/value/int_u8.hh>
#include <mln/data/fill.hh>
-#include <mln/level/replace.hh>
+#include <mln/data/replace.hh>
#include <mln/morpho/meyer_wst.hh>
#include <mln/io/pgm/load.hh>
Index: theo/tufa_2008/experiment.cc
--- theo/tufa_2008/experiment.cc (revision 3923)
+++ theo/tufa_2008/experiment.cc (working copy)
@@ -38,7 +38,7 @@
#include <mln/debug/println.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/morpho/tree/data.hh>
@@ -52,8 +52,8 @@
#include <mln/data/fill.hh>
-#include <mln/level/transform.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/transform.hh>
+#include <mln/data/stretch.hh>
@@ -106,7 +106,7 @@
io::pgm::load(f, argv[1]);
typedef p_array<point2d> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
// Children go towards lower levels so leafs are regional minima.
// We get a min-tree so that we can perform morphological closings.
@@ -115,12 +115,12 @@
accu::volume<I> attr;
image2d<unsigned> a = morpho::tree::compute_attribute_image(attr, t);
- io::pgm::save(level::stretch(int_u8(), a),
+ io::pgm::save(data::stretch(int_u8(), a),
"a.pgm");
unsigned n;
image2d<unsigned> wst_a = morpho::meyer_wst(a, c4(), n);
- io::ppm::save(level::transform(wst_a, colorize(n)),
+ io::ppm::save(data::transform(wst_a, colorize(n)),
"wst_a.ppm");
std::cout << "n(a) = " << n << std::endl;
@@ -128,11 +128,11 @@
image2d<unsigned> aa = morpho::closing_area(a, c4(), 100);
- io::pgm::save(level::stretch(int_u8(), aa),
+ io::pgm::save(data::stretch(int_u8(), aa),
"aa.pgm");
image2d<unsigned> wst_aa = morpho::meyer_wst(aa, c4(), n);
- io::ppm::save(level::transform(wst_aa, colorize(n)),
+ io::ppm::save(data::transform(wst_aa, colorize(n)),
"wst_aa.ppm");
std::cout << "n(aa) = " << n << std::endl;
}
Index: theo/tufa_2008/n_cmpt.cc
--- theo/tufa_2008/n_cmpt.cc (revision 3923)
+++ theo/tufa_2008/n_cmpt.cc (working copy)
@@ -69,10 +69,10 @@
typedef p_array<mln_psite(I)> S;
typedef mln_ch_value(I, mln_result(A)) Attr;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
morpho::tree::data<I,S> t(f, s, nbh);
Attr attr = morpho::tree::compute_attribute_image(a, t);
- s = level::sort_psites_increasing(attr);
+ s = data::sort_psites_increasing(attr);
debug::println("attr =", attr);
Index: theo/tufa_2008/filter.cc
--- theo/tufa_2008/filter.cc (revision 3923)
+++ theo/tufa_2008/filter.cc (working copy)
@@ -39,7 +39,7 @@
#include <mln/core/site_set/p_array.hh>
#include <mln/core/alias/neighb2d.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/data/fill.hh>
#include <mln/morpho/tree/data.hh>
@@ -66,7 +66,7 @@
mln_concrete(I) filtering(const I& f, const A& a, const N& nbh, mln_value(A) lambda)
{
typedef p_array<mln_psite(I)> S;
- S s = level::sort_psites_increasing(a);
+ S s = data::sort_psites_increasing(a);
// s maps increasing attributes.
@@ -144,7 +144,7 @@
unsigned lambda = std::atoi(argv[2]);
typedef p_array<point2d> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
// Children go towards lower levels so leafs are regional minima.
// We get a min-tree so that we can perform morphological closings.
Index: theo/tufa_2008/fz_count.cc
--- theo/tufa_2008/fz_count.cc (revision 3923)
+++ theo/tufa_2008/fz_count.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/debug/println.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/labeling/regional_minima.hh>
@@ -75,7 +75,7 @@
unsigned fz_count(const I& f, const N& nbh)
{
typedef p_array<mln_psite(I)> S;
- S s = level::sort_psites_increasing(f);
+ S s = data::sort_psites_increasing(f);
// s maps increasing attributes.
mln_ch_value(I, mln_site(I)) par;
Index: theo/color/segment.hh
--- theo/color/segment.hh (revision 3923)
+++ theo/color/segment.hh (working copy)
@@ -11,7 +11,7 @@
#include <mln/value/rgb8.hh>
#include <mln/math/diff_abs.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/labeling/regional_minima.hh>
#include <mln/pw/all.hh>
@@ -367,7 +367,7 @@
unsigned n_objects, unsigned less,
bool echo = false)
{
- mln_concrete(I) g_ref = morpho::closing::leveling(f, nbh, A(), lambda);
+ mln_concrete(I) g_ref = morpho::closing::dataing(f, nbh, A(), lambda);
unsigned n_regmins_g_ref;
mln_ch_value(I, unsigned) regmin_g_ref = labeling::regional_minima(g_ref, nbh, n_regmins_g_ref);
@@ -462,7 +462,7 @@
bool echo = false)
{
typedef p_array<mln_psite(F)> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
typedef morpho::tree::data<F,S> tree_t;
tree_t t(f, s, nbh);
@@ -527,7 +527,7 @@
gran_filter(const F& f, const N& nbh, const A& a_)
{
typedef p_array<mln_psite(F)> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
typedef morpho::tree::data<F,S> T;
T t(f, s, nbh);
Index: theo/color/segment_rgb_pixels.cc
--- theo/color/segment_rgb_pixels.cc (revision 3923)
+++ theo/color/segment_rgb_pixels.cc (working copy)
@@ -12,7 +12,7 @@
#include <mln/io/ppm/save.hh>
#include <mln/io/pgm/save.hh>
#include <mln/io/pbm/save.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/convert.hh>
#include <mln/morpho/watershed/flooding.hh>
#include <mln/morpho/attribute/card.hh>
@@ -143,7 +143,7 @@
typedef p_array<mln_psite_(F)> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
typedef morpho::tree::data<F,S> tree_t;
tree_t t(f, s, c4());
Index: theo/color/segment_rgb_edges.cc
--- theo/color/segment_rgb_edges.cc (revision 3923)
+++ theo/color/segment_rgb_edges.cc (working copy)
@@ -350,7 +350,7 @@
util::array<rgb8> m;
convert::from_to(m_3f, m);
- io::ppm::save( level::transform(w_all,
+ io::ppm::save( data::transform(w_all,
convert::to< fun::i2v::array<rgb8> >(m) ),
argv[6] );
Index: theo/color/change_attributes.hh
--- theo/color/change_attributes.hh (revision 3923)
+++ theo/color/change_attributes.hh (working copy)
@@ -174,7 +174,7 @@
node_only.t = &t;
typedef p_array<P> S;
- S s = level::sort_psites_increasing(a | node_only);
+ S s = data::sort_psites_increasing(a | node_only);
mln_invariant(geom::nsites(a | t.nodes()) == s.nsites());
mln_fwd_piter(S) p(s);
@@ -242,7 +242,7 @@
node_only.t = &t;
typedef p_array<P> S;
- S s = level::sort_psites_increasing(a | node_only);
+ S s = data::sort_psites_increasing(a | node_only);
mln_invariant(geom::nsites(a | t.nodes()) == s.nsites());
mln_fwd_piter(S) p(s);
Index: theo/color/filter_blen_rgb_edges.cc
--- theo/color/filter_blen_rgb_edges.cc (revision 3923)
+++ theo/color/filter_blen_rgb_edges.cc (working copy)
@@ -279,7 +279,7 @@
typedef p_array<mln_psite_(I)> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
typedef morpho::tree::data<I,S> tree_t;
tree_t t(f, s, e2e());
@@ -364,12 +364,12 @@
m[i] = rgb8(m_3f[i][0], m_3f[i][1], m_3f[i][2]);
- io::ppm::save( level::transform(out_w,
+ io::ppm::save( data::transform(out_w,
convert::to< fun::i2v::array<rgb8> >(m) ),
argv[4] );
-// io::ppm::save( level::transform(w_all,
+// io::ppm::save( data::transform(w_all,
// convert::to< fun::i2v::array<rgb8> >(m) ),
// argv[4] );
Index: theo/color/filter_meandist_rgb_pixels.cc
--- theo/color/filter_meandist_rgb_pixels.cc (revision 3923)
+++ theo/color/filter_meandist_rgb_pixels.cc (working copy)
@@ -12,7 +12,7 @@
#include <mln/io/ppm/save.hh>
#include <mln/io/pgm/save.hh>
#include <mln/io/pbm/save.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/convert.hh>
#include <mln/morpho/watershed/flooding.hh>
@@ -185,7 +185,7 @@
typedef p_array<mln_psite_(F)> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
typedef morpho::tree::data<F,S> tree_t;
tree_t t(f, s, c4());
Index: theo/color/segment_gl_pixels.cc
--- theo/color/segment_gl_pixels.cc (revision 3923)
+++ theo/color/segment_gl_pixels.cc (working copy)
@@ -12,7 +12,7 @@
#include <mln/io/ppm/save.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/convert.hh>
#include <mln/morpho/elementary/gradient.hh>
#include <mln/morpho/meyer_wst.hh>
@@ -110,7 +110,7 @@
L nbasins;
mln_ch_value_(I, L) w = morpho::meyer_wst(g, c4(), nbasins);
- image2d<rgb8> output = level::convert(rgb8(), input);
+ image2d<rgb8> output = data::convert(rgb8(), input);
data::fill((output | (pw::value(w) == 0)).rw(), literal::red);
io::ppm::save(output, argv[6]);
Index: theo/csi/edwin.cc
--- theo/csi/edwin.cc (revision 3923)
+++ theo/csi/edwin.cc (working copy)
@@ -11,7 +11,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/pbm/save.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/morpho/elementary/gradient.hh>
#include <mln/morpho/tree/data.hh>
@@ -121,7 +121,7 @@
typedef p_array<point2d> S;
- S s = level::sort_psites_decreasing(f);
+ S s = data::sort_psites_decreasing(f);
typedef morpho::tree::data<I,S> tree_t;
tree_t t(f, s, nbh);
Index: bugs/lut.cc
--- bugs/lut.cc (revision 3923)
+++ bugs/lut.cc (working copy)
@@ -1,5 +1,5 @@
-/// Passing a fun::i2v::array to level::Transform can lead to a segfault.
-/// Through the dispatch of level::transform, a dispatch function detects that
+/// Passing a fun::i2v::array to data::Transform can lead to a segfault.
+/// Through the dispatch of data::transform, a dispatch function detects that
/// we are using int_u8 as values, meaning a low quantification value type.
/// It tries to compute a look-up table (lut) which for each int_u8 value
/// (0-255), maps a new value computed thanks to the function.
@@ -7,7 +7,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
int main()
{
@@ -19,5 +19,5 @@
fun::i2v::array<bool> f(3, true);
/// Crash, since the lut computes values for 0-255.
- level::transform(ima, f);
+ data::transform(ima, f);
}
Index: lazzara/igr/irm_seg_with_mm_and_rag.mine.cc
--- lazzara/igr/irm_seg_with_mm_and_rag.mine.cc (revision 3923)
+++ lazzara/igr/irm_seg_with_mm_and_rag.mine.cc (working copy)
@@ -24,7 +24,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/label_16.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/convert/to_window.hh>
#include <mln/convert/to_image.hh>
@@ -33,7 +33,7 @@
#include <mln/labeling/compute.hh>
#include <mln/labeling/background.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/convert.hh>
#include <mln/make/image3d.hh>
@@ -42,7 +42,7 @@
#include <mln/morpho/meyer_wst.hh>
#include <mln/accu/mean.hh>
-//#include <mln/level/take.hh>
+//#include <mln/data/take.hh>
#include <mln/util/graph.hh>
@@ -262,7 +262,7 @@
label_16 nbasins;
image2d<label_16> wshed = morpho::meyer_wst(clo, c4(), nbasins);
std::cout << "nbasins = " << nbasins << std::endl;
- io::pgm::save( level::transform(wshed, convert::to_fun(foo)),
+ io::pgm::save( data::transform(wshed, convert::to_fun(foo)),
"tmp_wshed.pgm" );
mln_VAR(mean_values, labeling::compute(accu::meta::mean(), irm, wshed, nbasins));
@@ -272,11 +272,11 @@
if (f(mean_values[i]))
to_keep(i) = i;
- wshed = level::transform(wshed, to_keep);
- io::pgm::save( level::transform(wshed, convert::to_fun(foo)),
+ wshed = data::transform(wshed, to_keep);
+ io::pgm::save( data::transform(wshed, convert::to_fun(foo)),
"tmp_wshed_2.pgm" );
- image2d<bool> wshed_bw = level::transform(wshed, to_bool());
+ image2d<bool> wshed_bw = data::transform(wshed, to_bool());
image2d<bool> main_obj = get_main_object_shape(wshed_bw);
io::pbm::save(main_obj, "tmp_main_obj");
Index: lazzara/igr/igr-biggest-comp.cc
--- lazzara/igr/igr-biggest-comp.cc (revision 3923)
+++ lazzara/igr/igr-biggest-comp.cc (working copy)
@@ -222,12 +222,12 @@
// Load ppm images and apply a threshold.
// I in;
// io::ppm::load(in, argv[1]);
-// image2d<bool> in_bw = level::transform(in, threshold());
+// image2d<bool> in_bw = data::transform(in, threshold());
// J in_obj = get_main_object_shape(in_bw);
//
// I ref;
// io::ppm::load(ref, argv[2]);
-// image2d<bool> ref_bw = level::transform(ref, threshold());
+// image2d<bool> ref_bw = data::transform(ref, threshold());
// J ref_obj = get_main_object_shape(ref_bw);
Index: lazzara/igr/irm/wst_rag_hsl.cc
--- lazzara/igr/irm/wst_rag_hsl.cc (revision 3923)
+++ lazzara/igr/irm/wst_rag_hsl.cc (working copy)
@@ -20,7 +20,7 @@
#include <mln/labeling/mean_values.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/morpho/elementary/dilation.hh>
@@ -234,8 +234,8 @@
K input;
io::ppm::load(input, argv[1]);
- I input_ = level::convert(hsl_f(), input);
- input = level::transform(input_, hsl2rgb());
+ I input_ = data::convert(hsl_f(), input);
+ input = data::transform(input_, hsl2rgb());
J vol;
io::dump::load(vol, argv[2]);
@@ -287,7 +287,7 @@
std::cout << "nbasins2 = " << nbasins2 << std::endl;
}
// debug::println(vol);
- vol2 = level::transform(vol, f);
+ vol2 = data::transform(vol, f);
// debug::println(vol2);
util::graph g2 = make::region_adjacency_graph(vol2, c4(), nbasins2);
Index: lazzara/igr/irm/grad_clo_and_wshd.cc
--- lazzara/igr/irm/grad_clo_and_wshd.cc (revision 3923)
+++ lazzara/igr/irm/grad_clo_and_wshd.cc (working copy)
@@ -15,7 +15,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/label_16.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/labeling/mean_values.hh>
@@ -71,7 +71,7 @@
image2d<label_16> wshed = morpho::meyer_wst(clo, c4(), nbasins);
std::cout << "nbasins = " << nbasins << std::endl;
- io::pgm::save(level::transform(wshed, fun::v2v::wrap<int_u8>()),
+ io::pgm::save(data::transform(wshed, fun::v2v::wrap<int_u8>()),
"tmp_wshed.pgm");
Index: lazzara/igr/irm/hsl_grad_and_wst.cc
--- lazzara/igr/irm/hsl_grad_and_wst.cc (revision 3923)
+++ lazzara/igr/irm/hsl_grad_and_wst.cc (working copy)
@@ -58,11 +58,11 @@
I input_;
io::ppm::load(input_, argv[1]);
- J input = level::convert(hsl_f(), input_);
- io::ppm::save(level::transform(input, hsl2rgb()), "input-hsl.ppm");
+ J input = data::convert(hsl_f(), input_);
+ io::ppm::save(data::transform(input, hsl2rgb()), "input-hsl.ppm");
{
- I tmp = level::transform(input, hsl2rgb());
+ I tmp = data::transform(input, hsl2rgb());
image2d<int_u8> grad_hue;
initialize(grad_hue, input);
@@ -130,13 +130,13 @@
io::dump::save(wshed, "hsl2rgb_wshed.dump");
std::cout << "nbasins = " << nbasins << std::endl;
- io::pgm::save(level::transform(wshed, fun::v2v::wrap<int_u8>()),
+ io::pgm::save(data::transform(wshed, fun::v2v::wrap<int_u8>()),
"hsl2rgb_wshed.pgm");
- io::ppm::save(labeling::mean_values(level::transform(input, hsl2rgb()), wshed, nbasins),
+ io::ppm::save(labeling::mean_values(data::transform(input, hsl2rgb()), wshed, nbasins),
"hsl2rgb_wshed_mean_colors.ppm");
- I out = level::transform(input, hsl2rgb());
+ I out = data::transform(input, hsl2rgb());
io::ppm::save(out, "hsl2rgb_out.ppm");
}
Index: lazzara/igr/irm/wst_rag.cc
--- lazzara/igr/irm/wst_rag.cc (revision 3923)
+++ lazzara/igr/irm/wst_rag.cc (working copy)
@@ -11,7 +11,7 @@
#include <mln/accu/compute.hh>
#include <mln/core/alias/dpoint2d.hh>
#include <mln/draw/box.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/fun/v2v/id.hh>
#include <mln/core/image/line_graph_elt_neighborhood.hh>
#include <mln/morpho/elementary/dilation.hh>
@@ -92,7 +92,7 @@
convert::from_to(m_3f, m);
m[0] = literal::yellow;
- io::ppm::save(level::transform(w,
+ io::ppm::save(data::transform(w,
convert::to< fun::i2v::array<mln_value(I)> >(m)),
"wst_rag_wshd_color.ppm");
@@ -273,7 +273,7 @@
mln_invariant(f(0) == 0u);
--nbasins2; //nbasins2 does not count the basin with label 0.
std::cout << "nbasins2 = " << nbasins2 << std::endl;
- J wsd2 = level::transform(wsd, f);
+ J wsd2 = data::transform(wsd, f);
/// Reconstruct a graph from the simplified image.
Index: edwin/tree/tree.cc
--- edwin/tree/tree.cc (revision 3923)
+++ edwin/tree/tree.cc (working copy)
@@ -11,7 +11,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/pbm/save.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/morpho/tree/data.hh>
#include <mln/morpho/tree/compute_attribute_image.hh>
@@ -72,7 +72,7 @@
Accumulator<A> a_,
double lambda1,
double lambda2)
- : sorted_sites_(level::sort_psites_decreasing(exact(f_))),
+ : sorted_sites_(data::sort_psites_decreasing(exact(f_))),
tree_(exact(f_), sorted_sites_, c4())
{
mln_VAR(a, morpho::tree::compute_attribute_image(a_, tree_));
@@ -109,14 +109,14 @@
//debug::println(img | tree.nodes());
- N nodes = level::sort_psites_increasing(img);
+ N nodes = data::sort_psites_increasing(img);
mln_fwd_piter(N) n(nodes);
mln_fwd_piter(PS) p(pset), p_rm(ps_rm);
old = 0;
// FIXME: hack because we want iterate on nodes and we would
// have wanted to write:
- // N nodes = level::sort_psites_increasing(img | tree.nodes)
+ // N nodes = data::sort_psites_increasing(img | tree.nodes)
//
// but it doesn't work, so we iterate on domain regarding if n is
// a node.
Index: edwin/tree/propagation.cc
--- edwin/tree/propagation.cc (revision 3923)
+++ edwin/tree/propagation.cc (working copy)
@@ -15,7 +15,7 @@
#include <mln/io/pgm/load.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/morpho/tree/data.hh>
#include <../../theo/color/change_attributes.hh>
@@ -58,7 +58,7 @@
typedef p_array< mln_site_(I) > S;
typedef morpho::tree::data<I,S> tree_t;
- S sorted_sites = level::sort_psites_decreasing(input);
+ S sorted_sites = data::sort_psites_decreasing(input);
tree_t tree(input, sorted_sites, c4());
dsp("Input:");
Index: edwin/rush/leaves/test/export.cc
--- edwin/rush/leaves/test/export.cc (revision 3923)
+++ edwin/rush/leaves/test/export.cc (working copy)
@@ -30,7 +30,7 @@
#include <mln/core/alias/neighb2d.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/morpho/tree/data.hh>
#include "../export_leaves.hh"
@@ -51,7 +51,7 @@
4, 4, 4 };
I ima = make::image2d(vals);
- S s = level::sort_psites_decreasing(ima);
+ S s = data::sort_psites_decreasing(ima);
tree_t t(ima, s, c4());
export_leaves_to_file(t, ima);
Index: edwin/rush/leaves/get_leaves.cc
--- edwin/rush/leaves/get_leaves.cc (revision 3923)
+++ edwin/rush/leaves/get_leaves.cc (working copy)
@@ -2,7 +2,7 @@
#include <mln/core/alias/neighb2d.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/morpho/tree/data.hh>
#include <mln/morpho/tree/compute_attribute_image.hh>
@@ -47,7 +47,7 @@
// Tree Creation
typedef p_array<point2d> S;
typedef morpho::tree::data<I,S> tree_t;
- S s = level::sort_psites_decreasing(input);
+ S s = data::sort_psites_decreasing(input);
tree_t t(input, s, c4());
// Attribute pruning.
Index: edwin/rush/granulometry/test.cc
--- edwin/rush/granulometry/test.cc (revision 3923)
+++ edwin/rush/granulometry/test.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/io/pgm/load.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/morpho/tree/data.hh>
#include <mln/morpho/tree/compute_attribute_image.hh>
#include <mln/morpho/attribute/card.hh>
@@ -66,7 +66,7 @@
typedef p_array<point2d> S;
typedef morpho::tree::data<I,S> tree_t;
- S s = level::sort_psites_decreasing(input);
+ S s = data::sort_psites_decreasing(input);
tree_t tree(input, s, c4());
typedef mln_ch_value_(I, unsigned) A;
Index: edwin/rush/exo2/wst_from_closing.cc
--- edwin/rush/exo2/wst_from_closing.cc (revision 3923)
+++ edwin/rush/exo2/wst_from_closing.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/value/int_u16.hh>
#include <mln/value/rgb8.hh>
#include <mln/value/label_16.hh>
-#include <mln/level/convert.hh>
+#include <mln/data/convert.hh>
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
@@ -118,7 +118,7 @@
if (!output_ || output_ == 3)
{
typedef image2d<value::label_16> L;
- L lab = level::convert(value::label_16(),
+ L lab = data::convert(value::label_16(),
morpho::elementary::dilation(wst, c8()));
I_ out = color_labeling_mean(input_, lab, n_basins);
io::ppm::save(out, "mean.pgm");
Index: edwin/rush/exo2/test.cc
--- edwin/rush/exo2/test.cc (revision 3923)
+++ edwin/rush/exo2/test.cc (working copy)
@@ -4,7 +4,7 @@
#include <mln/morpho/tree/data.hh>
#include <mln/morpho/tree/compute_attribute_image.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/debug/println.hh>
#include <mln/convert/all.hh>
@@ -76,7 +76,7 @@
typedef p_array<point1d> S;
typedef morpho::tree::data<I,S> tree_t;
- S s = level::sort_psites_decreasing(input);
+ S s = data::sort_psites_decreasing(input);
tree_t t(input, s, c2());
Index: edwin/rush/exo2/wst_from_tree.cc
--- edwin/rush/exo2/wst_from_tree.cc (revision 3923)
+++ edwin/rush/exo2/wst_from_tree.cc (working copy)
@@ -43,7 +43,7 @@
#include "color_internal_gradient.hh"
/* Labeling */
-#include <mln/level/convert.hh>
+#include <mln/data/convert.hh>
#include "color_labeling_mean.hh"
/* WST */
@@ -52,7 +52,7 @@
#include <mln/morpho/elementary/dilation.hh>
/* Tree computation */
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/morpho/tree/data.hh>
#include <mln/morpho/tree/propagate.hh>
#include <mln/morpho/tree/propagate_if.hh>
@@ -70,7 +70,7 @@
#include <iostream>
#include <string>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/io/pgm/save.hh>
namespace mln
@@ -188,7 +188,7 @@
typedef p_array<point2d> S;
typedef morpho::tree::data<I,S> tree_t;
- S s = level::sort_psites_decreasing(input);
+ S s = data::sort_psites_decreasing(input);
tree_t t(input, s, c4());
@@ -218,7 +218,7 @@
/************************************************/
p_array< mln_psite_(A) > obj_array;
{
- //I output = level::stretch(int_u8(), a); //adapt to 0-255
+ //I output = data::stretch(int_u8(), a); //adapt to 0-255
//io::pgm::save(output, "components.pgm");
obj_array = morpho::tree::get_components(t, a);
@@ -258,7 +258,7 @@
if (!output_ || output_ == 3)
{
typedef image2d<value::label_16> L;
- L lab = level::convert(value::label_16(),
+ L lab = data::convert(value::label_16(),
morpho::elementary::dilation(wst, c8()));
I_ out = color_labeling_mean(input_, lab, n_basins);
io::ppm::save(out, "mean.pgm");
Index: edwin/rush/exo2/color_labeling_mean.hh
--- edwin/rush/exo2/color_labeling_mean.hh (revision 3923)
+++ edwin/rush/exo2/color_labeling_mean.hh (working copy)
@@ -33,7 +33,7 @@
# include <mln/labeling/compute.hh>
# include <mln/accu/mean.hh>
-# include <mln/level/transform.hh>
+# include <mln/data/transform.hh>
# include <mln/value/label_8.hh>
# include <mln/value/int_u16.hh>
@@ -62,7 +62,7 @@
c[l].blue() = m[l][2];
}
- return level::transform(label, c);
+ return data::transform(label, c);
}
} // mln
Index: edwin/tests/sharp.cc
--- edwin/tests/sharp.cc (revision 3923)
+++ edwin/tests/sharp.cc (working copy)
@@ -7,7 +7,7 @@
/* Site set */
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
/* Component trees */
#include <mln/morpho/tree/data.hh>
@@ -32,7 +32,7 @@
#include <mln/pw/all.hh>
/* level */
-//#include <mln/level/stretch.hh>
+//#include <mln/data/stretch.hh>
/* label */
#include <mln/labeling/blobs.hh>
@@ -209,7 +209,7 @@
typedef p_array< mln_site_(I) > S;
typedef morpho::tree::data<I,S> tree_t;
- S sorted_sites = level::sort_psites_decreasing(input);
+ S sorted_sites = data::sort_psites_decreasing(input);
tree_t tree(input, sorted_sites, c4());
@@ -276,7 +276,7 @@
// Note: now we must propagate the representant value to the other components sites.
//a = morpho::tree::propagate_components(a, tree, obj_array, 0);
- //I output = level::stretch(int_u8(), a); //adapt to 0-255
+ //I output = data::stretch(int_u8(), a); //adapt to 0-255
//io::pgm::save(output, "components.pgm");
Index: camille/graph-wst.cc
--- camille/graph-wst.cc (revision 3923)
+++ camille/graph-wst.cc (working copy)
@@ -60,7 +60,7 @@
#include <mln/morpho/line_gradient.hh>
#include <mln/morpho/closing_area_on_vertices.hh>
#include <mln/morpho/meyer_wst.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/value/int_u8.hh>
#include <mln/value/int_u16.hh>
Index: camille/graph-line-gradient-closing.cc
--- camille/graph-line-gradient-closing.cc (revision 3923)
+++ camille/graph-line-gradient-closing.cc (working copy)
@@ -60,7 +60,7 @@
#include <mln/morpho/line_gradient.hh>
#include <mln/morpho/closing_area_on_vertices.hh>
#include <mln/morpho/meyer_wst.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/value/int_u8.hh>
#include <mln/value/int_u16.hh>
Index: vigouroux/convert/stretch.hh
--- vigouroux/convert/stretch.hh (revision 3923)
+++ vigouroux/convert/stretch.hh (working copy)
@@ -134,7 +134,7 @@
** \code
** #include <oln/basics2d.hh>
** #include <oln/convert/stretch.hh>
- ** #include <oln/level/cc.hh>
+ ** #include <oln/data/cc.hh>
** #include <ntg/all.hh>
** #include <iostream>
**
@@ -145,7 +145,7 @@
** //Extraction of the connected components:
** unsigned card;
** oln::image2d<ntg::int_u8> cc
- ** = oln::level::frontp_connected_component<ntg::int_u8>(light,
+ ** = oln::data::frontp_connected_component<ntg::int_u8>(light,
** oln::neighb_c8(),
** card);
** oln::io::save(cc, IMG_OUT "oln_convert_stretch_dark.pgm");
Index: vigouroux/yuv/test.cc
--- vigouroux/yuv/test.cc (revision 3923)
+++ vigouroux/yuv/test.cc (working copy)
@@ -9,7 +9,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/math/round.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
int main()
{
@@ -19,10 +19,10 @@
io::ppm::load(lena, "../../../img/lena.ppm");
image2d< value::yuv_<float, float, float> > lena_hsi
- = level::transform(lena,
+ = data::transform(lena,
fun::v2v::f_rgb_to_yuv_f());
- image2d<value::rgb8> lena_rgb = level::transform(lena_hsi,
+ image2d<value::rgb8> lena_rgb = data::transform(lena_hsi,
fun::v2v::f_yuv_to_rgb_3x8);
}
Index: vigouroux/yuv/testfun.cc
--- vigouroux/yuv/testfun.cc (revision 3923)
+++ vigouroux/yuv/testfun.cc (working copy)
@@ -9,7 +9,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/math/round.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include "fun.hh"
@@ -22,9 +22,9 @@
mln::image2d<mln::value::rgb8> lena;
mln::io::ppm::load(lena, "../../../img/lena.ppm");
- mln::image2d<mln::value::yuv_d> lena_yuv = mln::level::transform(lena,
+ mln::image2d<mln::value::yuv_d> lena_yuv = mln::data::transform(lena,
mln::fun::v2v::f_rgb_to_yuv_d());
- mln::image2d<mln::value::rgb8> lena_rgb = mln::level::transform(lena_yuv,
+ mln::image2d<mln::value::rgb8> lena_rgb = mln::data::transform(lena_yuv,
f_yuv_3x8);
}
Index: vigouroux/cmy/test.cc
--- vigouroux/cmy/test.cc (revision 3923)
+++ vigouroux/cmy/test.cc (working copy)
@@ -9,7 +9,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/math/round.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
int main()
{
@@ -19,10 +19,10 @@
io::ppm::load(lena, "../../../img/lena.ppm");
image2d< value::cmy_<float, float, float> > lena_hsi
- = level::transform(lena,
+ = data::transform(lena,
fun::v2v::f_rgb_to_cmy_f());
- image2d<value::rgb8> lena_rgb = level::transform(lena_hsi,
+ image2d<value::rgb8> lena_rgb = data::transform(lena_hsi,
fun::v2v::f_cmy_to_rgb_3x8);
}
Index: vigouroux/cmy/testfun.cc
--- vigouroux/cmy/testfun.cc (revision 3923)
+++ vigouroux/cmy/testfun.cc (working copy)
@@ -9,7 +9,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/math/round.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include "fun.hh"
@@ -22,9 +22,9 @@
mln::image2d<mln::value::rgb8> lena;
mln::io::ppm::load(lena, "../../../img/lena.ppm");
- mln::image2d<mln::value::cmy_d> lena_cmy = mln::level::transform(lena,
+ mln::image2d<mln::value::cmy_d> lena_cmy = mln::data::transform(lena,
mln::fun::v2v::f_rgb_to_cmy_d());
- mln::image2d<mln::value::rgb8> lena_rgb = mln::level::transform(lena_cmy,
+ mln::image2d<mln::value::rgb8> lena_rgb = mln::data::transform(lena_cmy,
f_cmy_3x8);
}
Index: vigouroux/xyz/test.cc
--- vigouroux/xyz/test.cc (revision 3923)
+++ vigouroux/xyz/test.cc (working copy)
@@ -9,7 +9,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/math/round.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
int main()
{
@@ -19,10 +19,10 @@
io::ppm::load(lena, "../../../img/lena.ppm");
image2d< value::xyz_<float, float, float> > lena_hsi
- = level::transform(lena,
+ = data::transform(lena,
fun::v2v::f_rgb_to_xyz_f_t());
-// image2d<value::rgb8> lena_rgb = level::transform(lena_hsi,
+// image2d<value::rgb8> lena_rgb = data::transform(lena_hsi,
// fun::v2v::f_xyz_to_rgb_3x8);
}
Index: vigouroux/xyz/testfun.cc
--- vigouroux/xyz/testfun.cc (revision 3923)
+++ vigouroux/xyz/testfun.cc (working copy)
@@ -9,7 +9,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/math/round.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include "rgb_to_xyz.hh"
#include "get_red.hh"
@@ -23,9 +23,9 @@
mln::image2d<mln::value::rgb8> lena;
mln::io::ppm::load(lena, "../../../img/lena.ppm");
- mln::image2d<mln::value::xyz_f> lena_xyz = mln::level::transform(lena,
+ mln::image2d<mln::value::xyz_f> lena_xyz = mln::data::transform(lena,
mln::fun::v2v::f_rgb_to_xyz_f_t());
- mln::image2d<mln::value::rgb8> lena_rgb = mln::level::transform(lena_xyz,
+ mln::image2d<mln::value::rgb8> lena_rgb = mln::data::transform(lena_xyz,
f_xyz_get_red ());
}
Index: vigouroux/moyenne.cc
--- vigouroux/moyenne.cc (revision 3923)
+++ vigouroux/moyenne.cc (working copy)
@@ -9,7 +9,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/math/round.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
@@ -51,10 +51,10 @@
image2d<value::rgb8> lena;
io::ppm::load(lena, "../../img/lena.ppm");
- image2d<value::hsi_f> lena_hsi = level::transform(lena,
+ image2d<value::hsi_f> lena_hsi = data::transform(lena,
fun::v2v::f_rgb_to_hsi_f);
- image2d<value::rgb8> lena_rgb = level::transform(lena_hsi,
+ image2d<value::rgb8> lena_rgb = data::transform(lena_hsi,
fun::v2v::f_hsi_to_rgb_3x8);
double err = rms(lena, lena_rgb);
Index: vigouroux/lap.cc
--- vigouroux/lap.cc (revision 3923)
+++ vigouroux/lap.cc (working copy)
@@ -16,7 +16,7 @@
#include <mln/value/hsi.hh>
#include <mln/fun/v2v/rgb_to_hsi.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <iostream>
@@ -39,7 +39,7 @@
image2d<value::hsi_f> reshsi(tmp.domain());
gradation2(tmp, reshsi);
- image2d<value::rgb8> resrgb = level::transform(reshsi,
+ image2d<value::rgb8> resrgb = data::transform(reshsi,
fun::v2v::f_hsi_to_rgb_3x8);
Index: vigouroux/yiq/test.cc
--- vigouroux/yiq/test.cc (revision 3923)
+++ vigouroux/yiq/test.cc (working copy)
@@ -9,7 +9,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/math/round.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
int main()
{
@@ -19,10 +19,10 @@
io::ppm::load(lena, "../../../img/lena.ppm");
image2d< value::yiq_<double, double, double> > lena_hsi
- = level::transform(lena,
+ = data::transform(lena,
fun::v2v::f_rgb_to_yiq_d());
- image2d<value::rgb8> lena_rgb = level::transform(lena_hsi,
+ image2d<value::rgb8> lena_rgb = data::transform(lena_hsi,
fun::v2v::f_yiq_to_rgb_3x8);
}
Index: vigouroux/yiq/testfun.cc
--- vigouroux/yiq/testfun.cc (revision 3923)
+++ vigouroux/yiq/testfun.cc (working copy)
@@ -9,7 +9,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/math/round.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include "get_red.hh"
@@ -22,9 +22,9 @@
mln::image2d<mln::value::rgb8> lena;
mln::io::ppm::load(lena, "../../../img/lena.ppm");
- mln::image2d<mln::value::yiq_d> lena_yiq = mln::level::transform(lena,
+ mln::image2d<mln::value::yiq_d> lena_yiq = mln::data::transform(lena,
mln::fun::v2v::f_rgb_to_yiq_d());
- mln::image2d<mln::value::rgb8> lena_rgb = mln::level::transform(lena_yiq,
+ mln::image2d<mln::value::rgb8> lena_rgb = mln::data::transform(lena_yiq,
f_yiq_3x8);
}
Index: vigouroux/load.cc
--- vigouroux/load.cc (revision 3923)
+++ vigouroux/load.cc (working copy)
@@ -9,7 +9,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/math/round.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/core/alias/w_window2d_float.hh>
#include <mln/border/thickness.hh>
Index: vigouroux/conv/test.cc
--- vigouroux/conv/test.cc (revision 3923)
+++ vigouroux/conv/test.cc (working copy)
@@ -10,7 +10,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/math/round.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
int main(void)
@@ -25,9 +25,9 @@
io::ppm::load(lena, "../../../img/lena.ppm");
image2d<value::hsi_f> lena_hsi =
- level::transform(lena, fun::v2v::f_rgb_to_<value::hsi_f> ());
+ data::transform(lena, fun::v2v::f_rgb_to_<value::hsi_f> ());
image2d<value::rgb8> lena_rgb =
- level::transform(lena_hsi, fun::v2v::f_to_rgb_< value::rgb<8> > ());
+ data::transform(lena_hsi, fun::v2v::f_to_rgb_< value::rgb<8> > ());
}
Index: vigouroux/testfun.cc
--- vigouroux/testfun.cc (revision 3923)
+++ vigouroux/testfun.cc (working copy)
@@ -9,7 +9,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/math/round.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include "function.hh"
#include "yuv/my_yuv.hh"
@@ -24,9 +24,9 @@
mln::image2d<mln::value::rgb8> lena;
mln::io::ppm::load(lena, "../../img/lena.ppm");
- mln::image2d<mln::value::yuv_f> lena_hsi = mln::level::transform(lena,
+ mln::image2d<mln::value::yuv_f> lena_hsi = mln::data::transform(lena,
mln::fun::v2v::f_rgb_to_yuv_f());
- mln::image2d<mln::value::rgb8> lena_rgb = mln::level::transform(lena_hsi,
+ mln::image2d<mln::value::rgb8> lena_rgb = mln::data::transform(lena_hsi,
f_get_red_<mln::value::rgb8>());
}
Index: folio/test/histo/compute_histo_rgb_from_ppm.cc
--- folio/test/histo/compute_histo_rgb_from_ppm.cc (revision 3923)
+++ folio/test/histo/compute_histo_rgb_from_ppm.cc (working copy)
@@ -8,7 +8,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include "../../mln/histo/compute_histo_rgb.hh"
Index: folio/test/histo/projected3d.cc
--- folio/test/histo/projected3d.cc (revision 3923)
+++ folio/test/histo/projected3d.cc (working copy)
@@ -7,8 +7,8 @@
#include <mln/core/image/dmorph/image_if.hh>
#include <mln/pw/value.hh>
-#include <mln/level/transform.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/transform.hh>
+#include <mln/data/stretch.hh>
#include <mln/arith/revert.hh>
#include <mln/core/alias/neighb3d.hh>
@@ -80,7 +80,7 @@
std::cout << " => loading " << argv[1] << "..." << std::endl;
image2d<value::rgb8> ima;
io::ppm::load(ima, argv[1]);
-// image2d<rgb6> ima6 = level::transform(ima, rgb8to6());
+// image2d<rgb6> ima6 = data::transform(ima, rgb8to6());
std::cout << " => computing histogram..." << std::endl;
image3d<unsigned> histo = histo::compute_histo_rgb<unsigned>(ima); // 6);
@@ -99,8 +99,8 @@
h );
image2d<float> h_2d = accu::image::to_result(h_2d_a);
- io::pgm::save( level::stretch( int_u8(),
- level::transform( h_2d,
+ io::pgm::save( data::stretch( int_u8(),
+ data::transform( h_2d,
take_log() ) ),
"h_2d.pgm" );
}
Index: folio/test/histo/classify_with_histo_rgb.cc
--- folio/test/histo/classify_with_histo_rgb.cc (revision 3923)
+++ folio/test/histo/classify_with_histo_rgb.cc (working copy)
@@ -24,7 +24,7 @@
#include "../../mln/histo/compute_histo_rgb.hh"
#include "../../mln/histo/classify_with_histo_rgb.hh"
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
namespace mln
{
@@ -60,7 +60,7 @@
std::cout << " => loading " << argv[1] << "..." << std::endl;
image2d<value::rgb8> lena;
io::ppm::load(lena, argv[1]);
- image2d<rgb6> ima = level::transform(lena, rgb8to6());
+ image2d<rgb6> ima = data::transform(lena, rgb8to6());
// let's run !
std::cout << " => computing histogram..." << std::endl;
Index: folio/test/dt/psn.cc
--- folio/test/dt/psn.cc (revision 3923)
+++ folio/test/dt/psn.cc (working copy)
@@ -159,7 +159,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/value/int_u8.hh>
#include <mln/core/image/dmorph/sub_image.hh>
@@ -198,7 +198,7 @@
// image2d<bool> ima = io::pbm::load("../../img/c01.pbm");
// image2d<value::int_u8> out2(out.domain());
-// level::stretch(out, out2);
+// data::stretch(out, out2);
// io::pgm::save(out2, "out.pgm");
}
Index: folio/test/dt/psn_log.cc
--- folio/test/dt/psn_log.cc (revision 3923)
+++ folio/test/dt/psn_log.cc (working copy)
@@ -245,7 +245,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/value/int_u8.hh>
#include <mln/core/image/dmorph/sub_image.hh>
@@ -284,7 +284,7 @@
// image2d<bool> ima = io::pbm::load("../../img/c01.pbm");
// image2d<value::int_u8> out2(out.domain());
-// level::stretch(out, out2);
+// data::stretch(out, out2);
// io::pgm::save(out2, "out.pgm");
}
Index: folio/test/dt/dt_maze.cc
--- folio/test/dt/dt_maze.cc (revision 3923)
+++ folio/test/dt/dt_maze.cc (working copy)
@@ -13,7 +13,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/io/pbm/save.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/data/paste.hh>
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
Index: folio/test/dt/chamfer.cc
--- folio/test/dt/chamfer.cc (revision 3923)
+++ folio/test/dt/chamfer.cc (working copy)
@@ -7,7 +7,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/value/int_u8.hh>
#include "../dt/chamfer.hh"
@@ -44,7 +44,7 @@
out = dt::chamfer(ima, chamfer);
image2d<value::int_u8> out2(out.first.domain());
- level::stretch(out.first, out2);
+ data::stretch(out.first, out2);
io::pgm::save(out2, "out.pgm");
Index: folio/test/dt/dt_bench.cc
--- folio/test/dt/dt_bench.cc (revision 3923)
+++ folio/test/dt/dt_bench.cc (working copy)
@@ -12,7 +12,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/data/paste.hh>
#include <mln/value/int_u8.hh>
@@ -46,7 +46,7 @@
out = dt::raw_dmap_fast(ima, make::w_window2d(ws), 666666);
image2d<value::int_u8> out2(out.domain());
- level::stretch(out, out2);
+ data::stretch(out, out2);
io::pgm::save(out2, "out.pgm");
}
Index: folio/test/dt/dt.cc
--- folio/test/dt/dt.cc (revision 3923)
+++ folio/test/dt/dt.cc (working copy)
@@ -12,7 +12,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/data/paste.hh>
#include <mln/value/int_u8.hh>
Index: folio/test/value/hsv.cc
--- folio/test/value/hsv.cc (revision 3923)
+++ folio/test/value/hsv.cc (working copy)
@@ -2,7 +2,7 @@
#include <mln/io/ppm/save.hh>
#include <mln/debug/println.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/core/image/image2d.hh>
#include "../../mln/fun/v2v/rgb_to_hsv.hh"
#include "../../mln/value/circular.hh"
@@ -23,9 +23,9 @@
image2d<value::rgb8> ima;
io::ppm::load(ima, argv[1]);
- image2d<hsv_16f> hsv = level::transform(ima,
+ image2d<hsv_16f> hsv = data::transform(ima,
fun::v2v::f_rgb_to_hsv_16f);
- ima = level::transform(hsv,
+ ima = data::transform(hsv,
fun::v2v::f_hsv_to_rgb_8f);
std::cout << " => saving " << argv[2] << "..." << std::endl;
Index: folio/mln/dt/dt_old/psn.cc
--- folio/mln/dt/dt_old/psn.cc (revision 3923)
+++ folio/mln/dt/dt_old/psn.cc (working copy)
@@ -159,7 +159,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/value/int_u8.hh>
#include <mln/core/image/dmorph/sub_image.hh>
@@ -198,7 +198,7 @@
// image2d<bool> ima = io::pbm::load("../../img/c01.pbm");
// image2d<value::int_u8> out2(out.domain());
-// level::stretch(out, out2);
+// data::stretch(out, out2);
// io::pgm::save(out2, "out.pgm");
}
Index: folio/mln/dt/dt_old/psn_log.cc
--- folio/mln/dt/dt_old/psn_log.cc (revision 3923)
+++ folio/mln/dt/dt_old/psn_log.cc (working copy)
@@ -245,7 +245,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/value/int_u8.hh>
#include <mln/core/image/dmorph/sub_image.hh>
@@ -284,7 +284,7 @@
// image2d<bool> ima = io::pbm::load("../../img/c01.pbm");
// image2d<value::int_u8> out2(out.domain());
-// level::stretch(out, out2);
+// data::stretch(out, out2);
// io::pgm::save(out2, "out.pgm");
}
Index: folio/mln/dt/dt_old/distance_front.cc
--- folio/mln/dt/dt_old/distance_front.cc (revision 3923)
+++ folio/mln/dt/dt_old/distance_front.cc (working copy)
@@ -38,7 +38,7 @@
#include <mln/data/fill.hh>
#include <mln/debug/println.hh>
#include <mln/opt/at.hh>
-#include <mln/level/compare.hh>
+#include <mln/data/compare.hh>
#include <mln/transform/internal/distance_functor.hh>
#include "distance_front_new.hh"
Index: folio/mln/dt/dt_old/chamfer.cc
--- folio/mln/dt/dt_old/chamfer.cc (revision 3923)
+++ folio/mln/dt/dt_old/chamfer.cc (working copy)
@@ -163,7 +163,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/value/int_u8.hh>
int main()
@@ -198,7 +198,7 @@
out = dt::chamfer(ima, chamfer);
image2d<value::int_u8> out2(out.first.domain());
- level::stretch(out.first, out2);
+ data::stretch(out.first, out2);
io::pgm::save(out2, "out.pgm");
Index: folio/mln/dt/dt_old/dt.cc
--- folio/mln/dt/dt_old/dt.cc (revision 3923)
+++ folio/mln/dt/dt_old/dt.cc (working copy)
@@ -12,7 +12,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/value/int_u8.hh>
#include <mln/core/image/dmorph/sub_image.hh>
@@ -53,7 +53,7 @@
// image2d<bool> ima = io::pbm::load("../../img/c01.pbm");
// image2d<value::int_u8> out2(out.domain());
-// level::stretch(out, out2);
+// data::stretch(out, out2);
// io::pgm::save(out2, "out.pgm");
}
Index: beguin/irm_g.cc
--- beguin/irm_g.cc (revision 3923)
+++ beguin/irm_g.cc (working copy)
@@ -14,7 +14,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/convert/to_window.hh>
#include <mln/convert/to_image.hh>
@@ -25,7 +25,7 @@
#include <mln/morpho/meyer_wst.hh>
#include <mln/accu/mean.hh>
-#include <mln/level/take.hh>
+#include <mln/data/take.hh>
#include <mln/util/graph.hh>
@@ -56,7 +56,7 @@
// if (lbl(p) == 82)
// m.take(irm(p));
-// level::take(irm | (pw::value(lbl) == pw::cst(82)), m);
+// data::take(irm | (pw::value(lbl) == pw::cst(82)), m);
// std::cout << "reg 82 has mean = " << m << std::endl;
}
@@ -175,7 +175,7 @@
unsigned nbasins;
image2d<unsigned> wshed = morpho::meyer_wst(clo, c4(), nbasins);
std::cout << "nbasins = " << nbasins << std::endl;
- io::pgm::save( level::transform(wshed, convert::to_fun(foo)),
+ io::pgm::save( data::transform(wshed, convert::to_fun(foo)),
"tmp_wshed.pgm" );
// doit(irm, wshed, nbasins);
Index: beguin/segm_to_pregraph.hh
--- beguin/segm_to_pregraph.hh (revision 3923)
+++ beguin/segm_to_pregraph.hh (working copy)
@@ -59,7 +59,7 @@
}
}
//io::pgm::save(retour, "tmp_pregraphe.pgm");
- io::pgm::save( level::transform(retour, convert::to_fun(foo)),
+ io::pgm::save( data::transform(retour, convert::to_fun(foo)),
"tmp_pregraph.pgm" );
//return retour;
}
Index: beguin/irm.cc
--- beguin/irm.cc (revision 3923)
+++ beguin/irm.cc (working copy)
@@ -23,7 +23,7 @@
#include <mln/value/rgb8.hh>
#include <mln/literal/colors.hh>
-#include <mln/level/transform.hh>
+#include <mln/data/transform.hh>
#include <mln/convert/to_window.hh>
#include <mln/convert/to_image.hh>
@@ -34,7 +34,7 @@
#include <mln/morpho/meyer_wst.hh>
#include <mln/accu/mean.hh>
-#include <mln/level/take.hh>
+#include <mln/data/take.hh>
#include <mln/util/graph.hh>
@@ -76,7 +76,7 @@
}
}
- io::pgm::save(level::transform(carte, convert::to_fun(foo)),
+ io::pgm::save(data::transform(carte, convert::to_fun(foo)),
"tmp_region_10.pgm");
}
@@ -94,7 +94,7 @@
// if (lbl(p) == 82)
// m.take(irm(p));
-// level::take(irm | (pw::value(lbl) == pw::cst(82)), m);
+// data::take(irm | (pw::value(lbl) == pw::cst(82)), m);
// std::cout << "reg 82 has mean = " << m << std::endl;
// }
@@ -177,7 +177,7 @@
// for (unsigned i = 0; i <= nlabels; ++i)
// {
// accu::mean_<unsigned> m;
-// level::take(irm | (pw::value(lbl) == pw::cst(i)), m);
+// data::take(irm | (pw::value(lbl) == pw::cst(i)), m);
// g.add_vertex(m.to_result());
// }
// // Edges.
@@ -246,7 +246,7 @@
for (unsigned i = 0; i <= nlabels; ++i)
{
accu::mean_<mln_value(J)> m;
- level::take(input | (pw::value(label) == pw::cst(i)), m);
+ data::take(input | (pw::value(label) == pw::cst(i)), m);
g.add_vertex(m);
}
// Edges.
@@ -478,7 +478,7 @@
unsigned nbasins;
image2d<unsigned> wshed = morpho::meyer_wst(clo, c4(), nbasins);
std::cout << "nbasins = " << nbasins << std::endl;
- io::pgm::save( level::transform(wshed, convert::to_fun(foo)),
+ io::pgm::save( data::transform(wshed, convert::to_fun(foo)),
"tmp_wshed.pgm" );
//typedef fusion_graph<unsigned int, void> _fg;
Index: laurent/ismm2009.cc
--- laurent/ismm2009.cc (revision 3923)
+++ laurent/ismm2009.cc (working copy)
@@ -16,7 +16,7 @@
# include <mln/core/site_set/p_queue.hh>
# include <mln/core/site_set/p_priority.hh>
-#include <mln/level/stretch.hh>
+#include <mln/data/stretch.hh>
#include <mln/labeling/compute.hh>
#include <mln/accu/count.hh>
@@ -1099,7 +1099,7 @@
image2d<A> output(f_.domain());
data::fill(output, 0);
data::paste(aa_line, output);
- io::pgm::save(level::stretch(int_u8(), output),
+ io::pgm::save(data::stretch(int_u8(), output),
argv[3]);
// image2d<int_u8> output(f_.domain());
Index: laurent/playing_with_attributes.cc
--- laurent/playing_with_attributes.cc (revision 3923)
+++ laurent/playing_with_attributes.cc (working copy)
@@ -14,7 +14,7 @@
#include <mln/labeling/regional_minima.hh>
#include <mln/core/site_set/p_array.hh>
-#include <mln/level/sort_psites.hh>
+#include <mln/data/sort_psites.hh>
#include <mln/geom/nsites.hh>
#include <mln/accu/count.hh>
@@ -127,7 +127,7 @@
node_only.t = &t;
typedef p_array<P> S;
- S s = level::sort_psites_increasing(a | node_only);
+ S s = data::sort_psites_increasing(a | node_only);
mln_invariant(geom::nsites(a | t.nodes()) == s.nsites());
@@ -280,7 +280,7 @@
node_only.t = &t;
typedef p_array<P> S;
- S s = level::sort_psites_increasing(a | node_only);
+ S s = data::sort_psites_increasing(a | node_only);
mln_invariant(geom::nsites(a | t.nodes()) == s.nsites());
mln_fwd_piter(S) p(s);
@@ -320,7 +320,7 @@
{
typedef p_array<mln_site(I)> S;
- S s = level::sort_psites_decreasing(g);
+ S s = data::sort_psites_decreasing(g);
typedef morpho::tree::data<I,S> tree_t;
tree_t t(g, s, nbh);
Index: delmon/minsurf/main.cc
--- delmon/minsurf/main.cc (revision 3923)
+++ delmon/minsurf/main.cc (working copy)
@@ -160,12 +160,12 @@
io::pgm::load (in, file_in);
image2d<float> g;
- g = level::transform(morpho::gradient(in, win_c4p()), g_functor(0));
+ g = data::transform(morpho::gradient(in, win_c4p()), g_functor(0));
image2d<value::int_u8> fseeds;
io::pgm::load (fseeds, file_seeds);
- image2d<bool> seeds = level::transform(in, fseeds, seeds_functor());
+ image2d<bool> seeds = data::transform(in, fseeds, seeds_functor());
//image2d<point2d> closest = transform::closest_point_geodesic(seeds, c4(),
// value:: int_u8(std::max(in.nrows(),
// in.ncols())));
1
0
* tests/tools/pretty_check.sh: make the C++ compiler depend on
autotools variables.
Introduce TEST_CXX to force the use of a specific compiler.
---
milena/ChangeLog | 8 ++++++++
milena/tests/tools/pretty_check.sh | 11 +++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index aeba29c..538f285 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,13 @@
2009-05-29 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+ Improve pretty check.
+
+ * tests/tools/pretty_check.sh: make the C++ compiler depend on
+ autotools variables.
+ Introduce TEST_CXX to force the use of a specific compiler.
+
+2009-05-29 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
* tests/img/tiny.png: add a test image.
2009-05-29 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
diff --git a/milena/tests/tools/pretty_check.sh b/milena/tests/tools/pretty_check.sh
index d73820b..2bb6044 100755
--- a/milena/tests/tools/pretty_check.sh
+++ b/milena/tests/tools/pretty_check.sh
@@ -40,6 +40,10 @@
# - tests.html, the formated test suite results.
#
#
+# Useful Global variables to know:
+# - TEST_DIR Run the tests only in this directory.
+# - TEST_CXX Use a specific compiler.
+#
#
#
# _WARNING_: be aware of the fact this script run a make clean in the
@@ -66,6 +70,9 @@ if [ -z "$base_make_path" ]; then
fi
fi
+if [ -z "$TEST_CXX" ]; then
+ TEST_CXX="$CXX"
+fi
gcc_wrapper="$PWD/$output_directory/gcc-wrapper.sh"
@@ -320,7 +327,7 @@ done
name=\`basename \$file .o\`
# Compile and log the compilation output.
-g++ 2>\$name.comp.log \$@
+$TEST_CXX 2>\$name.comp.log \$@
EOF
chmod +x "$gcc_wrapper"
@@ -399,7 +406,7 @@ main()
# Cleanup temporary files.
cleanup_tmp_files
- cleanup_gcc_wrapper
+# cleanup_gcc_wrapper
}
main
--
1.5.6.5
1
0
* Makefile.am: change box_piter.i to box_piter.ixx.
---
swilena/ChangeLog | 6 ++++++
swilena/Makefile.am | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/swilena/ChangeLog b/swilena/ChangeLog
index ee39aa4..1de5c61 100644
--- a/swilena/ChangeLog
+++ b/swilena/ChangeLog
@@ -1,3 +1,9 @@
+2009-05-29 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ Fix swilena distributed file list.
+
+ * Makefile.am: change box_piter.i to box_piter.ixx.
+
2009-05-27 Roland Levillain <roland(a)lrde.epita.fr>
Update dates in Swilena's copyright headers.
diff --git a/swilena/Makefile.am b/swilena/Makefile.am
index 2e08041..b0dfffb 100644
--- a/swilena/Makefile.am
+++ b/swilena/Makefile.am
@@ -5,7 +5,7 @@ SUBDIRS = python
# Meta-wrappers (templates), not generating a module, but factoring
# common parts.
meta_wrappers = \
- box_piter.i ch_value.ixx concat.ixx concrete.ixx fill.ixx \
+ box_piter.ixx ch_value.ixx concat.ixx concrete.ixx fill.ixx \
image2d.ixx intp.ixx int_u.ixx morpho.ixx pgm.ixx println.ixx \
python-utils.ixx
--
1.5.6.5
1
0
---
milena/ChangeLog | 4 ++++
milena/tests/img/tiny.png | Bin 0 -> 850 bytes
2 files changed, 4 insertions(+), 0 deletions(-)
create mode 100644 milena/tests/img/tiny.png
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 1a8d899..aeba29c 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-29 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ * tests/img/tiny.png: add a test image.
+
2009-05-29 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix many warnings and errors in test files.
diff --git a/milena/tests/img/tiny.png b/milena/tests/img/tiny.png
new file mode 100644
index 0000000000000000000000000000000000000000..f578c7d8429831c5674c3c5d5b18dd03d2b60fff
GIT binary patch
literal 850
zcmV-Y1FigtP)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00009a7bBm0000;
z0000;07l7cJ^%m!33hNnX8-^I5C8xG5CB}pt-}BS0<}p*K~yNu1;N{H8$}oZ;Q9X<
zPj<cQU1xntaZ~5e64VORB7~57fw({w7nKmF$KWX{-i4dqlnVqZ2%)BGrB=|&sTC46
z)N$&>@p(5phn<;zAH2Euqc!H)-*1yDizA-`SVtTXYn{+8sE0`%ozG{2%zNj1{UxF+
zpwPC^U>s4#SXxA@ZsUqu320&ULK%g{C~K}qFZ;_Uy(u2P9075nAgXXmo0+r)((+b2
z`S#1awMMKx>!%>?tB0?j?@!z737(Fmb<9~u5QQO}GsY<6E0mTtf4D=cVecfBovXj>
z4#Ti~_p2RNE)mM11lEg~%?t(f<G{^RZLIZ!)!Vmjf5A&pWtRW`^_`ud%os&P2G$XW
zkhIIWpz}d`e4wRMAAi2#zgJ(LO#Z#Ud$|>FT}zBJNB{uPI+C4T&}w`>wGVdR?mj)J
zZ8VwB2T%Un`{Tu<husf9S_2OqAXCN>q{vD>XGi;s-@0io^*7($sFAFidp4lIc86Zs
z-`uX|qR`T@i(Dgx6||>b^8AQsr0?(eu~Daoi#oW+fAva?uD2r!R!K_(jwdti9MN8*
zJE<+^<62q8AxoC&t?PAgWcyNuf!W%ORY7<Kwm+#MV+g>qT;*BTywqIZZXCSmyDXE#
zu~y=r|7RuY+U-ymw$TYNs9{<Vhd4Lj7`@WD+}k_Ogzg@XjnL^-_4?z`qu{LwM|e^r
zg<x2%7;VReF*-dHE##Hl<|73XvHU^pGjj9da4;EW%S<|v{ruA-q>Tib9ZweN?0j){
z9yS{hht4YZKzTC1`~9b_Yb_p@c5c=OPhSVf5RjO{FaRY*F4EDPK_|va#Y1PzbRlQU
z%^Mp>2P2=${l~|X++xy<q$NU|FkZDvP?=qA@J0y0C{a=mN6}it3H9pF{ve|ZW!?b?
zO@D)P{*xI1001s@MObuWZ*6U5Zgc=3LsCUSR8LYmAV*0}P#{oFO&~^TY;<LEAXa5^
cb7^mGATcg63OMEBmjD0&07*qoM6N<$f_l$|#Q*>R
literal 0
HcmV?d00001
--
1.5.6.5
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix many warnings and errors in test files.
* mln/core/image/imorph/labeled_image.hh: Fix doc.
* mln/accu/all.hh
(count_adjacent_vertices): Use de-activation notation.
(tuple): De-activate.
* mln/value/ops.hh
(operator==): New overloads for a couple of scalars, resp.
int and unsigned; fix warnings.
(operator): Fix missing declarations.
* mln/value/scalar.hh: Upgrade doc style.
* mln/value/int_s.hh: Fix warnings.
* mln/value/internal/gray_.hh: Fix warning.
* mln/value/internal/gray_f.hh: Fix warnings.
Fix ending guard.
* mln/set/compute_with_weights.hh: Fix warnings.
* mln/util/adjacency_matrix.hh: Fix warnings.
* tests/arith/times_full.cc: Fix missing includes; layout.
* tests/arith/plus_full.cc: Fix missing includes; layout.
* tests/arith/revert_full.cc: Fix missing include.
* tests/data/paste.cc (include): Fix typo.
* tests/accu/all_accus.cc: Upgrade doc style.
* tests/accu/count.cc: Fix warnings.
* tests/value/rgb_full.cc: Upgrade doc style.
* tests/value/int_u8.cc: Fix warnings.
* tests/value/float01.cc: Remove useless dependencies.
Revamp.
Fix warnings.
* tests/value/graylevel_f.cc,
* tests/value/graylevel_full.cc,
* tests/value/graylevel_f_full.cc: Fix ambiguities with g++-4.2.
Upgrade doc style.
* tests/value/graylevel.cc: Upgrade doc style.
* tests/convert/to_hsl.cc: De-activate code since it relies
on de-activated code.
* tests/morpho/artificial_line_graph_image_wst.cc: Fix typo.
* tests/morpho/lena_line_graph_image_wst1.cc: Fix warning.
mln/accu/all.hh | 4 -
mln/core/image/imorph/labeled_image.hh | 13 +---
mln/set/compute_with_weights.hh | 6 +-
mln/util/adjacency_matrix.hh | 18 +++---
mln/value/int_s.hh | 8 +-
mln/value/internal/gray_.hh | 4 -
mln/value/internal/gray_f.hh | 10 +--
mln/value/ops.hh | 50 ++++++++++++++++++
mln/value/scalar.hh | 10 +--
tests/accu/all_accus.cc | 6 +-
tests/accu/count.cc | 7 +-
tests/arith/plus_full.cc | 13 ----
tests/arith/revert_full.cc | 1
tests/arith/times_full.cc | 11 ----
tests/convert/to_hsl.cc | 12 ++--
tests/morpho/artificial_line_graph_image_wst.cc | 2
tests/morpho/lena_line_graph_image_wst1.cc | 2
tests/value/float01.cc | 66 +++++-------------------
tests/value/graylevel.cc | 13 ++--
tests/value/graylevel_f.cc | 11 +---
tests/value/graylevel_f_full.cc | 22 ++++----
tests/value/graylevel_full.cc | 15 ++---
tests/value/int_u8.cc | 20 +++----
tests/value/rgb_full.cc | 10 +--
24 files changed, 165 insertions(+), 169 deletions(-)
Index: mln/core/image/imorph/labeled_image.hh
--- mln/core/image/imorph/labeled_image.hh (revision 3919)
+++ mln/core/image/imorph/labeled_image.hh (working copy)
@@ -112,17 +112,12 @@
/// Morpher providing an improved interface for labeled image.
///
/// \tparam I The label image type.
- /// \tparam A An accumulator type.
///
- /// This image type allows to pre-compute components attributes. These
- /// attributes can be set through the template parameter \p A. This
- /// accumulator type can be a simple accumulator, a pair of accumulators or
- /// a tuple.
- ///
- /// This image type guaranties that the labeling is always contiguous.
- ///
- /// \sa accu::pair, accu::tuple, mln::accu
+ /// This image type allows to access every site set at a given
+ /// label.
///
+ /// This image type guaranties that labels are contiguous (from 1 to
+ /// n).
///
/// \ingroup modimageidmorpher
//
Index: mln/accu/all.hh
--- mln/accu/all.hh (revision 3919)
+++ mln/accu/all.hh (working copy)
@@ -60,7 +60,7 @@
# include <mln/accu/count.hh>
# include <mln/accu/count_labels.hh>
# include <mln/accu/center.hh>
-//# include <mln/accu/count_adjacent_vertices.hh>
+// << # include <mln/accu/count_adjacent_vertices.hh> >>
# include <mln/accu/height.hh>
# include <mln/accu/histo.hh>
# include <mln/accu/label_used.hh>
@@ -81,7 +81,7 @@
# include <mln/accu/rank.hh>
# include <mln/accu/rms.hh>
# include <mln/accu/sum.hh>
-# include <mln/accu/tuple.hh>
+// << # include <mln/accu/tuple.hh> >>
# include <mln/accu/volume.hh>
// Routines.
Index: mln/value/ops.hh
--- mln/value/ops.hh (revision 3919)
+++ mln/value/ops.hh (working copy)
@@ -210,6 +210,42 @@
operator % (const value::scalar_<Sl>& lhs, const value::scalar_<Sr>& rhs);
+ // Operator ==.
+
+ template <typename Sl, typename Sr>
+ mln_trait_op_eq(Sl, Sr)
+ operator == (const value::scalar_<Sl>& lhs, const value::scalar_<Sr>& rhs);
+
+ bool
+ operator == (const value::scalar_<int>& lhs, const value::scalar_<unsigned>& rhs);
+
+ bool
+ operator == (const value::scalar_<unsigned>& lhs, const value::scalar_<int>& rhs);
+
+ template <typename O, typename L>
+ mln_trait_op_eq(O, O)
+ operator==(const value::scalar_<O>& lhs, const Literal<L>& rhs);
+
+ template <typename L, typename O>
+ mln_trait_op_eq(O, O)
+ operator==(const Literal<L>& lhs, const value::scalar_<O>& rhs);
+
+
+ // Operator <.
+
+ template <typename Sl, typename Sr>
+ mln_trait_op_less(Sl, Sr)
+ operator < (const value::scalar_<Sl>& lhs, const value::scalar_<Sr>& rhs);
+
+ template <typename O, typename L>
+ mln_trait_op_less(O, O)
+ operator < (const value::scalar_<O>& lhs, const Literal<L>& rhs);
+
+ template <typename L, typename O>
+ mln_trait_op_less(O, O)
+ operator < (const Literal<L>& lhs, const value::scalar_<O>& rhs);
+
+
# ifndef MLN_INCLUDE_ONLY
@@ -338,6 +374,20 @@
return value::equiv(lhs) == value::equiv(rhs);
}
+ inline
+ bool
+ operator == (const value::scalar_<int>& lhs, const value::scalar_<unsigned>& rhs)
+ {
+ return lhs.to_equiv() == int(rhs.to_equiv());
+ }
+
+ inline
+ bool
+ operator == (const value::scalar_<unsigned>& lhs, const value::scalar_<int>& rhs)
+ {
+ return int(lhs.to_equiv()) == rhs.to_equiv();
+ }
+
template <typename O, typename L>
inline
mln_trait_op_eq(O, O)
Index: mln/value/scalar.hh
--- mln/value/scalar.hh (revision 3919)
+++ mln/value/scalar.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2006, 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2006, 2007, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +29,9 @@
#ifndef MLN_VALUE_SCALAR_HH
# define MLN_VALUE_SCALAR_HH
-/*! \file mln/value/scalar.hh
- *
- * \brief Definition of the basic mln::value::scalar_ class.
- */
+/// \file mln/value/scalar.hh
+///
+/// \brief Definition of the basic mln::value::scalar_ class.
# include <mln/value/concept/scalar.hh>
# include <mln/metal/is_a.hh>
Index: mln/value/int_s.hh
--- mln/value/int_s.hh (revision 3919)
+++ mln/value/int_s.hh (working copy)
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -193,7 +193,7 @@
inline
int_s<n>::int_s(int i)
{
- static const int max = metal::math::pow_int<2, n-1>::value - 1;
+ static const int max = int(metal::math::pow_int<2, n-1>::value) - 1;
static const int min = - max;
mln_precondition(i >= min);
mln_precondition(i <= max);
@@ -205,7 +205,7 @@
int_s<n>&
int_s<n>::operator=(int i)
{
- static const int max = metal::math::pow_int<2, n-1>::value - 1;
+ static const int max = int(metal::math::pow_int<2, n-1>::value) - 1;
static const int min = - max;
mln_precondition(i >= min);
mln_precondition(i <= max);
Index: mln/value/internal/gray_.hh
--- mln/value/internal/gray_.hh (revision 3919)
+++ mln/value/internal/gray_.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006, 2007, 2008 EPITA Research and Development
+// Copyright (C) 2006, 2007, 2008, 2009 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
@@ -682,7 +682,7 @@
mln_trait_op_div(graylevel<n>, scalar_<S>)
operator/(const graylevel<n>& lhs, const scalar_<S>& rhs)
{
- mln_precondition(rhs.to_equiv() != 0);
+ mln_precondition(rhs.to_equiv() != S(0));
typedef mln_trait_op_div(graylevel<n>, scalar_<S>) ret;
return internal::helper_gray__op_<ret>::div(lhs, rhs);
}
Index: mln/value/internal/gray_f.hh
--- mln/value/internal/gray_f.hh (revision 3919)
+++ mln/value/internal/gray_f.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006, 2007, 2008 EPITA Research and Development
+// Copyright (C) 2006, 2007, 2008, 2009 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
@@ -474,7 +474,7 @@
mln_trait_op_times(graylevel_f, S)
operator*(const graylevel_f& lhs, const scalar_<S>& rhs)
{
- return lhs.value() * rhs;
+ return lhs.value() * rhs.to_equiv();
}
// Op / scalar
@@ -483,12 +483,12 @@
mln_trait_op_div(graylevel_f, S)
operator/(const graylevel_f& lhs, const scalar_<S>& rhs)
{
- mln_precondition(rhs.to_equiv() != 0);
- return lhs.value() / rhs;
+ mln_precondition(rhs.to_equiv() != S(0));
+ return lhs.value() / rhs.to_equiv();
}
} // end of namespace mln::value
} // end of namespace mln
-#endif // ! MLN_VALUE_GRAY_F_HH
+#endif // ! MLN_VALUE_INTERNAL_GRAY_F_HH
Index: mln/set/compute_with_weights.hh
--- mln/set/compute_with_weights.hh (revision 3919)
+++ mln/set/compute_with_weights.hh (working copy)
@@ -102,9 +102,9 @@
mln_precondition(label.is_valid());
mln_precondition(w.domain() <= label.domain());
- (void) a_;
- (void) w_;
- (void) label_;
+ (void) a;
+ (void) w;
+ (void) label;
}
} // end of namespace mln::internal
Index: mln/util/adjacency_matrix.hh
--- mln/util/adjacency_matrix.hh (revision 3919)
+++ mln/util/adjacency_matrix.hh (working copy)
@@ -30,11 +30,13 @@
/// \file mln/util/adjacency_matrix.hh
///
-/// A class of adjacency matrix.
+/// \brief A class of adjacency matrix.
///
-/// FIXME: the underlying data structure is chosen according
+/// \todo the underlying data structure is chosen according
/// to the value type quantification however we may like to make it
/// depend on the number of elements.
+///
+/// \todo Have theo re-read this file.
# include <mln/core/image/image2d.hh>
# include <mln/util/set.hh>
@@ -260,8 +262,8 @@
adjacency_matrix_impl_selector<V, metal::bool_<false> >
::add(const V& e1, const V& e2)
{
- mln_precondition(e1 < nelements_);
- mln_precondition(e2 < nelements_);
+ mln_precondition(e1 < int(nelements_));
+ mln_precondition(e2 < int(nelements_));
adj_.insert(make::ord_pair(e1, e2));
}
@@ -270,8 +272,8 @@
adjacency_matrix_impl_selector<V, metal::bool_<false> >
::remove(const V& e1, const V& e2)
{
- mln_precondition(e1 < nelements_);
- mln_precondition(e2 < nelements_);
+ mln_precondition(e1 < int(nelements_));
+ mln_precondition(e2 < int(nelements_));
mln_precondition(adj_.has(make::ord_pair(e1, e2)));
adj_.remove(make::ord_pair(e1, e2));
}
@@ -288,8 +290,8 @@
adjacency_matrix_impl_selector<V, metal::bool_<false> >
::are_adjacent(const V& e1, const V& e2) const
{
- mln_precondition(e1 < nelements_);
- mln_precondition(e2 < nelements_);
+ mln_precondition(e1 < int(nelements_));
+ mln_precondition(e2 < int(nelements_));
return adj_.has(make::ord_pair(e1, e2));
}
Index: tests/arith/times_full.cc
--- tests/arith/times_full.cc (revision 3919)
+++ tests/arith/times_full.cc (working copy)
@@ -30,9 +30,6 @@
///
/// Tests on mln::arith::times.
-
-
-
#include <mln/core/image/image1d.hh>
#include <mln/core/image/image2d.hh>
#include <mln/core/image/image3d.hh>
@@ -45,18 +42,14 @@
#include <mln/value/int_s8.hh>
#include <mln/value/int_s16.hh>
-
-
+#include <mln/value/int_u8.hh>
+#include <mln/value/int_u16.hh>
#include <mln/debug/iota.hh>
#include <mln/arith/times.hh>
-
-
-
-
struct f_box1d_t : mln::Function_p2b< f_box1d_t >
{
f_box1d_t(const mln::box1d& b)
Index: tests/arith/plus_full.cc
--- tests/arith/plus_full.cc (revision 3919)
+++ tests/arith/plus_full.cc (working copy)
@@ -26,14 +26,10 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-
/// \file tests/arith/plus_full.cc
///
/// Tests on mln::arith::plus.
-
-
-
#include <mln/core/image/image1d.hh>
#include <mln/core/image/image2d.hh>
#include <mln/core/image/image3d.hh>
@@ -41,23 +37,18 @@
#include <mln/core/image/dmorph/image_if.hh>
#include <mln/fun/p2b/chess.hh>
-
#include <mln/literal/origin.hh>
+#include <mln/value/int_u8.hh>
#include <mln/value/int_s8.hh>
+#include <mln/value/int_u16.hh>
#include <mln/value/int_s16.hh>
-
-
#include <mln/debug/iota.hh>
#include <mln/arith/plus.hh>
-
-
-
-
struct f_box1d_t : mln::Function_p2b< f_box1d_t >
{
f_box1d_t(const mln::box1d& b)
Index: tests/arith/revert_full.cc
--- tests/arith/revert_full.cc (revision 3919)
+++ tests/arith/revert_full.cc (working copy)
@@ -40,6 +40,7 @@
#include <mln/fun/p2b/chess.hh>
#include <mln/literal/origin.hh>
+#include <mln/value/int_u8.hh>
#include <mln/value/int_s8.hh>
#include <mln/value/int_s16.hh>
Index: tests/accu/all_accus.cc
--- tests/accu/all_accus.cc (revision 3919)
+++ tests/accu/all_accus.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -26,7 +27,8 @@
// Public License.
/// \file tests/accu/all_accus.cc
-/// \brief Tests on all_accus files in mln/accu.
+///
+/// \brief Tests on all_accus files in mln/accu/.
#include <mln/accu/all.hh>
#include <mln/core/alias/point2d.hh>
Index: tests/accu/count.cc
--- tests/accu/count.cc (revision 3919)
+++ tests/accu/count.cc (working copy)
@@ -1,4 +1,5 @@
// Copyright (C) 2007, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -57,11 +58,11 @@
{
accu::count<int> a, a_;
a.take_as_init(1);
- mln_assertion(a == 1);
+ mln_assertion(a == 1u);
a.take(2);
- mln_assertion(a == 2);
+ mln_assertion(a == 2u);
a_.take_as_init(a);
- mln_assertion(a_ == 2);
+ mln_assertion(a_ == 2u);
}
}
Index: tests/value/rgb_full.cc
--- tests/value/rgb_full.cc (revision 3919)
+++ tests/value/rgb_full.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,10 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/value/rgb_full.cc
- *
- * \brief Tests on mln::value::rgb.
- */
+/// \file tests/value/rgb_full.cc
+///
+/// \brief Tests on mln::value::rgb.
#include <mln/value/rgb.hh>
#include <mln/value/rgb8.hh>
Index: tests/value/graylevel_f.cc
--- tests/value/graylevel_f.cc (revision 3919)
+++ tests/value/graylevel_f.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2009 EPITA Research and Development Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,10 +25,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/value/graylevel_f.cc
- *
- * \brief Tests on mln::value::graylevel_f.
- */
+/// \file tests/value/graylevel_f.cc
+///
+/// \brief Tests on mln::value::graylevel_f.
#include <mln/value/graylevel.hh>
#include <mln/value/glf.hh>
@@ -55,7 +54,7 @@
mln_assertion(b == a);
a *= 2;
- mln_assertion(a == white);
+ mln_assertion(a == glf(white));
mln_assertion(a.to_enc() == 1.f);
}
}
Index: tests/value/float01.cc
--- tests/value/float01.cc (revision 3919)
+++ tests/value/float01.cc (working copy)
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -32,26 +32,16 @@
#include <iostream>
-#include <mln/core/image/image2d.hh>
-#include <mln/debug/iota.hh>
-#include <mln/debug/println.hh>
-
+#include <mln/core/concept/function.hh>
#include <mln/value/float01_8.hh>
#include <mln/value/float01_16.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/transform.hh>
-#include <mln/io/pgm/load.hh>
-#include <mln/io/pgm/save.hh>
-#include <mln/win/rectangle2d.hh>
-#include <mln/level/median.hh>
-#include <mln/level/compare.hh>
+namespace mln
+{
-
-using namespace mln;
-using namespace mln::value;
-using mln::value::int_u8;
+ using namespace value;
float fi(int) { return 0.5f; }
int ii(int) { return 1; }
@@ -60,7 +50,7 @@
int id(double) { return 1; }
-struct tofloat01 : mln::Function_v2v<tofloat01>
+ struct tofloat01 : Function_v2v<tofloat01>
{
typedef float01_<12> result;
@@ -72,7 +62,7 @@
}
};
-struct to8bits : mln::Function_v2v<to8bits>
+ struct to8bits : Function_v2v<to8bits>
{
typedef int_u8 result;
@@ -85,15 +75,17 @@
}
};
+} // mln
+
+
int main()
{
- win::rectangle2d rect(51, 51);
- border::thickness = 52;
+ using namespace mln;
- float01_8 a(0.5);
- float01_16 b(0.5);
+ value::float01_8 a(0.5);
+ value::float01_16 b(0.5);
- assert(approx_equal(b,a));
+ mln_assertion(approx_equal(b,a));
std::cout << b << std::endl;
b = b + 0.2f;
@@ -123,32 +115,4 @@
std::cout << b << std::endl;
b = 1;
std::cout << b << std::endl;
-
- {
- typedef value::float01_<12> float01_12;
-
- std::cout << "convert" << std::endl;
- image2d<int_u8>
- lena = io::pgm::load<int_u8>("../img/lena.pgm"),
- ref(lena.domain());
-
- image2d<float01_12> out(lena.domain());
- image2d<float01_12> tmp(lena.domain());
-
- tmp = level::transform(lena, tofloat01());
-
- level::median(tmp, rect, out);
- level::median(lena, rect, ref);
-
-
- lena = level::transform(out, to8bits());
-
- io::pgm::save(lena, "out.pgm");
- io::pgm::save(ref, "ref.pgm");
- mln_assertion(lena == ref);
- // FIXME: Dead code.
- //debug::println(out);
- }
-
-
}
Index: tests/value/int_u8.cc
--- tests/value/int_u8.cc (revision 3919)
+++ tests/value/int_u8.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,10 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/value/int_u8.cc
- *
- * \brief Tests on mln::value::int_u8.
- */
+/// \file tests/value/int_u8.cc
+///
+/// \brief Tests on mln::value::int_u8.
#include <mln/value/int_u8.hh>
#include <tests/value/macros.hh>
@@ -49,18 +49,18 @@
// Assignment.
{
i = 51;
- // FIXME: Triggers a warning about signed vs unsigned comparison.
- sym_compare_assert(i, ==, 51);
+ mln_assertion(i == 51u);
+ mln_assertion(-i == -51);
i = 51u;
- sym_compare_assert(i, ==, 51);
+ mln_assertion(i == 51u);
signed char c = 51;
i = c;
- sym_compare_assert(i, ==, 51);
+ mln_assertion(i == 51u);
j = i;
- sym_compare_assert(j, ==, 51);
+ mln_assertion(j == 51u);
i = 3;
sym_compare_assert(3.0f, ==, i);
Index: tests/value/graylevel_full.cc
--- tests/value/graylevel_full.cc (revision 3919)
+++ tests/value/graylevel_full.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,12 +26,10 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/value/graylevel_full.cc
- *
- * \brief Tests on mln::value::graylevel. Tests operations between
- * graylevel of different encodings.
- *
- */
+/// \file tests/value/graylevel_full.cc
+///
+/// \brief Tests on mln::value::graylevel. Tests operations between
+/// graylevel of different encodings.
#include <mln/value/gl8.hh>
#include <mln/value/gl16.hh>
@@ -71,7 +70,7 @@
gl8 e = white;
- mln_assertion(e == white);
+ mln_assertion(e == gl8(white));
gl8 f = 12;
gl8 g = f;
Index: tests/value/graylevel_f_full.cc
--- tests/value/graylevel_f_full.cc (revision 3919)
+++ tests/value/graylevel_f_full.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2006, 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2006, 2007, 2009 EPITA Research and Development
+// Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,10 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/value/graylevel_f_full.cc
- *
- * \brief Full tests on mln::value::graylevel_f.
- */
+/// \file tests/value/graylevel_f_full.cc
+///
+/// \brief Full tests on mln::value::graylevel_f.
#include <mln/value/graylevel.hh>
#include <mln/value/glf.hh>
@@ -77,24 +77,24 @@
// Literals
{
glf a(white);
- mln_assertion(a == white);
+ mln_assertion(a == glf(white));
mln_assertion(a.value() == 1.f);
glf d = white;
- mln_assertion(d == white);
+ mln_assertion(d == glf(white));
mln_assertion(d.value() == 1.f);
glf b(black);
- mln_assertion(b == black);
+ mln_assertion(b == glf(black));
mln_assertion(b.value() == 0.f);
glf e = black;
- mln_assertion(e == black);
+ mln_assertion(e == glf(black));
mln_assertion(e.value() == 0.f);
glf c(medium_gray);
- mln_assertion(c == medium_gray);
+ mln_assertion(c == glf(medium_gray));
mln_assertion(c.value() == 0.5f);
glf f = medium_gray;
- mln_assertion(f == medium_gray);
+ mln_assertion(f == glf(medium_gray));
mln_assertion(f.value() == 0.5f);
}
Index: tests/value/graylevel.cc
--- tests/value/graylevel.cc (revision 3919)
+++ tests/value/graylevel.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,12 +26,10 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/value/graylevel.cc
- *
- * \brief Tests on mln::value::graylevel. Tests operations between
- * graylevel of different encodings.
- *
- */
+/// \file tests/value/graylevel.cc
+///
+/// \brief Tests on mln::value::graylevel. Tests operations between
+/// graylevel of different encodings.
#include <mln/value/gl8.hh>
#include <mln/value/gl16.hh>
Index: tests/convert/to_hsl.cc
--- tests/convert/to_hsl.cc (revision 3919)
+++ tests/convert/to_hsl.cc (working copy)
@@ -40,12 +40,12 @@
{
using namespace mln;
- value::rgb8 c1(3,3,3);
- value::hsl_f c2 = convert::to<value::hsl_f>(c1);
-// mln_assertion(c2 == hsl_f(0,0,3)); //FIXME: wrong result.
+// value::rgb8 c1(3,3,3);
+// value::hsl_f c2 = convert::to<value::hsl_f>(c1);
+// // mln_assertion(c2 == hsl_f(0,0,3)); //FIXME: wrong result.
- value::hsl_f c3(3,3,3);
- c1 = convert::to<value::rgb8>(c3);
-// mln_assertion(c1 == rgb8(2,4,0)); //FIXME: wrong result.
+// value::hsl_f c3(3,3,3);
+// c1 = convert::to<value::rgb8>(c3);
+// // mln_assertion(c1 == rgb8(2,4,0)); //FIXME: wrong result.
}
Index: tests/morpho/artificial_line_graph_image_wst.cc
--- tests/morpho/artificial_line_graph_image_wst.cc (revision 3919)
+++ tests/morpho/artificial_line_graph_image_wst.cc (working copy)
@@ -108,7 +108,7 @@
? mln_min(input_val_t)
: mln_max(input_val_t);
mln_assertion((nrows * ncols) == 10000);
- mln_assertion((2 * nrows * ncols - (rows + ncols)) == 19800);
+ mln_assertion((2 * nrows * ncols - (nrows + ncols)) == 19800);
/*----------------.
| Line gradient. |
Index: tests/morpho/lena_line_graph_image_wst1.cc
--- tests/morpho/lena_line_graph_image_wst1.cc (revision 3919)
+++ tests/morpho/lena_line_graph_image_wst1.cc (working copy)
@@ -158,7 +158,7 @@
int_u8 nbasins;
typedef edge_image<util::site_pair<point2d>,int_u8,util::graph> wshed_t;
wshed_t wshed = morpho::meyer_wst(lg_ima, nbh, nbasins);
- mln_assertion(nbasins == 5);
+ mln_assertion(nbasins == 5u);
/*---------.
| Output. |
1
0
* mln/value/label.hh: do not use literal::zero.
* mln/world/binary_2d/subsample.hh: revamp and add MLN_INCLUDE_ONLY
guards.
* tests/data/paste.cc: fix invalid path to include file.
---
milena/ChangeLog | 11 +++++++++
milena/mln/value/label.hh | 2 +-
milena/mln/world/binary_2d/subsample.hh | 37 +++++++++++++++++++++++++++++-
milena/tests/data/paste.cc | 2 +-
4 files changed, 48 insertions(+), 4 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index c3d3344..bb6ae9f 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,16 @@
2009-05-28 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+ Fix tests.
+
+ * mln/value/label.hh: do not use literal::zero.
+
+ * mln/world/binary_2d/subsample.hh: revamp and add MLN_INCLUDE_ONLY
+ guards.
+
+ * tests/data/paste.cc: fix invalid path to include file.
+
+2009-05-28 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
Set few tests as XFAIL tests.
* tests/convert/Makefile.am,
diff --git a/milena/mln/value/label.hh b/milena/mln/value/label.hh
index dd61b33..8f874f9 100644
--- a/milena/mln/value/label.hh
+++ b/milena/mln/value/label.hh
@@ -223,7 +223,7 @@ namespace mln
void
from_to_(const value::label<n>& from, bool& to_)
{
- to_ = (from != literal::zero);
+ to_ = (from != 0u);
}
} // end of namespace mln::convert::over_load
diff --git a/milena/mln/world/binary_2d/subsample.hh b/milena/mln/world/binary_2d/subsample.hh
index 78bdbbd..7c6b19c 100644
--- a/milena/mln/world/binary_2d/subsample.hh
+++ b/milena/mln/world/binary_2d/subsample.hh
@@ -30,7 +30,10 @@
/// \file mln/world/binary_2d/subsample.hh
///
-/// FIXME: insert comment.
+/// Subsample a Boolean image.
+///
+/// FIXME: not enough generic. Does not work on image having
+/// the top left corner different from (0,0).
# include <mln/core/image/image2d.hh>
# include <mln/core/alias/dpoint2d.hh>
@@ -45,10 +48,37 @@ namespace mln
namespace binary_2d
{
- image2d<value::int_u8> subsample(image2d<bool>& input, unsigned n)
+ /// Subsample a Boolean image.
+ ///
+ /// \param[in] input A binary image.
+ /// \param[in] n Linear subsampling coefficient.
+ ///
+ /// \return A gray level image.
+ //
+ image2d<value::int_u8>
+ subsample(image2d<bool>& input, unsigned n);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ image2d<value::int_u8>
+ subsample(image2d<bool>& input, unsigned n)
{
+ trace::entering("world::binary_2d::subsample");
+
+ mln_precondition(input.is_valid());
+
using value::int_u8;
+ if (n == 0)
+ {
+ image2d<value::int_u8>
+ output = level::convert(int_u8(), input);
+
+ trace::exiting("world::binary_2d::subsample");
+ return output;
+ }
+
const bool** ptr = new const bool*[n];
const unsigned nrows = input.nrows() / n;
const unsigned ncols = input.ncols() / n;
@@ -86,9 +116,12 @@ namespace mln
}
}
+ trace::exiting("world::binary_2d::subsample");
return output;
}
+# endif // ! MLN_INCLUDE_ONLY
+
} // end of namespace mln::world::binary_2d
} // end of namspace mln::world
diff --git a/milena/tests/data/paste.cc b/milena/tests/data/paste.cc
index 54387fd..07d88fc 100644
--- a/milena/tests/data/paste.cc
+++ b/milena/tests/data/paste.cc
@@ -35,7 +35,7 @@
#include <mln/core/image/image3d.hh>
#include <mln/pw/image.hh>
#include <mln/core/image/flat_image.hh>
-#include <mln/core/image/vmorphcast_image.hh>
+#include <mln/core/image/vmorph/cast_image.hh>
#include <mln/core/image/dmorph/image_if.hh>
#include <mln/core/image/dmorph/sub_image.hh>
#include <mln/core/image/dmorph/extension_val.hh>
--
1.5.6.5
1
0