olena-2.0-393-g24d3d37 Introduce mln_trace.

* mln/debug/trace.hh: New. * doc/benchmark/canvas.cc, * doc/examples/split/tuto3_first_routine-1.cc.raw, * doc/examples/split/tuto3_first_routine-3.cc.raw, * doc/examples/split/tuto3_first_routine-8.cc.raw, * doc/examples/split/tuto3_trace-1.cc.raw, * doc/examples/split/tuto3_trace-2.cc.raw, * doc/examples/trash/tuto_bis.cc, * doc/examples/tuto3/first_routine.cc, * doc/examples/tuto3/trace.cc, * doc/outputs/accu-right-instantiation.txt, * doc/outputs/borderthickness.txt, * doc/outputs/estim-sites.txt, * doc/outputs/extend.txt, * doc/outputs/fill-call-1.txt, * doc/outputs/fill-imageif-cfun.txt, * doc/outputs/fill-part-image.txt, * doc/outputs/fill-subdomain-shorter.txt, * doc/outputs/fill-subdomain.txt, * doc/outputs/fill.txt, * doc/outputs/ima-load.txt, * doc/outputs/ima-save.txt, * doc/outputs/ima2d-6-clone.txt, * doc/outputs/ima2d-7.txt, * doc/outputs/ima2d-rot.txt, * doc/outputs/labeling-compute.txt, * doc/outputs/logical-not.txt, * doc/outputs/paste-call-1.txt, * doc/outputs/split/tuto3_println-1.txt, * doc/outputs/split/tuto3_println-2.txt, * doc/outputs/tuto2_first_image.txt, * doc/outputs/tuto3_colorize.txt, * doc/outputs/tuto3_first_routine.txt, * doc/outputs/tuto3_println.txt, * doc/outputs/tuto3_rw_image.txt, * doc/outputs/tuto4_genericity_and_algorithms.txt, * mln/accu/compute.hh, * mln/accu/image/init.hh, * mln/accu/image/set_value.hh, * mln/accu/image/take.hh, * mln/accu/image/take_as_init.hh, * mln/accu/image/take_n_times.hh, * mln/accu/image/to_result.hh, * mln/accu/image/untake.hh, * mln/accu/stat/histo3d_rgb.hh, * mln/accu/transform.hh, * mln/accu/transform_diagonal.hh, * mln/accu/transform_directional.hh, * mln/accu/transform_line.hh, * mln/accu/transform_snake.hh, * mln/accu/transform_stop.hh, * mln/all.hh, * mln/arith/diff_abs.hh, * mln/arith/div.hh, * mln/arith/div.spe.hh, * mln/arith/min.hh, * mln/arith/min.spe.hh, * mln/arith/minus.hh, * mln/arith/plus.hh, * mln/arith/revert.hh, * mln/arith/revert.spe.hh, * mln/arith/times.hh, * mln/arith/times.spe.hh, * mln/binarization/binarization.hh, * mln/binarization/threshold.hh, * mln/border/adjust.hh, * mln/border/duplicate.hh, * mln/border/equalize.hh, * mln/border/fill.hh, * mln/border/find.hh, * mln/border/get.hh, * mln/border/mirror.hh, * mln/border/resize.hh, * mln/border/resize_equal.hh, * mln/canvas/browsing/backdiagonal2d.hh, * mln/canvas/browsing/diagonal2d.hh, * mln/canvas/browsing/dir_struct_elt_incr_update.hh, * mln/canvas/browsing/directional.hh, * mln/canvas/browsing/fwd.hh, * mln/canvas/browsing/hyper_directional.hh, * mln/canvas/browsing/internal/graph_first_search.hh, * mln/canvas/browsing/snake_fwd.hh, * mln/canvas/browsing/snake_generic.hh, * mln/canvas/browsing/snake_vert.hh, * mln/canvas/distance_front.hh, * mln/canvas/distance_geodesic.hh, * mln/canvas/labeling/blobs.hh, * mln/canvas/labeling/generic.hh, * mln/canvas/labeling/sorted.hh, * mln/canvas/labeling/video.hh, * mln/canvas/morpho/attribute_filter.hh, * mln/clustering/kmean_rgb.hh, * mln/convert/to.hh, * mln/convert/to_qimage.hh, * mln/convert/to_qimage_nocopy.hh, * mln/core/concept/object.hh, * mln/core/routine/duplicate.hh, * mln/core/routine/initialize.hh, * mln/data/abs.hh, * mln/data/apply.hh, * mln/data/apply.spe.hh, * mln/data/approx/median.hh, * mln/data/compare.hh, * mln/data/compute.hh, * mln/data/compute_in_window.hh, * mln/data/convert.hh, * mln/data/fill.hh, * mln/data/fill_with_image.hh, * mln/data/fill_with_image.spe.hh, * mln/data/fill_with_value.hh, * mln/data/fill_with_value.spe.hh, * mln/data/median.hh, * mln/data/memcpy_.hh, * mln/data/memset_.hh, * mln/data/paste.hh, * mln/data/paste.spe.hh, * mln/data/paste_without_localization.hh, * mln/data/replace.hh, * mln/data/saturate.hh, * mln/data/sort_offsets.hh, * mln/data/split.hh, * mln/data/stretch.hh, * mln/data/to_enc.hh, * mln/data/transform.hh, * mln/data/transform.spe.hh, * mln/data/transform_inplace.hh, * mln/data/update.hh, * mln/data/wrap.hh, * mln/debug/draw_graph.hh, * mln/debug/iota.hh, * mln/debug/mosaic.hh, * mln/debug/println.hh, * mln/debug/put_word.hh, * mln/debug/slices_2d.hh, * mln/debug/superpose.hh, * mln/debug/z_order.hh, * mln/draw/dashed_line.hh, * mln/draw/line.hh, * mln/essential/routine.hh, * mln/extension/adjust.hh, * mln/extension/adjust_duplicate.hh, * mln/extension/adjust_fill.hh, * mln/extension/duplicate.hh, * mln/extension/fill.hh, * mln/fun/x2x/composed.hh, * mln/geom/chamfer.hh, * mln/geom/crop.hh, * mln/geom/crop_without_localization.hh, * mln/geom/horizontal_symmetry.hh, * mln/geom/max_ind.hh, * mln/geom/min_ind.hh, * mln/geom/ninds.hh, * mln/geom/nsites.hh, * mln/geom/rotate.hh, * mln/geom/seeds2tiling.hh, * mln/geom/seeds2tiling_roundness.hh, * mln/geom/translate.hh, * mln/geom/vertical_symmetry.hh, * mln/graph/compute.hh, * mln/graph/labeling.hh, * mln/graph/to_neighb.hh, * mln/graph/to_win.hh, * mln/histo/compute.hh, * mln/histo/equalize.hh, * mln/io/cloud/load.hh, * mln/io/cloud/save.hh, * mln/io/dicom/get_header.hh, * mln/io/dicom/load.hh, * mln/io/dump/get_header.hh, * mln/io/dump/load.hh, * mln/io/dump/save.hh, * mln/io/fits/load.hh, * mln/io/fld/load.hh, * mln/io/fld/save.hh, * mln/io/magick/load.hh, * mln/io/magick/save.hh, * mln/io/off/load.hh, * mln/io/off/save.hh, * mln/io/pbm/load.hh, * mln/io/pbm/save.hh, * mln/io/pbms/load.hh, * mln/io/pdf/get_header.hh, * mln/io/pdf/load.hh, * mln/io/pfm/load.hh, * mln/io/pfm/save.hh, * mln/io/pgm/load.hh, * mln/io/pgm/save.hh, * mln/io/pgms/load.hh, * mln/io/plot/load.hh, * mln/io/plot/save.hh, * mln/io/pnm/load.hh, * mln/io/pnm/save.hh, * mln/io/pnms/load.hh, * mln/io/ppm/load.hh, * mln/io/ppms/load.hh, * mln/io/raw/get_header.hh, * mln/io/raw/load.hh, * mln/io/raw/save.hh, * mln/io/svg/simple_svg_1.0.0.hh, * mln/io/tiff/load.hh, * mln/io/txt/save.hh, * mln/labeling/background.hh, * mln/labeling/blobs.hh, * mln/labeling/blobs_and_compute.hh, * mln/labeling/colorize.hh, * mln/labeling/compute.hh, * mln/labeling/compute_image.hh, * mln/labeling/fill_holes.hh, * mln/labeling/flat_zones.hh, * mln/labeling/foreground.hh, * mln/labeling/mean_values.hh, * mln/labeling/n_max.hh, * mln/labeling/pack.hh, * mln/labeling/regional_maxima.hh, * mln/labeling/regional_minima.hh, * mln/labeling/relabel.hh, * mln/labeling/superpose.hh, * mln/labeling/value.hh, * mln/labeling/value.spe.hh, * mln/labeling/value_and_compute.hh, * mln/labeling/wrap.hh, * mln/linear/convolve.hh, * mln/linear/convolve_2x1d.hh, * mln/linear/convolve_directional.hh, * mln/linear/gaussian_1d.hh, * mln/linear/gaussian_directional_2d.hh, * mln/linear/lap.hh, * mln/linear/log.hh, * mln/linear/sobel_2d.hh, * mln/logical/and.hh, * mln/logical/and_not.hh, * mln/logical/not.hh, * mln/logical/not.spe.hh, * mln/logical/or.hh, * mln/logical/xor.hh, * mln/make/dual_neighb.hh, * mln/make/dummy_p_edges.hh, * mln/make/dummy_p_vertices.hh, * mln/make/edge_image.hh, * mln/make/influence_zone_adjacency_graph.hh, * mln/make/p_edges_with_mass_centers.hh, * mln/make/p_vertices_with_mass_centers.hh, * mln/make/rag_and_labeled_wsl.hh, * mln/make/region_adjacency_graph.hh, * mln/make/relabelfun.hh, * mln/make/vertex_image.hh, * mln/make/w_window.hh, * mln/morpho/algebraic_filter.hh, * mln/morpho/approx/dilation.hh, * mln/morpho/approx/erosion.hh, * mln/morpho/closing/algebraic.hh, * mln/morpho/closing/approx/structural.hh, * mln/morpho/closing/area.hh, * mln/morpho/closing/area_on_vertices.hh, * mln/morpho/closing/height.hh, * mln/morpho/closing/leveling.hh, * mln/morpho/closing/structural.hh, * mln/morpho/closing/sum.hh, * mln/morpho/closing/volume.hh, * mln/morpho/complementation.hh, * mln/morpho/contrast.hh, * mln/morpho/dilation.hh, * mln/morpho/elementary/closing.hh, * mln/morpho/elementary/dilation.hh, * mln/morpho/elementary/erosion.hh, * mln/morpho/elementary/gradient.hh, * mln/morpho/elementary/gradient_external.hh, * mln/morpho/elementary/gradient_internal.hh, * mln/morpho/elementary/laplacian.hh, * mln/morpho/elementary/like_ero_fun.hh, * mln/morpho/elementary/like_ero_set.hh, * mln/morpho/elementary/opening.hh, * mln/morpho/elementary/top_hat.hh, * mln/morpho/erosion.hh, * mln/morpho/general.hh, * mln/morpho/general.spe.hh, * mln/morpho/gradient.hh, * mln/morpho/hit_or_miss.hh, * mln/morpho/laplacian.hh, * mln/morpho/leveling_filter.hh, * mln/morpho/line_gradient.hh, * mln/morpho/meyer_wst.hh, * mln/morpho/min.hh, * mln/morpho/minus.hh, * mln/morpho/opening/algebraic.hh, * mln/morpho/opening/approx/structural.hh, * mln/morpho/opening/area.hh, * mln/morpho/opening/area_on_vertices.hh, * mln/morpho/opening/height.hh, * mln/morpho/opening/leveling.hh, * mln/morpho/opening/structural.hh, * mln/morpho/opening/volume.hh, * mln/morpho/plus.hh, * mln/morpho/rank_filter.hh, * mln/morpho/reconstruction/by_dilation/union_find.hh, * mln/morpho/reconstruction/by_erosion/union_find.hh, * mln/morpho/skeleton_constrained.hh, * mln/morpho/thick_miss.hh, * mln/morpho/thickening.hh, * mln/morpho/thin_fit.hh, * mln/morpho/thinning.hh, * mln/morpho/top_hat.hh, * mln/morpho/tree/component_tree.hh, * mln/morpho/tree/compute_attribute_image.hh, * mln/morpho/tree/compute_parent.hh, * mln/morpho/tree/dual_input_tree.hh, * mln/morpho/tree/filter/direct.hh, * mln/morpho/tree/filter/filter.hh, * mln/morpho/tree/filter/max.hh, * mln/morpho/tree/filter/min.hh, * mln/morpho/tree/filter/subtractive.hh, * mln/morpho/tree/impl/dual_hqueue.hh, * mln/morpho/tree/impl/dual_union_find.hh, * mln/morpho/tree/max.hh, * mln/morpho/watershed/flooding.hh, * mln/morpho/watershed/superpose.hh, * mln/opt/at.hh, * mln/registration/icp.hh, * mln/set/card.hh, * mln/set/compute.hh, * mln/set/compute_with_weights.hh, * mln/set/diff.hh, * mln/set/get.hh, * mln/set/has.hh, * mln/set/inter.hh, * mln/set/sym_diff.hh, * mln/set/uni.hh, * mln/set/unique.hh, * mln/subsampling/antialiased.hh, * mln/test/positive.hh, * mln/test/predicate.hh, * mln/topo/skeleton/crest.hh, * mln/transform/distance_and_closest_point_geodesic.hh, * mln/transform/distance_and_influence_zone_geodesic.hh, * mln/transform/distance_front.hh, * mln/transform/distance_geodesic.hh, * mln/transform/hough.hh, * mln/transform/influence_zone_front.hh, * mln/transform/influence_zone_geodesic.hh, * mln/transform/influence_zone_geodesic_saturated.hh, * mln/upscaling/art/scale2x.hh, * mln/upscaling/art/scale3x.hh, * mln/util/tree_fast_to_image.hh, * mln/util/tree_to_fast.hh, * mln/util/tree_to_image.hh, * mln/win/diff.hh, * mln/win/inter.hh, * mln/win/shift.hh, * mln/win/sym.hh, * mln/world/binary_2d/enlarge.hh, * mln/world/binary_2d/subsample.hh, * mln/world/inter_pixel/compute.hh, * mln/world/inter_pixel/dim2/make_edge_image.hh, * mln/world/inter_pixel/full2image.hh, * mln/world/inter_pixel/immerse.hh, * mln/world/rgb/invert.hh, * mln/world/rgb/invert.spe.hh, * tests/arith/diff_abs.cc, * tests/arith/minus.cc, * tests/arith/plus.cc, * tests/arith/revert.cc, * tests/arith/times.cc, * tests/geom/nsites.cc, * tests/morpho/closing/algebraic.cc, * tests/morpho/elementary/closing.cc, * tests/morpho/elementary/dilation.cc, * tests/morpho/elementary/erosion.cc, * tests/morpho/elementary/opening.cc, * tests/morpho/elementary/top_hat.cc, * tests/morpho/general.cc, * tests/morpho/opening/algebraic.cc, * tests/morpho/top_hat.cc: Make use of mln_trace. --- milena/ChangeLog | 378 ++++++++++++ milena/doc/benchmark/canvas.cc | 6 +- .../examples/split/tuto3_first_routine-1.cc.raw | 3 +- .../examples/split/tuto3_first_routine-3.cc.raw | 2 +- .../examples/split/tuto3_first_routine-8.cc.raw | 1 - milena/doc/examples/split/tuto3_trace-1.cc.raw | 2 +- milena/doc/examples/split/tuto3_trace-2.cc.raw | 2 +- milena/doc/examples/trash/tuto_bis.cc | 3 +- milena/doc/examples/tuto3/first_routine.cc | 6 +- milena/doc/examples/tuto3/trace.cc | 6 +- milena/doc/outputs/accu-right-instantiation.txt | 2 + milena/doc/outputs/borderthickness.txt | 2 + milena/doc/outputs/estim-sites.txt | 2 + milena/doc/outputs/extend.txt | 31 + milena/doc/outputs/fill-call-1.txt | 8 + milena/doc/outputs/fill-imageif-cfun.txt | 10 + milena/doc/outputs/fill-part-image.txt | 18 + milena/doc/outputs/fill-subdomain-shorter.txt | 20 + milena/doc/outputs/fill-subdomain.txt | 41 ++ milena/doc/outputs/fill.txt | 4 + milena/doc/outputs/ima-load.txt | 1 + milena/doc/outputs/ima-save.txt | 1 + milena/doc/outputs/ima2d-6-clone.txt | 7 + milena/doc/outputs/ima2d-7.txt | 6 + milena/doc/outputs/ima2d-rot.txt | 32 + milena/doc/outputs/labeling-compute.txt | 19 + milena/doc/outputs/logical-not.txt | 10 + milena/doc/outputs/paste-call-1.txt | 15 + milena/doc/outputs/split/tuto3_println-1.txt | 11 + milena/doc/outputs/split/tuto3_println-2.txt | 7 + milena/doc/outputs/tuto2_first_image.txt | 7 + milena/doc/outputs/tuto3_colorize.txt | 7 + milena/doc/outputs/tuto3_first_routine.txt | 48 ++ milena/doc/outputs/tuto3_println.txt | 18 + milena/doc/outputs/tuto3_rw_image.txt | 24 + .../outputs/tuto4_genericity_and_algorithms.txt | 83 +++ milena/mln/accu/compute.hh | 9 +- milena/mln/accu/image/init.hh | 9 +- milena/mln/accu/image/set_value.hh | 18 +- milena/mln/accu/image/take.hh | 18 +- milena/mln/accu/image/take_as_init.hh | 18 +- milena/mln/accu/image/take_n_times.hh | 18 +- milena/mln/accu/image/to_result.hh | 9 +- milena/mln/accu/image/untake.hh | 18 +- milena/mln/accu/stat/histo3d_rgb.hh | 13 +- milena/mln/accu/transform.hh | 12 +- milena/mln/accu/transform_diagonal.hh | 6 +- milena/mln/accu/transform_directional.hh | 6 +- milena/mln/accu/transform_line.hh | 15 +- milena/mln/accu/transform_snake.hh | 6 +- milena/mln/accu/transform_stop.hh | 12 +- milena/mln/all.hh | 2 +- milena/mln/arith/diff_abs.hh | 3 +- milena/mln/arith/div.hh | 18 +- milena/mln/arith/div.spe.hh | 6 +- milena/mln/arith/min.hh | 13 +- milena/mln/arith/min.spe.hh | 6 +- milena/mln/arith/minus.hh | 33 +- milena/mln/arith/plus.hh | 36 +- milena/mln/arith/revert.hh | 9 +- milena/mln/arith/revert.spe.hh | 8 +- milena/mln/arith/times.hh | 18 +- milena/mln/arith/times.spe.hh | 6 +- milena/mln/binarization/binarization.hh | 6 +- milena/mln/binarization/threshold.hh | 3 +- milena/mln/border/adjust.hh | 3 +- milena/mln/border/duplicate.hh | 12 +- milena/mln/border/equalize.hh | 6 +- milena/mln/border/fill.hh | 9 +- milena/mln/border/find.hh | 3 +- milena/mln/border/get.hh | 9 +- milena/mln/border/mirror.hh | 15 +- milena/mln/border/resize.hh | 3 +- milena/mln/border/resize_equal.hh | 3 +- milena/mln/canvas/browsing/backdiagonal2d.hh | 3 +- milena/mln/canvas/browsing/diagonal2d.hh | 3 +- .../canvas/browsing/dir_struct_elt_incr_update.hh | 3 +- milena/mln/canvas/browsing/directional.hh | 3 +- milena/mln/canvas/browsing/fwd.hh | 3 +- milena/mln/canvas/browsing/hyper_directional.hh | 3 +- .../canvas/browsing/internal/graph_first_search.hh | 3 +- milena/mln/canvas/browsing/snake_fwd.hh | 3 +- milena/mln/canvas/browsing/snake_generic.hh | 3 +- milena/mln/canvas/browsing/snake_vert.hh | 3 +- milena/mln/canvas/distance_front.hh | 9 +- milena/mln/canvas/distance_geodesic.hh | 9 +- milena/mln/canvas/labeling/blobs.hh | 7 +- milena/mln/canvas/labeling/generic.hh | 9 +- milena/mln/canvas/labeling/sorted.hh | 8 +- milena/mln/canvas/labeling/video.hh | 10 +- milena/mln/canvas/morpho/attribute_filter.hh | 6 +- milena/mln/clustering/kmean_rgb.hh | 68 +-- milena/mln/convert/to.hh | 7 +- milena/mln/convert/to_qimage.hh | 3 +- milena/mln/convert/to_qimage_nocopy.hh | 3 +- milena/mln/core/concept/object.hh | 4 +- milena/mln/core/routine/duplicate.hh | 3 +- milena/mln/core/routine/initialize.hh | 7 +- milena/mln/data/abs.hh | 6 +- milena/mln/data/apply.hh | 6 +- milena/mln/data/apply.spe.hh | 3 +- milena/mln/data/approx/median.hh | 6 +- milena/mln/data/compare.hh | 9 +- milena/mln/data/compute.hh | 3 +- milena/mln/data/compute_in_window.hh | 9 +- milena/mln/data/convert.hh | 9 +- milena/mln/data/fill.hh | 3 +- milena/mln/data/fill_with_image.hh | 6 +- milena/mln/data/fill_with_image.spe.hh | 12 +- milena/mln/data/fill_with_value.hh | 6 +- milena/mln/data/fill_with_value.spe.hh | 9 +- milena/mln/data/median.hh | 9 +- milena/mln/data/memcpy_.hh | 6 +- milena/mln/data/memset_.hh | 9 +- milena/mln/data/paste.hh | 6 +- milena/mln/data/paste.spe.hh | 12 +- milena/mln/data/paste_without_localization.hh | 15 +- milena/mln/data/replace.hh | 6 +- milena/mln/data/saturate.hh | 9 +- milena/mln/data/sort_offsets.hh | 18 +- milena/mln/data/split.hh | 3 +- milena/mln/data/stretch.hh | 12 +- milena/mln/data/to_enc.hh | 3 +- milena/mln/data/transform.hh | 12 +- milena/mln/data/transform.spe.hh | 24 +- milena/mln/data/transform_inplace.hh | 30 +- milena/mln/data/update.hh | 9 +- milena/mln/data/wrap.hh | 3 +- milena/mln/debug/draw_graph.hh | 12 +- milena/mln/debug/iota.hh | 3 +- milena/mln/debug/mosaic.hh | 3 +- milena/mln/debug/println.hh | 3 +- milena/mln/debug/put_word.hh | 4 +- milena/mln/debug/slices_2d.hh | 6 +- milena/mln/debug/superpose.hh | 3 +- milena/mln/debug/trace.hh | 208 +++++++ milena/mln/debug/z_order.hh | 3 +- milena/mln/draw/dashed_line.hh | 8 +- milena/mln/draw/line.hh | 8 +- milena/mln/essential/routine.hh | 5 +- milena/mln/extension/adjust.hh | 12 +- milena/mln/extension/adjust_duplicate.hh | 12 +- milena/mln/extension/adjust_fill.hh | 12 +- milena/mln/extension/duplicate.hh | 3 +- milena/mln/extension/fill.hh | 3 +- milena/mln/fun/x2x/composed.hh | 3 +- milena/mln/geom/chamfer.hh | 3 +- milena/mln/geom/crop.hh | 3 +- milena/mln/geom/crop_without_localization.hh | 3 +- milena/mln/geom/horizontal_symmetry.hh | 3 +- milena/mln/geom/max_ind.hh | 3 +- milena/mln/geom/min_ind.hh | 3 +- milena/mln/geom/ninds.hh | 3 +- milena/mln/geom/nsites.hh | 3 +- milena/mln/geom/rotate.hh | 6 +- milena/mln/geom/seeds2tiling.hh | 6 +- milena/mln/geom/seeds2tiling_roundness.hh | 6 +- milena/mln/geom/translate.hh | 3 +- milena/mln/geom/vertical_symmetry.hh | 3 +- milena/mln/graph/compute.hh | 3 +- milena/mln/graph/labeling.hh | 3 +- milena/mln/graph/to_neighb.hh | 3 +- milena/mln/graph/to_win.hh | 3 +- milena/mln/histo/compute.hh | 3 +- milena/mln/histo/equalize.hh | 3 +- milena/mln/io/cloud/load.hh | 3 +- milena/mln/io/cloud/save.hh | 3 +- milena/mln/io/dicom/get_header.hh | 3 +- milena/mln/io/dicom/load.hh | 9 +- milena/mln/io/dump/get_header.hh | 3 +- milena/mln/io/dump/load.hh | 3 +- milena/mln/io/dump/save.hh | 3 +- milena/mln/io/fits/load.hh | 3 +- milena/mln/io/fld/load.hh | 3 +- milena/mln/io/fld/save.hh | 3 +- milena/mln/io/magick/load.hh | 4 +- milena/mln/io/magick/save.hh | 10 +- milena/mln/io/off/load.hh | 9 +- milena/mln/io/off/save.hh | 12 +- milena/mln/io/pbm/load.hh | 3 +- milena/mln/io/pbm/save.hh | 3 +- milena/mln/io/pbms/load.hh | 3 +- milena/mln/io/pdf/get_header.hh | 3 +- milena/mln/io/pdf/load.hh | 9 +- milena/mln/io/pfm/load.hh | 3 +- milena/mln/io/pfm/save.hh | 3 +- milena/mln/io/pgm/load.hh | 6 +- milena/mln/io/pgm/save.hh | 3 +- milena/mln/io/pgms/load.hh | 3 +- milena/mln/io/plot/load.hh | 3 +- milena/mln/io/plot/save.hh | 9 +- milena/mln/io/pnm/load.hh | 6 +- milena/mln/io/pnm/save.hh | 3 +- milena/mln/io/pnms/load.hh | 6 +- milena/mln/io/ppm/load.hh | 6 +- milena/mln/io/ppms/load.hh | 3 +- milena/mln/io/raw/get_header.hh | 3 +- milena/mln/io/raw/load.hh | 3 +- milena/mln/io/raw/save.hh | 3 +- milena/mln/io/svg/simple_svg_1.0.0.hh | 642 ++++++++++++++++++++ milena/mln/io/tiff/load.hh | 3 +- milena/mln/io/txt/save.hh | 3 +- milena/mln/labeling/background.hh | 3 +- milena/mln/labeling/blobs.hh | 3 +- milena/mln/labeling/blobs_and_compute.hh | 3 +- milena/mln/labeling/colorize.hh | 8 +- milena/mln/labeling/compute.hh | 30 +- milena/mln/labeling/compute_image.hh | 9 +- milena/mln/labeling/fill_holes.hh | 3 +- milena/mln/labeling/flat_zones.hh | 3 +- milena/mln/labeling/foreground.hh | 3 +- milena/mln/labeling/mean_values.hh | 9 +- milena/mln/labeling/n_max.hh | 3 +- milena/mln/labeling/pack.hh | 6 +- milena/mln/labeling/regional_maxima.hh | 3 +- milena/mln/labeling/regional_minima.hh | 3 +- milena/mln/labeling/relabel.hh | 12 +- milena/mln/labeling/superpose.hh | 3 +- milena/mln/labeling/value.hh | 3 +- milena/mln/labeling/value.spe.hh | 3 +- milena/mln/labeling/value_and_compute.hh | 3 +- milena/mln/labeling/wrap.hh | 3 +- milena/mln/linear/convolve.hh | 9 +- milena/mln/linear/convolve_2x1d.hh | 3 +- milena/mln/linear/convolve_directional.hh | 3 +- milena/mln/linear/gaussian_1d.hh | 3 +- milena/mln/linear/gaussian_directional_2d.hh | 3 +- milena/mln/linear/lap.hh | 12 +- milena/mln/linear/log.hh | 11 +- milena/mln/linear/sobel_2d.hh | 12 +- milena/mln/logical/and.hh | 6 +- milena/mln/logical/and_not.hh | 6 +- milena/mln/logical/not.hh | 6 +- milena/mln/logical/not.spe.hh | 6 +- milena/mln/logical/or.hh | 6 +- milena/mln/logical/xor.hh | 6 +- milena/mln/make/dual_neighb.hh | 3 +- milena/mln/make/dummy_p_edges.hh | 3 +- milena/mln/make/dummy_p_vertices.hh | 3 +- milena/mln/make/edge_image.hh | 18 +- milena/mln/make/influence_zone_adjacency_graph.hh | 6 +- milena/mln/make/p_edges_with_mass_centers.hh | 3 +- milena/mln/make/p_vertices_with_mass_centers.hh | 3 +- milena/mln/make/rag_and_labeled_wsl.hh | 6 +- milena/mln/make/region_adjacency_graph.hh | 6 +- milena/mln/make/relabelfun.hh | 6 +- milena/mln/make/vertex_image.hh | 6 +- milena/mln/make/w_window.hh | 3 +- milena/mln/morpho/algebraic_filter.hh | 3 +- milena/mln/morpho/approx/dilation.hh | 9 +- milena/mln/morpho/approx/erosion.hh | 9 +- milena/mln/morpho/closing/algebraic.hh | 3 +- milena/mln/morpho/closing/approx/structural.hh | 3 +- milena/mln/morpho/closing/area.hh | 3 +- milena/mln/morpho/closing/area_on_vertices.hh | 3 +- milena/mln/morpho/closing/height.hh | 3 +- milena/mln/morpho/closing/leveling.hh | 3 +- milena/mln/morpho/closing/structural.hh | 3 +- milena/mln/morpho/closing/sum.hh | 3 +- milena/mln/morpho/closing/volume.hh | 3 +- milena/mln/morpho/complementation.hh | 6 +- milena/mln/morpho/contrast.hh | 3 +- milena/mln/morpho/dilation.hh | 9 +- milena/mln/morpho/elementary/closing.hh | 3 +- milena/mln/morpho/elementary/dilation.hh | 3 +- milena/mln/morpho/elementary/erosion.hh | 3 +- milena/mln/morpho/elementary/gradient.hh | 12 +- milena/mln/morpho/elementary/gradient_external.hh | 3 +- milena/mln/morpho/elementary/gradient_internal.hh | 3 +- milena/mln/morpho/elementary/laplacian.hh | 3 +- milena/mln/morpho/elementary/like_ero_fun.hh | 6 +- milena/mln/morpho/elementary/like_ero_set.hh | 6 +- milena/mln/morpho/elementary/opening.hh | 3 +- milena/mln/morpho/elementary/top_hat.hh | 9 +- milena/mln/morpho/erosion.hh | 9 +- milena/mln/morpho/general.hh | 9 +- milena/mln/morpho/general.spe.hh | 21 +- milena/mln/morpho/gradient.hh | 9 +- milena/mln/morpho/hit_or_miss.hh | 21 +- milena/mln/morpho/laplacian.hh | 6 +- milena/mln/morpho/leveling_filter.hh | 3 +- milena/mln/morpho/line_gradient.hh | 3 +- milena/mln/morpho/meyer_wst.hh | 3 +- milena/mln/morpho/min.hh | 6 +- milena/mln/morpho/minus.hh | 3 +- milena/mln/morpho/opening/algebraic.hh | 3 +- milena/mln/morpho/opening/approx/structural.hh | 3 +- milena/mln/morpho/opening/area.hh | 3 +- milena/mln/morpho/opening/area_on_vertices.hh | 3 +- milena/mln/morpho/opening/height.hh | 3 +- milena/mln/morpho/opening/leveling.hh | 3 +- milena/mln/morpho/opening/structural.hh | 3 +- milena/mln/morpho/opening/volume.hh | 3 +- milena/mln/morpho/plus.hh | 3 +- milena/mln/morpho/rank_filter.hh | 12 +- .../reconstruction/by_dilation/union_find.hh | 6 +- .../morpho/reconstruction/by_erosion/union_find.hh | 6 +- milena/mln/morpho/skeleton_constrained.hh | 9 +- milena/mln/morpho/thick_miss.hh | 3 +- milena/mln/morpho/thickening.hh | 3 +- milena/mln/morpho/thin_fit.hh | 3 +- milena/mln/morpho/thinning.hh | 3 +- milena/mln/morpho/top_hat.hh | 9 +- milena/mln/morpho/tree/component_tree.hh | 6 +- milena/mln/morpho/tree/compute_attribute_image.hh | 6 +- milena/mln/morpho/tree/compute_parent.hh | 6 +- milena/mln/morpho/tree/dual_input_tree.hh | 3 +- milena/mln/morpho/tree/filter/direct.hh | 3 +- milena/mln/morpho/tree/filter/filter.hh | 3 +- milena/mln/morpho/tree/filter/max.hh | 3 +- milena/mln/morpho/tree/filter/min.hh | 3 +- milena/mln/morpho/tree/filter/subtractive.hh | 3 +- milena/mln/morpho/tree/impl/dual_hqueue.hh | 3 +- milena/mln/morpho/tree/impl/dual_union_find.hh | 3 +- milena/mln/morpho/tree/max.hh | 3 +- milena/mln/morpho/watershed/flooding.hh | 9 +- milena/mln/morpho/watershed/superpose.hh | 3 +- milena/mln/opt/at.hh | 5 +- milena/mln/registration/icp.hh | 3 +- milena/mln/set/card.hh | 9 +- milena/mln/set/compute.hh | 9 +- milena/mln/set/compute_with_weights.hh | 15 +- milena/mln/set/diff.hh | 3 +- milena/mln/set/get.hh | 3 +- milena/mln/set/has.hh | 3 +- milena/mln/set/inter.hh | 3 +- milena/mln/set/sym_diff.hh | 3 +- milena/mln/set/uni.hh | 3 +- milena/mln/set/unique.hh | 3 +- milena/mln/subsampling/antialiased.hh | 13 +- milena/mln/test/positive.hh | 3 +- milena/mln/test/predicate.hh | 9 +- milena/mln/topo/skeleton/crest.hh | 9 +- .../distance_and_closest_point_geodesic.hh | 6 +- .../distance_and_influence_zone_geodesic.hh | 3 +- milena/mln/transform/distance_front.hh | 3 +- milena/mln/transform/distance_geodesic.hh | 3 +- milena/mln/transform/hough.hh | 3 +- milena/mln/transform/influence_zone_front.hh | 3 +- milena/mln/transform/influence_zone_geodesic.hh | 6 +- .../transform/influence_zone_geodesic_saturated.hh | 3 +- milena/mln/upscaling/art/scale2x.hh | 3 +- milena/mln/upscaling/art/scale3x.hh | 3 +- milena/mln/util/tree_fast_to_image.hh | 6 +- milena/mln/util/tree_to_fast.hh | 8 +- milena/mln/util/tree_to_image.hh | 21 +- milena/mln/win/diff.hh | 3 +- milena/mln/win/inter.hh | 3 +- milena/mln/win/shift.hh | 3 +- milena/mln/win/sym.hh | 6 +- milena/mln/world/binary_2d/enlarge.hh | 3 +- milena/mln/world/binary_2d/subsample.hh | 4 +- milena/mln/world/inter_pixel/compute.hh | 3 +- .../mln/world/inter_pixel/dim2/make_edge_image.hh | 3 +- milena/mln/world/inter_pixel/full2image.hh | 3 +- milena/mln/world/inter_pixel/immerse.hh | 3 +- milena/mln/world/rgb/invert.hh | 9 +- milena/mln/world/rgb/invert.spe.hh | 7 +- milena/tests/arith/diff_abs.cc | 2 +- milena/tests/arith/minus.cc | 2 +- milena/tests/arith/plus.cc | 4 +- milena/tests/arith/revert.cc | 2 +- milena/tests/arith/times.cc | 2 +- milena/tests/geom/nsites.cc | 2 +- milena/tests/morpho/closing/algebraic.cc | 2 +- milena/tests/morpho/elementary/closing.cc | 2 +- milena/tests/morpho/elementary/dilation.cc | 2 +- milena/tests/morpho/elementary/erosion.cc | 2 +- milena/tests/morpho/elementary/opening.cc | 2 +- milena/tests/morpho/elementary/top_hat.cc | 2 +- milena/tests/morpho/general.cc | 4 +- milena/tests/morpho/opening/algebraic.cc | 2 +- milena/tests/morpho/top_hat.cc | 2 +- 373 files changed, 2392 insertions(+), 1380 deletions(-) create mode 100644 milena/mln/debug/trace.hh create mode 100644 milena/mln/io/svg/simple_svg_1.0.0.hh diff --git a/milena/ChangeLog b/milena/ChangeLog index aa4dc0d..6937e7c 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -35,6 +35,384 @@ 2013-03-15 Guillaume Lazzara <z@lrde.epita.fr> + Introduce mln_trace. + + * mln/debug/trace.hh: New. + + * doc/benchmark/canvas.cc, + * doc/examples/split/tuto3_first_routine-1.cc.raw, + * doc/examples/split/tuto3_first_routine-3.cc.raw, + * doc/examples/split/tuto3_first_routine-8.cc.raw, + * doc/examples/split/tuto3_trace-1.cc.raw, + * doc/examples/split/tuto3_trace-2.cc.raw, + * doc/examples/trash/tuto_bis.cc, + * doc/examples/tuto3/first_routine.cc, + * doc/examples/tuto3/trace.cc, + * doc/outputs/accu-right-instantiation.txt, + * doc/outputs/borderthickness.txt, + * doc/outputs/estim-sites.txt, + * doc/outputs/extend.txt, + * doc/outputs/fill-call-1.txt, + * doc/outputs/fill-imageif-cfun.txt, + * doc/outputs/fill-part-image.txt, + * doc/outputs/fill-subdomain-shorter.txt, + * doc/outputs/fill-subdomain.txt, + * doc/outputs/fill.txt, + * doc/outputs/ima-load.txt, + * doc/outputs/ima-save.txt, + * doc/outputs/ima2d-6-clone.txt, + * doc/outputs/ima2d-7.txt, + * doc/outputs/ima2d-rot.txt, + * doc/outputs/labeling-compute.txt, + * doc/outputs/logical-not.txt, + * doc/outputs/paste-call-1.txt, + * doc/outputs/split/tuto3_println-1.txt, + * doc/outputs/split/tuto3_println-2.txt, + * doc/outputs/tuto2_first_image.txt, + * doc/outputs/tuto3_colorize.txt, + * doc/outputs/tuto3_first_routine.txt, + * doc/outputs/tuto3_println.txt, + * doc/outputs/tuto3_rw_image.txt, + * doc/outputs/tuto4_genericity_and_algorithms.txt, + * mln/accu/compute.hh, + * mln/accu/image/init.hh, + * mln/accu/image/set_value.hh, + * mln/accu/image/take.hh, + * mln/accu/image/take_as_init.hh, + * mln/accu/image/take_n_times.hh, + * mln/accu/image/to_result.hh, + * mln/accu/image/untake.hh, + * mln/accu/stat/histo3d_rgb.hh, + * mln/accu/transform.hh, + * mln/accu/transform_diagonal.hh, + * mln/accu/transform_directional.hh, + * mln/accu/transform_line.hh, + * mln/accu/transform_snake.hh, + * mln/accu/transform_stop.hh, + * mln/all.hh, + * mln/arith/diff_abs.hh, + * mln/arith/div.hh, + * mln/arith/div.spe.hh, + * mln/arith/min.hh, + * mln/arith/min.spe.hh, + * mln/arith/minus.hh, + * mln/arith/plus.hh, + * mln/arith/revert.hh, + * mln/arith/revert.spe.hh, + * mln/arith/times.hh, + * mln/arith/times.spe.hh, + * mln/binarization/binarization.hh, + * mln/binarization/threshold.hh, + * mln/border/adjust.hh, + * mln/border/duplicate.hh, + * mln/border/equalize.hh, + * mln/border/fill.hh, + * mln/border/find.hh, + * mln/border/get.hh, + * mln/border/mirror.hh, + * mln/border/resize.hh, + * mln/border/resize_equal.hh, + * mln/canvas/browsing/backdiagonal2d.hh, + * mln/canvas/browsing/diagonal2d.hh, + * mln/canvas/browsing/dir_struct_elt_incr_update.hh, + * mln/canvas/browsing/directional.hh, + * mln/canvas/browsing/fwd.hh, + * mln/canvas/browsing/hyper_directional.hh, + * mln/canvas/browsing/internal/graph_first_search.hh, + * mln/canvas/browsing/snake_fwd.hh, + * mln/canvas/browsing/snake_generic.hh, + * mln/canvas/browsing/snake_vert.hh, + * mln/canvas/distance_front.hh, + * mln/canvas/distance_geodesic.hh, + * mln/canvas/labeling/blobs.hh, + * mln/canvas/labeling/generic.hh, + * mln/canvas/labeling/sorted.hh, + * mln/canvas/labeling/video.hh, + * mln/canvas/morpho/attribute_filter.hh, + * mln/clustering/kmean_rgb.hh, + * mln/convert/to.hh, + * mln/convert/to_qimage.hh, + * mln/convert/to_qimage_nocopy.hh, + * mln/core/concept/object.hh, + * mln/core/routine/duplicate.hh, + * mln/core/routine/initialize.hh, + * mln/data/abs.hh, + * mln/data/apply.hh, + * mln/data/apply.spe.hh, + * mln/data/approx/median.hh, + * mln/data/compare.hh, + * mln/data/compute.hh, + * mln/data/compute_in_window.hh, + * mln/data/convert.hh, + * mln/data/fill.hh, + * mln/data/fill_with_image.hh, + * mln/data/fill_with_image.spe.hh, + * mln/data/fill_with_value.hh, + * mln/data/fill_with_value.spe.hh, + * mln/data/median.hh, + * mln/data/memcpy_.hh, + * mln/data/memset_.hh, + * mln/data/paste.hh, + * mln/data/paste.spe.hh, + * mln/data/paste_without_localization.hh, + * mln/data/replace.hh, + * mln/data/saturate.hh, + * mln/data/sort_offsets.hh, + * mln/data/split.hh, + * mln/data/stretch.hh, + * mln/data/to_enc.hh, + * mln/data/transform.hh, + * mln/data/transform.spe.hh, + * mln/data/transform_inplace.hh, + * mln/data/update.hh, + * mln/data/wrap.hh, + * mln/debug/draw_graph.hh, + * mln/debug/iota.hh, + * mln/debug/mosaic.hh, + * mln/debug/println.hh, + * mln/debug/put_word.hh, + * mln/debug/slices_2d.hh, + * mln/debug/superpose.hh, + * mln/debug/z_order.hh, + * mln/draw/dashed_line.hh, + * mln/draw/line.hh, + * mln/essential/routine.hh, + * mln/extension/adjust.hh, + * mln/extension/adjust_duplicate.hh, + * mln/extension/adjust_fill.hh, + * mln/extension/duplicate.hh, + * mln/extension/fill.hh, + * mln/fun/x2x/composed.hh, + * mln/geom/chamfer.hh, + * mln/geom/crop.hh, + * mln/geom/crop_without_localization.hh, + * mln/geom/horizontal_symmetry.hh, + * mln/geom/max_ind.hh, + * mln/geom/min_ind.hh, + * mln/geom/ninds.hh, + * mln/geom/nsites.hh, + * mln/geom/rotate.hh, + * mln/geom/seeds2tiling.hh, + * mln/geom/seeds2tiling_roundness.hh, + * mln/geom/translate.hh, + * mln/geom/vertical_symmetry.hh, + * mln/graph/compute.hh, + * mln/graph/labeling.hh, + * mln/graph/to_neighb.hh, + * mln/graph/to_win.hh, + * mln/histo/compute.hh, + * mln/histo/equalize.hh, + * mln/io/cloud/load.hh, + * mln/io/cloud/save.hh, + * mln/io/dicom/get_header.hh, + * mln/io/dicom/load.hh, + * mln/io/dump/get_header.hh, + * mln/io/dump/load.hh, + * mln/io/dump/save.hh, + * mln/io/fits/load.hh, + * mln/io/fld/load.hh, + * mln/io/fld/save.hh, + * mln/io/magick/load.hh, + * mln/io/magick/save.hh, + * mln/io/off/load.hh, + * mln/io/off/save.hh, + * mln/io/pbm/load.hh, + * mln/io/pbm/save.hh, + * mln/io/pbms/load.hh, + * mln/io/pdf/get_header.hh, + * mln/io/pdf/load.hh, + * mln/io/pfm/load.hh, + * mln/io/pfm/save.hh, + * mln/io/pgm/load.hh, + * mln/io/pgm/save.hh, + * mln/io/pgms/load.hh, + * mln/io/plot/load.hh, + * mln/io/plot/save.hh, + * mln/io/pnm/load.hh, + * mln/io/pnm/save.hh, + * mln/io/pnms/load.hh, + * mln/io/ppm/load.hh, + * mln/io/ppms/load.hh, + * mln/io/raw/get_header.hh, + * mln/io/raw/load.hh, + * mln/io/raw/save.hh, + * mln/io/svg/simple_svg_1.0.0.hh, + * mln/io/tiff/load.hh, + * mln/io/txt/save.hh, + * mln/labeling/background.hh, + * mln/labeling/blobs.hh, + * mln/labeling/blobs_and_compute.hh, + * mln/labeling/colorize.hh, + * mln/labeling/compute.hh, + * mln/labeling/compute_image.hh, + * mln/labeling/fill_holes.hh, + * mln/labeling/flat_zones.hh, + * mln/labeling/foreground.hh, + * mln/labeling/mean_values.hh, + * mln/labeling/n_max.hh, + * mln/labeling/pack.hh, + * mln/labeling/regional_maxima.hh, + * mln/labeling/regional_minima.hh, + * mln/labeling/relabel.hh, + * mln/labeling/superpose.hh, + * mln/labeling/value.hh, + * mln/labeling/value.spe.hh, + * mln/labeling/value_and_compute.hh, + * mln/labeling/wrap.hh, + * mln/linear/convolve.hh, + * mln/linear/convolve_2x1d.hh, + * mln/linear/convolve_directional.hh, + * mln/linear/gaussian_1d.hh, + * mln/linear/gaussian_directional_2d.hh, + * mln/linear/lap.hh, + * mln/linear/log.hh, + * mln/linear/sobel_2d.hh, + * mln/logical/and.hh, + * mln/logical/and_not.hh, + * mln/logical/not.hh, + * mln/logical/not.spe.hh, + * mln/logical/or.hh, + * mln/logical/xor.hh, + * mln/make/dual_neighb.hh, + * mln/make/dummy_p_edges.hh, + * mln/make/dummy_p_vertices.hh, + * mln/make/edge_image.hh, + * mln/make/influence_zone_adjacency_graph.hh, + * mln/make/p_edges_with_mass_centers.hh, + * mln/make/p_vertices_with_mass_centers.hh, + * mln/make/rag_and_labeled_wsl.hh, + * mln/make/region_adjacency_graph.hh, + * mln/make/relabelfun.hh, + * mln/make/vertex_image.hh, + * mln/make/w_window.hh, + * mln/morpho/algebraic_filter.hh, + * mln/morpho/approx/dilation.hh, + * mln/morpho/approx/erosion.hh, + * mln/morpho/closing/algebraic.hh, + * mln/morpho/closing/approx/structural.hh, + * mln/morpho/closing/area.hh, + * mln/morpho/closing/area_on_vertices.hh, + * mln/morpho/closing/height.hh, + * mln/morpho/closing/leveling.hh, + * mln/morpho/closing/structural.hh, + * mln/morpho/closing/sum.hh, + * mln/morpho/closing/volume.hh, + * mln/morpho/complementation.hh, + * mln/morpho/contrast.hh, + * mln/morpho/dilation.hh, + * mln/morpho/elementary/closing.hh, + * mln/morpho/elementary/dilation.hh, + * mln/morpho/elementary/erosion.hh, + * mln/morpho/elementary/gradient.hh, + * mln/morpho/elementary/gradient_external.hh, + * mln/morpho/elementary/gradient_internal.hh, + * mln/morpho/elementary/laplacian.hh, + * mln/morpho/elementary/like_ero_fun.hh, + * mln/morpho/elementary/like_ero_set.hh, + * mln/morpho/elementary/opening.hh, + * mln/morpho/elementary/top_hat.hh, + * mln/morpho/erosion.hh, + * mln/morpho/general.hh, + * mln/morpho/general.spe.hh, + * mln/morpho/gradient.hh, + * mln/morpho/hit_or_miss.hh, + * mln/morpho/laplacian.hh, + * mln/morpho/leveling_filter.hh, + * mln/morpho/line_gradient.hh, + * mln/morpho/meyer_wst.hh, + * mln/morpho/min.hh, + * mln/morpho/minus.hh, + * mln/morpho/opening/algebraic.hh, + * mln/morpho/opening/approx/structural.hh, + * mln/morpho/opening/area.hh, + * mln/morpho/opening/area_on_vertices.hh, + * mln/morpho/opening/height.hh, + * mln/morpho/opening/leveling.hh, + * mln/morpho/opening/structural.hh, + * mln/morpho/opening/volume.hh, + * mln/morpho/plus.hh, + * mln/morpho/rank_filter.hh, + * mln/morpho/reconstruction/by_dilation/union_find.hh, + * mln/morpho/reconstruction/by_erosion/union_find.hh, + * mln/morpho/skeleton_constrained.hh, + * mln/morpho/thick_miss.hh, + * mln/morpho/thickening.hh, + * mln/morpho/thin_fit.hh, + * mln/morpho/thinning.hh, + * mln/morpho/top_hat.hh, + * mln/morpho/tree/component_tree.hh, + * mln/morpho/tree/compute_attribute_image.hh, + * mln/morpho/tree/compute_parent.hh, + * mln/morpho/tree/dual_input_tree.hh, + * mln/morpho/tree/filter/direct.hh, + * mln/morpho/tree/filter/filter.hh, + * mln/morpho/tree/filter/max.hh, + * mln/morpho/tree/filter/min.hh, + * mln/morpho/tree/filter/subtractive.hh, + * mln/morpho/tree/impl/dual_hqueue.hh, + * mln/morpho/tree/impl/dual_union_find.hh, + * mln/morpho/tree/max.hh, + * mln/morpho/watershed/flooding.hh, + * mln/morpho/watershed/superpose.hh, + * mln/opt/at.hh, + * mln/registration/icp.hh, + * mln/set/card.hh, + * mln/set/compute.hh, + * mln/set/compute_with_weights.hh, + * mln/set/diff.hh, + * mln/set/get.hh, + * mln/set/has.hh, + * mln/set/inter.hh, + * mln/set/sym_diff.hh, + * mln/set/uni.hh, + * mln/set/unique.hh, + * mln/subsampling/antialiased.hh, + * mln/test/positive.hh, + * mln/test/predicate.hh, + * mln/topo/skeleton/crest.hh, + * mln/transform/distance_and_closest_point_geodesic.hh, + * mln/transform/distance_and_influence_zone_geodesic.hh, + * mln/transform/distance_front.hh, + * mln/transform/distance_geodesic.hh, + * mln/transform/hough.hh, + * mln/transform/influence_zone_front.hh, + * mln/transform/influence_zone_geodesic.hh, + * mln/transform/influence_zone_geodesic_saturated.hh, + * mln/upscaling/art/scale2x.hh, + * mln/upscaling/art/scale3x.hh, + * mln/util/tree_fast_to_image.hh, + * mln/util/tree_to_fast.hh, + * mln/util/tree_to_image.hh, + * mln/win/diff.hh, + * mln/win/inter.hh, + * mln/win/shift.hh, + * mln/win/sym.hh, + * mln/world/binary_2d/enlarge.hh, + * mln/world/binary_2d/subsample.hh, + * mln/world/inter_pixel/compute.hh, + * mln/world/inter_pixel/dim2/make_edge_image.hh, + * mln/world/inter_pixel/full2image.hh, + * mln/world/inter_pixel/immerse.hh, + * mln/world/rgb/invert.hh, + * mln/world/rgb/invert.spe.hh, + * tests/arith/diff_abs.cc, + * tests/arith/minus.cc, + * tests/arith/plus.cc, + * tests/arith/revert.cc, + * tests/arith/times.cc, + * tests/geom/nsites.cc, + * tests/morpho/closing/algebraic.cc, + * tests/morpho/elementary/closing.cc, + * tests/morpho/elementary/dilation.cc, + * tests/morpho/elementary/erosion.cc, + * tests/morpho/elementary/opening.cc, + * tests/morpho/elementary/top_hat.cc, + * tests/morpho/general.cc, + * tests/morpho/opening/algebraic.cc, + * tests/morpho/top_hat.cc: Make use of mln_trace. + +2013-03-15 Guillaume Lazzara <z@lrde.epita.fr> + Automatically initialize GraphicsMagick. * mln/io/magick/internal/init_magick.hh: New. diff --git a/milena/doc/benchmark/canvas.cc b/milena/doc/benchmark/canvas.cc index ce3c7e3..eaff351 100644 --- a/milena/doc/benchmark/canvas.cc +++ b/milena/doc/benchmark/canvas.cc @@ -93,14 +93,13 @@ namespace mln labeling<F>::labeling(F& f) : f(f) { - trace::entering("canvas::labeling"); + mln_trace("canvas::labeling"); init(); f.init(); // Client initialization. pass_1(); pass_2(); - trace::exiting("canvas::labeling"); } template <typename F> @@ -251,7 +250,7 @@ namespace mln level(const Image<I>& input, const mln_value(I)& val, const Neighborhood<N>& nbh, L& nlabels) { - trace::entering("labeling::value"); + mln_trace("labeling::value"); typedef level_functor<I,N,L> F; F f(exact(input), val, exact(nbh)); @@ -259,7 +258,6 @@ namespace mln nlabels = run.nlabels; - trace::exiting("labeling::value"); return run.output; } diff --git a/milena/doc/examples/split/tuto3_first_routine-1.cc.raw b/milena/doc/examples/split/tuto3_first_routine-1.cc.raw index 3e66206..d36d6ae 100644 --- a/milena/doc/examples/split/tuto3_first_routine-1.cc.raw +++ b/milena/doc/examples/split/tuto3_first_routine-1.cc.raw @@ -29,7 +29,7 @@ namespace mln my_algorithm(const Image<I>& ima_, const Neighborhood<N>& nbh_) { - trace::entering("my_algorithm"); + debug::trace("my_algorithm"); const I& ima = exact(ima_); const N& nbh = exact(nbh_); @@ -53,7 +53,6 @@ namespace mln data::fill((output | (pw::value(lbl) == pw::cst(i))).rw(), literal::zero); - trace::exiting("my_algorithm"); return output; } diff --git a/milena/doc/examples/split/tuto3_first_routine-3.cc.raw b/milena/doc/examples/split/tuto3_first_routine-3.cc.raw index 35421e3..d9d40b9 100644 --- a/milena/doc/examples/split/tuto3_first_routine-3.cc.raw +++ b/milena/doc/examples/split/tuto3_first_routine-3.cc.raw @@ -1 +1 @@ - trace::entering("my_algorithm"); + debug::trace("my_algorithm"); diff --git a/milena/doc/examples/split/tuto3_first_routine-8.cc.raw b/milena/doc/examples/split/tuto3_first_routine-8.cc.raw index a0b2a75..e042cad 100644 --- a/milena/doc/examples/split/tuto3_first_routine-8.cc.raw +++ b/milena/doc/examples/split/tuto3_first_routine-8.cc.raw @@ -1,2 +1 @@ - trace::exiting("my_algorithm"); return output; diff --git a/milena/doc/examples/split/tuto3_trace-1.cc.raw b/milena/doc/examples/split/tuto3_trace-1.cc.raw index 39a1013..31c063d 100644 --- a/milena/doc/examples/split/tuto3_trace-1.cc.raw +++ b/milena/doc/examples/split/tuto3_trace-1.cc.raw @@ -1,2 +1,2 @@ // ... - trace::quiet = false; + debug::trace::quiet = false; diff --git a/milena/doc/examples/split/tuto3_trace-2.cc.raw b/milena/doc/examples/split/tuto3_trace-2.cc.raw index a1e0739..e206ff5 100644 --- a/milena/doc/examples/split/tuto3_trace-2.cc.raw +++ b/milena/doc/examples/split/tuto3_trace-2.cc.raw @@ -1,6 +1,6 @@ labeling::blobs(ima, c4(), nlabels); - trace::quiet = true; + debug::trace::quiet = true; geom::bbox(ima); // ... diff --git a/milena/doc/examples/trash/tuto_bis.cc b/milena/doc/examples/trash/tuto_bis.cc index 238f843..399b55a 100644 --- a/milena/doc/examples/trash/tuto_bis.cc +++ b/milena/doc/examples/trash/tuto_bis.cc @@ -45,7 +45,7 @@ namespace mln V& v) { mlc_is_a(A_, Meta_Accumulator)::check(); - trace::entering("accu::compute"); + mln_trace("accu::compute"); const I& input = exact(input_); const L& label = exact(label_); @@ -61,7 +61,6 @@ namespace mln for (unsigned l = 1; l < n; ++l) v(l) = a[l]; - trace::exiting("accu::compute"); } } // mln::accu diff --git a/milena/doc/examples/tuto3/first_routine.cc b/milena/doc/examples/tuto3/first_routine.cc index 609fd4e..9784e35 100644 --- a/milena/doc/examples/tuto3/first_routine.cc +++ b/milena/doc/examples/tuto3/first_routine.cc @@ -33,7 +33,7 @@ namespace mln my_algorithm(const Image<I>& ima_, const Neighborhood<N>& nbh_) { - trace::entering("my_algorithm"); + mln_trace("my_algorithm"); const I& ima = exact(ima_); const N& nbh = exact(nbh_); @@ -57,7 +57,6 @@ namespace mln data::fill((output | (pw::value(lbl) == pw::cst(i))).rw(), literal::zero); - trace::exiting("my_algorithm"); return output; } @@ -77,7 +76,7 @@ namespace sandbox // \} { // \{ - trace::entering("my_algorithm"); + mln_trace("my_algorithm"); // \} // \{ @@ -111,7 +110,6 @@ namespace sandbox // \} // \{ - trace::exiting("my_algorithm"); return output; // \} } diff --git a/milena/doc/examples/tuto3/trace.cc b/milena/doc/examples/tuto3/trace.cc index a857163..52b8bbe 100644 --- a/milena/doc/examples/tuto3/trace.cc +++ b/milena/doc/examples/tuto3/trace.cc @@ -13,13 +13,13 @@ int main() label_8 nlabels; // \{ // ... - trace::quiet = false; + debug::trace::quiet = false; // \} - trace::quiet = true; + debug::trace::quiet = true; // \{ labeling::blobs(ima, c4(), nlabels); - trace::quiet = true; + debug::trace::quiet = true; geom::bbox(ima); // ... diff --git a/milena/doc/outputs/accu-right-instantiation.txt b/milena/doc/outputs/accu-right-instantiation.txt index e69de29..b8389ed 100644 --- a/milena/doc/outputs/accu-right-instantiation.txt +++ b/milena/doc/outputs/accu-right-instantiation.txt @@ -0,0 +1,2 @@ +data::compute {} +data::impl::update_fastest {} diff --git a/milena/doc/outputs/borderthickness.txt b/milena/doc/outputs/borderthickness.txt index 94f4df7..e159b1a 100644 --- a/milena/doc/outputs/borderthickness.txt +++ b/milena/doc/outputs/borderthickness.txt @@ -1,3 +1,5 @@ +border::fill {} +border::impl::fill_size_1 {} - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/milena/doc/outputs/estim-sites.txt b/milena/doc/outputs/estim-sites.txt index e69de29..a24151d 100644 --- a/milena/doc/outputs/estim-sites.txt +++ b/milena/doc/outputs/estim-sites.txt @@ -0,0 +1,2 @@ +geom::nsites {} +set::impl::card_from_method {} diff --git a/milena/doc/outputs/extend.txt b/milena/doc/outputs/extend.txt index e69de29..18621cb 100644 --- a/milena/doc/outputs/extend.txt +++ b/milena/doc/outputs/extend.txt @@ -0,0 +1,31 @@ +mln::io::ppm::load {} +mln::io::pnm::load {} +core::initialize {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +data::paste {} +data::impl::generic::paste {} +mln::io::pnm::save {} +mln::io::pnm::save {} +mln::io::pnm::save {} +mln::io::pnm::save {} +core::initialize {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} +data::transform {} +data::impl::generic::transform {} +core::initialize {} +data::paste {} +data::impl::generic::paste {} +data::paste {} +data::impl::generic::paste {} +mln::io::pnm::save {} diff --git a/milena/doc/outputs/fill-call-1.txt b/milena/doc/outputs/fill-call-1.txt index e69de29..8cfbfd9 100644 --- a/milena/doc/outputs/fill-call-1.txt +++ b/milena/doc/outputs/fill-call-1.txt @@ -0,0 +1,8 @@ +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} diff --git a/milena/doc/outputs/fill-imageif-cfun.txt b/milena/doc/outputs/fill-imageif-cfun.txt index e69de29..fca0e7e 100644 --- a/milena/doc/outputs/fill-imageif-cfun.txt +++ b/milena/doc/outputs/fill-imageif-cfun.txt @@ -0,0 +1,10 @@ +core::initialize {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} +mln::io::pnm::save {} diff --git a/milena/doc/outputs/fill-part-image.txt b/milena/doc/outputs/fill-part-image.txt index 39d0035..7c8dece 100644 --- a/milena/doc/outputs/fill-part-image.txt +++ b/milena/doc/outputs/fill-part-image.txt @@ -1,9 +1,27 @@ +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} +debug::println {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} - - +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} +debug::println {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} - diff --git a/milena/doc/outputs/fill-subdomain-shorter.txt b/milena/doc/outputs/fill-subdomain-shorter.txt index e69de29..7678968 100644 --- a/milena/doc/outputs/fill-subdomain-shorter.txt +++ b/milena/doc/outputs/fill-subdomain-shorter.txt @@ -0,0 +1,20 @@ +labeling::blobs {} +labeling::blobs {} +core::initialize {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +extension::fill {} +border::fill {} +border::impl::fill_size_1 {} +core::initialize {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} diff --git a/milena/doc/outputs/fill-subdomain.txt b/milena/doc/outputs/fill-subdomain.txt index e69de29..f5c403d 100644 --- a/milena/doc/outputs/fill-subdomain.txt +++ b/milena/doc/outputs/fill-subdomain.txt @@ -0,0 +1,41 @@ +mln::io::pbm::save {} +labeling::blobs {} +labeling::blobs {} +core::initialize {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +extension::fill {} +border::fill {} +border::impl::fill_size_1 {} +labeling::colorize {} +data::transform {} +data::impl::transform_fast_lowq {} +core::initialize {} +mln::io::pnm::save {} +core::initialize {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} +labeling::colorize {} +data::transform {} +data::impl::transform_fast_lowq {} +core::initialize {} +mln::io::pnm::save {} +core::initialize {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} +mln::io::pnm::save {} diff --git a/milena/doc/outputs/fill.txt b/milena/doc/outputs/fill.txt index e69de29..15ad66f 100644 --- a/milena/doc/outputs/fill.txt +++ b/milena/doc/outputs/fill.txt @@ -0,0 +1,4 @@ +mln::io::ppm::load {} +mln::io::pnm::load {} +mln::io::pnm::save {} +mln::io::pnm::save {} diff --git a/milena/doc/outputs/ima-load.txt b/milena/doc/outputs/ima-load.txt index e69de29..c22c7f9 100644 --- a/milena/doc/outputs/ima-load.txt +++ b/milena/doc/outputs/ima-load.txt @@ -0,0 +1 @@ +mln::io::pbm::load {} diff --git a/milena/doc/outputs/ima-save.txt b/milena/doc/outputs/ima-save.txt index e69de29..2d09eac 100644 --- a/milena/doc/outputs/ima-save.txt +++ b/milena/doc/outputs/ima-save.txt @@ -0,0 +1 @@ +mln::io::pbm::save {} diff --git a/milena/doc/outputs/ima2d-6-clone.txt b/milena/doc/outputs/ima2d-6-clone.txt index 877bce6..5e5e738 100644 --- a/milena/doc/outputs/ima2d-6-clone.txt +++ b/milena/doc/outputs/ima2d-6-clone.txt @@ -1,2 +1,9 @@ +core::duplicate {} +core::initialize {} +data::fill {} +data::fill_with_image {} +border::get {} +border::get {} +data::impl::fill_with_image_fastest {} 3 - 0 0 diff --git a/milena/doc/outputs/ima2d-7.txt b/milena/doc/outputs/ima2d-7.txt index e69de29..45cf668 100644 --- a/milena/doc/outputs/ima2d-7.txt +++ b/milena/doc/outputs/ima2d-7.txt @@ -0,0 +1,6 @@ +core::initialize {} +data::fill {} +data::fill_with_image {} +border::get {} +border::get {} +data::impl::fill_with_image_fastest {} diff --git a/milena/doc/outputs/ima2d-rot.txt b/milena/doc/outputs/ima2d-rot.txt index e69de29..0858acd 100644 --- a/milena/doc/outputs/ima2d-rot.txt +++ b/milena/doc/outputs/ima2d-rot.txt @@ -0,0 +1,32 @@ +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +border::fill {} +border::impl::fill_size_n {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +border::fill {} +border::impl::fill_size_n {} +data::paste {} +data::impl::generic::paste {} +data::paste {} +data::impl::generic::paste {} +data::paste {} +data::impl::generic::paste {} +data::paste {} +data::impl::generic::paste {} +mln::io::pnm::save {} +data::paste {} +data::impl::generic::paste {} +data::paste {} +data::impl::generic::paste {} +data::paste {} +data::impl::generic::paste {} +data::paste {} +data::impl::generic::paste {} +mln::io::pnm::save {} diff --git a/milena/doc/outputs/labeling-compute.txt b/milena/doc/outputs/labeling-compute.txt index 19f03f4..e2efdee 100644 --- a/milena/doc/outputs/labeling-compute.txt +++ b/milena/doc/outputs/labeling-compute.txt @@ -1,3 +1,22 @@ +mln::io::pbm::save {} +labeling::blobs {} +labeling::blobs {} +core::initialize {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +extension::fill {} +border::fill {} +border::impl::fill_size_1 {} +labeling::colorize {} +data::transform {} +data::impl::transform_fast_lowq {} +core::initialize {} +mln::io::pnm::save {} +labeling::compute {} +labeling::impl::generic::compute {} [(0,1)..(1,2)] [(3,0)..(5,1)] [(3,2)..(4,4)] diff --git a/milena/doc/outputs/logical-not.txt b/milena/doc/outputs/logical-not.txt index e69de29..add9dd0 100644 --- a/milena/doc/outputs/logical-not.txt +++ b/milena/doc/outputs/logical-not.txt @@ -0,0 +1,10 @@ +mln::io::pbm::save {} +logical::not_ {} +data::transform {} +data::impl::transform_fast_lowq {} +core::initialize {} +mln::io::pbm::save {} +logical::not_inplace {} +data::transform_inplace {} +data::impl::transform_inplace_fastest_lowq {} +mln::io::pbm::save {} diff --git a/milena/doc/outputs/paste-call-1.txt b/milena/doc/outputs/paste-call-1.txt index 49e117a..c482286 100644 --- a/milena/doc/outputs/paste-call-1.txt +++ b/milena/doc/outputs/paste-call-1.txt @@ -1,3 +1,18 @@ +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +data::paste {} +border::get {} +border::get {} +data::impl::paste_fastest {} +debug::println {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} 98 98 98 98 98 98 98 98 98 98 98 98 diff --git a/milena/doc/outputs/split/tuto3_println-1.txt b/milena/doc/outputs/split/tuto3_println-1.txt index 7ef416e..0ff752d 100644 --- a/milena/doc/outputs/split/tuto3_println-1.txt +++ b/milena/doc/outputs/split/tuto3_println-1.txt @@ -1,3 +1,14 @@ +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +debug::println {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 diff --git a/milena/doc/outputs/split/tuto3_println-2.txt b/milena/doc/outputs/split/tuto3_println-2.txt index 4d76ec4..477da9d 100644 --- a/milena/doc/outputs/split/tuto3_println-2.txt +++ b/milena/doc/outputs/split/tuto3_println-2.txt @@ -1,3 +1,10 @@ +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +border::fill {} +border::impl::fill_size_1 {} 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 diff --git a/milena/doc/outputs/tuto2_first_image.txt b/milena/doc/outputs/tuto2_first_image.txt index 42a59f9..ebe8ba3 100644 --- a/milena/doc/outputs/tuto2_first_image.txt +++ b/milena/doc/outputs/tuto2_first_image.txt @@ -1,3 +1,9 @@ +debug::println {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} - - - - - - - - - - - - - - - - - - - - - - | - | - | | | - | - - - | - - - - | - - - | - | - | - - - | - - - | - - - | - | - @@ -12,3 +18,4 @@ - | - | - - | - - | - | - | | | - | | - - - - - - - - - - - - - - - - - - - - - - - +mln::io::pbm::save {} diff --git a/milena/doc/outputs/tuto3_colorize.txt b/milena/doc/outputs/tuto3_colorize.txt index e69de29..f8d7c99 100644 --- a/milena/doc/outputs/tuto3_colorize.txt +++ b/milena/doc/outputs/tuto3_colorize.txt @@ -0,0 +1,7 @@ +labeling::colorize {} +data::transform {} +data::impl::transform_fast_lowq {} +core::initialize {} +mln::io::pgm::save {} +mln::io::pnm::save {} +mln::io::pnm::save {} diff --git a/milena/doc/outputs/tuto3_first_routine.txt b/milena/doc/outputs/tuto3_first_routine.txt index e69de29..e0777a2 100644 --- a/milena/doc/outputs/tuto3_first_routine.txt +++ b/milena/doc/outputs/tuto3_first_routine.txt @@ -0,0 +1,48 @@ +my_algorithm {} +labeling::blobs {} +labeling::blobs {} +core::initialize {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +extension::fill {} +border::fill {} +border::impl::fill_size_1 {} +labeling::compute {} +labeling::impl::generic::compute {} +core::initialize {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} +my_algorithm {} +labeling::blobs {} +labeling::blobs {} +core::initialize {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +extension::fill {} +border::fill {} +border::impl::fill_size_1 {} +labeling::compute {} +labeling::impl::generic::compute {} +core::initialize {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} +data::compare (==) {} +test::predicate {} diff --git a/milena/doc/outputs/tuto3_println.txt b/milena/doc/outputs/tuto3_println.txt index 307681c..24f3047 100644 --- a/milena/doc/outputs/tuto3_println.txt +++ b/milena/doc/outputs/tuto3_println.txt @@ -1,4 +1,15 @@ // \{ +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +debug::println {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 @@ -7,6 +18,13 @@ // \} // \{ +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +border::fill {} +border::impl::fill_size_1 {} 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 diff --git a/milena/doc/outputs/tuto3_rw_image.txt b/milena/doc/outputs/tuto3_rw_image.txt index e69de29..9fc001c 100644 --- a/milena/doc/outputs/tuto3_rw_image.txt +++ b/milena/doc/outputs/tuto3_rw_image.txt @@ -0,0 +1,24 @@ +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +mln::io::pnm::save {} +core::duplicate {} +core::initialize {} +data::fill {} +data::fill_with_image {} +border::get {} +border::get {} +data::impl::fill_with_image_fastest {} +mln::io::ppm::load {} +mln::io::pnm::load {} +data::fill {} +data::fill_with_image {} +border::get {} +border::get {} +data::impl::fill_with_image_lines {} +mln::io::pnm::save {} +data::paste {} +data::impl::paste_lines {} +mln::io::pnm::save {} diff --git a/milena/doc/outputs/tuto4_genericity_and_algorithms.txt b/milena/doc/outputs/tuto4_genericity_and_algorithms.txt index e69de29..291ad16 100644 --- a/milena/doc/outputs/tuto4_genericity_and_algorithms.txt +++ b/milena/doc/outputs/tuto4_genericity_and_algorithms.txt @@ -0,0 +1,83 @@ +mln::io::ppm::load {} +mln::io::pnm::load {} +core::duplicate {} +core::initialize {} +data::fill {} +data::fill_with_image {} +border::get {} +border::get {} +data::impl::fill_with_image_fastest {} +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} +mln::io::pnm::save {} +core::duplicate {} +core::initialize {} +data::fill {} +data::fill_with_image {} +border::get {} +border::get {} +data::impl::fill_with_image_fastest {} +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} +mln::io::pnm::save {} +core::duplicate {} +core::initialize {} +data::fill {} +data::fill_with_image {} +border::get {} +border::get {} +data::impl::fill_with_image_fastest {} +core::initialize {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} +mln::io::pbm::save {} +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} +mln::io::pnm::save {} +core::duplicate {} +core::initialize {} +data::fill {} +data::fill_with_image {} +border::get {} +border::get {} +data::impl::fill_with_image_fastest {} +binarization::binarization {} +binarization::impl::binarization_ {} +data::transform {} +data::impl::transform_fast {} +core::initialize {} +labeling::blobs {} +labeling::blobs {} +core::initialize {} +data::fill {} +data::fill_with_value {} +data::impl::fill_with_value_one_block {} +data::memset_ {} +data::impl::memset_ {} +extension::fill {} +border::fill {} +border::impl::fill_size_1 {} +labeling::colorize {} +data::transform {} +data::impl::transform_fast_lowq {} +core::initialize {} +mln::io::pnm::save {} +data::fill {} +data::fill_with_value {} +data::impl::generic::fill_with_value {} +mln::io::pnm::save {} diff --git a/milena/mln/accu/compute.hh b/milena/mln/accu/compute.hh index eaa9cac..0bddf6f 100644 --- a/milena/mln/accu/compute.hh +++ b/milena/mln/accu/compute.hh @@ -97,7 +97,7 @@ namespace mln mln_result(A) compute(const Accumulator<A>&, const Image<I>& input_) { - trace::entering("accu::impl::generic::compute"); + mln_trace("accu::impl::generic::compute"); const I& input = exact(input_); mln_precondition(input.is_valid()); @@ -107,7 +107,6 @@ namespace mln for_all(p) a.take(make::pix(input, p)); - trace::exiting("accu::impl::generic::compute"); return a.to_result(); } @@ -136,12 +135,11 @@ namespace mln mln_result(A) compute(const Accumulator<A>& a, const Image<I>& input) { - trace::entering("accu::compute"); + mln_trace("accu::compute"); mln_precondition(exact(input).is_valid()); mln_result(A) output = internal::compute_dispatch(a, input); - trace::exiting("accu::compute"); return output; } @@ -150,7 +148,7 @@ namespace mln mln_meta_accu_result(A, util::pix<I>) compute(const Meta_Accumulator<A>& a, const Image<I>& input) { - trace::entering("accu::compute"); + mln_trace("accu::compute"); mln_precondition(exact(input).is_valid()); @@ -160,7 +158,6 @@ namespace mln mln_result(A_) output = internal::compute_dispatch(a_, input); - trace::exiting("accu::compute"); return output; } diff --git a/milena/mln/accu/image/init.hh b/milena/mln/accu/image/init.hh index 19a9791..db950f8 100644 --- a/milena/mln/accu/image/init.hh +++ b/milena/mln/accu/image/init.hh @@ -63,7 +63,7 @@ namespace mln void init(Image<I>& input_) { - trace::entering("accu::impl::image::generic::init"); + mln_trace("accu::impl::image::generic::init"); mlc_is_a(mln_value(I), Accumulator)::check(); @@ -74,7 +74,6 @@ namespace mln for_all(p) input(p).init(); - trace::exiting("accu::impl::image::generic::init"); } } // end of namespace mln::accu::image::impl::generic @@ -86,7 +85,7 @@ namespace mln void init_fastest(Image<I>& input_) { - trace::entering("accu::impl::image::init_fastest"); + mln_trace("accu::impl::image::init_fastest"); mlc_is_a(mln_value(I), Accumulator)::check(); @@ -97,7 +96,6 @@ namespace mln for_all(px) px.val().init(); - trace::exiting("accu::impl::image::init_fastest"); } } // end of namespace mln::accu::image::impl @@ -142,14 +140,13 @@ namespace mln void init(Image<I>& input) { - trace::entering("accu::image::init"); + mln_trace("accu::image::init"); mlc_is_a(mln_value(I), Accumulator)::check(); mln_precondition(exact(input).is_valid()); internal::init_dispatch(input); - trace::exiting("accu::image::init"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/accu/image/set_value.hh b/milena/mln/accu/image/set_value.hh index 5c4cd05..71e7c65 100644 --- a/milena/mln/accu/image/set_value.hh +++ b/milena/mln/accu/image/set_value.hh @@ -95,7 +95,7 @@ namespace mln void set_value(Image<I>& input_, const mln_deduce(I, value, result)& res) { - trace::entering("accu::impl::image::generic::set_value"); + mln_trace("accu::impl::image::generic::set_value"); typedef mln_value(I) A; mlc_is_a(A, Accumulator)::check(); @@ -109,7 +109,6 @@ namespace mln for_all(p) input(p).set_value(res); - trace::exiting("accu::impl::image::generic::set_value"); } template <typename I, typename J> @@ -117,7 +116,7 @@ namespace mln void set_value(Image<I>& input_, const Image<J>& res_) { - trace::entering("accu::impl::image::generic::set_value"); + mln_trace("accu::impl::image::generic::set_value"); typedef mln_value(I) A; mlc_is_a(A, Accumulator)::check(); @@ -134,7 +133,6 @@ namespace mln for_all(p) input(p).set_value(res(p)); - trace::exiting("accu::impl::image::generic::set_value"); } } // end of namespace mln::accu::image::impl::generic @@ -147,7 +145,7 @@ namespace mln void set_value_fastest(Image<I>& input_, const mln_deduce(I, value, result)& res) { - trace::entering("accu::impl::image::set_value_fastest"); + mln_trace("accu::impl::image::set_value_fastest"); typedef mln_value(I) A; mlc_is_a(A, Accumulator)::check(); @@ -161,7 +159,6 @@ namespace mln for_all(px) px.val().set_value(res); - trace::exiting("accu::impl::image::set_value_fastest"); } template <typename I, typename J> @@ -169,7 +166,7 @@ namespace mln void set_value_fastest(Image<I>& input_, const Image<J>& res_) { - trace::entering("accu::impl::image::set_value_fastest"); + mln_trace("accu::impl::image::set_value_fastest"); typedef mln_value(I) A; mlc_is_a(A, Accumulator)::check(); @@ -190,7 +187,6 @@ namespace mln for_all_2(p_in, p_res) p_in.val().set_value(p_res.val()); - trace::exiting("accu::impl::image::set_value_fastest"); } } // end of namespace mln::accu::image::impl @@ -275,7 +271,7 @@ namespace mln void set_value(Image<I>& input, const mln_deduce(I, value, result)& res) { - trace::entering("accu::image::set_value"); + mln_trace("accu::image::set_value"); typedef mln_value(I) A; mlc_is_a(A, Accumulator)::check(); @@ -285,7 +281,6 @@ namespace mln mln_precondition(exact(input).is_valid()); internal::set_value_dispatch(input, res); - trace::exiting("accu::image::set_value"); } template <typename I, typename J> @@ -293,7 +288,7 @@ namespace mln void set_value(Image<I>& input, const Image<J>& res) { - trace::entering("accu::image::set_value"); + mln_trace("accu::image::set_value"); typedef mln_value(I) A; mlc_is_a(A, Accumulator)::check(); @@ -304,7 +299,6 @@ namespace mln internal::set_value_tests(input, res); internal::set_value_dispatch(input, res); - trace::exiting("accu::image::set_value"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/accu/image/take.hh b/milena/mln/accu/image/take.hh index 698daa0..33b5f1b 100644 --- a/milena/mln/accu/image/take.hh +++ b/milena/mln/accu/image/take.hh @@ -98,7 +98,7 @@ namespace mln void take(Image<I>& input_, const mln_deduce(I, value, argument)& arg) { - trace::entering("accu::impl::image::generic::take"); + mln_trace("accu::impl::image::generic::take"); mlc_is_a(mln_value(I), Accumulator)::check(); @@ -109,7 +109,6 @@ namespace mln for_all(p) input(p).take(arg); - trace::exiting("accu::impl::image::generic::take"); } template <typename I, typename J> @@ -117,7 +116,7 @@ namespace mln void take(Image<I>& input_, const Image<J>& arg_) { - trace::entering("accu::impl::image::generic::take"); + mln_trace("accu::impl::image::generic::take"); mlc_is_a(mln_value(I), Accumulator)::check(); mlc_converts_to(mln_value(J), mln_deduce(I, value, argument))::check(); @@ -131,7 +130,6 @@ namespace mln for_all(p) input(p).take(arg(p)); - trace::exiting("accu::impl::image::generic::take"); } } // end of namespace mln::accu::image::impl::generic @@ -144,7 +142,7 @@ namespace mln void take_fastest(Image<I>& input_, const mln_deduce(I, value, argument)& arg) { - trace::entering("accu::impl::image::take_fastest"); + mln_trace("accu::impl::image::take_fastest"); mlc_is_a(mln_value(I), Accumulator)::check(); @@ -155,7 +153,6 @@ namespace mln for_all(px) px.val().take(arg); - trace::exiting("accu::impl::image::take_fastest"); } template <typename I, typename J> @@ -163,7 +160,7 @@ namespace mln void take_fastest(Image<I>& input_, const Image<J>& arg_) { - trace::entering("accu::impl::image::take_fastest"); + mln_trace("accu::impl::image::take_fastest"); mlc_is_a(mln_value(I), Accumulator)::check(); mlc_converts_to(mln_value(J), mln_deduce(I, value, argument))::check(); @@ -182,7 +179,6 @@ namespace mln for_all_2(p_in, p_arg) p_in.val().take( p_arg.val() ); - trace::exiting("accu::impl::image::take_fastest"); } } // end of namespace mln::accu::image::impl @@ -268,14 +264,13 @@ namespace mln void take(Image<I>& input, const mln_deduce(I, value, argument)& arg) { - trace::entering("accu::image::take"); + mln_trace("accu::image::take"); mlc_is_a(mln_value(I), Accumulator)::check(); mln_precondition(exact(input).is_valid()); internal::take_dispatch(input, arg); - trace::exiting("accu::image::take"); } template <typename I, typename J> @@ -283,7 +278,7 @@ namespace mln void take(Image<I>& input, const Image<J>& arg) { - trace::entering("accu::image::take"); + mln_trace("accu::image::take"); mlc_is_a(mln_value(I), Accumulator)::check(); mlc_converts_to(mln_value(J), mln_deduce(I, value, argument))::check(); @@ -291,7 +286,6 @@ namespace mln internal::take_tests(input, arg); internal::take_dispatch(input, arg); - trace::exiting("accu::image::take"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/accu/image/take_as_init.hh b/milena/mln/accu/image/take_as_init.hh index 8232b97..2d828ff 100644 --- a/milena/mln/accu/image/take_as_init.hh +++ b/milena/mln/accu/image/take_as_init.hh @@ -93,7 +93,7 @@ namespace mln void take_as_init(Image<I>& input_, const mln_deduce(I, value, argument)& v) { - trace::entering("accu::impl::image::generic::take_as_init"); + mln_trace("accu::impl::image::generic::take_as_init"); mlc_is_a(mln_value(I), Accumulator)::check(); @@ -104,14 +104,13 @@ namespace mln for_all(p) input(p).take_as_init(v); - trace::exiting("accu::impl::image::generic::take_as_init"); } template <typename I, typename J> void take_as_init(Image<I>& input_, const Image<J>& values_) { - trace::entering("accu::impl::image::generic::take_as_init"); + mln_trace("accu::impl::image::generic::take_as_init"); typedef mln_value(I) A; mlc_is_a(A, Accumulator)::check(); @@ -126,7 +125,6 @@ namespace mln for_all(p) input(p).take_as_init(values(p)); - trace::exiting("accu::impl::image::generic::take_as_init"); } } // end of namespace mln::accu::image::impl::generic @@ -138,7 +136,7 @@ namespace mln void take_as_init_fastest(Image<I>& input_, const mln_deduce(I, value, argument)& v) { - trace::entering("accu::impl::image::take_as_init_fastest"); + mln_trace("accu::impl::image::take_as_init_fastest"); mlc_is_a(mln_value(I), Accumulator)::check(); @@ -149,14 +147,13 @@ namespace mln for_all(px) px.val().take_as_init(v); - trace::exiting("accu::impl::image::take_as_init_fastest"); } template <typename I, typename J> void take_as_init_fastest(Image<I>& input_, const Image<J>& values_) { - trace::entering("accu::impl::image::take_as_init_fastest"); + mln_trace("accu::impl::image::take_as_init_fastest"); typedef mln_value(I) A; mlc_is_a(A, Accumulator)::check(); @@ -176,7 +173,6 @@ namespace mln for_all_2(p_in, p_v) p_in.val().take_as_init(p_v.val()); - trace::exiting("accu::impl::image::take_as_init_fastest"); } } // end of namespace mln::accu::image::impl @@ -263,14 +259,13 @@ namespace mln void take_as_init(Image<I>& input, const mln_deduce(I, value, argument)& v) { - trace::entering("accu::image::take_as_init"); + mln_trace("accu::image::take_as_init"); mlc_is_a(mln_value(I), Accumulator)::check(); mln_precondition(exact(input).is_valid()); internal::take_as_init_dispatch(input, v); - trace::exiting("accu::image::take_as_init"); } template <typename I, typename J> @@ -278,7 +273,7 @@ namespace mln void take_as_init(Image<I>& input, const Image<J>& values) { - trace::entering("accu::image::take_as_init"); + mln_trace("accu::image::take_as_init"); typedef mln_value(I) A; mlc_is_a(A, Accumulator)::check(); @@ -287,7 +282,6 @@ namespace mln internal::take_as_init_tests(input, values); internal::take_as_init_dispatch(input, values); - trace::exiting("accu::image::take_as_init"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/accu/image/take_n_times.hh b/milena/mln/accu/image/take_n_times.hh index 8c8dd52..fc95988 100644 --- a/milena/mln/accu/image/take_n_times.hh +++ b/milena/mln/accu/image/take_n_times.hh @@ -121,7 +121,7 @@ namespace mln void take_n_times(Image<I>& input_, const Image<J>& n_times_, const Image<K>& arg_) { - trace::entering("accu::impl::image::generic::take_n_times"); + mln_trace("accu::impl::image::generic::take_n_times"); mlc_is_a(mln_value(I), Accumulator)::check(); mlc_converts_to(mln_value(J), unsigned)::check(); @@ -137,7 +137,6 @@ namespace mln for_all(p) input(p).take_n_times(n_times(p), arg(p)); - trace::exiting("accu::impl::image::generic::take_n_times"); } template <typename I, typename J> @@ -145,7 +144,7 @@ namespace mln void take_n_times(Image<I>& input_, const Image<J>& n_times_, const mln_deduce(I, value, argument)& arg) { - trace::entering("accu::impl::image::generic::take_n_times"); + mln_trace("accu::impl::image::generic::take_n_times"); mlc_is_a(mln_value(I), Accumulator)::check(); mlc_converts_to(mln_value(J), unsigned)::check(); @@ -159,7 +158,6 @@ namespace mln for_all(p) input(p).take_n_times(n_times(p), arg); - trace::exiting("accu::impl::image::generic::take_n_times"); } } // end of namespace mln::accu::image::impl::generic @@ -172,7 +170,7 @@ namespace mln void take_n_times_fastest(Image<I>& input_, const Image<J>& n_times_, const mln_deduce(I, value, argument)& arg) { - trace::entering("accu::impl::image::take_n_times_fastest"); + mln_trace("accu::impl::image::take_n_times_fastest"); mlc_is_a(mln_value(I), Accumulator)::check(); mlc_converts_to(mln_value(J), unsigned)::check(); @@ -191,7 +189,6 @@ namespace mln for_all_2(p_in, p_ntm) p_in.val().take_n_times( p_ntm.val(), arg ); - trace::exiting("accu::impl::image::take_n_times_fastest"); } template <typename I, typename J, typename K> @@ -199,7 +196,7 @@ namespace mln void take_n_times_fastest(Image<I>& input_, const Image<J>& n_times_, const Image<K>& arg_) { - trace::entering("accu::impl::image::take_n_times_fastest"); + mln_trace("accu::impl::image::take_n_times_fastest"); mlc_is_a(mln_value(I), Accumulator)::check(); mlc_converts_to(mln_value(J), unsigned)::check(); @@ -224,7 +221,6 @@ namespace mln for_all_3(p_in, p_ntm, p_arg) p_in.val().take_n_times( p_ntm.val(), p_arg.val() ); - trace::exiting("accu::impl::image::take_n_times_fastest"); } } // end of namespace mln::accu::image::impl @@ -319,7 +315,7 @@ namespace mln void take_n_times(Image<I>& input, const Image<J>& n_times, const mln_deduce(I, value, argument)& arg) { - trace::entering("accu::image::take_n_times"); + mln_trace("accu::image::take_n_times"); mlc_is_a(mln_value(I), Accumulator)::check(); mlc_converts_to(mln_value(J), unsigned)::check(); @@ -327,7 +323,6 @@ namespace mln internal::take_n_times_tests(input, n_times); internal::take_n_times_dispatch(input, n_times, arg); - trace::exiting("accu::image::take_n_times"); } template <typename I, typename J, typename K> @@ -335,7 +330,7 @@ namespace mln void take_n_times(Image<I>& input, const Image<J>& n_times, const Image<K>& arg) { - trace::entering("accu::image::take_n_times"); + mln_trace("accu::image::take_n_times"); mlc_is_a(mln_value(I), Accumulator)::check(); mlc_converts_to(mln_value(J), unsigned)::check(); @@ -344,7 +339,6 @@ namespace mln internal::take_n_times_tests(input, n_times, arg); internal::take_n_times_dispatch(input, n_times, arg); - trace::exiting("accu::image::take_n_times"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/accu/image/to_result.hh b/milena/mln/accu/image/to_result.hh index 2731c1d..183d9c8 100644 --- a/milena/mln/accu/image/to_result.hh +++ b/milena/mln/accu/image/to_result.hh @@ -63,7 +63,7 @@ namespace mln mln_ch_value(I, mln_deduce(I, value, result)) to_result(const Image<I>& input_) { - trace::entering("accu::impl::image::generic::to_result"); + mln_trace("accu::impl::image::generic::to_result"); mlc_is_a(mln_value(I), Accumulator)::check(); @@ -78,7 +78,6 @@ namespace mln for_all(p) output(p) = input(p).to_result(); - trace::exiting("accu::impl::image::generic::to_result"); return output; } @@ -91,7 +90,7 @@ namespace mln mln_ch_value(I, mln_deduce(I, value, result)) to_result_fastest(const Image<I>& input_) { - trace::entering("accu::impl::image::to_result_fastest"); + mln_trace("accu::impl::image::to_result_fastest"); mlc_is_a(mln_value(I), Accumulator)::check(); @@ -108,7 +107,6 @@ namespace mln for_all_2(p_in, p_out) p_out.val() = p_in.val().to_result(); - trace::exiting("accu::impl::image::to_result_fastest"); return output; } @@ -154,7 +152,7 @@ namespace mln mln_ch_value(I, mln_deduce(I, value, result)) to_result(const Image<I>& input) { - trace::entering("accu::image::to_result"); + mln_trace("accu::image::to_result"); mlc_is_a(mln_value(I), Accumulator)::check(); @@ -164,7 +162,6 @@ namespace mln mln_ch_value(I, R) output; output = internal::to_result_dispatch(input); - trace::exiting("accu::image::to_result"); return output; } diff --git a/milena/mln/accu/image/untake.hh b/milena/mln/accu/image/untake.hh index 7354711..18c5d78 100644 --- a/milena/mln/accu/image/untake.hh +++ b/milena/mln/accu/image/untake.hh @@ -98,7 +98,7 @@ namespace mln void untake(Image<I>& input_, const mln_deduce(I, value, argument)& arg) { - trace::entering("accu::impl::image::generic::untake"); + mln_trace("accu::impl::image::generic::untake"); mlc_is_a(mln_value(I), Accumulator)::check(); @@ -109,7 +109,6 @@ namespace mln for_all(p) input(p).untake(arg); - trace::exiting("accu::impl::image::generic::untake"); } template <typename I, typename J> @@ -117,7 +116,7 @@ namespace mln void untake(Image<I>& input_, const Image<J>& arg_) { - trace::entering("accu::impl::image::generic::untake"); + mln_trace("accu::impl::image::generic::untake"); mlc_is_a(mln_value(I), Accumulator)::check(); mlc_converts_to(mln_value(J), mln_deduce(I, value, argument))::check(); @@ -131,7 +130,6 @@ namespace mln for_all(p) input(p).untake(arg(p)); - trace::exiting("accu::impl::image::generic::untake"); } } // end of namespace mln::accu::image::impl::generic @@ -144,7 +142,7 @@ namespace mln void untake_fastest(Image<I>& input_, const mln_deduce(I, value, argument)& arg) { - trace::entering("accu::impl::image::untake_fastest"); + mln_trace("accu::impl::image::untake_fastest"); mlc_is_a(mln_value(I), Accumulator)::check(); @@ -155,7 +153,6 @@ namespace mln for_all(px) px.val().untake(arg); - trace::exiting("accu::impl::image::untake_fastest"); } template <typename I, typename J> @@ -163,7 +160,7 @@ namespace mln void untake_fastest(Image<I>& input_, const Image<J>& arg_) { - trace::entering("accu::impl::image::untake_fastest"); + mln_trace("accu::impl::image::untake_fastest"); mlc_is_a(mln_value(I), Accumulator)::check(); mlc_converts_to(mln_value(J), mln_deduce(I, value, argument))::check(); @@ -182,7 +179,6 @@ namespace mln for_all_2(p_in, p_arg) p_in.val().untake( p_arg.val() ); - trace::exiting("accu::impl::image::untake_fastest"); } } // end of namespace mln::accu::image::impl @@ -268,7 +264,7 @@ namespace mln void untake(Image<I>& input, const mln_deduce(I, value, argument)& arg) { - trace::entering("accu::image::untake"); + mln_trace("accu::image::untake"); typedef mln_value(I) A; mlc_is_a(A, Accumulator)::check(); @@ -278,7 +274,6 @@ namespace mln mln_precondition(exact(input).is_valid()); internal::untake_dispatch(input, arg); - trace::exiting("accu::image::untake"); } template <typename I, typename J> @@ -286,7 +281,7 @@ namespace mln void untake(Image<I>& input, const Image<J>& arg) { - trace::entering("accu::image::untake"); + mln_trace("accu::image::untake"); typedef mln_value(I) A; mlc_is_a(A, Accumulator)::check(); @@ -297,7 +292,6 @@ namespace mln internal::untake_tests(input, arg); internal::untake_dispatch(input, arg); - trace::exiting("accu::image::untake"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/accu/stat/histo3d_rgb.hh b/milena/mln/accu/stat/histo3d_rgb.hh index 24f6b46..02b22ba 100644 --- a/milena/mln/accu/stat/histo3d_rgb.hh +++ b/milena/mln/accu/stat/histo3d_rgb.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory -// (LRDE) +// Copyright (C) 2009, 2010, 2013 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -80,8 +80,7 @@ # include <mln/literal/zero.hh> -# include <mln/trace/entering.hh> -# include <mln/trace/exiting.hh> +# include <mln/debug/trace.hh> # include <mln/trait/value/comp.hh> @@ -243,7 +242,7 @@ namespace mln inline histo3d_rgb<V>::histo3d_rgb() { - trace::entering("mln::accu::stat::histo3d_rgb::cstor"); + mln_trace("mln::accu::stat::histo3d_rgb::cstor"); typedef mln_trait_value_comp(V,0) comp0; typedef mln_trait_value_comp(V,1) comp1; @@ -260,7 +259,6 @@ namespace mln mln_max(comp1), mln_max(comp2)))); - trace::exiting("mln::accu::stat::histo3d_rgb::cstor"); } template <typename V> @@ -315,7 +313,7 @@ namespace mln bool operator==(const histo3d_rgb<V>& histo1, const histo3d_rgb<V>& histo2) { - trace::entering("mln::accu::stat::histo3d_rgb::operator=="); + mln_trace("mln::accu::stat::histo3d_rgb::operator=="); bool result = true; const image3d<unsigned>& res1 = histo1.to_result(); @@ -330,7 +328,6 @@ namespace mln for_all_2(p1, p2) result &= (res1(p1) == res2(p2)); - trace::exiting("mln::accu::stat::histo3d_rgb::operator=="); return result; } diff --git a/milena/mln/accu/transform.hh b/milena/mln/accu/transform.hh index eeae247..bb726ff 100644 --- a/milena/mln/accu/transform.hh +++ b/milena/mln/accu/transform.hh @@ -74,7 +74,7 @@ namespace mln const Accumulator<A>& a_, const Window<W>& win_) { - trace::entering("accu::impl::generic::transform"); + mln_trace("accu::impl::generic::transform"); const I& input = exact(input_); const W& win = exact(win_); @@ -98,7 +98,6 @@ namespace mln output(p) = a.to_result(); } - trace::exiting("accu::impl::generic::transform"); return output; } @@ -111,7 +110,7 @@ namespace mln mln_ch_value(I, mln_result(A)) transform_fastest(const Image<I>& input_, const Accumulator<A>& a_, const Window<W>& win_) { - trace::entering("accu::impl::transform_fastest"); + mln_trace("accu::impl::transform_fastest"); const I& input = exact(input_); const W& win = exact(win_); @@ -137,7 +136,6 @@ namespace mln o.val() = a.to_result(); } - trace::exiting("accu::impl::transform_fastest"); return output; } @@ -184,7 +182,7 @@ namespace mln mln_ch_value(I, mln_result(A)) transform(const Image<I>& input, const Accumulator<A>& a, const Window<W>& win) { - trace::entering("accu::transform"); + mln_trace("accu::transform"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(win).is_valid()); @@ -192,7 +190,6 @@ namespace mln mln_ch_value(I, mln_result(A)) output; output = internal::transform_dispatch(input, a, win); - trace::exiting("accu::transform"); return output; } @@ -200,7 +197,7 @@ namespace mln mln_ch_value(I, mln_meta_accu_result(A, mln_value(I))) transform(const Image<I>& input, const Meta_Accumulator<A>& a, const Window<W>& win) { - trace::entering("accu::transform"); + mln_trace("accu::transform"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(win).is_valid()); @@ -211,7 +208,6 @@ namespace mln mln_ch_value(I, mln_result(A_)) output; output = internal::transform_dispatch(input, a_, win); - trace::exiting("accu::transform"); return output; } diff --git a/milena/mln/accu/transform_diagonal.hh b/milena/mln/accu/transform_diagonal.hh index 2c73c8a..dc285ce 100644 --- a/milena/mln/accu/transform_diagonal.hh +++ b/milena/mln/accu/transform_diagonal.hh @@ -429,7 +429,7 @@ namespace mln transform_diagonal(const Accumulator<A>& a, const Image<I>& input, const Window<W>& win) { - trace::entering("accu::transform_diagonal"); + mln_trace("accu::transform_diagonal"); internal::transform_diagonal_tests(input, win); @@ -437,7 +437,6 @@ namespace mln mln_ch_value(I, mln_result(A)) output; output = internal::transform_diagonal_dispatch(a, input, win); - trace::exiting("accu::transform_diagonal"); return output; } @@ -448,7 +447,7 @@ namespace mln transform_diagonal(const Meta_Accumulator<A>& a, const Image<I>& input, const Window<W>& win) { - trace::entering("accu::transform_diagonal"); + mln_trace("accu::transform_diagonal"); internal::transform_diagonal_tests(input, win); @@ -459,7 +458,6 @@ namespace mln mln_ch_value(I, mln_result(A_)) output; output = internal::transform_diagonal_dispatch(a_, input, win); - trace::exiting("accu::transform_diagonal"); return output; } diff --git a/milena/mln/accu/transform_directional.hh b/milena/mln/accu/transform_directional.hh index 5534a56..ab374da 100644 --- a/milena/mln/accu/transform_directional.hh +++ b/milena/mln/accu/transform_directional.hh @@ -303,7 +303,7 @@ namespace mln const Image<I>& input, const Window<W>& win, unsigned dir) { - trace::entering("accu::transform_directional"); + mln_trace("accu::transform_directional"); internal::transform_directional_tests(input, win); @@ -311,7 +311,6 @@ namespace mln mln_ch_value(I, mln_result(A)) output; output = internal::transform_directional_dispatch(a, input, win, dir); - trace::exiting("accu::transform_directional"); return output; } @@ -323,7 +322,7 @@ namespace mln const Image<I>& input, const Window<W>& win, unsigned dir) { - trace::entering("accu::transform_directional"); + mln_trace("accu::transform_directional"); internal::transform_directional_tests(input, win); @@ -334,7 +333,6 @@ namespace mln mln_ch_value(I, mln_result(A_)) output; output = internal::transform_directional_dispatch(a_, input, win, dir); - trace::exiting("accu::transform_directional"); return output; } diff --git a/milena/mln/accu/transform_line.hh b/milena/mln/accu/transform_line.hh index 2250c87..0040ad2 100644 --- a/milena/mln/accu/transform_line.hh +++ b/milena/mln/accu/transform_line.hh @@ -111,7 +111,7 @@ namespace mln const Image<I>& input_, unsigned length, unsigned dir) { - trace::entering("accu::impl::transform_line"); + mln_trace("accu::impl::transform_line"); const I& input = exact(input_); A a = exact(a_); @@ -194,7 +194,6 @@ namespace mln } while (p != pmin); - trace::exiting("accu::impl::transform_line"); return output; } @@ -208,7 +207,7 @@ namespace mln const Image<I>& input_, unsigned length, unsigned dir) { - trace::entering("accu::impl::transform_line_fastest"); + mln_trace("accu::impl::transform_line_fastest"); const I& input = exact(input_); A a = exact(a_); @@ -294,7 +293,6 @@ namespace mln } while (p != pmin); - trace::exiting("accu::impl::transform_line_fastest"); return output; } @@ -307,7 +305,7 @@ namespace mln const Image<I>& input_, unsigned length, unsigned dir) { - trace::entering("accu::impl::transform_line_fastest_without_border"); + mln_trace("accu::impl::transform_line_fastest_without_border"); const I& input = exact(input_); A a = exact(a_); @@ -421,7 +419,6 @@ namespace mln } while (p != pmin); - trace::exiting("accu::impl::transform_line_fastest_without_border"); return output; } @@ -507,7 +504,7 @@ namespace mln const Image<I>& input, unsigned length, unsigned dir) { - trace::entering("accu::transform_line"); + mln_trace("accu::transform_line"); internal::transform_line_tests(a, input); @@ -516,7 +513,6 @@ namespace mln mln_ch_value(I, mln_result(A)) output; output = internal::transform_line_dispatch(a, input, length, dir); - trace::exiting("accu::transform_line"); return output; } @@ -528,7 +524,7 @@ namespace mln const Image<I>& input, unsigned length, unsigned dir) { - trace::entering("accu::transform_line"); + mln_trace("accu::transform_line"); typedef mln_accu_with(A, mln_value(I)) A_; A_ a_ = accu::unmeta(exact(a), mln_value(I)()); @@ -538,7 +534,6 @@ namespace mln mln_ch_value(I, mln_result(A_)) output; output = internal::transform_line_dispatch(a_, input, length, dir); - trace::exiting("accu::transform_line"); return output; } diff --git a/milena/mln/accu/transform_snake.hh b/milena/mln/accu/transform_snake.hh index 3890eb4..6a14ed9 100644 --- a/milena/mln/accu/transform_snake.hh +++ b/milena/mln/accu/transform_snake.hh @@ -437,7 +437,7 @@ namespace mln transform_snake(const Accumulator<A>& a, const Image<I>& input, const Window<W>& win) { - trace::entering("accu::transform_snake"); + mln_trace("accu::transform_snake"); internal::transform_snake_tests(input, win); @@ -445,7 +445,6 @@ namespace mln mln_ch_value(I, mln_result(A)) output; output = internal::transform_snake_dispatch(a, input, win); - trace::exiting("accu::transform_snake"); return output; } @@ -456,7 +455,7 @@ namespace mln transform_snake(const Meta_Accumulator<A>& a, const Image<I>& input, const Window<W>& win) { - trace::entering("accu::transform_snake"); + mln_trace("accu::transform_snake"); internal::transform_snake_tests(input, win); @@ -467,7 +466,6 @@ namespace mln mln_ch_value(I, mln_result(A_)) output; output = internal::transform_snake_dispatch(a_, input, win); - trace::exiting("accu::transform_snake"); return output; } diff --git a/milena/mln/accu/transform_stop.hh b/milena/mln/accu/transform_stop.hh index b694042..90aea63 100644 --- a/milena/mln/accu/transform_stop.hh +++ b/milena/mln/accu/transform_stop.hh @@ -70,7 +70,7 @@ namespace mln const Accumulator<A>& a_, const Window<W>& win_) { - trace::entering("accu::impl::generic::transform_stop"); + mln_trace("accu::impl::generic::transform_stop"); const I& input = exact(input_); const W& win = exact(win_); @@ -98,7 +98,6 @@ namespace mln output(p) = a.to_result(); } - trace::exiting("accu::impl::generic::transform_stop"); return output; } @@ -111,7 +110,7 @@ namespace mln mln_ch_value(I, mln_result(A)) transform_stop_fastest(const Image<I>& input_, const Accumulator<A>& a_, const Window<W>& win_) { - trace::entering("accu::impl::transform_stop_fastest"); + mln_trace("accu::impl::transform_stop_fastest"); const I& input = exact(input_); const W& win = exact(win_); @@ -141,7 +140,6 @@ namespace mln o.val() = a.to_result(); } - trace::exiting("accu::impl::transform_stop_fastest"); return output; } @@ -188,7 +186,7 @@ namespace mln mln_ch_value(I, mln_result(A)) transform_stop(const Image<I>& input, const Accumulator<A>& a, const Window<W>& win) { - trace::entering("accu::transform_stop"); + mln_trace("accu::transform_stop"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(win).is_valid()); @@ -196,7 +194,6 @@ namespace mln mln_ch_value(I, mln_result(A)) output; output = internal::transform_stop_dispatch(input, a, win); - trace::exiting("accu::transform_stop"); return output; } @@ -204,7 +201,7 @@ namespace mln mln_ch_value(I, mln_meta_accu_result(A, mln_value(I))) transform_stop(const Image<I>& input, const Meta_Accumulator<A>& a, const Window<W>& win) { - trace::entering("accu::transform_stop"); + mln_trace("accu::transform_stop"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(win).is_valid()); @@ -215,7 +212,6 @@ namespace mln mln_ch_value(I, mln_result(A_)) output; output = internal::transform_stop_dispatch(input, a_, win); - trace::exiting("accu::transform_stop"); return output; } diff --git a/milena/mln/all.hh b/milena/mln/all.hh index ee33bab..9911df9 100644 --- a/milena/mln/all.hh +++ b/milena/mln/all.hh @@ -67,7 +67,7 @@ #include <mln/tag/all.hh> #include <mln/test/all.hh> -#include <mln/trace/all.hh> +#include <mln/debug/trace.hh> #include <mln/trait/all.hh> #include <mln/util/all.hh> #include <mln/value/all.hh> diff --git a/milena/mln/arith/diff_abs.hh b/milena/mln/arith/diff_abs.hh index 397c9e1..77f4213 100644 --- a/milena/mln/arith/diff_abs.hh +++ b/milena/mln/arith/diff_abs.hh @@ -62,14 +62,13 @@ namespace mln mln_concrete(I) diff_abs(const Image<I>& lhs, const Image<I>& rhs) { - trace::entering("arith::diff_abs"); + mln_trace("arith::diff_abs"); mln_precondition(exact(lhs).is_valid()); mln_precondition(exact(rhs).is_valid()); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); mln_concrete(I) output = data::transform(lhs, rhs, fun::vv2v::diff_abs<mln_value(I)>()); - trace::exiting("arith::diff_abs"); return output; } diff --git a/milena/mln/arith/div.hh b/milena/mln/arith/div.hh index 71f839a..ca9e0a3 100644 --- a/milena/mln/arith/div.hh +++ b/milena/mln/arith/div.hh @@ -193,26 +193,24 @@ namespace mln inline void div_(const L& lhs, const R& rhs, O& output) { - trace::entering("arith::impl::generic::div_"); + mln_trace("arith::impl::generic::div_"); mln_piter(L) p(lhs.domain()); for_all(p) output(p) = lhs(p) / rhs(p); - trace::exiting("arith::impl::generic::div_"); } template <typename L, typename R> inline void div_inplace_(L& lhs, const R& rhs) { - trace::entering("arith::impl::generic::div_inplace_"); + mln_trace("arith::impl::generic::div_inplace_"); mln_piter(R) p(rhs.domain()); for_all(p) lhs(p) /= rhs(p); - trace::exiting("arith::impl::generic::div_inplace_"); } } // end of namespace mln::arith::impl::generic @@ -226,7 +224,7 @@ namespace mln inline void div(const Image<L>& lhs, const Image<R>& rhs, Image<O>& output) { - trace::entering("arith::div"); + mln_trace("arith::div"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); mln_precondition(exact(output).domain() == exact(lhs).domain()); @@ -234,46 +232,42 @@ namespace mln mln_trait_image_speed(R)(), exact(rhs), mln_trait_image_speed(O)(), exact(output)); - trace::exiting("arith::div"); } template <typename I, typename V, typename O> inline void div_cst(const Image<I>& input, const V& val, Image<O>& output) { - trace::entering("arith::div_cst"); + mln_trace("arith::div_cst"); mln_precondition(exact(output).domain() == exact(input).domain()); div(input, pw::cst(val) | exact(input).domain(), output); // Calls the previous version. - trace::exiting("arith::div_cst"); } template <typename L, typename R> inline void div_inplace(Image<L>& lhs, const Image<R>& rhs) { - trace::entering("arith::div_inplace"); + mln_trace("arith::div_inplace"); mln_precondition(exact(rhs).domain() <= exact(lhs).domain()); impl::div_inplace_(mln_trait_image_speed(L)(), exact(lhs), mln_trait_image_speed(R)(), exact(rhs)); - trace::exiting("arith::div_inplace"); } template <typename I, typename V> inline void div_cst_inplace(Image<I>& input, const V& val) { - trace::entering("arith::div_cst_inplace"); + mln_trace("arith::div_cst_inplace"); mln_precondition(exact(input).is_valid()); div_inplace(input, pw::cst(val) | exact(input).domain()); // Calls the previous version. - trace::exiting("arith::div_cst_inplace"); } } // end of namespace mln::arith diff --git a/milena/mln/arith/div.spe.hh b/milena/mln/arith/div.spe.hh index 6a0fd0e..c91d26f 100644 --- a/milena/mln/arith/div.spe.hh +++ b/milena/mln/arith/div.spe.hh @@ -73,7 +73,7 @@ namespace mln trait::image::speed::fastest, const R& rhs, trait::image::speed::fastest, O& output) { - trace::entering("arith::impl::div_"); + mln_trace("arith::impl::div_"); mln_pixter(const L) lp(lhs); mln_pixter(const R) rp(rhs); @@ -81,7 +81,6 @@ namespace mln for_all_3(lp, rp, op) op.val() = lp.val() / rp.val(); - trace::exiting("arith::impl::div_"); } template <typename L, typename R> @@ -97,14 +96,13 @@ namespace mln void div_inplace_(trait::image::speed::fastest, L& lhs, trait::image::speed::fastest, const R& rhs) { - trace::entering("arith::impl::div_inplace_"); + mln_trace("arith::impl::div_inplace_"); mln_pixter(L) lp(lhs); mln_pixter(const R) rp(rhs); for_all_2(rp, lp) lp.val() /= rp.val(); - trace::exiting("arith::impl::div_inplace_"); } } // end of namespace mln::arith::impl diff --git a/milena/mln/arith/min.hh b/milena/mln/arith/min.hh index c5ca627..cb2c165 100644 --- a/milena/mln/arith/min.hh +++ b/milena/mln/arith/min.hh @@ -77,27 +77,26 @@ namespace mln inline void min_(const L& lhs, const R& rhs, O& output) { - trace::entering("data::arith::generic::min_"); + mln_trace("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("data::arith::generic::min_"); + mln_trace("data::arith::generic::min_"); } template <typename L, typename R> inline void min_inplace_(L& lhs, const R& rhs) { - trace::entering("data::arith::generic::min_inplace_"); + mln_trace("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("data::arith::generic::min_inplace_"); } } // end of namespace mln::arith::impl::generic @@ -111,7 +110,7 @@ namespace mln inline mln_concrete(L) min(const Image<L>& lhs, const Image<R>& rhs) { - trace::entering("arith::min"); + mln_trace("arith::min"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); mln_concrete(L) output; @@ -119,7 +118,6 @@ namespace mln impl::min_(mln_trait_image_speed(L)(), exact(lhs), mln_trait_image_speed(R)(), exact(rhs), output); - trace::exiting("arith::min"); return output; } @@ -127,13 +125,12 @@ namespace mln inline void min_inplace(Image<L>& lhs, const Image<R>& rhs) { - trace::entering("arith::min_inplace"); + mln_trace("arith::min_inplace"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); impl::min_inplace_(mln_trait_image_speed(L)(), exact(lhs), mln_trait_image_speed(R)(), exact(rhs)); - trace::exiting("arith::min_inplace"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/arith/min.spe.hh b/milena/mln/arith/min.spe.hh index 92af553..016a2aa 100644 --- a/milena/mln/arith/min.spe.hh +++ b/milena/mln/arith/min.spe.hh @@ -70,7 +70,7 @@ namespace mln void min_(trait::image::speed::fastest, const L& lhs, trait::image::speed::fastest, const R& rhs, O& output) { - trace::entering("data::arith::min_"); + mln_trace("data::arith::min_"); mln_pixter(const L) lp(lhs); mln_pixter(const R) rp(rhs); @@ -78,7 +78,6 @@ namespace mln for_all_3(lp, rp, op) op.val() = lp.val() < rp.val() ? lp.val() : rp.val(); - trace::exiting("data::arith::min_"); } template <typename L, typename R> @@ -94,7 +93,7 @@ namespace mln void min_inplace_(trait::image::speed::fastest, L& lhs, trait::image::speed::fastest, const R& rhs) { - trace::entering("data::arith::min_inplace_"); + mln_trace("data::arith::min_inplace_"); mln_pixter(L) lp(lhs); mln_pixter(const R) rp(rhs); @@ -102,7 +101,6 @@ namespace mln if (rp.val() < lp.val()) lp.val() = rp.val(); - trace::exiting("data::arith::min_inplace_"); } } // end of namespace mln::arith::impl diff --git a/milena/mln/arith/minus.hh b/milena/mln/arith/minus.hh index e30a403..ddec735 100644 --- a/milena/mln/arith/minus.hh +++ b/milena/mln/arith/minus.hh @@ -194,12 +194,11 @@ namespace mln mln_trait_op_minus(L,R) operator-(const Image<L>& lhs, const Image<R>& rhs) { - trace::entering("operator::minus"); + mln_trace("operator::minus"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); mln_trait_op_minus(L,R) output = arith::minus(lhs, rhs); - trace::exiting("operator::minus"); return output; } @@ -208,12 +207,11 @@ namespace mln L& operator-=(Image<L>& lhs, const Image<R>& rhs) { - trace::entering("operator::minus_eq"); + mln_trace("operator::minus_eq"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); arith::minus_inplace(lhs, rhs); - trace::exiting("operator::minus_eq"); return exact(lhs); } @@ -223,12 +221,11 @@ namespace mln mln_trait_op_minus(I,S) operator-(const Image<I>& ima, const value::Scalar<S>& s) { - trace::entering("operator::minus"); + mln_trace("operator::minus"); mln_precondition(exact(ima).is_valid()); mln_trait_op_minus(I,S) output = arith::minus_cst(ima, exact(s)); - trace::exiting("operator::minus"); return output; } @@ -237,12 +234,11 @@ namespace mln I& operator-=(Image<I>& ima, const value::Scalar<S>& s) { - trace::entering("operator::minus_eq"); + mln_trace("operator::minus_eq"); mln_precondition(exact(ima).is_valid()); arith::minus_cst_inplace(ima, exact(s)); - trace::exiting("operator::minus_eq"); return exact(ima); } @@ -330,7 +326,7 @@ namespace mln mln_trait_op_minus(L, R) minus(const Image<L>& lhs, const Image<R>& rhs) { - trace::entering("arith::minus"); + mln_trace("arith::minus"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); @@ -339,7 +335,6 @@ namespace mln impl::minus_(mln_trait_image_speed(L)(), exact(lhs), mln_trait_image_speed(R)(), exact(rhs), output); - trace::exiting("arith::minus"); return output; } @@ -349,7 +344,7 @@ namespace mln mln_ch_value(L, mln_result(F)) minus(const Image<L>& lhs, const Image<R>& rhs, const Function_v2v<F>& f) { - trace::entering("arith::minus"); + mln_trace("arith::minus"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); @@ -358,7 +353,6 @@ namespace mln impl::minus_(mln_trait_image_speed(L)(), exact(lhs), mln_trait_image_speed(R)(), exact(rhs), exact(f), output); - trace::exiting("arith::minus"); return output; } @@ -368,7 +362,7 @@ namespace mln mln_ch_value(L, V) minus(const Image<L>& lhs, const Image<R>& rhs) { - trace::entering("arith::minus"); + mln_trace("arith::minus"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); @@ -376,7 +370,6 @@ namespace mln mln_ch_value(L, V) output = minus(lhs, rhs, mln::fun::v2v::cast<V>()); - trace::exiting("arith::minus"); return output; } @@ -386,7 +379,7 @@ namespace mln mln_trait_op_minus(I, V) minus_cst(const Image<I>& input, const V& val) { - trace::entering("arith::minus_cst"); + mln_trace("arith::minus_cst"); mln_precondition(exact(input).is_valid()); @@ -394,7 +387,6 @@ namespace mln mln_trait_op_minus(I, V) output = minus(input, pw::cst(val) | exact(input).domain()); - trace::exiting("arith::minus_cst"); return output; } @@ -404,7 +396,7 @@ namespace mln mln_ch_value(I, mln_result(F)) minus_cst(const Image<I>& input, const V& val, const Function_v2v<F>& f) { - trace::entering("arith::minus_cst"); + mln_trace("arith::minus_cst"); mln_precondition(exact(input).is_valid()); @@ -413,7 +405,6 @@ namespace mln pw::cst(val) | exact(input).domain(), f); - trace::exiting("arith::minus_cst"); return output; } @@ -423,14 +414,13 @@ namespace mln void minus_inplace(Image<L>& lhs, const Image<R>& rhs) { - trace::entering("arith::minus_inplace"); + mln_trace("arith::minus_inplace"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); impl::minus_inplace_(mln_trait_image_speed(L)(), exact(lhs), mln_trait_image_speed(R)(), exact(rhs)); - trace::exiting("arith::minus_inplace"); } @@ -439,7 +429,7 @@ namespace mln I& minus_cst_inplace(Image<I>& input, const V& val) { - trace::entering("arith::minus_cst_inplace"); + mln_trace("arith::minus_cst_inplace"); mln_precondition(exact(input).is_valid()); @@ -447,7 +437,6 @@ namespace mln minus_inplace(input, pw::cst(val) | exact(input).domain()); - trace::exiting("arith::minus_cst_inplace"); return exact(input); } diff --git a/milena/mln/arith/plus.hh b/milena/mln/arith/plus.hh index 0a57f6f..59ad72f 100644 --- a/milena/mln/arith/plus.hh +++ b/milena/mln/arith/plus.hh @@ -207,13 +207,12 @@ namespace mln mln_trait_op_plus(L,R) operator+(const Image<L>& lhs, const Image<R>& rhs) { - trace::entering("operator::plus"); + mln_trace("operator::plus"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); mln_trait_op_plus(L,R) output = arith::plus(lhs, rhs); - trace::exiting("operator::plus"); return output; } @@ -222,13 +221,12 @@ namespace mln L& operator+=(Image<L>& lhs, const Image<R>& rhs) { - trace::entering("operator::plus_eq"); + mln_trace("operator::plus_eq"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); arith::plus_inplace(lhs, rhs); - trace::exiting("operator::plus_eq"); return exact(lhs); } @@ -238,13 +236,12 @@ namespace mln mln_trait_op_plus(I,S) operator+(const Image<I>& ima, const value::Scalar<S>& s) { - trace::entering("operator::plus"); + mln_trace("operator::plus"); mln_precondition(exact(ima).is_valid()); mln_trait_op_plus(I,S) output = arith::plus_cst(ima, exact(s)); - trace::exiting("operator::plus"); return output; } @@ -253,13 +250,12 @@ namespace mln I& operator+=(Image<I>& ima, const value::Scalar<S>& s) { - trace::entering("operator::plus_eq"); + mln_trace("operator::plus_eq"); mln_precondition(exact(ima).is_valid()); arith::plus_cst_inplace(ima, exact(s)); - trace::exiting("operator::plus_eq"); return exact(ima); } @@ -347,7 +343,7 @@ namespace mln mln_trait_op_plus(L, R) plus(const Image<L>& lhs, const Image<R>& rhs) { - trace::entering("arith::plus"); + mln_trace("arith::plus"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); @@ -356,7 +352,6 @@ namespace mln impl::plus_(mln_trait_image_speed(L)(), exact(lhs), mln_trait_image_speed(R)(), exact(rhs), output); - trace::exiting("arith::plus"); return output; } @@ -366,7 +361,7 @@ namespace mln mln_ch_value(L, mln_result(F)) plus(const Image<L>& lhs, const Image<R>& rhs, const Function_v2v<F>& f) { - trace::entering("arith::plus"); + mln_trace("arith::plus"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); @@ -375,7 +370,6 @@ namespace mln impl::plus_(mln_trait_image_speed(L)(), exact(lhs), mln_trait_image_speed(R)(), exact(rhs), exact(f), output); - trace::exiting("arith::plus"); return output; } @@ -385,7 +379,7 @@ namespace mln mln_ch_value(L, V) plus(const Image<L>& lhs, const Image<R>& rhs) { - trace::entering("arith::plus"); + mln_trace("arith::plus"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); @@ -393,7 +387,6 @@ namespace mln mln_ch_value(L, V) output = plus(lhs, rhs, mln::fun::v2v::cast<V>()); - trace::exiting("arith::plus"); return output; } @@ -403,7 +396,7 @@ namespace mln mln_trait_op_plus(I, V) plus_cst(const Image<I>& input, const V& val) { - trace::entering("arith::plus_cst"); + mln_trace("arith::plus_cst"); mln_precondition(exact(input).is_valid()); @@ -411,7 +404,6 @@ namespace mln mln_trait_op_plus(I, V) output = plus(input, pw::cst(val) | exact(input).domain()); - trace::exiting("arith::plus_cst"); return output; } @@ -421,7 +413,7 @@ namespace mln mln_ch_value(I, mln_result(F)) plus_cst(const Image<I>& input, const V& val, const Function_v2v<F>& f) { - trace::entering("arith::plus_cst"); + mln_trace("arith::plus_cst"); mln_precondition(exact(input).is_valid()); @@ -430,7 +422,6 @@ namespace mln pw::cst(val) | exact(input).domain(), f); - trace::exiting("arith::plus_cst"); return output; } @@ -440,7 +431,7 @@ namespace mln mln_ch_value(I, W) plus_cst(const Image<I>& input, const V& val) { - trace::entering("arith::plus_cst"); + mln_trace("arith::plus_cst"); mln_precondition(exact(input).is_valid()); @@ -448,7 +439,6 @@ namespace mln mln_ch_value(I, W) output = plus_cst(input, val, mln::fun::v2v::cast<W>()); - trace::exiting("arith::plus_cst"); return output; } @@ -458,14 +448,13 @@ namespace mln void plus_inplace(Image<L>& lhs, const Image<R>& rhs) { - trace::entering("arith::plus_inplace"); + mln_trace("arith::plus_inplace"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); impl::plus_inplace_(mln_trait_image_speed(L)(), exact(lhs), mln_trait_image_speed(R)(), exact(rhs)); - trace::exiting("arith::plus_inplace"); } @@ -474,7 +463,7 @@ namespace mln I& plus_cst_inplace(Image<I>& input, const V& val) { - trace::entering("arith::plus_cst_inplace"); + mln_trace("arith::plus_cst_inplace"); mln_precondition(exact(input).is_valid()); @@ -482,7 +471,6 @@ namespace mln plus_inplace(input, pw::cst(val) | exact(input).domain()); - trace::exiting("arith::plus_cst_inplace"); return exact(input); } diff --git a/milena/mln/arith/revert.hh b/milena/mln/arith/revert.hh index 2ac3710..84cb40e 100644 --- a/milena/mln/arith/revert.hh +++ b/milena/mln/arith/revert.hh @@ -92,7 +92,7 @@ namespace mln inline void revert(const Image<I>& input_, Image<O>& output_) { - trace::entering("arith::impl::generic::revert_"); + mln_trace("arith::impl::generic::revert_"); const I& input = exact(input_); O& output = exact(output_); @@ -106,7 +106,6 @@ namespace mln for_all(p) output(p) = mln_min(V) + (mln_max(V) - input(p)); - trace::exiting("arith::impl::generic::revert_"); } } // end of namespace mln::arith::impl::generic @@ -157,7 +156,7 @@ namespace mln inline mln_concrete(I) revert(const Image<I>& input) { - trace::entering("arith::revert"); + mln_trace("arith::revert"); mln_precondition(exact(input).is_valid()); @@ -165,7 +164,6 @@ namespace mln initialize(output, input); internal::revert_dispatch(exact(input), exact(output)); - trace::exiting("arith::revert"); return output; } @@ -173,13 +171,12 @@ namespace mln inline void revert_inplace(Image<I>& input) { - trace::entering("arith::revert_inplace"); + mln_trace("arith::revert_inplace"); mln_precondition(exact(input).is_valid()); internal::revert_dispatch(exact(input), exact(input)); - trace::exiting("arith::revert_inplace"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/arith/revert.spe.hh b/milena/mln/arith/revert.spe.hh index 2df8bc0..7d074ca 100644 --- a/milena/mln/arith/revert.spe.hh +++ b/milena/mln/arith/revert.spe.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2010, 2013 EPITA Research and +// Development Laboratory (LRDE) // // This file is part of Olena. // @@ -55,7 +55,7 @@ namespace mln inline void revert_fastest(const Image<I>& input_, Image<O>& output_) { - trace::entering("arith::impl::revert_fastest"); + mln_trace("arith::impl::revert_fastest"); const I& input = exact(input_); O& output = exact(output_); @@ -69,8 +69,6 @@ namespace mln mln_pixter(O) op(output); for_all_2(ip, op) op.val() = mln_min(V) + (mln_max(V) - ip.val()); - - trace::entering("arith::impl::revert_fastest"); } } // end of namespace mln::arith::impl diff --git a/milena/mln/arith/times.hh b/milena/mln/arith/times.hh index 1daff76..2b0d41d 100644 --- a/milena/mln/arith/times.hh +++ b/milena/mln/arith/times.hh @@ -192,26 +192,24 @@ namespace mln inline void times_(const L& lhs, const R& rhs, O& output) { - trace::entering("arith::impl::generic::times_"); + mln_trace("arith::impl::generic::times_"); mln_piter(L) p(lhs.domain()); for_all(p) output(p) = lhs(p) * rhs(p); - trace::exiting("arith::impl::generic::times_"); } template <typename L, typename R> inline void times_inplace_(L& lhs, const R& rhs) { - trace::entering("arith::impl::generic::times_inplace_"); + mln_trace("arith::impl::generic::times_inplace_"); mln_piter(R) p(rhs.domain()); for_all(p) lhs(p) *= rhs(p); - trace::exiting("arith::impl::generic::times_inplace_"); } } // end of namespace mln::arith::impl::generic @@ -225,7 +223,7 @@ namespace mln inline void times(const Image<L>& lhs, const Image<R>& rhs, Image<O>& output) { - trace::entering("arith::times"); + mln_trace("arith::times"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); mln_precondition(exact(output).domain() == exact(lhs).domain()); @@ -233,46 +231,42 @@ namespace mln mln_trait_image_speed(R)(), exact(rhs), mln_trait_image_speed(O)(), exact(output)); - trace::exiting("arith::times"); } template <typename I, typename V, typename O> inline void times_cst(const Image<I>& input, const V& val, Image<O>& output) { - trace::entering("arith::times_cst"); + mln_trace("arith::times_cst"); mln_precondition(exact(output).domain() == exact(input).domain()); times(input, pw::cst(val) | exact(input).domain(), output); // Calls the previous version. - trace::exiting("arith::times_cst"); } template <typename L, typename R> inline void times_inplace(Image<L>& lhs, const Image<R>& rhs) { - trace::entering("arith::times_inplace"); + mln_trace("arith::times_inplace"); mln_precondition(exact(rhs).domain() <= exact(lhs).domain()); impl::times_inplace_(mln_trait_image_speed(L)(), exact(lhs), mln_trait_image_speed(R)(), exact(rhs)); - trace::exiting("arith::times_inplace"); } template <typename I, typename V> inline void times_cst_inplace(Image<I>& input, const V& val) { - trace::entering("arith::times_cst_inplace"); + mln_trace("arith::times_cst_inplace"); mln_precondition(exact(input).is_valid()); times_inplace(input, pw::cst(val) | exact(input).domain()); // Calls the previous version. - trace::exiting("arith::times_cst_inplace"); } } // end of namespace mln::arith diff --git a/milena/mln/arith/times.spe.hh b/milena/mln/arith/times.spe.hh index 29f3cbc..b9cf410 100644 --- a/milena/mln/arith/times.spe.hh +++ b/milena/mln/arith/times.spe.hh @@ -73,7 +73,7 @@ namespace mln trait::image::speed::fastest, const R& rhs, trait::image::speed::fastest, O& output) { - trace::entering("arith::impl::times_"); + mln_trace("arith::impl::times_"); mln_pixter(const L) lp(lhs); mln_pixter(const R) rp(rhs); @@ -81,7 +81,6 @@ namespace mln for_all_3(lp, rp, op) op.val() = lp.val() * rp.val(); - trace::exiting("arith::impl::times_"); } template <typename L, typename R> @@ -97,14 +96,13 @@ namespace mln void times_inplace_(trait::image::speed::fastest, L& lhs, trait::image::speed::fastest, const R& rhs) { - trace::entering("arith::impl::times_inplace_"); + mln_trace("arith::impl::times_inplace_"); mln_pixter(L) lp(lhs); mln_pixter(const R) rp(rhs); for_all_2(rp, lp) lp.val() *= rp.val(); - trace::exiting("arith::impl::times_inplace_"); } } // end of namespace mln::arith::impl diff --git a/milena/mln/binarization/binarization.hh b/milena/mln/binarization/binarization.hh index 9e43cf9..868655d 100644 --- a/milena/mln/binarization/binarization.hh +++ b/milena/mln/binarization/binarization.hh @@ -65,12 +65,11 @@ namespace mln mln_ch_value(I, bool) binarization_(const I& input, const Function_v2b<F>& fun) { - trace::entering("binarization::impl::binarization_"); + mln_trace("binarization::impl::binarization_"); mln_ch_value(I, bool) output(input.domain()); output = data::transform(input, fun); - trace::exiting("binarization::impl::binarization_"); return output; } @@ -85,13 +84,12 @@ namespace mln mln_ch_value(I, bool) binarization(const Image<I>& input, const Function_v2b<F>& fun) { - trace::entering("binarization::binarization"); + mln_trace("binarization::binarization"); mln_precondition(exact(input).is_valid()); mln_ch_value(I, bool) output(exact(input).domain()); output = impl::binarization_(exact(input), fun); - trace::exiting("binarization::binarization"); return output; } diff --git a/milena/mln/binarization/threshold.hh b/milena/mln/binarization/threshold.hh index b261cb5..f2b1996 100644 --- a/milena/mln/binarization/threshold.hh +++ b/milena/mln/binarization/threshold.hh @@ -65,7 +65,7 @@ namespace mln mln_ch_value(I, bool) threshold(const Image<I>& input, const mln_value(I) threshold_value) { - trace::entering("binarization::threshold"); + mln_trace("binarization::threshold"); mln_precondition(exact(input).is_valid()); mlc_is(mln_trait_value_nature(mln_value(I)), @@ -78,7 +78,6 @@ namespace mln output = mln::binarization::binarization(exact(input), f); - trace::exiting("binarization::threshold"); return output; } diff --git a/milena/mln/border/adjust.hh b/milena/mln/border/adjust.hh index 075d1d0..f7451ff 100644 --- a/milena/mln/border/adjust.hh +++ b/milena/mln/border/adjust.hh @@ -64,7 +64,7 @@ namespace mln inline void adjust(const Image<I>& ima, unsigned min_thickness) { - trace::entering("border::adjust"); + mln_trace("border::adjust"); mln_precondition(exact(ima).is_valid()); @@ -74,7 +74,6 @@ namespace mln // We cannot run here a postcondition since we do not know if // ima (or an underlying image) has a border or not. - trace::exiting("border::adjust"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/border/duplicate.hh b/milena/mln/border/duplicate.hh index cff7d84..1b7d8d6 100644 --- a/milena/mln/border/duplicate.hh +++ b/milena/mln/border/duplicate.hh @@ -68,7 +68,7 @@ namespace mln inline void duplicate_1D(I& ima) { - trace::entering("border::impl::duplicate_1D"); + mln_trace("border::impl::duplicate_1D"); typedef mln_psite(I) P; mln_box_runstart_piter(I) pl(ima.domain()); @@ -82,14 +82,13 @@ namespace mln for (unsigned i = st + 1; i < opt::nelements(ima); ++i) opt::element(ima, i) = opt::element(ima, st); - trace::exiting("border::impl::duplicate_1D"); } template <typename I> inline void duplicate_2D(I& ima) { - trace::entering("border::impl::duplicate_2D"); + mln_trace("border::impl::duplicate_2D"); typedef mln_psite(I) P; mln_box_runstart_piter(I) pl(ima.domain()); @@ -123,14 +122,13 @@ namespace mln for (unsigned i = st; i < st + real_len_c; ++i) opt::element(ima, k * real_len_c + i) = opt::element(ima, i); - trace::exiting("border::impl::duplicate_2D"); } template <typename I> inline void duplicate_3D(I& ima) { - trace::entering("border::impl::duplicate_3D"); + mln_trace("border::impl::duplicate_3D"); mln_precondition(ima.is_valid()); @@ -190,7 +188,6 @@ namespace mln for (unsigned i = 0; i < face; ++i) opt::element(ima, st + k * face + i) = opt::element(ima, st + i); - trace::exiting("border::impl::duplicate_3D"); } } // end of namespace mln::border::impl @@ -255,13 +252,12 @@ namespace mln template <typename I> void duplicate(const Image<I>& ima) { - trace::entering("border::duplicate"); + mln_trace("border::duplicate"); mln_precondition(exact(ima).is_valid()); if (border::get(ima) != 0) internal::duplicate_dispatch(ima); - trace::exiting("border::duplicate"); } diff --git a/milena/mln/border/equalize.hh b/milena/mln/border/equalize.hh index bf94408..2d01c1e 100644 --- a/milena/mln/border/equalize.hh +++ b/milena/mln/border/equalize.hh @@ -74,7 +74,7 @@ namespace mln inline void equalize_(const I& ima1, const J& ima2, unsigned min_thickness) { - trace::entering("border::impl::equalize_"); + mln_trace("border::impl::equalize_"); unsigned b1 = border::get(ima1), b2 = border::get(ima2); @@ -103,7 +103,6 @@ namespace mln } } - trace::exiting("border::impl::equalize_"); } } // end of namespace mln::border::impl @@ -116,7 +115,7 @@ namespace mln void equalize(const Image<I>& ima1_, const Image<J>& ima2_, unsigned min_thickness) { - trace::entering("border::equalize"); + mln_trace("border::equalize"); //FIXME: check border //mlc_is(mln_trait_image_border(I), trait::image::border::some)::check(); @@ -131,7 +130,6 @@ namespace mln border::get(ima1) >= min_thickness && border::get(ima2) >= min_thickness); - trace::exiting("border::equalize"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/border/fill.hh b/milena/mln/border/fill.hh index ff2d52a..f3d1669 100644 --- a/milena/mln/border/fill.hh +++ b/milena/mln/border/fill.hh @@ -85,7 +85,7 @@ namespace mln inline void fill_size_1(const Image<I>& ima_, const mln_value(I)& v) { - trace::entering("border::impl::fill_size_1"); + mln_trace("border::impl::fill_size_1"); const I& ima = exact(ima_); internal::fill_tests(ima, v); @@ -111,7 +111,6 @@ namespace mln *(const int*)(&v), opt::nelements(ima) - st); - trace::exiting("border::impl::fill_size_1"); } @@ -119,7 +118,7 @@ namespace mln inline void fill_size_n(const I& ima_, const mln_value(I)& v) { - trace::entering("border::impl::fill_size_n"); + mln_trace("border::impl::fill_size_n"); I& ima = const_cast<I&>( exact(ima_) ); internal::fill_tests(ima, v); @@ -139,7 +138,6 @@ namespace mln for (unsigned i = st; i < opt::nelements(ima); ++i) opt::element(ima, i) = v; - trace::exiting("border::impl::fill_size_n"); } @@ -205,12 +203,11 @@ namespace mln inline void fill(const Image<I>& ima, const mln_value(I)& v) { - trace::entering("border::fill"); + mln_trace("border::fill"); internal::fill_tests(ima, v); internal::fill_dispatch(ima, v); - trace::exiting("border::fill"); } diff --git a/milena/mln/border/find.hh b/milena/mln/border/find.hh index 0bab260..2906f94 100644 --- a/milena/mln/border/find.hh +++ b/milena/mln/border/find.hh @@ -96,12 +96,11 @@ namespace mln inline unsigned find(const Image<I>& ima) { - trace::entering("border::find"); + mln_trace("border::find"); mln_precondition(exact(ima).is_valid()); unsigned res = border::impl::find_(mln_trait_image_speed(I)(), exact(ima)); - trace::exiting("border::find"); return res; } diff --git a/milena/mln/border/get.hh b/milena/mln/border/get.hh index 44f0bf5..bd1d263 100644 --- a/milena/mln/border/get.hh +++ b/milena/mln/border/get.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2012, 2013 EPITA Research and +// Development Laboratory (LRDE) // // This file is part of Olena. // @@ -32,7 +32,7 @@ /// Define function that returns the real border thickness of image. # include <mln/trait/images.hh> -# include <mln/trace/all.hh> +# include <mln/debug/trace.hh> namespace mln { @@ -92,14 +92,13 @@ namespace mln inline unsigned get(const Image<I>& ima) { - trace::entering("border::get"); + mln_trace("border::get"); mln_precondition(exact(ima).is_valid()); unsigned res = border::impl::get_(mln_trait_image_ext_domain(I)(), mln_trait_image_category(I)(), exact(ima)); - trace::exiting("border::get"); return res; } diff --git a/milena/mln/border/mirror.hh b/milena/mln/border/mirror.hh index 96b65e3..390f581 100644 --- a/milena/mln/border/mirror.hh +++ b/milena/mln/border/mirror.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008, 2009, 2011, 2012 EPITA Research and +// Copyright (C) 2007, 2008, 2009, 2011, 2012, 2013 EPITA Research and // Development Laboratory (LRDE) // // This file is part of Olena. @@ -83,7 +83,7 @@ namespace mln inline void mirror_(const box1d&, const I& ima_) { - trace::entering("border::impl::mirror_"); + mln_trace("border::impl::mirror_"); I& ima = const_cast<I&>(ima_); def::coord @@ -121,14 +121,13 @@ namespace mln ++i) opt::element(ima, border + nbinds + i) = ima(point1d(j)); } - trace::exiting("border::impl::mirror_"); } template <typename I> inline void mirror_(const box2d&, const I& ima_) { - trace::entering("border::impl::mirror_"); + mln_trace("border::impl::mirror_"); I& ima = const_cast<I&>(ima_); unsigned border = ima.border (); @@ -192,15 +191,14 @@ namespace mln opt::element(ima, s + i + (j * real_nbcols)) = opt::element(ima, s + i - ((j - 1)* real_nbcols)); - trace::exiting("border::impl::mirror_"); } template <typename I> inline void mirror_(const box3d&, const I& ima) { - trace::warning("border::mirror for 3D image is not implemented," - " so image borders have not been mirrored!"); + debug::trace::warning("border::mirror for 3D image is not implemented," + " so image borders have not been mirrored!"); (void) ima; // FIXME write it! } @@ -213,7 +211,7 @@ namespace mln inline void mirror(const Image<I>& ima_) { - trace::entering("border::mirror"); + mln_trace("border::mirror"); const I& ima = exact(ima_); @@ -227,7 +225,6 @@ namespace mln impl::mirror_(ima.bbox(), ima); - trace::exiting("border::mirror"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/border/resize.hh b/milena/mln/border/resize.hh index 2ad4342..bd2903a 100644 --- a/milena/mln/border/resize.hh +++ b/milena/mln/border/resize.hh @@ -128,14 +128,13 @@ namespace mln inline void resize(const Image<I>& ima, unsigned thickness) { - trace::entering("border::resize"); + mln_trace("border::resize"); mln_precondition(exact(ima).is_valid()); // Try to resize the primary image behind ima. internal::resize_dispatch(primary(ima), thickness); - trace::exiting("border::resize"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/border/resize_equal.hh b/milena/mln/border/resize_equal.hh index c70a7fa..c2143b8 100644 --- a/milena/mln/border/resize_equal.hh +++ b/milena/mln/border/resize_equal.hh @@ -61,7 +61,7 @@ namespace mln void resize_equal(const Image<I>& ima1_, const Image<J>& ima2_) { - trace::entering("border::resize_equal"); + mln_trace("border::resize_equal"); // Static checks. mlc_equal(mln_trait_image_ext_domain(I), @@ -88,7 +88,6 @@ namespace mln border::resize(ima2, b1); // else no-op when b2 == b1. - trace::exiting("border::resize_equal"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/canvas/browsing/backdiagonal2d.hh b/milena/mln/canvas/browsing/backdiagonal2d.hh index 57f5a35..0961bdc 100644 --- a/milena/mln/canvas/browsing/backdiagonal2d.hh +++ b/milena/mln/canvas/browsing/backdiagonal2d.hh @@ -114,7 +114,7 @@ namespace mln void backdiagonal2d_t::operator()(F& f) const { - trace::entering("canvas::browsing::backdiagonal2d"); + mln_trace("canvas::browsing::backdiagonal2d"); typedef typename F::I I; typedef mln_deduce(I, psite, delta) dpsite; @@ -172,7 +172,6 @@ namespace mln } f.final(); - trace::exiting("canvas::browsing::backdiagonal2d"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/canvas/browsing/diagonal2d.hh b/milena/mln/canvas/browsing/diagonal2d.hh index 3b91af2..a0195ce 100644 --- a/milena/mln/canvas/browsing/diagonal2d.hh +++ b/milena/mln/canvas/browsing/diagonal2d.hh @@ -111,7 +111,7 @@ namespace mln void diagonal2d_t::operator()(F& f) const { - trace::entering("canvas::browsing::diagonal2d"); + mln_trace("canvas::browsing::diagonal2d"); typedef typename F::I I; typedef mln_deduce(I, psite, delta) dpsite; @@ -165,7 +165,6 @@ namespace mln } f.final(); - trace::exiting("canvas::browsing::diagonal2d"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh b/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh index 719fe15..cddd1c4 100644 --- a/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh +++ b/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh @@ -114,7 +114,7 @@ namespace mln void dir_struct_elt_incr_update_t::operator()(F& f) const { - trace::entering("canvas::browsing::dir_struct_elt_incr_update"); + mln_trace("canvas::browsing::dir_struct_elt_incr_update"); mln_precondition(f.dir < f.dim); typedef typename F::I I; @@ -214,7 +214,6 @@ namespace mln } while (f.p != pmin); f.final(); - trace::exiting("canvas::browsing::dir_struct_elt_incr_update"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/canvas/browsing/directional.hh b/milena/mln/canvas/browsing/directional.hh index f6a9dcd..8e74356 100644 --- a/milena/mln/canvas/browsing/directional.hh +++ b/milena/mln/canvas/browsing/directional.hh @@ -118,7 +118,7 @@ namespace mln void directional_t::operator()(F& f) const { - trace::entering("canvas::browsing::directional"); + mln_trace("canvas::browsing::directional"); mln_precondition(f.dir < f.dim); typedef typename F::I I; @@ -159,7 +159,6 @@ namespace mln } while (f.p != pmin); f.final(); - trace::exiting("canvas::browsing::directional"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/canvas/browsing/fwd.hh b/milena/mln/canvas/browsing/fwd.hh index 7309968..158d731 100644 --- a/milena/mln/canvas/browsing/fwd.hh +++ b/milena/mln/canvas/browsing/fwd.hh @@ -100,7 +100,7 @@ namespace mln void fwd_t::operator()(F& f) const { - trace::entering("canvas::browsing::fwd"); + mln_trace("canvas::browsing::fwd"); mln_precondition(f.input.is_valid()); typedef typename F::I I; mln_fwd_piter(I) p(f.input.domain()); @@ -111,7 +111,6 @@ namespace mln f.next(); } f.final(); - trace::exiting("canvas::browsing::fwd"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/canvas/browsing/hyper_directional.hh b/milena/mln/canvas/browsing/hyper_directional.hh index 86e45ee..ebc0af3 100644 --- a/milena/mln/canvas/browsing/hyper_directional.hh +++ b/milena/mln/canvas/browsing/hyper_directional.hh @@ -104,7 +104,7 @@ namespace mln void hyper_directional_t::operator()(F& f) const { - trace::entering("canvas::browsing::hyper_directional"); + mln_trace("canvas::browsing::hyper_directional"); mln_precondition(f.dir < f.dim); typedef typename F::I I; @@ -134,7 +134,6 @@ namespace mln } while (f.p != pmin); f.final(); - trace::exiting("canvas::browsing::hyper_directional"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/canvas/browsing/internal/graph_first_search.hh b/milena/mln/canvas/browsing/internal/graph_first_search.hh index 8d74fa4..ac43b78 100644 --- a/milena/mln/canvas/browsing/internal/graph_first_search.hh +++ b/milena/mln/canvas/browsing/internal/graph_first_search.hh @@ -145,7 +145,7 @@ namespace mln void graph_first_search_t<E, C>::operator()(const Graph<G>& g_, F& f) const { - trace::entering("canvas::browsing::internal::graph_first_search"); + mln_trace("canvas::browsing::internal::graph_first_search"); const G& g = exact(g_); mln_precondition(g.is_valid()); @@ -175,7 +175,6 @@ namespace mln } f.final(); // <-- final - trace::exiting("canvas::browsing::internal::graph_first_search"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/canvas/browsing/snake_fwd.hh b/milena/mln/canvas/browsing/snake_fwd.hh index bebde63..9f6474f 100644 --- a/milena/mln/canvas/browsing/snake_fwd.hh +++ b/milena/mln/canvas/browsing/snake_fwd.hh @@ -116,7 +116,7 @@ namespace mln // FIXME: Check the dimension of the input // mlc_equal(mln_trait_image_dimension(I)(), // trait::image::dimension::two_d)::check(); - trace::entering("canvas::browsing::snake_fwd"); + mln_trace("canvas::browsing::snake_fwd"); mln_precondition(f.input.is_valid()); def::coord min_row = geom::min_row(f.input), max_row = geom::max_row(f.input), @@ -155,7 +155,6 @@ namespace mln // change browsing fwd = ! fwd; } - trace::exiting("canvas::browsing::snake_fwd"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/canvas/browsing/snake_generic.hh b/milena/mln/canvas/browsing/snake_generic.hh index 980fec0..026a820 100644 --- a/milena/mln/canvas/browsing/snake_generic.hh +++ b/milena/mln/canvas/browsing/snake_generic.hh @@ -105,7 +105,7 @@ namespace mln void snake_generic_t::operator()(F& f) const { - trace::entering("canvas::browsing::snake_generic"); + mln_trace("canvas::browsing::snake_generic"); mln_precondition(f.input.is_valid()); // p init @@ -158,7 +158,6 @@ namespace mln } } - trace::exiting("canvas::browsing::snake_generic"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/canvas/browsing/snake_vert.hh b/milena/mln/canvas/browsing/snake_vert.hh index bd12a37..ffac7ea 100644 --- a/milena/mln/canvas/browsing/snake_vert.hh +++ b/milena/mln/canvas/browsing/snake_vert.hh @@ -116,7 +116,7 @@ namespace mln // FIXME: Check the dimension of the input // mlc_equal(mln_trait_image_dimension(I)(), // trait::image::dimension::two_d)::check(); - trace::entering("canvas::browsing::snake_vert"); + mln_trace("canvas::browsing::snake_vert"); mln_precondition(f.input.is_valid()); int min_row = geom::min_row(f.input), max_row = geom::max_row(f.input), @@ -155,7 +155,6 @@ namespace mln // change browsing down = ! down; } - trace::exiting("canvas::browsing::snake_vert"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/canvas/distance_front.hh b/milena/mln/canvas/distance_front.hh index 25215e9..3b2d222 100644 --- a/milena/mln/canvas/distance_front.hh +++ b/milena/mln/canvas/distance_front.hh @@ -116,7 +116,7 @@ namespace mln D max, F& functor) { - trace::entering("canvas::impl::generic::distance_front"); + mln_trace("canvas::impl::generic::distance_front"); const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -206,7 +206,6 @@ namespace mln } } // end of Propagation. - trace::exiting("canvas::impl::generic::distance_front"); return dmap; } @@ -225,7 +224,7 @@ namespace mln const Weighted_Window<W>& w_win_, D max, F& functor) { - trace::entering("canvas::impl::distance_front_fastest"); + mln_trace("canvas::impl::distance_front_fastest"); const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -326,7 +325,6 @@ namespace mln } } // end of Propagation. - trace::exiting("canvas::impl::distance_front_fastest"); return dmap; } @@ -403,14 +401,13 @@ namespace mln const Neighborhood<N>& nbh, const Weighted_Window<W>& w_win, D max, F& functor) { - trace::entering("canvas::distance_front"); + mln_trace("canvas::distance_front"); internal::distance_front_tests(input, nbh, w_win, max, functor); mln_ch_value(I,D) output; output = internal::distance_front_dispatch(input, nbh, w_win, max, functor); - trace::exiting("canvas::distance_front"); return output; } diff --git a/milena/mln/canvas/distance_geodesic.hh b/milena/mln/canvas/distance_geodesic.hh index 052c500..6ab7766 100644 --- a/milena/mln/canvas/distance_geodesic.hh +++ b/milena/mln/canvas/distance_geodesic.hh @@ -106,7 +106,7 @@ namespace mln distance_geodesic(const Image<I>& input_, const Neighborhood<N>& nbh_, D max, F& functor) { - trace::entering("canvas::impl::generic::distance_geodesic"); + mln_trace("canvas::impl::generic::distance_geodesic"); const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -167,7 +167,6 @@ namespace mln } } - trace::exiting("canvas::impl::generic::distance_geodesic"); return dmap; } @@ -185,7 +184,7 @@ namespace mln D max, F& functor) { - trace::entering("canvas::impl::distance_geodesic_fastest"); + mln_trace("canvas::impl::distance_geodesic_fastest"); const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -250,7 +249,6 @@ namespace mln } } - trace::exiting("canvas::impl::distance_geodesic_fastest"); return dmap; } @@ -324,14 +322,13 @@ namespace mln distance_geodesic(const Image<I>& input, const Neighborhood<N>& nbh, D max, F& functor) { - trace::entering("canvas::distance_geodesic"); + mln_trace("canvas::distance_geodesic"); internal::distance_geodesic_tests(input, nbh, max, functor); mln_ch_value(I,D) output; output = internal::distance_geodesic_dispatch(input, nbh, max, functor); - trace::exiting("canvas::distance_geodesic"); return output; } diff --git a/milena/mln/canvas/labeling/blobs.hh b/milena/mln/canvas/labeling/blobs.hh index ee9e5ca..1a30886 100644 --- a/milena/mln/canvas/labeling/blobs.hh +++ b/milena/mln/canvas/labeling/blobs.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2009, 2010, 2012 EPITA Research and Development +// Copyright (C) 2009, 2010, 2012, 2013 EPITA Research and Development // Laboratory (LRDE) // // This file is part of Olena. @@ -120,7 +120,7 @@ namespace mln // Label this point component. if (nlabels == mln_max(L)) { - trace::warning("labeling aborted! Too many labels \ + debug::trace::warning("labeling aborted! Too many labels \ for this label type: nlabels > max(label_type)."); return output; @@ -169,7 +169,7 @@ for this label type: nlabels > max(label_type)."); blobs(const Image<I>& input_, const Neighborhood<N>& nbh_, L& nlabels, F& functor) { - trace::entering("labeling::blobs"); + mln_trace("labeling::blobs"); mlc_equal(mln_trait_image_kind(I), mln::trait::image::kind::binary)::check(); const I& input = exact(input_); @@ -180,7 +180,6 @@ for this label type: nlabels > max(label_type)."); mln_ch_value(I, L) output = impl::generic::blobs(input, nbh, nlabels, functor); - trace::exiting("labeling::blobs"); return output; } diff --git a/milena/mln/canvas/labeling/generic.hh b/milena/mln/canvas/labeling/generic.hh index 6b753d0..19aad51 100644 --- a/milena/mln/canvas/labeling/generic.hh +++ b/milena/mln/canvas/labeling/generic.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2009, 2012 EPITA Research and Development Laboratory -// (LRDE) +// Copyright (C) 2009, 2012, 2013 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -86,7 +86,7 @@ namespace mln labeling(const Image<I>& input_, const Neighborhood<N>& nbh_, L& nlabels, const Site_Set<S>& s_, F& f) { - trace::entering("canvas::labeling::impl::generic::labeling"); + mln_trace("canvas::labeling::impl::generic::labeling"); // FIXME: Test?! @@ -161,7 +161,7 @@ namespace mln if (nlabels == mln_max(L)) { status = false; - trace::warning("labeling aborted! Too many labels \ + debug::trace::warning("labeling aborted! Too many labels \ for this label type: nlabels > \ max(label_type)."); @@ -176,7 +176,6 @@ namespace mln status = true; } - trace::exiting("canvas::labeling::impl::generic::labeling"); return output; } diff --git a/milena/mln/canvas/labeling/sorted.hh b/milena/mln/canvas/labeling/sorted.hh index 46609e0..89ebc82 100644 --- a/milena/mln/canvas/labeling/sorted.hh +++ b/milena/mln/canvas/labeling/sorted.hh @@ -84,7 +84,7 @@ namespace mln const Neighborhood<N>& nbh_, L& nlabels, const S& s, F& f) { - trace::entering("canvas::impl::labeling::sorted_fastest"); + mln_trace("canvas::impl::labeling::sorted_fastest"); // FIXME: Test?! @@ -172,7 +172,7 @@ namespace mln { if (nlabels == mln_max(L)) { - trace::warning("labeling aborted! Too many labels \ + debug::trace::warning("labeling aborted! Too many labels \ for this label type: nlabels > \ max(label_type)."); return output; @@ -185,7 +185,6 @@ namespace mln } } - trace::exiting("canvas::impl::labeling::sorted_fastest"); return output; } @@ -261,7 +260,7 @@ namespace mln sorted(const Image<I>& input, const Neighborhood<N>& nbh, L& nlabels, F& functor, bool increasing) { - trace::entering("canvas::labeling::sorted"); + mln_trace("canvas::labeling::sorted"); internal::labeling_tests(input, nbh, nlabels, functor); @@ -269,7 +268,6 @@ namespace mln output = internal::sorted_dispatch(input, nbh, nlabels, functor, increasing); - trace::exiting("canvas::labeling::sorted"); return output; } diff --git a/milena/mln/canvas/labeling/video.hh b/milena/mln/canvas/labeling/video.hh index b92ca83..8d3c65f 100644 --- a/milena/mln/canvas/labeling/video.hh +++ b/milena/mln/canvas/labeling/video.hh @@ -77,7 +77,7 @@ namespace mln const Neighborhood<N>& nbh_, L& nlabels, F& f) { - trace::entering("canvas::impl::video_fastest"); + mln_trace("canvas::impl::video_fastest"); // FIXME: Test?! @@ -159,8 +159,8 @@ namespace mln { if (nlabels == mln_max(L)) { - trace::warning("labeling aborted! Too many labels for \ - this label type: nlabels > \ + debug::trace::warning("labeling aborted! Too many labels for \ + this label type: nlabels > \ max(label_type)."); return output; } @@ -178,7 +178,6 @@ namespace mln } f.finalize(); - trace::exiting("canvas::impl::video_fastest"); return output; } @@ -246,7 +245,7 @@ namespace mln video(const Image<I>& input, const Neighborhood<N>& nbh, L& nlabels, F& functor) { - trace::entering("canvas::video"); + mln_trace("canvas::video"); internal::labeling_tests(input, nbh, nlabels, functor); @@ -254,7 +253,6 @@ namespace mln output = internal::video_dispatch(input, nbh, nlabels, functor); - trace::exiting("canvas::video"); return output; } diff --git a/milena/mln/canvas/morpho/attribute_filter.hh b/milena/mln/canvas/morpho/attribute_filter.hh index 855d959..33826f3 100644 --- a/milena/mln/canvas/morpho/attribute_filter.hh +++ b/milena/mln/canvas/morpho/attribute_filter.hh @@ -161,7 +161,7 @@ namespace mln const Accumulator<A>& a_, const mln_result(A)& lambda) { - trace::entering("canvas::morpho::impl::generic::attribute_filter"); + mln_trace("canvas::morpho::impl::generic::attribute_filter"); // FIXME: Test?! const I& input = exact(input_); @@ -256,7 +256,6 @@ namespace mln output(p) = output(parent(p)); } - trace::exiting("canvas::morpho::impl::generic::attribute_filter"); return output; } @@ -286,7 +285,7 @@ namespace mln const Accumulator<A>& a_, const mln_result(A)& lambda) { - trace::entering("canvas::morpho::impl::attribute_filter_fastest"); + mln_trace("canvas::morpho::impl::attribute_filter_fastest"); // FIXME: Tests? const I& input = exact(input_); @@ -378,7 +377,6 @@ namespace mln } } - trace::exiting("canvas::morpho::impl::attribute_filter_fastest"); return output; } diff --git a/milena/mln/clustering/kmean_rgb.hh b/milena/mln/clustering/kmean_rgb.hh index 9ed1f45..18265ae 100644 --- a/milena/mln/clustering/kmean_rgb.hh +++ b/milena/mln/clustering/kmean_rgb.hh @@ -91,7 +91,7 @@ /// {house.ppm,3,10,10} shows that if the binary starts correctly, it /// ends before returning the label image and with disturbing outputs. /// Dumping the outputs in a file reveals that the number of -/// trace::entering differs from the number of trace::exiting. May the +/// mln_trace differs from the number of trace::exiting. May the /// program exit from a loop without ending a trace ??? # include <limits.h> @@ -128,8 +128,7 @@ # include <mln/opt/at.hh> -# include <mln/trace/entering.hh> -# include <mln/trace/exiting.hh> +# include <mln/debug/trace.hh> # include <mln/trait/value_.hh> @@ -200,7 +199,7 @@ namespace mln inline void kmean3d_a<T,n>::build_label_dbg() { - trace::entering("mln::clustering::kmean3d_a::build_label_dbg"); + mln_trace("mln::clustering::kmean3d_a::build_label_dbg"); mln_piter(t_point_img) pi(_point.domain()); mln_piter(t_label_dbg) po(_label_dbg.domain()); @@ -214,14 +213,13 @@ namespace mln _label_dbg(po) = ++grp; } - trace::exiting("mln::clustering::kmean3d_a::build_label_dbg"); } template <typename T, unsigned n> inline void kmean3d_a<T,n>::build_mean_dbg() { - trace::entering("mln::clustering::kmean3d_a::build_mean_dbg"); + mln_trace("mln::clustering::kmean3d_a::build_mean_dbg"); mln_piter(t_mean_dbg) p(_mean_dbg.domain()); @@ -232,7 +230,6 @@ namespace mln _mean_dbg(p).blue() = static_cast<unsigned>(_mean[_label_dbg(p)][2]); } - trace::exiting("mln::clustering::kmean3d_a::build_mean_dbg"); } @@ -240,20 +237,19 @@ namespace mln inline void kmean3d_a<T,n>::build_all_dbg() { - trace::entering("mln::clustering::kmean3d_a::build_all_dbg"); + mln_trace("mln::clustering::kmean3d_a::build_all_dbg"); build_label_dbg(); //build_mean_dbg(); _mean_dbg = labeling::mean_values(_point, _label_dbg, _k_center); _color_dbg = labeling::colorize(value::rgb8(), _label_dbg); - trace::exiting("mln::clustering::kmean3d_a::build_all_dbg"); } template <typename T, unsigned n> inline void kmean3d_a<T,n>::update_cnv() { - trace::entering("mln::clustering::kmean3d_a::update_cnv"); + mln_trace("mln::clustering::kmean3d_a::update_cnv"); _variance_cnv[_current_launching](point1d(_current_step)) = _within_variance; @@ -266,14 +262,13 @@ namespace mln = _mean[l.index_()]; } - trace::exiting("mln::clustering::kmean3d_a::update_cnv"); } template <typename T, unsigned n> inline void kmean3d_a<T,n>::finalize_cnv() { - trace::entering("mln::clustering::kmean3d_a::finalize_cnv"); + mln_trace("mln::clustering::kmean3d_a::finalize_cnv"); // saturate the curv with the within variance for (unsigned i = _current_step; i < _watch_dog; ++i) @@ -290,7 +285,6 @@ namespace mln } } - trace::exiting("mln::clustering::kmean3d_a::finalize_cnv"); } @@ -304,7 +298,7 @@ namespace mln inline void kmean3d_a<T,n>::print_mean() { - trace::entering("mln::clustering::kmean3d_a::print_mean"); + mln_trace("mln::clustering::kmean3d_a::print_mean"); mln_eiter(t_mean_img) l(_mean); @@ -317,14 +311,13 @@ namespace mln std::cout << "]" << std::endl; } - trace::exiting("mln::clustering::kmean3d_a::print_mean"); } template <typename T, unsigned n> inline void kmean3d_a<T,n>::print_number() { - trace::entering("mln::clustering::kmean3d_a::print_number"); + mln_trace("mln::clustering::kmean3d_a::print_number"); mln_eiter(t_number_img) l(_number); @@ -335,14 +328,13 @@ namespace mln std::cout << std::endl; } - trace::exiting("mln::clustering::kmean3d_a::print_number"); } template <typename T, unsigned n> inline void kmean3d_a<T,n>::print_variance() { - trace::entering("mln::clustering::kmean3d_a::print_variance"); + mln_trace("mln::clustering::kmean3d_a::print_variance"); mln_eiter(t_variance_img) l(_number); @@ -353,14 +345,13 @@ namespace mln std::cout << std::endl; } - trace::exiting("mln::clustering::kmean3d_a::print_variance"); } template <typename T, unsigned n> inline void kmean3d_a<T,n>::print_histo() { - trace::entering("mln::clustering::kmean3d_a::print_histo"); + mln_trace("mln::clustering::kmean3d_a::print_histo"); mln_piter(t_histo_img) rgb(_histo.domain()); @@ -376,14 +367,13 @@ namespace mln } } - trace::exiting("mln::clustering::kmean3d_a::print_histo"); } template <typename T, unsigned n> inline void kmean3d_a<T,n>::print_group() { - trace::entering("mln::clustering::kmean3d_a::print_group"); + mln_trace("mln::clustering::kmean3d_a::print_group"); mln_piter(t_group_img) rgb(_group.domain()); @@ -399,14 +389,13 @@ namespace mln } } - trace::exiting("mln::clustering::kmean3d_a::print_group"); } template <typename T, unsigned n> inline void kmean3d_a<T,n>::print_distance() { - trace::entering("mln::clustering::kmean3d_a::print_distance"); + mln_trace("mln::clustering::kmean3d_a::print_distance"); mln_eiter(t_distance_img) l(_distance); @@ -428,14 +417,13 @@ namespace mln } } - trace::exiting("mln::clustering::kmean3d_a::print_distance"); } template <typename T, unsigned n> inline void kmean3d_a<T,n>::print_point() { - trace::entering("mln::clustering::kmean3d_a::print_point"); + mln_trace("mln::clustering::kmean3d_a::print_point"); mln_piter(t_point_img) p(_point.domain()); @@ -447,7 +435,6 @@ namespace mln std::cout << std::endl; } - trace::exiting("mln::clustering::kmean3d_a::print_point"); } @@ -555,7 +542,7 @@ namespace mln const unsigned watch_dog = 10, const unsigned n_times = 10) { - trace::entering("mln::clustering::impl::kmean_image2d_rgb"); + mln_trace("mln::clustering::impl::kmean_image2d_rgb"); const I& point = exact(point__); typedef mln_value(I) V; @@ -711,14 +698,14 @@ namespace mln while (_current_launching < _n_times) { // BEGIN LAUNCH ONE TIME - trace::entering("Launch one time"); + mln_trace("Launch one time"); { t_result1d old_variance = mln_max(t_result1d); _within_variance = mln_max(t_result1d); _current_step = 0; // BEGIN INIT_MEAN - trace::entering("init mean"); + mln_trace("init mean"); { t_value_comp0 min_comp0 = mln_min(t_value_comp0); t_value_comp0 max_comp0 = mln_max(t_value_comp0); @@ -735,12 +722,11 @@ namespace mln _mean[l.index_()][2]=(rand()%(max_comp2-min_comp2))+min_comp2; } } - trace::exiting("init mean"); // END INIT MEAN // UPDATE DISTANCE - trace::entering("update distance"); + mln_trace("update distance"); for (unsigned i = 0; i < _k_center; ++i) { @@ -761,7 +747,6 @@ namespace mln } } - trace::exiting("update distance"); // END UPDATE DISTANCE do @@ -769,7 +754,7 @@ namespace mln old_variance = _within_variance; // BEGIN UPDATE GROUP - trace::entering("update group"); + mln_trace("update group"); { mln_piter(t_group_img) rgb(_group.domain()); @@ -792,11 +777,10 @@ namespace mln } } - trace::exiting("update group"); // END UPDATE GROUP // BEGIN UPDATE MEAN - trace::entering("update mean"); + mln_trace("update mean"); { mln_eiter(t_number_img) en(_number); mln_eiter(t_mean_img) em(_mean); @@ -829,7 +813,6 @@ namespace mln _mean[l.index_()] /= _number[l.index_()]; } } - trace::exiting("update mean"); // END UPDATE MEAN @@ -838,7 +821,7 @@ namespace mln break; // UPDATE DISTANCE - trace::entering("update distance"); + mln_trace("update distance"); for (unsigned i = 0; i < _k_center; ++i) { @@ -854,11 +837,10 @@ namespace mln (diff2_row + diff2_col + diff2_sli); } } - trace::exiting("update distance"); // END UPDATE DISTANCE // BEGIN UPDATE VARIANCE - trace::entering("update variance"); + mln_trace("update variance"); { _within_variance = literal::zero; mln_eiter(t_variance_img) l(_variance); @@ -879,7 +861,6 @@ namespace mln } } - trace::exiting("update variance"); // END UPDATE VARIANCE //update_cnv(); @@ -892,7 +873,6 @@ namespace mln //finalize_cnv(); //build_all_dbg(); } - trace::exiting("Launch one time"); // END LAUNCH ONE TIME if ((_is_number_valid && (_current_step < _watch_dog))|| @@ -943,7 +923,6 @@ namespace mln // } // END BUILD LABEL IMAGE - trace::exiting("mln::clustering::impl::kmean_image2d_rgb"); return _label_dbg; @@ -1023,12 +1002,11 @@ namespace mln const unsigned watch_dog, const unsigned n_times) { - trace::entering("mln::clustering::kmean_rgb"); + mln_trace("mln::clustering::kmean_rgb"); mln_ch_value(I, value::label_8) output = internal::kmean_rgb_dispatch<T,n>(point, k_center, watch_dog, n_times); - trace::exiting("mln::clustering::kmean_rgb"); return output; } diff --git a/milena/mln/convert/to.hh b/milena/mln/convert/to.hh index 5c46416..6dc72e9 100644 --- a/milena/mln/convert/to.hh +++ b/milena/mln/convert/to.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2008, 2009, 2013 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -34,7 +35,7 @@ # include <mln/core/routine/exact.hh> # include <mln/metal/equal.hh> -# include <mln/trace/all.hh> +# include <mln/debug/trace.hh> # include <mln/convert/from_to.hh> @@ -64,7 +65,7 @@ namespace mln // Technical note: // No trace should be produced by this routine since it can be // applied on large sets of data. - + mlc_equal(T, mln_exact(T))::check(); mlc_equal(O, mln_exact(O))::check(); diff --git a/milena/mln/convert/to_qimage.hh b/milena/mln/convert/to_qimage.hh index f993fbc..fd90125 100755 --- a/milena/mln/convert/to_qimage.hh +++ b/milena/mln/convert/to_qimage.hh @@ -281,14 +281,13 @@ namespace mln inline QImage to_qimage(const Image<I>& ima_) { - trace::entering("convert::to_qimage"); + mln_trace("convert::to_qimage"); const I& ima = exact(ima_); mln_precondition(ima.is_valid()); QImage output = internal::to_qimage_dispatch(ima); - trace::exiting("convert::to_qimage"); return output; } diff --git a/milena/mln/convert/to_qimage_nocopy.hh b/milena/mln/convert/to_qimage_nocopy.hh index 93e0ebb..2820f0e 100755 --- a/milena/mln/convert/to_qimage_nocopy.hh +++ b/milena/mln/convert/to_qimage_nocopy.hh @@ -161,14 +161,13 @@ namespace mln inline QImage to_qimage_nocopy(const Image<I>& ima_) { - trace::entering("convert::to_qimage_nocopy"); + mln_trace("convert::to_qimage_nocopy"); const I& ima = exact(ima_); mln_precondition(ima.is_valid()); QImage output = internal::to_qimage_nocopy_dispatch(ima); - trace::exiting("convert::to_qimage_nocopy"); return output; } diff --git a/milena/mln/core/concept/object.hh b/milena/mln/core/concept/object.hh index 6fefeba..d8fba23 100644 --- a/milena/mln/core/concept/object.hh +++ b/milena/mln/core/concept/object.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008, 2009, 2010, 2011 EPITA Research and +// Copyright (C) 2007, 2008, 2009, 2010, 2011, 2013 EPITA Research and // Development Laboratory (LRDE) // // This file is part of Olena. @@ -38,7 +38,7 @@ # include <mln/core/category.hh> # include <mln/core/contract.hh> # include <mln/core/internal/fixme.hh> -# include <mln/trace/all.hh> +# include <mln/debug/trace.hh> // metal # include <mln/metal/abort.hh> diff --git a/milena/mln/core/routine/duplicate.hh b/milena/mln/core/routine/duplicate.hh index 4b72756..fb79569 100644 --- a/milena/mln/core/routine/duplicate.hh +++ b/milena/mln/core/routine/duplicate.hh @@ -56,13 +56,12 @@ namespace mln mln_concrete(I) duplicate(const Image<I>& model) { // FIXME: Add a static check that mln_concrete(I) actually *is* concrete... - trace::entering("core::duplicate"); + mln_trace("core::duplicate"); mln_concrete(I) tmp; initialize(tmp, model); data::fill(tmp, model); - trace::exiting("core::duplicate"); return tmp; } diff --git a/milena/mln/core/routine/initialize.hh b/milena/mln/core/routine/initialize.hh index b93b199..1dde1e5 100644 --- a/milena/mln/core/routine/initialize.hh +++ b/milena/mln/core/routine/initialize.hh @@ -55,16 +55,15 @@ namespace mln inline void initialize(Image<I>& target, const Image<J>& model) { - trace::entering("core::initialize"); + mln_trace("core::initialize"); mln_precondition(! exact(target).is_valid()); mln_precondition(exact(model).is_valid()); - trace::stop(); + debug::trace::stop(); init_(tag::image, exact(target), exact(model)); - trace::resume(); + debug::trace::resume(); mln_postcondition(exact(target).is_valid()); - trace::exiting("core::initialize"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/data/abs.hh b/milena/mln/data/abs.hh index d4a710a..1495352 100644 --- a/milena/mln/data/abs.hh +++ b/milena/mln/data/abs.hh @@ -74,24 +74,22 @@ namespace mln inline void abs(const Image<I>& input, Image<O>& output) { - trace::entering("data::abs"); + mln_trace("data::abs"); mln_precondition(exact(input).domain() == exact(output).domain()); exact(output) = data::transform(input, fun::v2v::abs<mln_value(I)>()); - trace::exiting("data::abs"); } template <typename I> inline void abs_inplace(Image<I>& input) { - trace::entering("data::abs_inplace"); + mln_trace("data::abs_inplace"); mln_precondition(exact(input).is_valid()); data::apply(input, fun::v2v::abs<mln_value(I)>()); - trace::exiting("data::abs_inplace"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/data/apply.hh b/milena/mln/data/apply.hh index 66a72ed..2d4d1c5 100644 --- a/milena/mln/data/apply.hh +++ b/milena/mln/data/apply.hh @@ -77,13 +77,12 @@ namespace mln inline void apply_(I& input, const F& f) { - trace::entering("data::impl::generic::apply_"); + mln_trace("data::impl::generic::apply_"); mln_piter(I) p(input.domain()); for_all(p) input(p) = f(input(p)); - trace::exiting("data::impl::generic::apply_"); } } // end of namespace mln::data::impl::generic @@ -97,13 +96,12 @@ namespace mln inline void apply(Image<I>& input, const Function_v2v<F>& f) { - trace::entering("data::apply"); + mln_trace("data::apply"); mln_precondition(exact(input).is_valid()); impl::apply_(mln_trait_image_speed(I)(), exact(input), exact(f)); - trace::exiting("data::apply"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/data/apply.spe.hh b/milena/mln/data/apply.spe.hh index 7fa43a5..e6237f2 100644 --- a/milena/mln/data/apply.spe.hh +++ b/milena/mln/data/apply.spe.hh @@ -71,13 +71,12 @@ namespace mln inline void apply_(trait::image::speed::fastest, I& input, const F& f) { - trace::entering("data::impl::apply_"); + mln_trace("data::impl::apply_"); mln_pixter(I) pxl(input); for_all(pxl) pxl.val() = f(pxl.val()); - trace::exiting("data::impl::apply_"); } diff --git a/milena/mln/data/approx/median.hh b/milena/mln/data/approx/median.hh index f3ba235..03b9c2b 100644 --- a/milena/mln/data/approx/median.hh +++ b/milena/mln/data/approx/median.hh @@ -111,7 +111,7 @@ namespace mln mln_concrete(I) median(const Image<I>& input, const win::rectangle2d& win) { - trace::entering("data::approx::median"); + mln_trace("data::approx::median"); mln_concrete(I) output; @@ -121,7 +121,6 @@ namespace mln win::vline2d win2(win.height()); output = data::median(output, win2); - trace::exiting("data::approx::median"); return output; } @@ -131,7 +130,7 @@ namespace mln mln_concrete(I) median(const Image<I>& input, const win::disk2d& win) { - trace::entering("data::approx::median"); + mln_trace("data::approx::median"); const unsigned len = win.diameter() / 3 + 1; mln_concrete(I) output; @@ -148,7 +147,6 @@ namespace mln win::vline2d win4(len); output = data::median(output, win4); - trace::exiting("data::approx::median"); return output; } diff --git a/milena/mln/data/compare.hh b/milena/mln/data/compare.hh index f325c07..f7ef69c 100644 --- a/milena/mln/data/compare.hh +++ b/milena/mln/data/compare.hh @@ -91,7 +91,7 @@ namespace mln inline bool operator == (const Image<L>& lhs_, const Image<R>& rhs_) { - trace::entering("data::compare (==)"); + mln_trace("data::compare (==)"); const L& lhs = exact(lhs_); const R& rhs = exact(rhs_); @@ -103,7 +103,6 @@ namespace mln typedef fun::vv2b::eq<mln_value(L), mln_value(R)> F; bool res = test::predicate(lhs, rhs, F()); - trace::exiting("data::compare (==)"); return res; } @@ -112,7 +111,7 @@ namespace mln inline bool operator < (const Image<L>& lhs_, const Image<R>& rhs_) { - trace::entering("data::compare (<)"); + mln_trace("data::compare (<)"); const L& lhs = exact(lhs_); const R& rhs = exact(rhs_); @@ -122,7 +121,6 @@ namespace mln typedef fun::vv2b::lt<mln_value(L), mln_value(R)> F; bool res = test::predicate(lhs_, rhs_, F()); - trace::exiting("data::compare (<)"); return res; } @@ -131,7 +129,7 @@ namespace mln inline bool operator <= (const Image<L>& lhs_, const Image<R>& rhs_) { - trace::entering("data::compare (<=)"); + mln_trace("data::compare (<=)"); const L& lhs = exact(lhs_); const R& rhs = exact(rhs_); @@ -141,7 +139,6 @@ namespace mln typedef fun::vv2b::le<mln_value(L), mln_value(R)> F; bool res = test::predicate(lhs_, rhs_, F()); - trace::exiting("data::compare (<=)"); return res; } diff --git a/milena/mln/data/compute.hh b/milena/mln/data/compute.hh index 3764add..0745469 100644 --- a/milena/mln/data/compute.hh +++ b/milena/mln/data/compute.hh @@ -111,7 +111,7 @@ namespace mln mln_result(A) compute(Accumulator<A>& a_, const Image<I>& input) { - trace::entering("data::compute"); + mln_trace("data::compute"); A a = exact(a_); data::internal::update_tests(a, input); @@ -119,7 +119,6 @@ namespace mln a.init(); data::internal::update_dispatch(a, input); - trace::exiting("data::compute"); return a; } diff --git a/milena/mln/data/compute_in_window.hh b/milena/mln/data/compute_in_window.hh index 1188ad5..0ab1c84 100644 --- a/milena/mln/data/compute_in_window.hh +++ b/milena/mln/data/compute_in_window.hh @@ -107,7 +107,7 @@ namespace mln const Image<I>& input_, const Window<W>& win_) { - trace::entering("mln::impl::generic::compute_in_window"); + mln_trace("mln::impl::generic::compute_in_window"); const I& input = exact(input_); const W& win = exact(win_); @@ -130,7 +130,6 @@ namespace mln mln_ch_value(I, mln_result(A)) output = accu::image::to_result(accu); - trace::exiting("mln::impl::generic::compute_in_window"); return output; } @@ -143,7 +142,7 @@ namespace mln const Image<I>& input_, const Window<W>& win_) { - trace::entering("mln::impl::generic::compute_in_window_fastest"); + mln_trace("mln::impl::generic::compute_in_window_fastest"); const W& win = exact(win_); const I& input = exact(input_); @@ -169,7 +168,6 @@ namespace mln mln_ch_value(I, mln_result(A)) output = accu::image::to_result(accu); - trace::exiting("mln::impl::generic::compute_in_window_fastest"); return output; } @@ -223,14 +221,13 @@ namespace mln compute_in_window(const Accumulator<A>& a, const Image<I>& input, const Window<W>& win) { - trace::entering("data::compute_in_window"); + mln_trace("data::compute_in_window"); internal::compute_in_window_tests(a, input, win); mln_ch_value(I, mln_result(A)) output = data::internal::compute_in_window_dispatch(a, input, win); - trace::exiting("data::compute_in_window"); return output; } diff --git a/milena/mln/data/convert.hh b/milena/mln/data/convert.hh index 4fa71d9..260baac 100644 --- a/milena/mln/data/convert.hh +++ b/milena/mln/data/convert.hh @@ -84,13 +84,12 @@ namespace mln mln_ch_value(I, V) convert(const V& v, const Image<I>& input) { - trace::entering("data::impl::generic::convert"); + mln_trace("data::impl::generic::convert"); internal::convert_tests(v, input); fun::v2v::convert<V> f; mln_ch_value(I, V) output = data::transform(input, f); - trace::exiting("data::impl::generic::convert"); return output; } @@ -102,12 +101,11 @@ namespace mln mln_ch_value(I,V) convert_identity(const V& v, const Image<I>& input) { - trace::entering("data::impl::convert_identity"); + mln_trace("data::impl::convert_identity"); internal::convert_tests(v, input); mln_concrete(I) output = duplicate(input); - trace::exiting("data::impl::convert_identity"); return output; } @@ -156,13 +154,12 @@ namespace mln mln_ch_value(I, V) convert(const V& v, const Image<I>& input) { - trace::entering("data::convert"); + mln_trace("data::convert"); internal::convert_tests(v, input); mln_ch_value(I, V) output = internal::convert_dispatch(v, input); - trace::exiting("data::convert"); return output; } diff --git a/milena/mln/data/fill.hh b/milena/mln/data/fill.hh index 7536718..f48e428 100644 --- a/milena/mln/data/fill.hh +++ b/milena/mln/data/fill.hh @@ -140,12 +140,11 @@ namespace mln inline void fill(Image<I>& ima, const D& data) { - trace::entering("data::fill"); + mln_trace("data::fill"); internal::fill_tests(ima, data); internal::fill_dispatch(ima, data); - trace::exiting("data::fill"); } diff --git a/milena/mln/data/fill_with_image.hh b/milena/mln/data/fill_with_image.hh index 0074ee5..4b69545 100644 --- a/milena/mln/data/fill_with_image.hh +++ b/milena/mln/data/fill_with_image.hh @@ -99,7 +99,7 @@ namespace mln template <typename I, typename J> void fill_with_image(Image<I>& ima_, const Image<J>& data_) { - trace::entering("data::impl::generic::fill_with_image"); + mln_trace("data::impl::generic::fill_with_image"); I& ima = exact(ima_); const J& data = exact(data_); @@ -109,7 +109,6 @@ namespace mln for_all(p) ima(p) = static_cast<mln_value(I)>(data(p)); - trace::exiting("data::impl::generic::fill_with_image"); } } // end if namespace mln::data::impl::generic @@ -123,11 +122,10 @@ namespace mln inline void fill_with_image(Image<I>& ima, const Image<J>& data) { - trace::entering("data::fill_with_image"); + mln_trace("data::fill_with_image"); internal::fill_with_image_(ima, data); - trace::exiting("data::fill_with_image"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/data/fill_with_image.spe.hh b/milena/mln/data/fill_with_image.spe.hh index 1f3327e..f2034e3 100644 --- a/milena/mln/data/fill_with_image.spe.hh +++ b/milena/mln/data/fill_with_image.spe.hh @@ -76,7 +76,7 @@ namespace mln template <typename I, typename J> void fill_with_image_fastest(Image<I>& ima_, const Image<J>& data_) { - trace::entering("data::impl::fill_with_image_fastest"); + mln_trace("data::impl::fill_with_image_fastest"); I& ima = exact(ima_); const J& data = exact(data_); @@ -90,13 +90,12 @@ namespace mln memcpy_(dst, src, opt::nelements(ima)); - trace::exiting("data::impl::fill_with_image_fastest"); } template <typename I, typename J> void fill_with_image_fast(Image<I>& ima_, const Image<J>& data_) { - trace::entering("data::impl::fill_with_image_fast"); + mln_trace("data::impl::fill_with_image_fast"); I& ima = exact(ima_); const J& data = exact(data_); @@ -112,14 +111,13 @@ namespace mln pi.val() = d.val(); d.next(); } - trace::exiting("data::impl::fill_with_image_fast"); } template <typename I, typename J> inline void fill_with_image_lines(Image<I>& ima_, const Image<J>& data_) { - trace::entering("data::impl::fill_with_image_lines"); + mln_trace("data::impl::fill_with_image_lines"); I& ima = exact(ima_); const J& data = exact(data_); @@ -133,21 +131,19 @@ namespace mln memcpy_(dst, make::pixel(data, p), p.run_length()); } - trace::exiting("data::impl::fill_with_image_lines"); } template <typename I, typename J> void fill_with_image_singleton(Image<I>& ima_, const Image<J>& data_) { - trace::entering("data::impl::fill_with_image_singleton"); + mln_trace("data::impl::fill_with_image_singleton"); const J& data = exact(data_); data::internal::fill_with_image_tests(ima_, data); data::fill_with_value(ima_, opt::value(data)); - trace::exiting("data::impl::fill_with_image_singleton"); } } // end of namespace mln::data::impl diff --git a/milena/mln/data/fill_with_value.hh b/milena/mln/data/fill_with_value.hh index 5688ed1..0a266a4 100644 --- a/milena/mln/data/fill_with_value.hh +++ b/milena/mln/data/fill_with_value.hh @@ -102,7 +102,7 @@ namespace mln template <typename I, typename V> void fill_with_value(Image<I>& ima_, const V& val) { - trace::entering("data::impl::generic::fill_with_value"); + mln_trace("data::impl::generic::fill_with_value"); I& ima = exact(ima_); @@ -115,7 +115,6 @@ namespace mln for_all(p) ima(p) = v; - trace::exiting("data::impl::generic::fill_with_value"); } } // end if namespace mln::data::impl::generic @@ -129,12 +128,11 @@ namespace mln inline void fill_with_value(Image<I>& ima, const V& val) { - trace::entering("data::fill_with_value"); + mln_trace("data::fill_with_value"); internal::fill_with_value_tests(ima, val); internal::fill_with_value_dispatch(ima, val); - trace::exiting("data::fill_with_value"); } diff --git a/milena/mln/data/fill_with_value.spe.hh b/milena/mln/data/fill_with_value.spe.hh index d7c9557..c31815e 100644 --- a/milena/mln/data/fill_with_value.spe.hh +++ b/milena/mln/data/fill_with_value.spe.hh @@ -76,7 +76,7 @@ namespace mln inline void fill_with_value_one_block(Image<I>& ima_, const V& val) { - trace::entering("data::impl::fill_with_value_one_block"); + mln_trace("data::impl::fill_with_value_one_block"); I& ima = exact(ima_); @@ -91,14 +91,13 @@ namespace mln mln_value(I) v = static_cast<mln_value(I)>(val); data::memset_(ima, ima.point_at_offset(0), v, opt::nelements(ima)); - trace::exiting("data::impl::fill_with_value_one_block"); } template <typename I, typename V> inline void fill_with_value_cell_wise(Image<I>& ima_, const V& val) { - trace::entering("data::impl::fill_with_value_cell_wise"); + mln_trace("data::impl::fill_with_value_cell_wise"); I& ima = exact(ima_); @@ -108,14 +107,13 @@ namespace mln for_all(v) v.change_to(val); - trace::exiting("data::impl::fill_with_value_cell_wise"); } template <typename I, typename V> inline void fill_with_value_singleton(Image<I>& ima_, const V& val) { - trace::entering("data::impl::fill_with_value_singleton"); + mln_trace("data::impl::fill_with_value_singleton"); I& ima = exact(ima_); @@ -127,7 +125,6 @@ namespace mln opt::value(ima) = static_cast<mln_value(I)>(val); - trace::exiting("data::impl::fill_with_value_singleton"); } } // end of namespace mln::data::impl diff --git a/milena/mln/data/median.hh b/milena/mln/data/median.hh index 0a5248f..0033c4d 100644 --- a/milena/mln/data/median.hh +++ b/milena/mln/data/median.hh @@ -189,7 +189,7 @@ namespace mln mln_concrete(I) median(const Image<I>& input, const Window<W>& win) { - trace::entering("data::impl::generic::median"); + mln_trace("data::impl::generic::median"); mlc_equal(mln_trait_image_quant(I), trait::image::quant::low)::check(); @@ -203,7 +203,6 @@ namespace mln median_t<I,W,O> f(exact(input), exact(win), output); canvas::browsing::snake_fwd(f); - trace::exiting("data::impl::generic::median"); return output; } @@ -216,7 +215,7 @@ namespace mln mln_concrete(I) median_line(const Image<I>& input, const win::line<M,i,C>& win) { - trace::entering("data::impl::median_line"); + mln_trace("data::impl::median_line"); mlc_equal(mln_trait_image_quant(I), trait::image::quant::low)::check(); @@ -225,7 +224,6 @@ namespace mln accu::stat::median_h<mln_value(I)> a; mln_concrete(I) output = accu::transform_line(a, input, win.length(), i); - trace::exiting("data::impl::median_line"); return output; } @@ -272,7 +270,7 @@ namespace mln mln_concrete(I) median(const Image<I>& input, const Window<W>& win) { - trace::entering("data::median"); + mln_trace("data::median"); mlc_equal(mln_trait_image_quant(I), trait::image::quant::low)::check(); @@ -281,7 +279,6 @@ namespace mln mln_concrete(I) output; output = internal::median_dispatch(input, win); - trace::exiting("data::median"); return output; } diff --git a/milena/mln/data/memcpy_.hh b/milena/mln/data/memcpy_.hh index 7453fab..a58047c 100644 --- a/milena/mln/data/memcpy_.hh +++ b/milena/mln/data/memcpy_.hh @@ -76,7 +76,7 @@ namespace mln inline void memcpy__(Pd& dest, const Ps& src, std::size_t n) { - // trace::entering("data::impl::memcpy__"); + // mln_trace("data::impl::memcpy__"); typedef mln_image(Pd) Id; typedef mln_image(Ps) Is; @@ -114,7 +114,6 @@ namespace mln *p_d++ = *p_s++; } - // trace::exiting("data::impl::memcpy__"); } } @@ -125,7 +124,7 @@ namespace mln const Generalized_Pixel<Ps>& src_, std::size_t n) { - // trace::entering("data::memcpy_"); + // mln_trace("data::memcpy_"); typedef mln_image(Pd) Id; metal::is_not_const<Id>::check(); @@ -152,7 +151,6 @@ namespace mln impl::memcpy__(dest, src, n); - // trace::exiting("data::memcpy_"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/data/memset_.hh b/milena/mln/data/memset_.hh index a7484b5..90fa874 100644 --- a/milena/mln/data/memset_.hh +++ b/milena/mln/data/memset_.hh @@ -86,7 +86,7 @@ namespace mln inline void memset__(P& pix, const mln_value(P)& v, std::size_t n) { - trace::entering("data::impl::memset_"); + mln_trace("data::impl::memset_"); typedef mln_image(P) I; if (n == 0) @@ -120,7 +120,6 @@ namespace mln *ptr++ = v; } - trace::exiting("data::impl::memset_"); } } // end of namespace mln::data::impl @@ -131,7 +130,7 @@ namespace mln void memset_(Generalized_Pixel<P>& pix_, const mln_value(P)& v, std::size_t n) { - trace::entering("data::memset_"); + mln_trace("data::memset_"); typedef mln_image(P) I; metal::is_not_const<I>::check(); @@ -146,7 +145,6 @@ namespace mln impl::memset__(pix, v, n); - trace::exiting("data::memset_"); } template <typename I> @@ -154,7 +152,7 @@ namespace mln void memset_(I& input, const mln_psite(I)& p, const mln_value(I)& v, std::size_t n) { - trace::entering("data::memset_"); + mln_trace("data::memset_"); mlc_is(mln_trait_image_speed(I), trait::image::speed::fastest)::check(); @@ -165,7 +163,6 @@ namespace mln pixel<I> pix(input, p); impl::memset__(pix, v, n); - trace::exiting("data::memset_"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/data/paste.hh b/milena/mln/data/paste.hh index 45e2b3e..b74e642 100644 --- a/milena/mln/data/paste.hh +++ b/milena/mln/data/paste.hh @@ -113,7 +113,7 @@ namespace mln inline void paste(const Image<I>& input_, Image<J>& output_) { - trace::entering("data::impl::generic::paste"); + mln_trace("data::impl::generic::paste"); data::internal::paste_tests(input_, output_); @@ -125,7 +125,6 @@ namespace mln for_all(p) output(p) = static_cast<mln_value(J)>(input(p)); - trace::exiting("data::impl::generic::paste"); } } // end of namespace mln::data::impl::generic @@ -139,14 +138,13 @@ namespace mln inline void paste(const Image<I>& input, Image<J>& output) { - trace::entering("data::paste"); + mln_trace("data::paste"); mlc_converts_to(mln_value(I), mln_value(J))::check(); internal::paste_tests(input, output); internal::paste_dispatch(input, output); - trace::exiting("data::paste"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/data/paste.spe.hh b/milena/mln/data/paste.spe.hh index d071be8..8e71ed9 100644 --- a/milena/mln/data/paste.spe.hh +++ b/milena/mln/data/paste.spe.hh @@ -76,7 +76,7 @@ namespace mln template <typename I, typename J> void paste_fast(const Image<I>& input_, Image<J>& output_) { - trace::entering("data::impl::paste_fast"); + mln_trace("data::impl::paste_fast"); const I& input = exact(input_); J& output = exact(output_); @@ -92,13 +92,12 @@ namespace mln po.val() = static_cast<mln_value(J)>(pi.val()); po.next(); } - trace::exiting("data::impl::paste_fast"); } template <typename I, typename J> void paste_fastest(const Image<I>& input_, Image<J>& output_) { - trace::entering("data::impl::paste_fastest"); + mln_trace("data::impl::paste_fastest"); const I& input = exact(input_); J& output = exact(output_); @@ -112,14 +111,13 @@ namespace mln memcpy_(dst, src, opt::nelements(input)); - trace::exiting("data::impl::paste_fastest"); } template <typename I, typename J> inline void paste_lines(const Image<I>& input_, Image<J>& output_) { - trace::entering("data::impl::paste_lines"); + mln_trace("data::impl::paste_lines"); const I& input = exact(input_); J& output = exact(output_); @@ -133,20 +131,18 @@ namespace mln memcpy_(dst, make::pixel(input, p), p.run_length()); } - trace::exiting("data::impl::paste_lines"); } template <typename I, typename J> void paste_singleton(const Image<I>& input_, Image<J>& output_) { - trace::entering("data::impl::paste_singleton"); + mln_trace("data::impl::paste_singleton"); const I& input = exact(input_); data::fill_with_value((output_ | input.domain()).rw(), opt::value(input)); - trace::exiting("data::impl::paste_singleton"); } } // end of namespace impl. diff --git a/milena/mln/data/paste_without_localization.hh b/milena/mln/data/paste_without_localization.hh index 437db09..c2f48f1 100644 --- a/milena/mln/data/paste_without_localization.hh +++ b/milena/mln/data/paste_without_localization.hh @@ -95,7 +95,7 @@ namespace mln void paste_without_localization(const Image<I>& input_, Image<J>& output_) { - trace::entering("data::impl::generic::paste_without_localization"); + mln_trace("data::impl::generic::paste_without_localization"); internal::paste_without_localization_tests(input_, output_); @@ -113,7 +113,6 @@ namespace mln po.next(); } - trace::exiting("data::impl::generic::paste_without_localization"); } @@ -144,7 +143,7 @@ namespace mln void paste_without_localization_fastest(const Image<I>& input_, Image<J>& output_) { - trace::entering("data::impl::paste_without_localization_fastest"); + mln_trace("data::impl::paste_without_localization_fastest"); internal::paste_without_localization_tests(input_, output_); @@ -154,7 +153,6 @@ namespace mln typedef mln_value(I) V; memcpy(output.buffer(), input.buffer(), input.nelements() * sizeof(V)); - trace::exiting("data::impl::paste_without_localization_fastest"); } @@ -181,7 +179,7 @@ namespace mln void paste_without_localization_lines(const Image<I>& input_, Image<J>& output_) { - trace::entering("data::impl::paste_without_localization_fastest"); + mln_trace("data::impl::paste_without_localization_fastest"); internal::paste_without_localization_tests(input_, output_); @@ -196,7 +194,6 @@ namespace mln for_all_2(pi, po) memcpy(&output(po), &input(pi), input.ncols() * sizeof(V)); - trace::exiting("data::impl::paste_without_localization_fastest"); } @@ -222,7 +219,7 @@ namespace mln void paste_without_localization_fast(const Image<I>& input_, Image<J>& output_) { - trace::entering("data::impl::paste_without_localization_fast"); + mln_trace("data::impl::paste_without_localization_fast"); internal::paste_without_localization_tests(input_, output_); @@ -235,7 +232,6 @@ namespace mln for_all_2(pi, po) po.val() = pi.val(); - trace::exiting("data::impl::paste_without_localization_fast"); } @@ -350,13 +346,12 @@ namespace mln inline void paste_without_localization(const Image<I>& input, Image<J>& output) { - trace::entering("data::paste_without_localization"); + mln_trace("data::paste_without_localization"); internal::paste_without_localization_tests(input, output); internal::paste_without_localization_dispatch(input, output); - trace::exiting("data::paste_without_localization"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/data/replace.hh b/milena/mln/data/replace.hh index e72c561..148a280 100644 --- a/milena/mln/data/replace.hh +++ b/milena/mln/data/replace.hh @@ -72,13 +72,12 @@ namespace mln void replace_(Image<I>& input_, const mln_value(I)& old_value, const mln_value(I)& new_value) { - trace::entering("data::impl::generic::replace"); + mln_trace("data::impl::generic::replace"); I& input = exact(input_); data::fill((input | (pw::value(input) == pw::cst(old_value))).rw(), new_value); - trace::exiting("data::impl::generic::replace"); } } // end of namespace mln::data::impl::generic @@ -92,13 +91,12 @@ namespace mln void replace(Image<I>& input, const mln_value(I)& old_value, const mln_value(I)& new_value) { - trace::entering("data::replace"); + mln_trace("data::replace"); mln_precondition(exact(input).is_valid()); impl::generic::replace_<I>(exact(input), old_value, new_value); - trace::exiting("data::replace"); } diff --git a/milena/mln/data/saturate.hh b/milena/mln/data/saturate.hh index 70995a3..04b6c85 100644 --- a/milena/mln/data/saturate.hh +++ b/milena/mln/data/saturate.hh @@ -93,14 +93,13 @@ namespace mln mln_ch_value(I, V) saturate(V, const Image<I>& input) { - trace::entering("data::saturate"); + mln_trace("data::saturate"); mln_precondition(exact(input).is_valid()); fun::v2v::saturate<V> f; mln_ch_value(I, V) output = data::transform(input, f); - trace::exiting("data::saturate"); return output; } @@ -110,14 +109,13 @@ namespace mln saturate(const Image<I>& input, const V& min, const V& max) { - trace::entering("data::saturate"); + mln_trace("data::saturate"); mln_precondition(exact(input).is_valid()); fun::v2v::saturate<V> f(min, max); mln_ch_value(I, V) output = data::transform(input, f); - trace::exiting("data::saturate"); return output; } @@ -126,14 +124,13 @@ namespace mln void saturate_inplace(Image<I>& input, const mln_value(I)& min, const mln_value(I)& max) { - trace::entering("data::saturate_inplace"); + mln_trace("data::saturate_inplace"); mln_precondition(exact(input).is_valid()); fun::v2v::saturate<mln_value(I)> f(min, max); data::apply(input, f); - trace::exiting("data::saturate_inplace"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/data/sort_offsets.hh b/milena/mln/data/sort_offsets.hh index 2ad8181..e01aca3 100644 --- a/milena/mln/data/sort_offsets.hh +++ b/milena/mln/data/sort_offsets.hh @@ -92,7 +92,7 @@ namespace mln util::array<unsigned> sort_offsets_increasing(const Image<I>& input_) { - trace::entering("data::impl::generic::sort_offsets_increasing"); + mln_trace("data::impl::generic::sort_offsets_increasing"); const I& input = exact(input_); @@ -104,7 +104,6 @@ namespace mln std::sort(v.hook_std_vector_().begin(), v.hook_std_vector_().end(), value_offset_less_<I>(input)); - trace::exiting("data::impl::generic::sort_offsets_increasing"); return v; } @@ -130,7 +129,7 @@ namespace mln util::array<unsigned> sort_offsets_decreasing(const Image<I>& input_) { - trace::entering("data::impl::generic::sort_offsets_decreasing"); + mln_trace("data::impl::generic::sort_offsets_decreasing"); const I& input = exact(input_); @@ -142,7 +141,6 @@ namespace mln std::sort(v.hook_std_vector_().begin(), v.hook_std_vector_().end(), value_offset_greater_<I>(input)); - trace::exiting("data::impl::generic::sort_offsets_decreasing"); return v; } @@ -158,7 +156,7 @@ namespace mln util::array<unsigned> sort_offsets_increasing_radix(const Image<I>& input_) { - trace::entering("data::impl::sort_offsets_increasing_radix"); + mln_trace("data::impl::sort_offsets_increasing_radix"); const I& input = exact(input_); @@ -181,7 +179,6 @@ namespace mln for_all(pxl) vec[loc[vset.index_of(pxl.val())]++] = pxl.offset(); - trace::exiting("data::impl::sort_offsets_increasing_radix"); return vec; } @@ -193,7 +190,7 @@ namespace mln util::array<unsigned> sort_offsets_decreasing_radix(const Image<I>& input_) { - trace::entering("data::impl::sort_offsets_decreasing_radix"); + mln_trace("data::impl::sort_offsets_decreasing_radix"); const I& input = exact(input_); @@ -216,7 +213,6 @@ namespace mln for_all(pxl) vec[loc[vset.index_of(pxl.val())]++] = pxl.offset(); - trace::exiting("data::impl::sort_offsets_decreasing_radix"); return vec; } @@ -297,14 +293,13 @@ namespace mln util::array<unsigned> sort_offsets_increasing(const Image<I>& input) { - trace::entering("data::sort_offsets_increasing"); + mln_trace("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("data::sort_offsets_increasing"); return output; } @@ -313,14 +308,13 @@ namespace mln util::array<unsigned> sort_offsets_decreasing(const Image<I>& input) { - trace::entering("data::sort_offsets_decreasing"); + mln_trace("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("data::sort_offsets_decreasing"); return output; } diff --git a/milena/mln/data/split.hh b/milena/mln/data/split.hh index 97606a8..baacafc 100644 --- a/milena/mln/data/split.hh +++ b/milena/mln/data/split.hh @@ -58,7 +58,7 @@ namespace mln void split(const Image<I>& input_, Image<J>& r_, Image<J>& g_, Image<J>& b_) { - trace::entering("mln::data::split"); + mln_trace("mln::data::split"); const I& input = exact(input_); J& r = exact(r_); @@ -91,7 +91,6 @@ namespace mln *b_ptr++ = in_ptr->blue(); } - trace::exiting("mln::data::split"); } diff --git a/milena/mln/data/stretch.hh b/milena/mln/data/stretch.hh index 7fdd838..1288376 100644 --- a/milena/mln/data/stretch.hh +++ b/milena/mln/data/stretch.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2012, 2013 EPITA Research and +// Development Laboratory (LRDE) // // This file is part of Olena. // @@ -84,7 +84,7 @@ namespace mln mln_ch_value(I, V) stretch(const V& v, const Image<I>& input) { - trace::entering("data::impl::stretch"); + mln_trace("data::impl::stretch"); (void) v; mlc_converts_to(float, V)::check(); @@ -111,10 +111,9 @@ namespace mln else { initialize(output, input); - trace::warning("output has no significative data!"); + debug::trace::warning("output has no significative data!"); } - trace::exiting("data::impl::stretch"); return output; } @@ -129,14 +128,13 @@ namespace mln mln_ch_value(I, V) stretch(const V& v, const Image<I>& input) { - trace::entering("data::stretch"); + mln_trace("data::stretch"); (void) v; mln_precondition(exact(input).is_valid()); mln_ch_value(I, V) output = impl::stretch(V(), input); - trace::exiting("data::stretch"); return output; } diff --git a/milena/mln/data/to_enc.hh b/milena/mln/data/to_enc.hh index cd758f0..55f1109 100644 --- a/milena/mln/data/to_enc.hh +++ b/milena/mln/data/to_enc.hh @@ -62,12 +62,11 @@ namespace mln inline void to_enc(const Image<I>& input, Image<O>& output) { - trace::entering("data::to_enc"); + mln_trace("data::to_enc"); mln_precondition(exact(output).domain() == exact(input).domain()); output = data::transform(input, fun::v2v::enc< mln_value(I) >()); - trace::exiting("data::to_enc"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/data/transform.hh b/milena/mln/data/transform.hh index f2103ef..be425a4 100644 --- a/milena/mln/data/transform.hh +++ b/milena/mln/data/transform.hh @@ -140,7 +140,7 @@ namespace mln mln_ch_value(I, mln_result(F)) transform(const Image<I>& input_, const Function_v2v<F>& f_) { - trace::entering("data::impl::generic::transform"); + mln_trace("data::impl::generic::transform"); const I& input = exact(input_); const F& f = exact(f_); @@ -154,7 +154,6 @@ namespace mln for_all(p) output(p) = f(input(p)); - trace::exiting("data::impl::generic::transform"); return output; } @@ -171,7 +170,7 @@ namespace mln const Image<I2>& input2_, const Function_vv2v<F>& f_) { - trace::entering("data::impl::generic::transform"); + mln_trace("data::impl::generic::transform"); const I1& input1 = exact(input1_); const I2& input2 = exact(input2_); @@ -186,7 +185,6 @@ namespace mln for_all(p) output(p) = f(input1(p), input2(p)); - trace::exiting("data::impl::generic::transform"); return output; } @@ -205,14 +203,13 @@ namespace mln mln_ch_value(I, mln_result(F)) transform(const Image<I>& input, const Function_v2v<F>& f) { - trace::entering("data::transform"); + mln_trace("data::transform"); internal::transform_tests(input, f); mln_ch_value(I, mln_result(F)) output; output = internal::transform_dispatch(input, f); - trace::exiting("data::transform"); return output; } @@ -223,14 +220,13 @@ namespace mln transform(const Image<I1>& input1, const Image<I2>& input2, const Function_vv2v<F>& f) { - trace::entering("data::transform"); + mln_trace("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("data::transform"); return output; } diff --git a/milena/mln/data/transform.spe.hh b/milena/mln/data/transform.spe.hh index d4aa855..a8288ee 100644 --- a/milena/mln/data/transform.spe.hh +++ b/milena/mln/data/transform.spe.hh @@ -104,7 +104,7 @@ namespace mln // mln_ch_value(I, mln_result(F)) // transform_lowq_v2v(const Image<I>& input_, const Function_v2v<F>& f_) // { -// trace::entering("data::impl::transform_lowq_v2v"); +// mln_trace("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(); @@ -123,7 +123,6 @@ namespace mln // for_all(p) // output(p) = lut(input(p)); -// trace::exiting("data::impl::transform_lowq_v2v"); // return output; // } @@ -132,7 +131,7 @@ namespace mln mln_ch_value(I, mln_result(F)) transform_lowq_i2v(const Image<I>& input_, const Function_v2v<F>& f_) { - trace::entering("data::impl::transform_lowq"); + mln_trace("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(); @@ -148,7 +147,6 @@ namespace mln for_all(p) output(p) = f(input(p)); - trace::exiting("data::impl::transform_lowq"); return output; } @@ -157,7 +155,7 @@ namespace mln // mln_ch_value(I, mln_result(F)) // transform_taken_v2v(const Image<I>& input_, const Function_v2v<F>& f_) // { -// trace::entering("data::impl::transform_taken_v2v"); +// mln_trace("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(); @@ -176,7 +174,6 @@ namespace mln // for_all(p) // output(p) = lut(input(p)); -// trace::exiting("data::impl::transform_taken_v2v"); // return output; // } @@ -185,7 +182,7 @@ namespace mln mln_ch_value(I, mln_result(F)) transform_taken_i2v(const Image<I>& input_, const Function_v2v<F>& f_) { - trace::entering("data::impl::transform_taken_i2v"); + mln_trace("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(); @@ -201,7 +198,6 @@ namespace mln for_all(p) output(p) = f(input(p)); - trace::exiting("data::impl::transform_taken_i2v"); return output; } @@ -210,7 +206,7 @@ namespace mln mln_ch_value(I, mln_result(F)) transform_singleton(const Image<I>& input_, const Function_v2v<F>& f_) { - trace::entering("data::impl::transform_singleton"); + mln_trace("data::impl::transform_singleton"); const I& input = exact(input_); const F& f = exact(f_); @@ -222,7 +218,6 @@ namespace mln mln_result(F) val = f(opt::value(input)); data::fill_with_value(output, val); - trace::exiting("data::impl::transform_singleton"); return output; } @@ -231,7 +226,7 @@ namespace mln mln_ch_value(I, mln_result(F)) transform_fast(const Image<I>& input_, const Function_v2v<F>& f_) { - trace::entering("data::impl::transform_fast"); + mln_trace("data::impl::transform_fast"); const I& input = exact(input_); const F& f = exact(f_); @@ -246,7 +241,6 @@ namespace mln for_all_2(pi, po) po.val() = f(pi.val()); - trace::exiting("data::impl::transform_fast"); return output; } @@ -255,7 +249,7 @@ namespace mln mln_ch_value(I, mln_result(F)) transform_fast_lowq(const Image<I>& input_, const Function_v2v<F>& f_) { - trace::entering("data::impl::transform_fast_lowq"); + mln_trace("data::impl::transform_fast_lowq"); const I& input = exact(input_); const F& f = exact(f_); @@ -273,7 +267,6 @@ namespace mln for_all_2(pi, po) po.val() = lut(pi.val()); - trace::exiting("data::impl::transform_fast_lowq"); return output; } @@ -283,7 +276,7 @@ namespace mln transform_fastest(const Image<I1>& input1_, const Image<I2>& input2_, const Function_vv2v<F>& f_) { - trace::entering("data::impl::transform_fastest"); + mln_trace("data::impl::transform_fastest"); const I1& input1 = exact(input1_); const I2& input2 = exact(input2_); @@ -300,7 +293,6 @@ namespace mln for_all_3(pi1, pi2, po) po.val() = f(pi1.val(), pi2.val()); - trace::exiting("data::impl::transform_fastest"); return output; } diff --git a/milena/mln/data/transform_inplace.hh b/milena/mln/data/transform_inplace.hh index 99fc5c6..d9a7028 100644 --- a/milena/mln/data/transform_inplace.hh +++ b/milena/mln/data/transform_inplace.hh @@ -148,7 +148,7 @@ namespace mln void transform_inplace(Image<I>& ima_, const Function_v2v<F>& f_) { - trace::entering("data::impl::generic::transform_inplace"); + mln_trace("data::impl::generic::transform_inplace"); mlc_is(mln_trait_image_pw_io(I), trait::image::pw_io::read_write)::check(); @@ -162,7 +162,6 @@ namespace mln for_all(p) ima(p) = f(ima(p)); - trace::exiting("data::impl::generic::transform_inplace"); } /// Generic implementation of transform_inplace. @@ -176,7 +175,7 @@ namespace mln transform_inplace(Image<I1>& ima_, const Image<I2>& aux_, const Function_vv2v<F>& f_) { - trace::entering("data::impl::generic::transform_inplace"); + mln_trace("data::impl::generic::transform_inplace"); mlc_is(mln_trait_image_pw_io(I1), trait::image::pw_io::read_write)::check(); @@ -191,7 +190,6 @@ namespace mln for_all(p) ima(p) = f(ima(p), aux(p)); - trace::exiting("data::impl::generic::transform_inplace"); } } // end of namespace mln::data::impl::generic @@ -203,7 +201,7 @@ namespace mln transform_inplace_lowq(Image<I>& input_, const Function_v2v<F>& f_) { - trace::entering("data::impl::transform_inplace_lowq"); + mln_trace("data::impl::transform_inplace_lowq"); mlc_is(mln_trait_image_pw_io(I), trait::image::pw_io::read_write)::check(); @@ -220,7 +218,6 @@ namespace mln for_all(p) input(p) = lut(input(p)); - trace::exiting("data::impl::transform_inplace_lowq"); } template <typename I, typename F> @@ -228,7 +225,7 @@ namespace mln transform_inplace_taken(Image<I>& input_, const Function_v2v<F>& f_) { - trace::entering("data::impl::transform_inplace_taken"); + mln_trace("data::impl::transform_inplace_taken"); mlc_is(mln_trait_image_pw_io(I), trait::image::pw_io::read_write)::check(); @@ -245,7 +242,6 @@ namespace mln for_all(p) input(p) = lut(input(p)); - trace::exiting("data::impl::transform_inplace_taken"); } @@ -254,7 +250,7 @@ namespace mln transform_inplace_singleton(Image<I>& input_, const Function_v2v<F>& f_) { - trace::entering("data::impl::transform_inplace_singleton"); + mln_trace("data::impl::transform_inplace_singleton"); I& input = exact(input_); const F& f = exact(f_); @@ -263,14 +259,13 @@ namespace mln opt::value(input) = f(opt::value(input)); - 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("data::impl::transform_inplace_fastest"); + mln_trace("data::impl::transform_inplace_fastest"); I& ima = exact(ima_); const F& f = exact(f_); @@ -281,7 +276,6 @@ namespace mln for_all(p) p.val() = f(p.val()); - trace::exiting("data::impl::transform_inplace_fastest"); } @@ -290,7 +284,7 @@ namespace mln transform_inplace_fastest_lowq(Image<I>& input_, const Function_v2v<F>& f_) { - trace::entering("data::impl::transform_inplace_fastest_lowq"); + mln_trace("data::impl::transform_inplace_fastest_lowq"); I& input = exact(input_); const F& f = exact(f_); @@ -304,7 +298,6 @@ namespace mln for_all(pi) pi.val() = lut(pi.val()); - trace::exiting("data::impl::transform_inplace_fastest_lowq"); } @@ -313,7 +306,7 @@ namespace mln transform_inplace_fastest(Image<I1>& ima_, const Image<I2>& aux_, const Function_vv2v<F>& f_) { - trace::entering("data::impl::transform_inplace_fastest"); + mln_trace("data::impl::transform_inplace_fastest"); mlc_is(mln_trait_image_pw_io(I1), trait::image::pw_io::read_write)::check(); @@ -329,7 +322,6 @@ namespace mln for_all_2(pi, pa) pi.val() = f(pi.val(), pa.val()); - trace::exiting("data::impl::transform_inplace_fastest"); } @@ -489,12 +481,11 @@ namespace mln void transform_inplace(Image<I>& ima, const Function_v2v<F>& f) { - trace::entering("data::transform_inplace"); + mln_trace("data::transform_inplace"); internal::transform_inplace_tests(ima, f); internal::transform_inplace_dispatch(ima, f); - trace::exiting("data::transform_inplace"); } template <typename I1, typename I2, typename F> @@ -502,12 +493,11 @@ namespace mln transform_inplace(Image<I1>& ima, const Image<I2>& aux, const Function_vv2v<F>& f) { - trace::entering("data::transform_inplace"); + mln_trace("data::transform_inplace"); internal::transform_inplace_tests(ima, aux, f); internal::transform_inplace_dispatch(ima, aux, f); - trace::exiting("data::transform_inplace"); } diff --git a/milena/mln/data/update.hh b/milena/mln/data/update.hh index 00480f0..9ff2260 100644 --- a/milena/mln/data/update.hh +++ b/milena/mln/data/update.hh @@ -103,7 +103,7 @@ namespace mln mln_result(A) update(Accumulator<A>& a_, const Image<I>& input_) { - trace::entering("data::impl::generic::update"); + mln_trace("data::impl::generic::update"); A& a = exact(a_); const I& input = exact(input_); @@ -113,7 +113,6 @@ namespace mln for_all(p) a.take(input(p)); - trace::exiting("data::impl::generic::update"); return a.to_result(); } @@ -132,7 +131,7 @@ namespace mln mln_result(A) update_fastest(Accumulator<A>& a_, const Image<I>& input_) { - trace::entering("data::impl::update_fastest"); + mln_trace("data::impl::update_fastest"); A& a = exact(a_); const I& input = exact(input_); @@ -142,7 +141,6 @@ namespace mln for_all(pxl) a.take(pxl.val()); - trace::exiting("data::impl::update_fastest"); return a.to_result(); } @@ -194,12 +192,11 @@ namespace mln mln_result(A) update(Accumulator<A>& a, const Image<I>& input) { - trace::entering("data::update"); + mln_trace("data::update"); data::internal::update_tests(a, input); mln_result(A) r = internal::update_dispatch(a, input); - trace::exiting("data::update"); return r; } diff --git a/milena/mln/data/wrap.hh b/milena/mln/data/wrap.hh index 9336cea..f7d1351 100644 --- a/milena/mln/data/wrap.hh +++ b/milena/mln/data/wrap.hh @@ -67,7 +67,7 @@ namespace mln mln_ch_value(I, V) wrap(const V& v, const Image<I>& input_) { - trace::entering("mln::data::wrap"); + mln_trace("mln::data::wrap"); (void) v; const I& input = exact(input_); @@ -77,7 +77,6 @@ namespace mln mln_ch_value(I, V) output = data::transform(input, fun::v2v::wrap<V>()); - trace::exiting("mln::data::wrap"); return output; } diff --git a/milena/mln/debug/draw_graph.hh b/milena/mln/debug/draw_graph.hh index 6d7da88..abb8401 100644 --- a/milena/mln/debug/draw_graph.hh +++ b/milena/mln/debug/draw_graph.hh @@ -132,7 +132,7 @@ namespace mln mln_value(I) vcolor, mln_value(I) ecolor) { - trace::entering("debug::draw_graph"); + mln_trace("debug::draw_graph"); I& ima = exact(ima_); mln_precondition(ima.is_valid()); @@ -150,7 +150,6 @@ namespace mln ima(p.second()) = vcolor; } - trace::exiting("debug::draw_graph"); } @@ -162,7 +161,7 @@ namespace mln mln_value(I) vcolor, mln_value(I) ecolor) { - trace::entering("debug::draw_graph"); + mln_trace("debug::draw_graph"); I& ima = exact(ima_); mln_precondition(ima.is_valid()); @@ -180,7 +179,6 @@ namespace mln if (ima.has(p)) ima(p) = vcolor; - trace::exiting("debug::draw_graph"); } @@ -193,7 +191,7 @@ namespace mln const Function<V>& vcolor_f_, const Function<E>& ecolor_f_, unsigned vwidth) { - trace::entering("debug::draw_graph"); + mln_trace("debug::draw_graph"); I& ima = exact(ima_); const V& vcolor_f = exact(vcolor_f_); @@ -221,7 +219,6 @@ namespace mln draw::box_plain(ima, box, vcolor_f(p.id())); } - trace::exiting("debug::draw_graph"); } @@ -244,7 +241,7 @@ namespace mln const p_vertices<util::line_graph<G>, F>& pv, const Function<V>& vcolor_f_, const Function<E>& ecolor_f_) { - trace::entering("debug::draw_graph"); + mln_trace("debug::draw_graph"); I& ima = exact(ima_); const V& vcolor_f = exact(vcolor_f_); @@ -271,7 +268,6 @@ namespace mln ima(l.end()) = vcolor_f(g.edge(vi).v2()); } - trace::exiting("debug::draw_graph"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/debug/iota.hh b/milena/mln/debug/iota.hh index b220c34..4bd92f7 100644 --- a/milena/mln/debug/iota.hh +++ b/milena/mln/debug/iota.hh @@ -90,10 +90,9 @@ namespace mln void iota(Image<I>& input, unsigned base_index) { - trace::entering("debug::iota"); + mln_trace("debug::iota"); mln_precondition(exact(input).is_valid()); impl::iota(mln_trait_image_speed(I)(), exact(input), base_index); - trace::exiting("debug::iota"); } diff --git a/milena/mln/debug/mosaic.hh b/milena/mln/debug/mosaic.hh index a9450bf..6111730 100644 --- a/milena/mln/debug/mosaic.hh +++ b/milena/mln/debug/mosaic.hh @@ -81,7 +81,7 @@ namespace mln unsigned n_horizontal, const mln_value(I)& bg) { - trace::entering("debug::mosaic"); + mln_trace("debug::mosaic"); mlc_is_a(I, Image)::check(); mlc_equal(mln_domain(I), box2d)::check(); @@ -129,7 +129,6 @@ namespace mln } } - trace::exiting("debug::mosaic"); return output; } diff --git a/milena/mln/debug/println.hh b/milena/mln/debug/println.hh index 1416405..02d74b0 100644 --- a/milena/mln/debug/println.hh +++ b/milena/mln/debug/println.hh @@ -91,12 +91,11 @@ namespace mln void println(const Image<I>& input) { - trace::entering("debug::println"); + mln_trace("debug::println"); if (!quiet) impl::println(geom::bbox(exact(input).domain()), exact(input)); - trace::exiting("debug::println"); } template <typename I> diff --git a/milena/mln/debug/put_word.hh b/milena/mln/debug/put_word.hh index a263a2b..335baf0 100644 --- a/milena/mln/debug/put_word.hh +++ b/milena/mln/debug/put_word.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2008, 2009, 2012 EPITA Research and Development +// Copyright (C) 2008, 2009, 2012, 2013 EPITA Research and Development // Laboratory (LRDE) // // This file is part of Olena. @@ -66,7 +66,7 @@ namespace mln word_end.last_coord() = static_cast<def::coord>(word_end.last_coord() + word.length() - 1); if (! inout.has(word_end)) - trace::warning("Cannot write text outside the image domain"); + debug::trace::warning("Cannot write text outside the image domain"); const unsigned n = word.length(); point2d p = word_start; diff --git a/milena/mln/debug/slices_2d.hh b/milena/mln/debug/slices_2d.hh index dbe22b2..4a25d94 100644 --- a/milena/mln/debug/slices_2d.hh +++ b/milena/mln/debug/slices_2d.hh @@ -86,7 +86,7 @@ namespace mln unsigned n_horizontal, unsigned n_vertical, const mln_value(I)& bg) { - trace::entering("debug::slices_2d"); + mln_trace("debug::slices_2d"); mlc_equal(mln_domain(I), box3d)::check(); const I& input = exact(input_); @@ -121,7 +121,6 @@ namespace mln } } - trace::exiting("debug::slices_2d"); return output; } @@ -171,7 +170,7 @@ namespace mln float ratio_hv, // horizontal / vertical const mln_value(I)& bg) { - trace::entering("debug::slices_2d"); + mln_trace("debug::slices_2d"); mlc_equal(mln_domain(I), box3d)::check(); const I& input = exact(input_); @@ -186,7 +185,6 @@ namespace mln image2d<mln_value(I)> output = slices_2d(input, n_horizontal, n_vertical, bg); - trace::exiting("debug::slices_2d"); return output; } diff --git a/milena/mln/debug/superpose.hh b/milena/mln/debug/superpose.hh index 448fbe1..736e4a9 100644 --- a/milena/mln/debug/superpose.hh +++ b/milena/mln/debug/superpose.hh @@ -84,7 +84,7 @@ namespace mln superpose(const Image<I>& input_, const Image<J>& object_, const value::rgb8& object_color) { - trace::entering("debug::superpose"); + mln_trace("debug::superpose"); const I& input = exact(input_); const J& object = exact(object_); @@ -102,7 +102,6 @@ namespace mln data::fill((output | (pw::value(object) != pw::cst(literal::zero))).rw(), object_color); - trace::exiting("debug::superpose"); return output; } diff --git a/milena/mln/debug/trace.hh b/milena/mln/debug/trace.hh new file mode 100644 index 0000000..07e9c5e --- /dev/null +++ b/milena/mln/debug/trace.hh @@ -0,0 +1,208 @@ +// Copyright (C) 2013 EPITA Research and Development Laboratory (LRDE) +// +// This file is part of Olena. +// +// Olena is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation, version 2 of the License. +// +// Olena is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Olena. If not, see <http://www.gnu.org/licenses/>. +// +// As a special exception, you may use this file as part of a free +// software project without restriction. Specifically, if other files +// instantiate templates or use macros or inline functions from this +// file, or you compile this file and link it with other files to produce +// an executable, this file does not by itself cause the resulting +// executable to be covered by the GNU General Public License. This +// exception does not however invalidate any other reasons why the +// executable file might be covered by the GNU General Public License. + +#ifndef MLN_DEBUG_TRACE_HH +# define MLN_DEBUG_TRACE_HH + +/// \file +/// +/// Definition of the trace entering procedure. + +# include <string> +# include <iostream> +# include <stack> +# include <ctime> +# include <mln/core/contract.hh> + +# define mln_trace(S) \ + mln::debug::trace mln_trace_(S); \ + (void) mln_trace_; + + +namespace mln +{ + + namespace debug + { + + /*! \brief Display function calls backtrace. + + This class is meant to be instantiated at the beginning of each + routine in olena. It keep trace of the function call backtrace + and remember the time in each function. + + This class must used at follow: + + \code + namespace mln + { + void my_function() + { + mln_trace("mln::my_function"); + } + } + \endcode + + \warning mln_trace() declares a named local variable, so do not + use mln_trace twice in the same scope in order to avoid + duplicate declarations. + */ + class trace + { + public: + + trace(const std::string& scope); + ~trace(); + + static void resume(); + static void stop(); + static void warning(const std::string& message); + + /// Public attributes + ///@{ + static bool quiet; + static unsigned tab; + static bool full_trace; + ///@} + + private: + static std::stack<std::clock_t> start_times_; + static std::stack<std::string> scopes_; + static unsigned max_tab_; + static bool is_quiet_; + + }; + + +# ifndef MLN_INCLUDE_ONLY + + + // Initialization of static attributes. +# ifndef MLN_WO_GLOBAL_VARS + + bool trace::quiet = true; + unsigned trace::tab = 0; + bool trace::full_trace = false; + + std::stack<std::clock_t> trace::start_times_; + std::stack<std::string> trace::scopes_; + unsigned trace::max_tab_ = 0; + bool trace::is_quiet_ = quiet; + +# endif // ! MLN_WO_GLOBAL_VARS + + + + // Implementations. + + trace::trace(const std::string& scope) + { + if (quiet) + return; + + start_times_.push(std::clock()); + scopes_.push(scope); + + if ((tab != 0) && (max_tab_ == tab)) + std::cout << std::endl; + + for (unsigned i = 0; i < tab; ++i) + std::cout << " "; + std::cout << scope << " {"; + + max_tab_ = ++tab; + } + + + trace::~trace() + { + if (quiet) + return; + + std::string scope = scopes_.top(); + scopes_.pop(); + + bool has_inner_trace = (max_tab_ == tab); + --tab; + + if (!has_inner_trace) + for (unsigned i = 0; i < tab; ++i) + std::cout << " "; + + std::cout << "} "; + + if (!has_inner_trace) + std::cout << scope << " "; + + mln_assertion(! start_times_.empty()); + std::clock_t now = std::clock(); + + if (start_times_.top() > now) + { + std::cerr << "warning: bad timer in trace handling" << std::endl; + // FIXME: So what? + } + + if (start_times_.top() < now) + { + std::cout << "- " + << ((float(now) - float(start_times_.top())) / CLOCKS_PER_SEC) + << "s "; + } + + start_times_.pop(); + + if (has_inner_trace || (max_tab_ - tab > 1)) + std::cout << std::endl; + } + + + void trace::resume() + { + quiet = is_quiet_; + } + + + void trace::stop() + { + is_quiet_ = quiet; + if (!full_trace) + quiet = true; + } + + + void trace::warning(const std::string& message) + { + std::cerr << "Warning: " << message << std::endl; + } + +# endif // ! MLN_INCLUDE_ONLY + + } // end of namespace mln::debug + +} // end of namespace mln + + +#endif // ! MLN_DEBUG_TRACE_HH diff --git a/milena/mln/debug/z_order.hh b/milena/mln/debug/z_order.hh index b58993d..a5f08f5 100644 --- a/milena/mln/debug/z_order.hh +++ b/milena/mln/debug/z_order.hh @@ -143,12 +143,11 @@ namespace mln void z_order(Image<I>& input) { - trace::entering("debug::z_order"); + mln_trace("debug::z_order"); mln_precondition(exact(input).is_valid()); internal::z_order_dispatch(input); - trace::exiting("debug::z_order"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/draw/dashed_line.hh b/milena/mln/draw/dashed_line.hh index 53aaff1..c9fe6b7 100644 --- a/milena/mln/draw/dashed_line.hh +++ b/milena/mln/draw/dashed_line.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2010, 2012 EPITA Research and Development Laboratory -// (LRDE) +// Copyright (C) 2010, 2012, 2013 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -99,9 +99,9 @@ namespace mln mln_precondition(ima.is_valid()); if (! ima.has(beg)) - trace::warning("Begin site is not part of the given image."); + debug::trace::warning("Begin site is not part of the given image."); if (! ima.has(end)) - trace::warning("End site is not part of the given image."); + debug::trace::warning("End site is not part of the given image."); data::fill(((ima | p_line2d(beg, end)).rw() | internal::dashed_line_f<I, 1>()).rw(), v); } diff --git a/milena/mln/draw/line.hh b/milena/mln/draw/line.hh index f1ca1da..08c9920 100644 --- a/milena/mln/draw/line.hh +++ b/milena/mln/draw/line.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2012, 2013 EPITA Research and +// Development Laboratory (LRDE) // // This file is part of Olena. // @@ -78,9 +78,9 @@ namespace mln I& ima = exact(ima_); mln_precondition(ima.is_valid()); if (! ima.has(beg)) - trace::warning("Begin site is not part of the given image."); + debug::trace::warning("Begin site is not part of the given image."); if (! ima.has(end)) - trace::warning("End site is not part of the given image."); + debug::trace::warning("End site is not part of the given image."); data::paste(pw::cst(v) | p_line2d(beg, end), safe(ima).rw()); } diff --git a/milena/mln/essential/routine.hh b/milena/mln/essential/routine.hh index 95f8edd..0d6f1ac 100644 --- a/milena/mln/essential/routine.hh +++ b/milena/mln/essential/routine.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2008, 2009, 2013 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -63,7 +64,7 @@ # include <mln/tag/essential.hh> # include <mln/test/essential.hh> -# include <mln/trace/essential.hh> +# include <mln/debug/trace.hh> # include <mln/trait/essential.hh> # include <mln/transform/essential.hh> # include <mln/util/essential.hh> diff --git a/milena/mln/extension/adjust.hh b/milena/mln/extension/adjust.hh index 23669ba..4d00185 100644 --- a/milena/mln/extension/adjust.hh +++ b/milena/mln/extension/adjust.hh @@ -101,33 +101,29 @@ namespace mln template <typename I, typename W> void adjust(const Image<I>& ima, const Window<W>& win) { - trace::entering("extension::adjust"); + mln_trace("extension::adjust"); impl::adjust(ima, geom::delta(win)); - trace::exiting("extension::adjust"); } template <typename I, typename W> void adjust(const Image<I>& ima, const Weighted_Window<W>& wwin) { - trace::entering("extension::adjust"); + mln_trace("extension::adjust"); impl::adjust(ima, geom::delta(wwin)); - trace::exiting("extension::adjust"); } template <typename I, typename N> void adjust(const Image<I>& ima, const Neighborhood<N>& nbh) { - trace::entering("extension::adjust"); + mln_trace("extension::adjust"); impl::adjust(ima, geom::delta(nbh)); - trace::exiting("extension::adjust"); } template <typename I> void adjust(const Image<I>& ima, unsigned delta) { - trace::entering("extension::adjust"); + mln_trace("extension::adjust"); impl::adjust(ima, delta); - trace::exiting("extension::adjust"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/extension/adjust_duplicate.hh b/milena/mln/extension/adjust_duplicate.hh index 9605dcf..475610c 100644 --- a/milena/mln/extension/adjust_duplicate.hh +++ b/milena/mln/extension/adjust_duplicate.hh @@ -86,40 +86,36 @@ namespace mln void adjust_duplicate(const Image<I>& ima, const Window<W>& win) { - trace::entering("extension::adjust_duplicate"); + mln_trace("extension::adjust_duplicate"); extension::adjust(ima, win); extension::duplicate(ima); - trace::exiting("extension::adjust_duplicate"); } template <typename I, typename W> void adjust_duplicate(const Image<I>& ima, const Weighted_Window<W>& wwin) { - trace::entering("extension::adjust_duplicate"); + mln_trace("extension::adjust_duplicate"); extension::adjust(ima, wwin); extension::duplicate(ima); - trace::exiting("extension::adjust_duplicate"); } template <typename I, typename N> void adjust_duplicate(const Image<I>& ima, const Neighborhood<N>& nbh) { - trace::entering("extension::adjust_duplicate"); + mln_trace("extension::adjust_duplicate"); extension::adjust(ima, nbh); extension::duplicate(ima); - trace::exiting("extension::adjust_duplicate"); } template <typename I> void adjust_duplicate(const Image<I>& ima, unsigned delta) { - trace::entering("extension::adjust_duplicate"); + mln_trace("extension::adjust_duplicate"); extension::adjust(ima, delta); extension::duplicate(ima); - trace::exiting("extension::adjust_duplicate"); } diff --git a/milena/mln/extension/adjust_fill.hh b/milena/mln/extension/adjust_fill.hh index 2de3743..72f31bc 100644 --- a/milena/mln/extension/adjust_fill.hh +++ b/milena/mln/extension/adjust_fill.hh @@ -89,10 +89,9 @@ namespace mln const Window<W>& win, const mln_value(I)& val) { - trace::entering("extension::adjust_fill"); + mln_trace("extension::adjust_fill"); extension::adjust(ima, win); extension::fill(ima, val); - trace::exiting("extension::adjust_fill"); } template <typename I, typename W> @@ -100,10 +99,9 @@ namespace mln const Weighted_Window<W>& wwin, const mln_value(I)& val) { - trace::entering("extension::adjust_fill"); + mln_trace("extension::adjust_fill"); extension::adjust(ima, wwin); extension::fill(ima, val); - trace::exiting("extension::adjust_fill"); } template <typename I, typename N> @@ -111,10 +109,9 @@ namespace mln const Neighborhood<N>& nbh, const mln_value(I)& val) { - trace::entering("extension::adjust_fill"); + mln_trace("extension::adjust_fill"); extension::adjust(ima, nbh); extension::fill(ima, val); - trace::exiting("extension::adjust_fill"); } template <typename I> @@ -122,10 +119,9 @@ namespace mln unsigned delta, const mln_value(I)& val) { - trace::entering("extension::adjust_fill"); + mln_trace("extension::adjust_fill"); extension::adjust(ima, delta); extension::fill(ima, val); - trace::exiting("extension::adjust_fill"); } diff --git a/milena/mln/extension/duplicate.hh b/milena/mln/extension/duplicate.hh index 726e5a5..e32b2d6 100644 --- a/milena/mln/extension/duplicate.hh +++ b/milena/mln/extension/duplicate.hh @@ -61,9 +61,8 @@ namespace mln template <typename I> void duplicate(const Image<I>& ima) { - trace::entering("extension::duplicate"); + mln_trace("extension::duplicate"); border::duplicate(ima); - trace::exiting("extension::duplicate"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/extension/fill.hh b/milena/mln/extension/fill.hh index 229eef3..10318f3 100644 --- a/milena/mln/extension/fill.hh +++ b/milena/mln/extension/fill.hh @@ -177,12 +177,11 @@ namespace mln template <typename I> void fill(const Image<I>& ima, const mln_value(I)& val) { - trace::entering("extension::fill"); + mln_trace("extension::fill"); mln_precondition(exact(ima).is_valid()); internal::fill_dispatch(ima, val); - trace::exiting("extension::fill"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/fun/x2x/composed.hh b/milena/mln/fun/x2x/composed.hh index 162e2fe..0fdbd35 100644 --- a/milena/mln/fun/x2x/composed.hh +++ b/milena/mln/fun/x2x/composed.hh @@ -311,9 +311,8 @@ namespace mln inline fun::x2x::composed<T2,T1> compose(T2 f, T1 g) { - trace::entering("fun::x2x::compose"); + mln_trace("fun::x2x::compose"); fun::x2x::composed<T2,T1> comp(f, g); - trace::exiting("fun::x2x::compose"); return comp; } diff --git a/milena/mln/geom/chamfer.hh b/milena/mln/geom/chamfer.hh index 74cfd3a..8122444 100644 --- a/milena/mln/geom/chamfer.hh +++ b/milena/mln/geom/chamfer.hh @@ -117,7 +117,7 @@ namespace mln chamfer(const Image<I>& input_, const W& w_win_, unsigned max) { - trace::entering("mln::geom::chamfer"); + mln_trace("mln::geom::chamfer"); // FIXME: check that input_ is binary. const I& input = exact(input_); @@ -128,7 +128,6 @@ namespace mln F f(input, w_win, max); canvas::chamfer<F> run(f); - trace::exiting("mln::geom::chamfer"); return f.output; } diff --git a/milena/mln/geom/crop.hh b/milena/mln/geom/crop.hh index 9c8127a..38841f7 100644 --- a/milena/mln/geom/crop.hh +++ b/milena/mln/geom/crop.hh @@ -54,7 +54,7 @@ namespace mln template <typename I, typename B> mln_concrete(I) crop(const Image<I>& input_, const Box<B>& b_) { - trace::entering("mln::geom::crop"); + mln_trace("mln::geom::crop"); const I& input = exact(input_); const B& b = exact(b_); @@ -65,7 +65,6 @@ namespace mln mln_concrete(I) output(b); data::paste(input | b, output); - trace::exiting("mln::geom::crop"); return output; } diff --git a/milena/mln/geom/crop_without_localization.hh b/milena/mln/geom/crop_without_localization.hh index 5f16ec1..9236d33 100644 --- a/milena/mln/geom/crop_without_localization.hh +++ b/milena/mln/geom/crop_without_localization.hh @@ -59,7 +59,7 @@ namespace mln crop_without_localization(const Image<I>& input_, const Box<B>& b_in_, const Box<B>& b_out_) { - trace::entering("mln::geom::crop_without_localization"); + mln_trace("mln::geom::crop_without_localization"); const I& input = exact(input_); const B& b_in = exact(b_in_); @@ -73,7 +73,6 @@ namespace mln mln_concrete(I) output(b_out); data::paste_without_localization(input | b_in, output); - trace::exiting("mln::geom::crop_without_localization"); return output; } diff --git a/milena/mln/geom/horizontal_symmetry.hh b/milena/mln/geom/horizontal_symmetry.hh index 3091f74..cff3479 100644 --- a/milena/mln/geom/horizontal_symmetry.hh +++ b/milena/mln/geom/horizontal_symmetry.hh @@ -174,14 +174,13 @@ namespace mln mln_concrete(I) horizontal_symmetry(const Image<I>& input_) { - trace::entering("geom::horizontal_symmetry"); + mln_trace("geom::horizontal_symmetry"); const I& input = exact(input_); mln_precondition(input.is_valid()); mln_concrete(I) output = internal::horizontal_symmetry_dispatch(input); - trace::exiting("geom::horizontal_symmetry"); return output; } diff --git a/milena/mln/geom/max_ind.hh b/milena/mln/geom/max_ind.hh index 241e2ee..401003d 100644 --- a/milena/mln/geom/max_ind.hh +++ b/milena/mln/geom/max_ind.hh @@ -54,12 +54,11 @@ namespace mln inline mln_deduce(I, site, coord) max_ind(const Image<I>& ima) { - trace::entering("mln::geom::max_ind"); + mln_trace("mln::geom::max_ind"); mln_precondition(exact(ima).is_valid()); mln_deduce(I, site, coord) maxind = exact(ima).bbox().pmax().ind(); - trace::exiting("mln::geom::max_ind"); return maxind; } diff --git a/milena/mln/geom/min_ind.hh b/milena/mln/geom/min_ind.hh index 1edcbe3..ca91fe9 100644 --- a/milena/mln/geom/min_ind.hh +++ b/milena/mln/geom/min_ind.hh @@ -54,12 +54,11 @@ namespace mln inline mln_deduce(I, site, coord) min_ind(const Image<I>& ima) { - trace::entering("mln::geom::min_ind"); + mln_trace("mln::geom::min_ind"); mln_precondition(exact(ima).is_valid()); mln_deduce(I, site, coord) minind = exact(ima).bbox().pmin().ind(); - trace::exiting("mln::geom::min_ind"); return minind; } diff --git a/milena/mln/geom/ninds.hh b/milena/mln/geom/ninds.hh index c0acb4d..3c4be0c 100644 --- a/milena/mln/geom/ninds.hh +++ b/milena/mln/geom/ninds.hh @@ -55,12 +55,11 @@ namespace mln inline unsigned ninds(const Image<I>& ima) { - trace::entering("mln::geom::ninds"); + mln_trace("mln::geom::ninds"); mln_precondition(exact(ima).is_valid()); unsigned ninds = geom::max_ind(ima) - geom::min_ind(ima) + 1; - trace::exiting("mln::geom::ninds"); return ninds; } diff --git a/milena/mln/geom/nsites.hh b/milena/mln/geom/nsites.hh index 434609c..f206fff 100644 --- a/milena/mln/geom/nsites.hh +++ b/milena/mln/geom/nsites.hh @@ -55,7 +55,7 @@ namespace mln inline unsigned nsites(const Image<I>& input_) { - trace::entering("geom::nsites"); + mln_trace("geom::nsites"); const I& input = exact(input_); mln_precondition(input.is_valid()); @@ -64,7 +64,6 @@ namespace mln // Relies on the card routine on a site set. unsigned n = mln::set::internal::card_dispatch(input.domain()); - trace::exiting("geom::nsites"); return n; } diff --git a/milena/mln/geom/rotate.hh b/milena/mln/geom/rotate.hh index 18b9d88..c7b5b3a 100644 --- a/milena/mln/geom/rotate.hh +++ b/milena/mln/geom/rotate.hh @@ -137,7 +137,7 @@ namespace mln rotate(const Image<I>& input_, double angle, const Ext& extension_, const Site_Set<S>& output_domain_) { - trace::entering("geom::rotate"); + mln_trace("geom::rotate"); const I& input = exact(input_); const S& output_domain = exact(output_domain_); @@ -188,7 +188,6 @@ namespace mln data::paste(tr, output); - trace::exiting("geom::rotate"); return output; } @@ -217,7 +216,7 @@ namespace mln B rotate(const Box<B>& box_, double angle, const mln_site(B)& ref) { - trace::entering("geom::rotate"); + mln_trace("geom::rotate"); const B& box = exact(box_); @@ -252,7 +251,6 @@ namespace mln B output = accu.to_result(); - trace::exiting("geom::rotate"); return output; } diff --git a/milena/mln/geom/seeds2tiling.hh b/milena/mln/geom/seeds2tiling.hh index 79e5794..f196052 100644 --- a/milena/mln/geom/seeds2tiling.hh +++ b/milena/mln/geom/seeds2tiling.hh @@ -80,7 +80,7 @@ namespace mln seeds2tiling (const Image<I>& ima_, const Neighborhood<N>& nbh_) { - trace::entering("geom::impl::seed2tiling"); + mln_trace("geom::impl::seed2tiling"); mln_precondition(exact(ima_).is_valid()); mln_precondition(exact(nbh_).is_valid()); @@ -124,7 +124,6 @@ namespace mln } } - trace::exiting("geom::impl::seed2tiling"); return out; } @@ -138,14 +137,13 @@ namespace mln inline mln_concrete(I) seeds2tiling(const Image<I>& ima_, const Neighborhood<N>& nbh) { - trace::entering("geom::seed2tiling"); + mln_trace("geom::seed2tiling"); mln_precondition(exact(ima_).is_valid()); mln_precondition(exact(nbh).is_valid()); mln_concrete(I) output = impl::seeds2tiling(ima_, nbh); - trace::exiting("geom::seed2tiling"); return output; } diff --git a/milena/mln/geom/seeds2tiling_roundness.hh b/milena/mln/geom/seeds2tiling_roundness.hh index 7ed87ab..ef9ff97 100644 --- a/milena/mln/geom/seeds2tiling_roundness.hh +++ b/milena/mln/geom/seeds2tiling_roundness.hh @@ -82,7 +82,7 @@ namespace mln seeds2tiling_roundness(Image<I>& ima_, const w_window2d_int& w_win, unsigned max, const Neighborhood<N>& nbh_) { - trace::entering("geom::impl::seed2tiling_roundness"); + mln_trace("geom::impl::seed2tiling_roundness"); I& ima = exact(ima_); const N& nbh = exact(nbh_); @@ -116,7 +116,6 @@ namespace mln } } - trace::exiting("geom::impl::seed2tiling_roundness"); return out; } @@ -130,12 +129,11 @@ namespace mln seeds2tiling_roundness(Image<I>& ima_, const w_window2d_int& w_win, unsigned max, const Neighborhood<N>& nbh) { - trace::entering("geom::seed2tiling_roundness"); + mln_trace("geom::seed2tiling_roundness"); mln_precondition(exact(ima_).is_valid()); I output = impl::seeds2tiling_roundness(ima_, w_win, max, nbh); - trace::exiting("geom::seed2tiling_roundness"); return output; } diff --git a/milena/mln/geom/translate.hh b/milena/mln/geom/translate.hh index 45a0306..a949a8c 100644 --- a/milena/mln/geom/translate.hh +++ b/milena/mln/geom/translate.hh @@ -109,7 +109,7 @@ namespace mln const algebra::vec<mln_site_(I)::dim, V>& ref, const Ext& extension_, const Site_Set<S>& output_domain_) { - trace::entering("geom::translate"); + mln_trace("geom::translate"); const I& input = exact(input_); const S& output_domain = exact(output_domain_); @@ -131,7 +131,6 @@ namespace mln mln_concrete(I) output(output_domain); data::fill(output, extend(tr_ima, extension) | output_domain); - trace::exiting("geom::translate"); return output; } diff --git a/milena/mln/geom/vertical_symmetry.hh b/milena/mln/geom/vertical_symmetry.hh index 8aa6694..019b866 100644 --- a/milena/mln/geom/vertical_symmetry.hh +++ b/milena/mln/geom/vertical_symmetry.hh @@ -176,14 +176,13 @@ namespace mln mln_concrete(I) vertical_symmetry(const Image<I>& input_) { - trace::entering("geom::vertical_symmetry"); + mln_trace("geom::vertical_symmetry"); const I& input = exact(input_); mln_precondition(input.is_valid()); mln_concrete(I) output = internal::vertical_symmetry_dispatch(input); - trace::exiting("geom::vertical_symmetry"); return output; } diff --git a/milena/mln/graph/compute.hh b/milena/mln/graph/compute.hh index 74eb5fb..7caa345 100644 --- a/milena/mln/graph/compute.hh +++ b/milena/mln/graph/compute.hh @@ -62,13 +62,12 @@ namespace mln mln_result(F) compute(const Graph<G>& g_, F& functor) { - trace::entering("graph::compute"); + mln_trace("graph::compute"); const G& g = exact(g_); mln_precondition(g.is_valid()); canvas::browsing::depth_first_search(g, functor); - trace::exiting("graph::compute"); return functor.data; } diff --git a/milena/mln/graph/labeling.hh b/milena/mln/graph/labeling.hh index 923cf0a..3dccefb 100644 --- a/milena/mln/graph/labeling.hh +++ b/milena/mln/graph/labeling.hh @@ -72,7 +72,7 @@ namespace mln labeling(const Image<I>& graph_image_, const Neighborhood<N>& nbh_, L& nlabels) { - trace::entering("graph::labeling"); + mln_trace("graph::labeling"); const I& graph_image = exact(graph_image_); const N& nbh = exact(nbh_); @@ -88,7 +88,6 @@ namespace mln mln_ch_value(I,L) output = mln::labeling::blobs(tmp, nbh, nlabels); - trace::exiting("graph::labeling"); return output; } diff --git a/milena/mln/graph/to_neighb.hh b/milena/mln/graph/to_neighb.hh index 4215951..3a831b3 100644 --- a/milena/mln/graph/to_neighb.hh +++ b/milena/mln/graph/to_neighb.hh @@ -56,7 +56,7 @@ namespace mln graph_elt_neighborhood_if<mln_graph(I), mln_domain(I), M> to_neighb(const Image<I>& graph_image_, const Image<M>& graph_mask_image_) { - trace::entering("graph::to_neighb"); + mln_trace("graph::to_neighb"); const I& graph_image = exact(graph_image_); const M& graph_mask_image = exact(graph_mask_image_); @@ -68,7 +68,6 @@ namespace mln typedef graph_elt_neighborhood_if<mln_graph(I), mln_domain(I), M> nbh_t; nbh_t nbh(graph_mask_image); - trace::exiting("graph::to_neighb"); return nbh; } diff --git a/milena/mln/graph/to_win.hh b/milena/mln/graph/to_win.hh index c19e261..6420382 100644 --- a/milena/mln/graph/to_win.hh +++ b/milena/mln/graph/to_win.hh @@ -56,7 +56,7 @@ namespace mln graph_elt_window_if<mln_graph(I), mln_domain(I), M> to_win(const Image<I>& graph_image_, const Image<M>& graph_mask_image_) { - trace::entering("graph::to_win"); + mln_trace("graph::to_win"); const I& graph_image = exact(graph_image_); const M& graph_mask_image = exact(graph_mask_image_); @@ -68,7 +68,6 @@ namespace mln typedef graph_elt_window_if<mln_graph(I), mln_domain(I), M> win_t; win_t win(graph_mask_image); - trace::exiting("graph::to_win"); return win; } diff --git a/milena/mln/histo/compute.hh b/milena/mln/histo/compute.hh index d7b9226..3d7b5ea 100644 --- a/milena/mln/histo/compute.hh +++ b/milena/mln/histo/compute.hh @@ -78,14 +78,13 @@ namespace mln inline histo::array<mln_value(I)> compute(const Image<I>& input) { - trace::entering("histo::compute"); + mln_trace("histo::compute"); mlc_equal(mln_trait_image_quant(I), mln::trait::image::quant::low)::check(); mln_precondition(exact(input).is_valid()); histo::array<mln_value(I)> h = impl::compute_(mln_trait_image_speed(I)(), exact(input)); - trace::exiting("histo::compute"); return h; } diff --git a/milena/mln/histo/equalize.hh b/milena/mln/histo/equalize.hh index 7f994df..032e141 100644 --- a/milena/mln/histo/equalize.hh +++ b/milena/mln/histo/equalize.hh @@ -58,7 +58,7 @@ namespace mln mln_concrete(I) equalize(const Image<I>& input_) { - trace::entering("mln::histo::equalize"); + mln_trace("mln::histo::equalize"); const I& input = exact(input_); mln_precondition(input.is_valid()); @@ -94,7 +94,6 @@ namespace mln for_all(p) output(p) = histo_correction[input(p)]; - trace::exiting("mln::histo::equalize"); return output; } diff --git a/milena/mln/io/cloud/load.hh b/milena/mln/io/cloud/load.hh index abd5fa5..788a6d6 100644 --- a/milena/mln/io/cloud/load.hh +++ b/milena/mln/io/cloud/load.hh @@ -91,7 +91,7 @@ namespace mln template <typename P> void load(p_array<P>& arr, const std::string& filename) { - trace::entering("mln::io::cloud::load"); + mln_trace("mln::io::cloud::load"); /// FIXME: do we really want this? mln_precondition(P::dim == 3u); @@ -105,7 +105,6 @@ namespace mln internal::load_data(arr, file); - trace::exiting("mln::io::cloud::load"); } diff --git a/milena/mln/io/cloud/save.hh b/milena/mln/io/cloud/save.hh index 375f4ad..d233516 100644 --- a/milena/mln/io/cloud/save.hh +++ b/milena/mln/io/cloud/save.hh @@ -86,7 +86,7 @@ namespace mln template <typename P> void save(const p_array<P>& arr, const std::string& filename) { - trace::entering("mln::io::cloud::save"); + mln_trace("mln::io::cloud::save"); std::ofstream file(filename.c_str()); if (! file) @@ -97,7 +97,6 @@ namespace mln internal::save_data(arr, file); - trace::exiting("mln::io::cloud::save"); } diff --git a/milena/mln/io/dicom/get_header.hh b/milena/mln/io/dicom/get_header.hh index 87b0238..d56c21d 100644 --- a/milena/mln/io/dicom/get_header.hh +++ b/milena/mln/io/dicom/get_header.hh @@ -82,7 +82,7 @@ namespace mln dicom_header get_header(const std::string& filename) { - trace::entering("mln::io::dicom::get_header"); + mln_trace("mln::io::dicom::get_header"); dicom_header header; @@ -104,7 +104,6 @@ namespace mln for (unsigned i = 0; i < 2; ++i) header.size.append(dims[i]); // row, col - trace::exiting("mln::io::dicom::get_header"); return header; } diff --git a/milena/mln/io/dicom/load.hh b/milena/mln/io/dicom/load.hh index 26c2232..333349f 100644 --- a/milena/mln/io/dicom/load.hh +++ b/milena/mln/io/dicom/load.hh @@ -75,9 +75,8 @@ namespace mln inline image2d<V> load(const std::string& filename) { - trace::entering("mln::io::gdcm::load"); + mln_trace("mln::io::gdcm::load"); image2d<V> ima;// = io::pnm::load<V>(MAGICK, filename); - trace::exiting("mln::io::gdcm::load"); return ima; } @@ -85,9 +84,8 @@ namespace mln inline image3d<V> load(const std::string& filename) { - trace::entering("mln::io::gdcm::load"); + mln_trace("mln::io::gdcm::load"); image2d<V> ima;// = io::pnm::load<V>(MAGICK, filename); - trace::exiting("mln::io::gdcm::load"); return ima; } @@ -97,7 +95,7 @@ namespace mln void load(Image<I>& ima_, const std::string& filename) { - trace::entering("mln::io::dicom::load"); + mln_trace("mln::io::dicom::load"); I& ima = exact(ima_); @@ -185,7 +183,6 @@ namespace mln delete[] dataBuffer; - trace::exiting("mln::io::dicom::load"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/io/dump/get_header.hh b/milena/mln/io/dump/get_header.hh index 4554fb3..9579762 100644 --- a/milena/mln/io/dump/get_header.hh +++ b/milena/mln/io/dump/get_header.hh @@ -72,7 +72,7 @@ namespace mln inline dump_header get_header(const std::string& filename) { - trace::entering("mln::io::dump::get_header"); + mln_trace("mln::io::dump::get_header"); dump_header header; @@ -116,7 +116,6 @@ namespace mln file.getline(value_type, 255); header.value_type = value_type; - trace::exiting("mln::io::dump::get_header"); return header; } diff --git a/milena/mln/io/dump/load.hh b/milena/mln/io/dump/load.hh index cbfce0f..b32ef9b 100644 --- a/milena/mln/io/dump/load.hh +++ b/milena/mln/io/dump/load.hh @@ -174,7 +174,7 @@ namespace mln template <typename I> void load(Image<I>& ima, const std::string& filename) { - trace::entering("mln::io::dump::load"); + mln_trace("mln::io::dump::load"); std::ifstream file(filename.c_str()); if (! file) @@ -190,7 +190,6 @@ namespace mln mln_postcondition(exact(ima).is_valid()); - trace::exiting("mln::io::dump::load"); } diff --git a/milena/mln/io/dump/save.hh b/milena/mln/io/dump/save.hh index 742430d..34fe684 100644 --- a/milena/mln/io/dump/save.hh +++ b/milena/mln/io/dump/save.hh @@ -133,7 +133,7 @@ namespace mln template <typename I> void save(const Image<I>& ima_, const std::string& filename) { - trace::entering("mln::io::dump::save"); + mln_trace("mln::io::dump::save"); const I& ima = exact(ima_); @@ -150,7 +150,6 @@ namespace mln file.close(); - trace::exiting("mln::io::dump::save"); } diff --git a/milena/mln/io/fits/load.hh b/milena/mln/io/fits/load.hh index 2d2227b..5923773 100644 --- a/milena/mln/io/fits/load.hh +++ b/milena/mln/io/fits/load.hh @@ -89,7 +89,7 @@ namespace mln inline image2d<float> load(const std::string& filename) { - trace::entering("mln::io::fits::load"); + mln_trace("mln::io::fits::load"); fitsfile *fptr; int status, nfound, anynull; @@ -128,7 +128,6 @@ namespace mln if (fits_close_file(fptr, &status)) fits_exit(status); - trace::exiting("mln::io::fits::load"); return output; } diff --git a/milena/mln/io/fld/load.hh b/milena/mln/io/fld/load.hh index 6bdd82b..8f59be4 100644 --- a/milena/mln/io/fld/load.hh +++ b/milena/mln/io/fld/load.hh @@ -200,7 +200,7 @@ namespace mln void load(Image<I>& ima_, const char* filename) { - trace::entering("mln::io::fld::load"); + mln_trace("mln::io::fld::load"); std::ifstream file(filename); if (! file) @@ -234,7 +234,6 @@ namespace mln internal::load_raw(file, ima); file.close(); - trace::exiting("mln::io::fld::load"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/io/fld/save.hh b/milena/mln/io/fld/save.hh index c3f91cf..60316ad 100644 --- a/milena/mln/io/fld/save.hh +++ b/milena/mln/io/fld/save.hh @@ -151,7 +151,7 @@ namespace mln template <typename I> void save(const Image<I>& ima_, const char* filename) { - trace::entering("mln::io::fld::save"); + mln_trace("mln::io::fld::save"); // For the moment, just the fast version. mlc_is(mln_trait_image_speed(I), trait::image::speed::fastest)::check(); @@ -165,7 +165,6 @@ namespace mln internal::save_data_contiguous(file, ima); file.close(); - trace::exiting("mln::io::fld::save"); } diff --git a/milena/mln/io/magick/load.hh b/milena/mln/io/magick/load.hh index e3c07bd..3044729 100644 --- a/milena/mln/io/magick/load.hh +++ b/milena/mln/io/magick/load.hh @@ -139,7 +139,7 @@ namespace mln inline void load(Image<I>& ima_, const std::string& filename) { - trace::entering("mln::io::magick::load"); + mln_trace("mln::io::magick::load"); I& ima = exact(ima_); @@ -200,11 +200,9 @@ namespace mln ++pixels; } - trace::exiting("mln::io::magick::load"); } - # endif // ! MLN_INCLUDE_ONLY } // end of namespace mln::io::magick diff --git a/milena/mln/io/magick/save.hh b/milena/mln/io/magick/save.hh index 4c10703..d8ca8a1 100644 --- a/milena/mln/io/magick/save.hh +++ b/milena/mln/io/magick/save.hh @@ -151,7 +151,7 @@ namespace mln void paste_data(const Image<I>& ima_, Magick::Image& magick_ima) { - trace::entering("io::magick::impl::generic::paste_data"); + mln_trace("io::magick::impl::generic::paste_data"); const I& ima = exact(ima_); @@ -173,7 +173,6 @@ namespace mln view.sync(); - trace::exiting("io::magick::impl::generic::paste_data"); } template <typename I, typename J> @@ -182,7 +181,7 @@ namespace mln const Image<J>& opacity_mask_, Magick::Image& magick_ima) { - trace::entering("io::magick::impl::generic::paste_data_opacity"); + mln_trace("io::magick::impl::generic::paste_data_opacity"); const I& ima = exact(ima_); const J& opacity_mask = exact(opacity_mask_); @@ -211,7 +210,6 @@ namespace mln view.sync(); - trace::exiting("io::magick::impl::generic::paste_data_opacity"); } } // end of namespace mln::io::magick::impl::generic @@ -475,7 +473,7 @@ namespace mln save(const Image<I>& ima_, const Image<J>& opacity_mask_, const std::string& filename) { - trace::entering("mln::io::magick::save"); + mln_trace("mln::io::magick::save"); mln_precondition(mln_site_(I)::dim == 2); // Turn this into a static check? @@ -528,7 +526,6 @@ namespace mln magick_ima.write(filename); - trace::exiting("mln::io::magick::save"); } @@ -542,6 +539,7 @@ namespace mln save(ima, opacity_mask, filename); } + # endif // ! MLN_INCLUDE_ONLY } // end of namespace mln::io::magick diff --git a/milena/mln/io/off/load.hh b/milena/mln/io/off/load.hh index 1834eb3..be1a206 100644 --- a/milena/mln/io/off/load.hh +++ b/milena/mln/io/off/load.hh @@ -190,27 +190,24 @@ namespace mln void load(bin_2complex_image3df& ima, const std::string& filename) { - trace::entering("mln::io::off::load"); + mln_trace("mln::io::off::load"); internal::bin_off_loader()(ima, filename); - trace::exiting("mln::io::off::load"); } inline void load(float_2complex_image3df& ima, const std::string& filename) { - trace::entering("mln::io::off::load"); + mln_trace("mln::io::off::load"); internal::float_off_loader()(ima, filename); - trace::exiting("mln::io::off::load"); } inline void load(rgb8_2complex_image3df& ima, const std::string& filename) { - trace::entering("mln::io::off::load"); + mln_trace("mln::io::off::load"); internal::rgb8_off_loader()(ima, filename); - trace::exiting("mln::io::off::load"); } diff --git a/milena/mln/io/off/save.hh b/milena/mln/io/off/save.hh index 1e82626..2784f27 100644 --- a/milena/mln/io/off/save.hh +++ b/milena/mln/io/off/save.hh @@ -178,36 +178,32 @@ namespace mln void save(const bin_2complex_image3df& ima, const std::string& filename) { - trace::entering("mln::io::off::save"); + mln_trace("mln::io::off::save"); internal::bin_off_saver()(ima, filename); - trace::exiting("mln::io::off::save"); } inline void save(const int_u8_2complex_image3df& ima, const std::string& filename) { - trace::entering("mln::io::off::save"); + mln_trace("mln::io::off::save"); internal::int_u8_off_saver()(ima, filename); - trace::exiting("mln::io::off::save"); } inline void save(const float_2complex_image3df& ima, const std::string& filename) { - trace::entering("mln::io::off::save"); + mln_trace("mln::io::off::save"); internal::float_off_saver()(ima, filename); - trace::exiting("mln::io::off::save"); } inline void save(const rgb8_2complex_image3df& ima, const std::string& filename) { - trace::entering("mln::io::off::save"); + mln_trace("mln::io::off::save"); internal::rgb8_off_saver()(ima, filename); - trace::exiting("mln::io::off::save"); } diff --git a/milena/mln/io/pbm/load.hh b/milena/mln/io/pbm/load.hh index a882125..1361541 100644 --- a/milena/mln/io/pbm/load.hh +++ b/milena/mln/io/pbm/load.hh @@ -132,7 +132,7 @@ namespace mln inline image2d<bool> load(const std::string& filename) { - trace::entering("mln::io::pbm::load"); + mln_trace("mln::io::pbm::load"); std::ifstream file(filename.c_str()); if (! file) { @@ -151,7 +151,6 @@ namespace mln if (type == '1') internal::load_ascii(file, ima); - trace::exiting("mln::io::pbm::load"); return ima; } diff --git a/milena/mln/io/pbm/save.hh b/milena/mln/io/pbm/save.hh index 4762b18..f21587b 100644 --- a/milena/mln/io/pbm/save.hh +++ b/milena/mln/io/pbm/save.hh @@ -120,10 +120,9 @@ namespace mln inline void save(const Image<I>& ima, const std::string& filename) { - trace::entering("mln::io::pbm::save"); + mln_trace("mln::io::pbm::save"); mln::metal::equal<mln_value(I), bool >::check(); impl::save_(exact(ima), filename); - trace::exiting("mln::io::pbm::save"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/io/pbms/load.hh b/milena/mln/io/pbms/load.hh index 5d7bf5d..fbdec80 100644 --- a/milena/mln/io/pbms/load.hh +++ b/milena/mln/io/pbms/load.hh @@ -69,11 +69,10 @@ namespace mln void load(image3d<bool>& ima, const util::array<std::string>& filenames) { - trace::entering("mln::io::pbms::load"); + mln_trace("mln::io::pbms::load"); io::pnms::load(PBM, ima, filenames); - trace::exiting("mln::io::pbms::load"); } diff --git a/milena/mln/io/pdf/get_header.hh b/milena/mln/io/pdf/get_header.hh index 0567433..946dbfd 100644 --- a/milena/mln/io/pdf/get_header.hh +++ b/milena/mln/io/pdf/get_header.hh @@ -92,7 +92,7 @@ namespace mln inline pdf_header get_header(const std::string& filename) { - trace::entering("mln::io::pdf::get_header"); + mln_trace("mln::io::pdf::get_header"); // Load document poppler::document *pdf = poppler::document::load_from_file(filename); @@ -108,7 +108,6 @@ namespace mln // Clear pdf document. delete pdf; - trace::exiting("mln::io::pdf::get_header"); return header; } diff --git a/milena/mln/io/pdf/load.hh b/milena/mln/io/pdf/load.hh index ee68c8a..63f5376 100644 --- a/milena/mln/io/pdf/load.hh +++ b/milena/mln/io/pdf/load.hh @@ -223,7 +223,7 @@ namespace mln template <typename I> void load(util::array<I>& arr, const std::string& filename, float dpi) { - trace::entering("mln::io::pdf::load"); + mln_trace("mln::io::pdf::load"); // Load document poppler::document *pdf = poppler::document::load_from_file(filename); @@ -238,14 +238,13 @@ namespace mln delete pdf; - trace::exiting("mln::io::pdf::load"); } template <typename I> void load(util::array<I>& arr, const std::string& filename, int first_page, int last_page, float dpi) { - trace::entering("mln::io::pdf::load"); + mln_trace("mln::io::pdf::load"); // Load document poppler::document *pdf = poppler::document::load_from_file(filename); @@ -268,7 +267,6 @@ namespace mln delete pdf; - trace::exiting("mln::io::pdf::load"); } @@ -276,7 +274,7 @@ namespace mln void load(util::array<I>& arr, const std::string& filename, util::array<int> pages, float dpi) { - trace::entering("mln::io::pdf::load"); + mln_trace("mln::io::pdf::load"); // Load document poppler::document *pdf = poppler::document::load_from_file(filename); @@ -300,7 +298,6 @@ namespace mln delete pdf; - trace::exiting("mln::io::pdf::load"); } diff --git a/milena/mln/io/pfm/load.hh b/milena/mln/io/pfm/load.hh index 4a12b2c..630bea9 100644 --- a/milena/mln/io/pfm/load.hh +++ b/milena/mln/io/pfm/load.hh @@ -142,7 +142,7 @@ namespace mln inline image2d<float> load(const std::string& filename) { - trace::entering("mln::io::pfm::load"); + mln_trace("mln::io::pfm::load"); std::ifstream file(filename.c_str()); if (! file) @@ -157,7 +157,6 @@ namespace mln image2d<float> ima(nrows, ncols); internal::load_raw_2d(file, ima); - trace::exiting("mln::io::pfm::load"); return ima; } diff --git a/milena/mln/io/pfm/save.hh b/milena/mln/io/pfm/save.hh index 63f8420..9adc157 100644 --- a/milena/mln/io/pfm/save.hh +++ b/milena/mln/io/pfm/save.hh @@ -100,10 +100,9 @@ namespace mln inline void save(const Image<I>& ima, const std::string& filename) { - trace::entering("mln::io::pfm::save"); + mln_trace("mln::io::pfm::save"); mln::metal::equal<mln_value(I), float >::check(); impl::save_(exact(ima), filename); - trace::exiting("mln::io::pfm::save"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/io/pgm/load.hh b/milena/mln/io/pgm/load.hh index e0c2493..db9aa31 100644 --- a/milena/mln/io/pgm/load.hh +++ b/milena/mln/io/pgm/load.hh @@ -85,9 +85,8 @@ namespace mln inline image2d<V> load(const std::string& filename) { - trace::entering("mln::io::pgm::load"); + mln_trace("mln::io::pgm::load"); image2d<V> ima = io::pnm::load<V>(PGM, filename); - trace::exiting("mln::io::pgm::load"); return ima; } @@ -96,9 +95,8 @@ namespace mln void load(Image<I>& ima, const std::string& filename) { - trace::entering("mln::io::pgm::load"); + mln_trace("mln::io::pgm::load"); io::pnm::load<I>(PGM, ima, filename); - trace::exiting("mln::io::pgm::load"); } diff --git a/milena/mln/io/pgm/save.hh b/milena/mln/io/pgm/save.hh index 690b107..28ebe4e 100644 --- a/milena/mln/io/pgm/save.hh +++ b/milena/mln/io/pgm/save.hh @@ -83,9 +83,8 @@ namespace mln mlc_is_not_a(mln_value(I), value::Vectorial)::check(); mlc_converts_to(mln_value(I),unsigned)::check(); - trace::entering("mln::io::pgm::save"); + mln_trace("mln::io::pgm::save"); io::pnm::save(PGM, exact(ima), filename); - trace::exiting("mln::io::pgm::save"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/io/pgms/load.hh b/milena/mln/io/pgms/load.hh index 8a51522..ce54224 100644 --- a/milena/mln/io/pgms/load.hh +++ b/milena/mln/io/pgms/load.hh @@ -72,11 +72,10 @@ namespace mln void load(image3d<V>& ima, const util::array<std::string>& filenames) { - trace::entering("mln::io::pgms::load"); + mln_trace("mln::io::pgms::load"); io::pnms::load<V>(PGM, ima, filenames); - trace::exiting("mln::io::pgms::load"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/io/plot/load.hh b/milena/mln/io/plot/load.hh index d9609b7..5cfecbb 100644 --- a/milena/mln/io/plot/load.hh +++ b/milena/mln/io/plot/load.hh @@ -68,7 +68,7 @@ namespace mln inline void load(util::array<I>& arr, const std::string& filename) { - trace::entering("mln::io::plot::load"); + mln_trace("mln::io::plot::load"); arr.clear(); std::ifstream file_in(filename.c_str()); @@ -96,7 +96,6 @@ namespace mln } } - trace::exiting("mln::io::plot::load"); } diff --git a/milena/mln/io/plot/save.hh b/milena/mln/io/plot/save.hh index 72a78f6..885bbb6 100644 --- a/milena/mln/io/plot/save.hh +++ b/milena/mln/io/plot/save.hh @@ -83,14 +83,13 @@ namespace mln inline void save(const image1d<T>& ima, const std::string& filename) { - trace::entering("mln::io::plot::save"); + mln_trace("mln::io::plot::save"); std::ofstream file_out(filename.c_str()); unsigned end = ima.bbox().pmax().ind(); for (unsigned i = ima.bbox().pmin().ind(); i <= end; ++i) file_out << i << " " << ima.at_(i) << std::endl; - trace::exiting("mln::io::plot::save"); } template <typename T> @@ -98,26 +97,24 @@ namespace mln void save(const util::array<T>& arr, const std::string& filename, int start_value) { - trace::entering("mln::io::plot::save"); + mln_trace("mln::io::plot::save"); std::ofstream file_out(filename.c_str()); for (unsigned i = 0; i < arr.nelements(); ++i) file_out << start_value + i << " " << arr[i] << std::endl; - trace::exiting("mln::io::plot::save"); } template <typename T> inline void save(const histo::array<T>& arr, const std::string& filename) { - trace::entering("mln::io::plot::save"); + mln_trace("mln::io::plot::save"); std::ofstream file_out(filename.c_str()); for (unsigned i = 0; i < arr.nvalues(); ++i) file_out << i << " " << arr[i] << std::endl; - trace::exiting("mln::io::plot::save"); } diff --git a/milena/mln/io/pnm/load.hh b/milena/mln/io/pnm/load.hh index 46587df..ee77e5e 100644 --- a/milena/mln/io/pnm/load.hh +++ b/milena/mln/io/pnm/load.hh @@ -209,7 +209,7 @@ namespace mln inline image2d<V> load(char type_, const std::string& filename) { - trace::entering("mln::io::pnm::load"); + mln_trace("mln::io::pnm::load"); std::ifstream file(filename.c_str()); if (! file) @@ -244,7 +244,6 @@ namespace mln if (type == (type_ - 3)) pnm::internal::load_ascii_dispatch(file, ima, mlc_is_a(V, mln::Value)()); - trace::exiting("mln::io::pnm::load"); return ima; } @@ -258,7 +257,7 @@ namespace mln Image<I>& ima_, const std::string& filename) { - trace::entering("mln::io::pnm::load"); + mln_trace("mln::io::pnm::load"); std::ifstream file(filename.c_str()); if (! file) @@ -296,7 +295,6 @@ namespace mln if (type == (type_ - 3)) pnm::internal::load_ascii_dispatch(file, ima, mlc_is_a(mln_value(I), mln::Value)()); - trace::exiting("mln::io::pnm::load"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/io/pnm/save.hh b/milena/mln/io/pnm/save.hh index 0e6c9c3..228533a 100644 --- a/milena/mln/io/pnm/save.hh +++ b/milena/mln/io/pnm/save.hh @@ -184,14 +184,13 @@ namespace mln inline void save(char type, const Image<I>& ima_, const std::string& filename) { - trace::entering("mln::io::pnm::save"); + mln_trace("mln::io::pnm::save"); const I& ima = exact(ima_); std::ofstream file(filename.c_str()); io::pnm::save_header(type, ima, filename, file); impl::save_data_(file, mln_trait_image_speed(I)(), ima); - trace::exiting("mln::io::pnm::save"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/io/pnms/load.hh b/milena/mln/io/pnms/load.hh index b8f55b8..487ab03 100644 --- a/milena/mln/io/pnms/load.hh +++ b/milena/mln/io/pnms/load.hh @@ -80,7 +80,7 @@ namespace mln image3d<V>& ima, const util::array<std::string>& filenames) { - trace::entering("mln::io::pnms::load"); + mln_trace("mln::io::pnms::load"); mln_precondition(!filenames.is_empty()); util::array<image2d<V> > slices; @@ -94,7 +94,6 @@ namespace mln ima = make::image3d(slices); - trace::exiting("mln::io::pnms::load"); } @@ -103,7 +102,7 @@ namespace mln image3d<bool>& ima, const util::array<std::string>& filenames) { - trace::entering("mln::io::pnms::load"); + mln_trace("mln::io::pnms::load"); mln_precondition(!filenames.is_empty()); (void) type; @@ -118,7 +117,6 @@ namespace mln ima = make::image3d(slices); - trace::exiting("mln::io::pnms::load"); } diff --git a/milena/mln/io/ppm/load.hh b/milena/mln/io/ppm/load.hh index b7fa503..77602fa 100644 --- a/milena/mln/io/ppm/load.hh +++ b/milena/mln/io/ppm/load.hh @@ -86,9 +86,8 @@ namespace mln inline image2d<V> load(const std::string& filename) { - trace::entering("mln::io::ppm::load"); + mln_trace("mln::io::ppm::load"); image2d<V> ima = io::pnm::load<V>(PPM, filename); - trace::exiting("mln::io::ppm::load"); return ima; } @@ -97,9 +96,8 @@ namespace mln void load(Image<I>& ima, const std::string& filename) { - trace::entering("mln::io::ppm::load"); + mln_trace("mln::io::ppm::load"); io::pnm::load<I>(PPM, ima, filename); - trace::exiting("mln::io::ppm::load"); } diff --git a/milena/mln/io/ppms/load.hh b/milena/mln/io/ppms/load.hh index 6662df3..a5bb6b3 100644 --- a/milena/mln/io/ppms/load.hh +++ b/milena/mln/io/ppms/load.hh @@ -71,11 +71,10 @@ namespace mln void load(image3d<V>& ima, const util::array<std::string>& filenames) { - trace::entering("mln::io::ppms::load"); + mln_trace("mln::io::ppms::load"); io::pnms::load<V>(PPM, ima, filenames); - trace::exiting("mln::io::ppms::load"); } diff --git a/milena/mln/io/raw/get_header.hh b/milena/mln/io/raw/get_header.hh index 545062f..65476c7 100644 --- a/milena/mln/io/raw/get_header.hh +++ b/milena/mln/io/raw/get_header.hh @@ -74,7 +74,7 @@ namespace mln raw_header get_header(const std::string& filename) { - trace::entering("mln::io::raw::get_header"); + mln_trace("mln::io::raw::get_header"); raw_header header; @@ -126,7 +126,6 @@ namespace mln info_file.close(); - trace::exiting("mln::io::raw::get_header"); return header; } diff --git a/milena/mln/io/raw/load.hh b/milena/mln/io/raw/load.hh index 8a60a59..a91d6ee 100644 --- a/milena/mln/io/raw/load.hh +++ b/milena/mln/io/raw/load.hh @@ -185,7 +185,7 @@ namespace mln template <typename I> void load(Image<I>& ima, const std::string& filename) { - trace::entering("mln::io::raw::load"); + mln_trace("mln::io::raw::load"); std::ifstream file(filename.c_str()); if (! file) @@ -213,7 +213,6 @@ namespace mln file.close(); info_file.close(); - trace::exiting("mln::io::raw::load"); } diff --git a/milena/mln/io/raw/save.hh b/milena/mln/io/raw/save.hh index ac8d635..92c52b3 100644 --- a/milena/mln/io/raw/save.hh +++ b/milena/mln/io/raw/save.hh @@ -137,7 +137,7 @@ namespace mln template <typename I> void save(const Image<I>& ima_, const std::string& filename) { - trace::entering("mln::io::raw::save"); + mln_trace("mln::io::raw::save"); mlc_bool(mln_site_(I)::dim == 2 || mln_site_(I)::dim == 3)::check(); @@ -165,7 +165,6 @@ namespace mln info_file.close(); file.close(); - trace::exiting("mln::io::raw::save"); } diff --git a/milena/mln/io/svg/simple_svg_1.0.0.hh b/milena/mln/io/svg/simple_svg_1.0.0.hh new file mode 100644 index 0000000..5aabba4 --- /dev/null +++ b/milena/mln/io/svg/simple_svg_1.0.0.hh @@ -0,0 +1,642 @@ + +/******************************************************************************* +* The "New BSD License" : http://www.opensource.org/licenses/bsd-license.php * +******************************************************************************** + +Copyright (c) 2010, Mark Turney +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the <organization> nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ + +#ifndef SIMPLE_SVG_HPP +#define SIMPLE_SVG_HPP + +#include <vector> +#include <string> +#include <sstream> +#include <fstream> + +#include <iostream> + +namespace svg +{ + // Utility XML/String Functions. + template <typename T> + std::string attribute(std::string const & attribute_name, + T const & value, std::string const & unit = "") + { + std::stringstream ss; + ss << attribute_name << "=\"" << value << unit << "\" "; + return ss.str(); + } + std::string elemStart(std::string const & element_name) + { + return "\t<" + element_name + " "; + } + std::string elemEnd(std::string const & element_name) + { + return "</" + element_name + ">\n"; + } + std::string emptyElemEnd() + { + return "/>\n"; + } + + // Quick optional return type. This allows functions to return an invalid + // value if no good return is possible. The user checks for validity + // before using the returned value. + template <typename T> + class optional + { + public: + optional<T>(T const & type) + : valid(true), type(type) { } + optional<T>() : valid(false), type(T()) { } + T * operator->() + { + // If we try to access an invalid value, an exception is thrown. + if (!valid) + throw std::exception(); + + return &type; + } + // Test for validity. + bool operator!() const { return !valid; } + private: + bool valid; + T type; + }; + + struct Dimensions + { + Dimensions(double width, double height) : width(width), height(height) { } + Dimensions(double combined = 0) : width(combined), height(combined) { } + double width; + double height; + }; + + struct Point + { + Point(double x = 0, double y = 0) : x(x), y(y) { } + double x; + double y; + }; + optional<Point> getMinPoint(std::vector<Point> const & points) + { + if (points.empty()) + return optional<Point>(); + + Point min = points[0]; + for (unsigned i = 0; i < points.size(); ++i) { + if (points[i].x < min.x) + min.x = points[i].x; + if (points[i].y < min.y) + min.y = points[i].y; + } + return optional<Point>(min); + } + optional<Point> getMaxPoint(std::vector<Point> const & points) + { + if (points.empty()) + return optional<Point>(); + + Point max = points[0]; + for (unsigned i = 0; i < points.size(); ++i) { + if (points[i].x > max.x) + max.x = points[i].x; + if (points[i].y > max.y) + max.y = points[i].y; + } + return optional<Point>(max); + } + + // Defines the dimensions, scale, origin, and origin offset of the document. + struct Layout + { + enum Origin { TopLeft, BottomLeft, TopRight, BottomRight }; + + Layout(Dimensions const & dimensions = Dimensions(400, 300), Origin origin = BottomLeft, + double scale = 1, Point const & origin_offset = Point(0, 0)) + : dimensions(dimensions), scale(scale), origin(origin), origin_offset(origin_offset) { } + Dimensions dimensions; + double scale; + Origin origin; + Point origin_offset; + }; + + // Convert coordinates in user space to SVG native space. + double translateX(double x, Layout const & layout) + { + if (layout.origin == Layout::BottomRight || layout.origin == Layout::TopRight) + return layout.dimensions.width - ((x + layout.origin_offset.x) * layout.scale); + else + return (layout.origin_offset.x + x) * layout.scale; + } + + double translateY(double y, Layout const & layout) + { + if (layout.origin == Layout::BottomLeft || layout.origin == Layout::BottomRight) + return layout.dimensions.height - ((y + layout.origin_offset.y) * layout.scale); + else + return (layout.origin_offset.y + y) * layout.scale; + } + double translateScale(double dimension, Layout const & layout) + { + return dimension * layout.scale; + } + + class Serializeable + { + public: + Serializeable() { } + virtual ~Serializeable() { }; + virtual std::string toString(Layout const & layout) const = 0; + }; + + class Color : public Serializeable + { + public: + enum Defaults { Transparent = -1, Aqua, Black, Blue, Brown, Cyan, Fuchsia, + Green, Lime, Magenta, Orange, Purple, Red, Silver, White, Yellow }; + + Color(int r, int g, int b) : transparent(false), red(r), green(g), blue(b) { } + Color(Defaults color) + : transparent(false), red(0), green(0), blue(0) + { + switch (color) + { + case Aqua: assign(0, 255, 255); break; + case Black: assign(0, 0, 0); break; + case Blue: assign(0, 0, 255); break; + case Brown: assign(165, 42, 42); break; + case Cyan: assign(0, 255, 255); break; + case Fuchsia: assign(255, 0, 255); break; + case Green: assign(0, 128, 0); break; + case Lime: assign(0, 255, 0); break; + case Magenta: assign(255, 0, 255); break; + case Orange: assign(255, 165, 0); break; + case Purple: assign(128, 0, 128); break; + case Red: assign(255, 0, 0); break; + case Silver: assign(192, 192, 192); break; + case White: assign(255, 255, 255); break; + case Yellow: assign(255, 255, 0); break; + default: transparent = true; break; + } + } + virtual ~Color() { } + std::string toString(Layout const &) const + { + std::stringstream ss; + if (transparent) + ss << "transparent"; + else + ss << "rgb(" << red << "," << green << "," << blue << ")"; + return ss.str(); + } + private: + bool transparent; + int red; + int green; + int blue; + + void assign(int r, int g, int b) + { + red = r; + green = g; + blue = b; + } + }; + + class Fill : public Serializeable + { + public: + Fill(Color::Defaults color) : color(color) { } + Fill(Color color = Color::Transparent) + : color(color) { } + std::string toString(Layout const & layout) const + { + std::stringstream ss; + ss << attribute("fill", color.toString(layout)); + return ss.str(); + } + private: + Color color; + }; + + class Stroke : public Serializeable + { + public: + Stroke(double width = -1, Color color = Color::Transparent) + : width(width), color(color) { } + std::string toString(Layout const & layout) const + { + // If stroke width is invalid. + if (width < 0) + return std::string(); + + std::stringstream ss; + ss << attribute("stroke-width", translateScale(width, layout)) << attribute("stroke", color.toString(layout)); + return ss.str(); + } + private: + double width; + Color color; + }; + + class Font : public Serializeable + { + public: + Font(double size = 12, std::string const & family = "Verdana") : size(size), family(family) { } + std::string toString(Layout const & layout) const + { + std::stringstream ss; + ss << attribute("font-size", translateScale(size, layout)) << attribute("font-family", family); + return ss.str(); + } + private: + double size; + std::string family; + }; + + class Shape : public Serializeable + { + public: + Shape(Fill const & fill = Fill(), Stroke const & stroke = Stroke()) + : fill(fill), stroke(stroke) { } + virtual ~Shape() { } + virtual std::string toString(Layout const & layout) const = 0; + virtual void offset(Point const & offset) = 0; + protected: + Fill fill; + Stroke stroke; + }; + template <typename T> + std::string vectorToString(std::vector<T> collection, Layout const & layout) + { + std::string combination_str; + for (unsigned i = 0; i < collection.size(); ++i) + combination_str += collection[i].toString(layout); + + return combination_str; + } + + class Circle : public Shape + { + public: + Circle(Point const & center, double diameter, Fill const & fill, + Stroke const & stroke = Stroke()) + : Shape(fill, stroke), center(center), radius(diameter / 2) { } + std::string toString(Layout const & layout) const + { + std::stringstream ss; + ss << elemStart("circle") << attribute("cx", translateX(center.x, layout)) + << attribute("cy", translateY(center.y, layout)) + << attribute("r", translateScale(radius, layout)) << fill.toString(layout) + << stroke.toString(layout) << emptyElemEnd(); + return ss.str(); + } + void offset(Point const & offset) + { + center.x += offset.x; + center.y += offset.y; + } + private: + Point center; + double radius; + }; + + class Elipse : public Shape + { + public: + Elipse(Point const & center, double width, double height, + Fill const & fill = Fill(), Stroke const & stroke = Stroke()) + : Shape(fill, stroke), center(center), radius_width(width / 2), + radius_height(height / 2) { } + std::string toString(Layout const & layout) const + { + std::stringstream ss; + ss << elemStart("ellipse") << attribute("cx", translateX(center.x, layout)) + << attribute("cy", translateY(center.y, layout)) + << attribute("rx", translateScale(radius_width, layout)) + << attribute("ry", translateScale(radius_height, layout)) + << fill.toString(layout) << stroke.toString(layout) << emptyElemEnd(); + return ss.str(); + } + void offset(Point const & offset) + { + center.x += offset.x; + center.y += offset.y; + } + private: + Point center; + double radius_width; + double radius_height; + }; + + class Rectangle : public Shape + { + public: + Rectangle(Point const & edge, double width, double height, + Fill const & fill = Fill(), Stroke const & stroke = Stroke()) + : Shape(fill, stroke), edge(edge), width(width), + height(height) { } + std::string toString(Layout const & layout) const + { + std::stringstream ss; + ss << elemStart("rect") << attribute("x", translateX(edge.x, layout)) + << attribute("y", translateY(edge.y, layout)) + << attribute("width", translateScale(width, layout)) + << attribute("height", translateScale(height, layout)) + << fill.toString(layout) << stroke.toString(layout) << emptyElemEnd(); + return ss.str(); + } + void offset(Point const & offset) + { + edge.x += offset.x; + edge.y += offset.y; + } + private: + Point edge; + double width; + double height; + }; + + class Line : public Shape + { + public: + Line(Point const & start_point, Point const & end_point, + Stroke const & stroke = Stroke()) + : Shape(Fill(), stroke), start_point(start_point), + end_point(end_point) { } + std::string toString(Layout const & layout) const + { + std::stringstream ss; + ss << elemStart("line") << attribute("x1", translateX(start_point.x, layout)) + << attribute("y1", translateY(start_point.y, layout)) + << attribute("x2", translateX(end_point.x, layout)) + << attribute("y2", translateY(end_point.y, layout)) + << stroke.toString(layout) << emptyElemEnd(); + return ss.str(); + } + void offset(Point const & offset) + { + start_point.x += offset.x; + start_point.y += offset.y; + + end_point.x += offset.x; + end_point.y += offset.y; + } + private: + Point start_point; + Point end_point; + }; + + class Polygon : public Shape + { + public: + Polygon(Fill const & fill = Fill(), Stroke const & stroke = Stroke()) + : Shape(fill, stroke) { } + Polygon(Stroke const & stroke = Stroke()) : Shape(Color::Transparent, stroke) { } + Polygon & operator<<(Point const & point) + { + points.push_back(point); + return *this; + } + std::string toString(Layout const & layout) const + { + std::stringstream ss; + ss << elemStart("polygon"); + + ss << "points=\""; + for (unsigned i = 0; i < points.size(); ++i) + ss << translateX(points[i].x, layout) << "," << translateY(points[i].y, layout) << " "; + ss << "\" "; + + ss << fill.toString(layout) << stroke.toString(layout) << emptyElemEnd(); + return ss.str(); + } + void offset(Point const & offset) + { + for (unsigned i = 0; i < points.size(); ++i) { + points[i].x += offset.x; + points[i].y += offset.y; + } + } + private: + std::vector<Point> points; + }; + + class Polyline : public Shape + { + public: + Polyline(Fill const & fill = Fill(), Stroke const & stroke = Stroke()) + : Shape(fill, stroke) { } + Polyline(Stroke const & stroke = Stroke()) : Shape(Color::Transparent, stroke) { } + Polyline(std::vector<Point> const & points, + Fill const & fill = Fill(), Stroke const & stroke = Stroke()) + : Shape(fill, stroke), points(points) { } + Polyline & operator<<(Point const & point) + { + points.push_back(point); + return *this; + } + std::string toString(Layout const & layout) const + { + std::stringstream ss; + ss << elemStart("polyline"); + + ss << "points=\""; + for (unsigned i = 0; i < points.size(); ++i) + ss << translateX(points[i].x, layout) << "," << translateY(points[i].y, layout) << " "; + ss << "\" "; + + ss << fill.toString(layout) << stroke.toString(layout) << emptyElemEnd(); + return ss.str(); + } + void offset(Point const & offset) + { + for (unsigned i = 0; i < points.size(); ++i) { + points[i].x += offset.x; + points[i].y += offset.y; + } + } + std::vector<Point> points; + }; + + class Text : public Shape + { + public: + Text(Point const & origin, std::string const & content, Fill const & fill = Fill(), + Font const & font = Font(), Stroke const & stroke = Stroke()) + : Shape(fill, stroke), origin(origin), content(content), font(font) { } + std::string toString(Layout const & layout) const + { + std::stringstream ss; + ss << elemStart("text") << attribute("x", translateX(origin.x, layout)) + << attribute("y", translateY(origin.y, layout)) + << fill.toString(layout) << stroke.toString(layout) << font.toString(layout) + << ">" << content << elemEnd("text"); + return ss.str(); + } + void offset(Point const & offset) + { + origin.x += offset.x; + origin.y += offset.y; + } + private: + Point origin; + std::string content; + Font font; + }; + + // Sample charting class. + class LineChart : public Shape + { + public: + LineChart(Dimensions margin = Dimensions(), double scale = 1, + Stroke const & axis_stroke = Stroke(.5, Color::Purple)) + : axis_stroke(axis_stroke), margin(margin), scale(scale) { } + LineChart & operator<<(Polyline const & polyline) + { + if (polyline.points.empty()) + return *this; + + polylines.push_back(polyline); + return *this; + } + std::string toString(Layout const & layout) const + { + if (polylines.empty()) + return ""; + + std::string ret; + for (unsigned i = 0; i < polylines.size(); ++i) + ret += polylineToString(polylines[i], layout); + + return ret + axisString(layout); + } + void offset(Point const & offset) + { + for (unsigned i = 0; i < polylines.size(); ++i) + polylines[i].offset(offset); + } + private: + Stroke axis_stroke; + Dimensions margin; + double scale; + std::vector<Polyline> polylines; + + optional<Dimensions> getDimensions() const + { + if (polylines.empty()) + return optional<Dimensions>(); + + optional<Point> min = getMinPoint(polylines[0].points); + optional<Point> max = getMaxPoint(polylines[0].points); + for (unsigned i = 0; i < polylines.size(); ++i) { + if (getMinPoint(polylines[i].points)->x < min->x) + min->x = getMinPoint(polylines[i].points)->x; + if (getMinPoint(polylines[i].points)->y < min->y) + min->y = getMinPoint(polylines[i].points)->y; + if (getMaxPoint(polylines[i].points)->x > max->x) + max->x = getMaxPoint(polylines[i].points)->x; + if (getMaxPoint(polylines[i].points)->y > max->y) + max->y = getMaxPoint(polylines[i].points)->y; + } + + return optional<Dimensions>(Dimensions(max->x - min->x, max->y - min->y)); + } + std::string axisString(Layout const & layout) const + { + optional<Dimensions> dimensions = getDimensions(); + if (!dimensions) + return ""; + + // Make the axis 10% wider and higher than the data points. + double width = dimensions->width * 1.1; + double height = dimensions->height * 1.1; + + // Draw the axis. + Polyline axis(Color::Transparent, axis_stroke); + axis << Point(margin.width, margin.height + height) << Point(margin.width, margin.height) + << Point(margin.width + width, margin.height); + + return axis.toString(layout); + } + std::string polylineToString(Polyline const & polyline, Layout const & layout) const + { + Polyline shifted_polyline = polyline; + shifted_polyline.offset(Point(margin.width, margin.height)); + + std::vector<Circle> vertices; + for (unsigned i = 0; i < shifted_polyline.points.size(); ++i) + vertices.push_back(Circle(shifted_polyline.points[i], getDimensions()->height / 30.0, Color::Black)); + + return shifted_polyline.toString(layout) + vectorToString(vertices, layout); + } + }; + + class Document + { + public: + Document(std::string const & file_name, Layout layout = Layout()) + : file_name(file_name), layout(layout) { } + + Document & operator<<(Shape const & shape) + { + body_nodes_str += shape.toString(layout); + return *this; + } + std::string toString() const + { + std::stringstream ss; + ss << "<?xml " << attribute("version", "1.0") << attribute("standalone", "no") + << "?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" " + << "\"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg " + << attribute("width", layout.dimensions.width, "px") + << attribute("height", layout.dimensions.height, "px") + << attribute("xmlns", "http://www.w3.org/2000/svg") + << attribute("version", "1.1") << ">\n" << body_nodes_str << elemEnd("svg"); + return ss.str(); + } + bool save() const + { + std::ofstream ofs(file_name.c_str()); + if (!ofs.good()) + return false; + + ofs << toString(); + ofs.close(); + return true; + } + private: + std::string file_name; + Layout layout; + + std::string body_nodes_str; + }; +} + +#endif diff --git a/milena/mln/io/tiff/load.hh b/milena/mln/io/tiff/load.hh index f07edd2..2fabcd9 100644 --- a/milena/mln/io/tiff/load.hh +++ b/milena/mln/io/tiff/load.hh @@ -325,7 +325,7 @@ namespace mln inline void load(Image<I>& ima_, const std::string& filename) { - trace::entering("mln::io::tiff::load"); + mln_trace("mln::io::tiff::load"); I& ima = exact(ima_); @@ -344,7 +344,6 @@ namespace mln mln_postcondition(ima.is_valid()); (void) TIFFClose(file); - trace::exiting("mln::io::tiff::load"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/io/txt/save.hh b/milena/mln/io/txt/save.hh index 6a4d5b2..7eeb3b9 100644 --- a/milena/mln/io/txt/save.hh +++ b/milena/mln/io/txt/save.hh @@ -65,7 +65,7 @@ namespace mln void save(const image2d<char>& ima, const std::string& filename) { - trace::entering("mln::io::txt::save"); + mln_trace("mln::io::txt::save"); mln_precondition(ima.is_valid()); std::ofstream ostr(filename.c_str()); @@ -83,7 +83,6 @@ namespace mln } ostr.close(); - trace::exiting("mln::io::txt::save"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/labeling/background.hh b/milena/mln/labeling/background.hh index ef7973d..7441504 100644 --- a/milena/mln/labeling/background.hh +++ b/milena/mln/labeling/background.hh @@ -69,7 +69,7 @@ namespace mln background(const Image<I>& input, const Neighborhood<N>& nbh, L& nlabels) { - trace::entering("labeling::background"); + mln_trace("labeling::background"); mlc_equal(mln_trait_image_kind(I), mln::trait::image::kind::binary)::check(); @@ -78,7 +78,6 @@ namespace mln mln_ch_value(I, L) output = labeling::value(input, false, nbh, nlabels); - trace::exiting("labeling::background"); return output; } diff --git a/milena/mln/labeling/blobs.hh b/milena/mln/labeling/blobs.hh index d41563f..5767d5a 100644 --- a/milena/mln/labeling/blobs.hh +++ b/milena/mln/labeling/blobs.hh @@ -104,7 +104,7 @@ namespace mln blobs(const Image<I>& input_, const Neighborhood<N>& nbh_, L& nlabels) { - trace::entering("labeling::blobs"); + mln_trace("labeling::blobs"); mlc_equal(mln_trait_image_kind(I), mln::trait::image::kind::binary)::check(); const I& input = exact(input_); @@ -116,7 +116,6 @@ namespace mln out_t output = canvas::labeling::blobs(input, nbh, nlabels, functor); - trace::exiting("labeling::blobs"); return output; } diff --git a/milena/mln/labeling/blobs_and_compute.hh b/milena/mln/labeling/blobs_and_compute.hh index d53f174..166af6a 100644 --- a/milena/mln/labeling/blobs_and_compute.hh +++ b/milena/mln/labeling/blobs_and_compute.hh @@ -164,7 +164,7 @@ namespace mln blobs_and_compute(const Image<I>& input, const Neighborhood<N>& nbh, L& nlabels, const Accumulator<A>& accu) { - trace::entering("labeling::blobs_and_compute"); + mln_trace("labeling::blobs_and_compute"); (void) accu; mlc_equal(mln_trait_image_kind(I), @@ -181,7 +181,6 @@ namespace mln result = make::couple(output, make::couple(functor.result_, functor.accus_)); - trace::exiting("labeling::blobs_and_compute"); return result; } diff --git a/milena/mln/labeling/colorize.hh b/milena/mln/labeling/colorize.hh index 730929e..a3e8f5c 100644 --- a/milena/mln/labeling/colorize.hh +++ b/milena/mln/labeling/colorize.hh @@ -144,7 +144,7 @@ namespace mln if (ntries == nelements) { - trace::warning("labeling::colorize - Can't find a new unique color. Returning black."); + debug::trace::warning("labeling::colorize - Can't find a new unique color. Returning black."); return literal::black; } @@ -191,7 +191,7 @@ namespace mln const Image<L>& input, const mln_value(L)& nlabels) { - trace::entering("labeling::colorize"); + mln_trace("labeling::colorize"); mln_precondition(exact(input).is_valid()); // FIXME: check that V is a color type. // FIXME: we want to be sure that this is a label. @@ -218,7 +218,6 @@ namespace mln mln_assertion(f.size() >= (label_count)); mln_ch_value(L, V) output = data::transform(input, f); - trace::exiting("labeling::colorize"); return output; } @@ -228,7 +227,7 @@ namespace mln colorize(const V& value, const Image<L>& input) { - trace::entering("labeling::colorize"); + mln_trace("labeling::colorize"); mln_precondition(exact(input).is_valid()); accu::stat::max<mln_value(L)> accu; @@ -236,7 +235,6 @@ namespace mln mln_ch_value(L,V) output = colorize(value, input, nlabels); - trace::exiting("labeling::colorize"); return output; } diff --git a/milena/mln/labeling/compute.hh b/milena/mln/labeling/compute.hh index 32dc806..cc4c234 100644 --- a/milena/mln/labeling/compute.hh +++ b/milena/mln/labeling/compute.hh @@ -196,7 +196,7 @@ namespace mln const Image<L>& label_, const mln_value(L)& nlabels) { - trace::entering("labeling::impl::generic::compute"); + mln_trace("labeling::impl::generic::compute"); internal::compute_tests(a_, label_, nlabels); const A& a = exact(a_); @@ -211,7 +211,6 @@ namespace mln util::array<mln_result(A)> res; convert::from_to(accus, res); - trace::exiting("labeling::impl::generic::compute"); return res; } @@ -222,7 +221,7 @@ namespace mln const Image<L>& label_, const mln_value(L)& nlabels) { - trace::entering("labeling::impl::generic::compute"); + mln_trace("labeling::impl::generic::compute"); internal::compute_tests(A(), label_, nlabels); if (value::next(nlabels) != accus.size()) @@ -242,7 +241,6 @@ namespace mln util::array<mln_result(A)> res; convert::from_to(accus, res); - trace::exiting("labeling::impl::generic::compute"); return res; } @@ -254,7 +252,7 @@ namespace mln const Image<L>& label_, const mln_value(L)& nlabels) { - trace::entering("labeling::impl::generic::compute"); + mln_trace("labeling::impl::generic::compute"); internal::compute_tests(a_, input_, label_, nlabels); const A& a = exact(a_); @@ -270,7 +268,6 @@ namespace mln util::array<mln_result(A)> res; convert::from_to(accus, res); - trace::exiting("labeling::impl::generic::compute"); return res; } @@ -282,7 +279,7 @@ namespace mln const Image<L>& label_, const mln_value(L)& nlabels) { - trace::entering("labeling::impl::generic::compute"); + mln_trace("labeling::impl::generic::compute"); //internal::compute_tests(a_, input_, label_, nlabels); //const A& a = exact(a_); @@ -305,7 +302,6 @@ namespace mln util::array<mln_result(A)> res; convert::from_to(accus, res); - trace::exiting("labeling::impl::generic::compute"); return res; } @@ -325,7 +321,7 @@ namespace mln const Image<L>& label_, const mln_value(L)& nlabels) { - trace::entering("labeling::impl::compute_fastest"); + mln_trace("labeling::impl::compute_fastest"); internal::compute_tests(a_, input_, label_, nlabels); const A& a = exact(a_); @@ -354,7 +350,6 @@ namespace mln util::array<mln_result(A)> res; convert::from_to(accus, res); - trace::exiting("labeling::impl::generic::compute_fastest"); return res; } @@ -370,7 +365,7 @@ namespace mln const Image<L>& label_, const mln_value(L)& nlabels) { - trace::entering("labeling::impl::generic::compute_fastest"); + mln_trace("labeling::impl::generic::compute_fastest"); //internal::compute_tests(a_, input_, label_, nlabels); // FIXME: check image properties + add doc. @@ -406,7 +401,6 @@ namespace mln util::array<mln_result(A)> res; convert::from_to(accus, res); - trace::exiting("labeling::impl::generic::compute_fastest"); return res; } @@ -639,14 +633,13 @@ namespace mln const Image<L>& label, const mln_value(L)& nlabels) { - trace::entering("labeling::compute"); + mln_trace("labeling::compute"); //internal::compute_tests(a, input, label, nlabels); typedef util::array<mln_result(A)> R; R res = internal::compute_dispatch(a, input, label, nlabels); - trace::exiting("labeling::compute"); return res; } @@ -658,14 +651,13 @@ namespace mln const Image<L>& label, const mln_value(L)& nlabels) { - trace::entering("labeling::compute"); + mln_trace("labeling::compute"); internal::compute_tests(a, input, label, nlabels); typedef util::array<mln_result(A)> R; R res = internal::compute_dispatch(a, input, label, nlabels); - trace::exiting("labeling::compute"); return res; } @@ -691,7 +683,7 @@ namespace mln const Image<L>& label, const mln_value(L)& nlabels) { - trace::entering("labeling::compute"); + mln_trace("labeling::compute"); internal::compute_tests(A(), label, nlabels); @@ -700,7 +692,6 @@ namespace mln mln_postcondition(res.nelements() == value::next(nlabels)); - trace::exiting("labeling::compute"); return res; } @@ -713,7 +704,7 @@ namespace mln const Image<L>& label, const mln_value(L)& nlabels) { - trace::entering("labeling::compute"); + mln_trace("labeling::compute"); internal::compute_tests(a, label, nlabels); @@ -722,7 +713,6 @@ namespace mln mln_postcondition(res.nelements() == value::next(nlabels)); - trace::exiting("labeling::compute"); return res; } diff --git a/milena/mln/labeling/compute_image.hh b/milena/mln/labeling/compute_image.hh index a96b3bc..4baea29 100644 --- a/milena/mln/labeling/compute_image.hh +++ b/milena/mln/labeling/compute_image.hh @@ -146,12 +146,11 @@ namespace mln { (void) nlabels; - trace::entering("labeling::compute_image"); + mln_trace("labeling::compute_image"); mln_ch_value(L, mln_result(A)) output = labeling::internal::compute_image(a, labels, nlabels); - trace::exiting("labeling::compute_image"); return output; } @@ -163,7 +162,7 @@ namespace mln const Image<L>& labels, const mln_value(L)& nlabels) { - trace::entering("labeling::compute_image"); + mln_trace("labeling::compute_image"); util::array<mln_result(A)> res = compute(accu, input, labels, nlabels); @@ -171,7 +170,6 @@ namespace mln mln_ch_value(L, mln_result(A)) output = internal::compute_image(res, labels, nlabels); - trace::exiting("labeling::compute_image"); return output; } @@ -183,7 +181,7 @@ namespace mln const Image<L>& labels, const mln_value(L)& nlabels) { - trace::entering("labeling::compute_image"); + mln_trace("labeling::compute_image"); typedef mln_meta_accu_result(A, mln_value(I)) T; @@ -193,7 +191,6 @@ namespace mln mln_ch_value(L, T) output = labeling::internal::compute_image(res, labels, nlabels); - trace::exiting("labeling::compute_image"); return output; } diff --git a/milena/mln/labeling/fill_holes.hh b/milena/mln/labeling/fill_holes.hh index 5e487d9..07f4014 100644 --- a/milena/mln/labeling/fill_holes.hh +++ b/milena/mln/labeling/fill_holes.hh @@ -73,7 +73,7 @@ namespace mln fill_holes(const Image<I>& input, const Neighborhood<N>& nbh, L& nlabels) { - trace::entering("labeling::fill_holes"); + mln_trace("labeling::fill_holes"); mlc_equal(mln_trait_image_kind(I), mln::trait::image::kind::binary)::check(); @@ -102,7 +102,6 @@ namespace mln bg_relbl(bg_lbl) = false; mln_ch_value(I, bool) output = data::transform(lbls, bg_relbl); - trace::exiting("labeling::fill_holes"); return output; } diff --git a/milena/mln/labeling/flat_zones.hh b/milena/mln/labeling/flat_zones.hh index 6c406d5..683a17d 100644 --- a/milena/mln/labeling/flat_zones.hh +++ b/milena/mln/labeling/flat_zones.hh @@ -124,7 +124,7 @@ namespace mln flat_zones(const Image<I>& input_, const Neighborhood<N>& nbh_, L& nlabels) { - trace::entering("labeling::flat_zones"); + mln_trace("labeling::flat_zones"); const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -136,7 +136,6 @@ namespace mln mln_ch_value(I, L) output = canvas::labeling::video(input, nbh, nlabels, f); - trace::exiting("labeling::flat_zones"); return output; } diff --git a/milena/mln/labeling/foreground.hh b/milena/mln/labeling/foreground.hh index 5a2e0c0..cb9c891 100644 --- a/milena/mln/labeling/foreground.hh +++ b/milena/mln/labeling/foreground.hh @@ -69,7 +69,7 @@ namespace mln foreground(const Image<I>& input, const Neighborhood<N>& nbh, L& nlabels) { - trace::entering("labeling::foreground"); + mln_trace("labeling::foreground"); mlc_equal(mln_trait_image_kind(I), mln::trait::image::kind::binary)::check(); @@ -78,7 +78,6 @@ namespace mln mln_ch_value(I, L) output = labeling::value(input, true, nbh, nlabels); - trace::exiting("labeling::foreground"); return output; } diff --git a/milena/mln/labeling/mean_values.hh b/milena/mln/labeling/mean_values.hh index fce9147..b8cef49 100644 --- a/milena/mln/labeling/mean_values.hh +++ b/milena/mln/labeling/mean_values.hh @@ -97,7 +97,7 @@ namespace mln mean_values(const Image<I>& input_, const Image<L>& lbl_, mln_value(L) nlabels) { - trace::entering("mln::labeling::impl::generic::mean_values"); + mln_trace("mln::labeling::impl::generic::mean_values"); internal::mean_values_tests(input_, lbl_, nlabels); @@ -119,7 +119,6 @@ namespace mln mln_concrete(I) output = data::transform(lbl, m); - trace::exiting("mln::labeling::impl::generic::mean_values"); return output; } @@ -130,7 +129,7 @@ namespace mln mean_values_rgb(const Image<I>& input_, const Image<L>& lbl_, mln_value(L) nlabels) { - trace::entering("mln::labeling::impl::mean_values_rgb"); + mln_trace("mln::labeling::impl::mean_values_rgb"); internal::mean_values_tests(input_, lbl_, nlabels); @@ -151,7 +150,6 @@ namespace mln convert::to< fun::i2v::array<mln_value(I)> >(m)); - trace::exiting("mln::labeling::impl::mean_values_rgb"); return output; } @@ -199,13 +197,12 @@ namespace mln const Image<L>& lbl, mln_value(L) nlabels) { - trace::entering("mln::labeling::mean_values"); + mln_trace("mln::labeling::mean_values"); internal::mean_values_tests(input, lbl, nlabels); mln_concrete(I) output = internal::mean_values_dispatch(input, lbl, nlabels); - trace::exiting("mln::labeling::mean_values"); return output; } diff --git a/milena/mln/labeling/n_max.hh b/milena/mln/labeling/n_max.hh index cc7a413..c53949e 100644 --- a/milena/mln/labeling/n_max.hh +++ b/milena/mln/labeling/n_max.hh @@ -65,7 +65,7 @@ namespace mln util::array<L> n_max(const util::array<V>& in_arr, unsigned n) { - trace::entering("mln::labeling::n_max"); + mln_trace("mln::labeling::n_max"); mln_precondition(n < in_arr.nelements()); @@ -97,7 +97,6 @@ namespace mln } } - trace::exiting("mln::labeling::n_max"); return output; } diff --git a/milena/mln/labeling/pack.hh b/milena/mln/labeling/pack.hh index ebf9bb1..999f129 100644 --- a/milena/mln/labeling/pack.hh +++ b/milena/mln/labeling/pack.hh @@ -124,7 +124,7 @@ namespace mln pack(const Image<I>& label, mln_value(I)& new_nlabels, fun::i2v::array<mln_value(I)>& repack_fun) { - trace::entering("labeling::pack"); + mln_trace("labeling::pack"); internal::pack_tests(label, new_nlabels); @@ -138,7 +138,6 @@ namespace mln mln_concrete(I) output = data::transform(label, repack_fun); - trace::exiting("labeling::pack"); return output; } @@ -157,7 +156,7 @@ namespace mln pack_inplace(Image<I>& label, mln_value(I)& new_nlabels, fun::i2v::array<mln_value(I)>& repack_fun) { - trace::entering("labeling::pack_inplace"); + mln_trace("labeling::pack_inplace"); internal::pack_tests(label, new_nlabels); @@ -169,7 +168,6 @@ namespace mln exact(label) = data::transform(label, repack_fun); - trace::exiting("labeling::pack_inplace"); } diff --git a/milena/mln/labeling/regional_maxima.hh b/milena/mln/labeling/regional_maxima.hh index 861066f..568fde8 100644 --- a/milena/mln/labeling/regional_maxima.hh +++ b/milena/mln/labeling/regional_maxima.hh @@ -130,7 +130,7 @@ namespace mln regional_maxima(const Image<I>& input_, const Neighborhood<N>& nbh_, L& nlabels) { - trace::entering("labeling::regional_maxima"); + mln_trace("labeling::regional_maxima"); const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -141,7 +141,6 @@ namespace mln mln_ch_value(I, L) output = canvas::labeling::sorted(input, nbh, nlabels, f, true); - trace::exiting("labeling::regional_maxima"); return output; } diff --git a/milena/mln/labeling/regional_minima.hh b/milena/mln/labeling/regional_minima.hh index ae0e7e9..5a6271e 100644 --- a/milena/mln/labeling/regional_minima.hh +++ b/milena/mln/labeling/regional_minima.hh @@ -140,7 +140,7 @@ namespace mln regional_minima(const Image<I>& input_, const Neighborhood<N>& nbh_, L& nlabels) { - trace::entering("labeling::regional_minima"); + mln_trace("labeling::regional_minima"); const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -154,7 +154,6 @@ namespace mln mln_ch_value(I, L) output = canvas::labeling::sorted(input, nbh, nlabels, f, false); - trace::exiting("labeling::regional_minima"); return output; } diff --git a/milena/mln/labeling/relabel.hh b/milena/mln/labeling/relabel.hh index 91db122..7f304ee 100644 --- a/milena/mln/labeling/relabel.hh +++ b/milena/mln/labeling/relabel.hh @@ -180,7 +180,7 @@ namespace mln const mln_value(I)& nlabels, const Function_v2v<F>& fv2v) { - trace::entering("labeling::relabel"); + mln_trace("labeling::relabel"); mlc_not_equal(mln_result(F),bool)::check(); @@ -188,7 +188,6 @@ namespace mln mln_concrete(I) output = data::transform(label, fv2v); - trace::exiting("labeling::relabel"); return output; } @@ -202,7 +201,7 @@ namespace mln mln_value(I)& new_nlabels, const Function_v2b<F>& fv2b) { - trace::entering("labeling::relabel"); + mln_trace("labeling::relabel"); internal::relabel_tests(label, nlabels, new_nlabels, fv2b); @@ -210,7 +209,6 @@ namespace mln fv2v_t fv2v = make::relabelfun(fv2b, nlabels, new_nlabels); mln_concrete(I) output = labeling::relabel(label, new_nlabels, fv2v); - trace::exiting("labeling::relabel"); return output; } @@ -222,14 +220,13 @@ namespace mln const mln_value(I)& nlabels, const Function_v2v<F>& fv2v) { - trace::entering("labeling::relabel_inplace"); + mln_trace("labeling::relabel_inplace"); mlc_not_equal(mln_result(F),bool)::check(); internal::relabel_inplace_tests(label, nlabels, fv2v); data::transform_inplace(label, fv2v); - trace::exiting("labeling::relabel_inplace"); } @@ -241,7 +238,7 @@ namespace mln const mln_value(I)& nlabels, const Function_v2b<F>& fv2b) { - trace::entering("labeling::relabel_inplace"); + mln_trace("labeling::relabel_inplace"); internal::relabel_inplace_tests(label, nlabels, fv2b); @@ -250,7 +247,6 @@ namespace mln fv2v_t fv2v = make::relabelfun(fv2b, nlabels, tmp); labeling::relabel_inplace(label, tmp, fv2v); - trace::exiting("labeling::relabel_inplace"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/labeling/superpose.hh b/milena/mln/labeling/superpose.hh index 1df647c..641b4bb 100644 --- a/milena/mln/labeling/superpose.hh +++ b/milena/mln/labeling/superpose.hh @@ -84,7 +84,7 @@ namespace mln const Image<J>& rhs_, const mln_value(J)& rhs_nlabels, mln_value(I)& new_nlabels) { - trace::entering("mln::labeling::superpose"); + mln_trace("mln::labeling::superpose"); const I& lhs = exact(lhs_); const J& rhs = exact(rhs_); @@ -111,7 +111,6 @@ namespace mln new_nlabels = value::equiv(lhs_nlabels) + value::equiv(rhs_nlabels) + 1; - trace::exiting("mln::labeling::superpose"); return output; } diff --git a/milena/mln/labeling/value.hh b/milena/mln/labeling/value.hh index fdd47ef..069b2a1 100644 --- a/milena/mln/labeling/value.hh +++ b/milena/mln/labeling/value.hh @@ -149,7 +149,7 @@ namespace mln value(const Image<I>& input, const mln_value(I)& val, const Neighborhood<N>& nbh, L& nlabels) { - trace::entering("labeling::value"); + mln_trace("labeling::value"); internal::value_tests(input, val, nbh, nlabels); @@ -157,7 +157,6 @@ namespace mln impl::value_functor<I,L> f(input, val); output = canvas::labeling::video(input, nbh, nlabels, f); - trace::exiting("labeling::value"); return output; } diff --git a/milena/mln/labeling/value.spe.hh b/milena/mln/labeling/value.spe.hh index 9384e0a..901d287 100644 --- a/milena/mln/labeling/value.spe.hh +++ b/milena/mln/labeling/value.spe.hh @@ -129,7 +129,7 @@ namespace mln const Neighborhood<N>& nbh, L& nlabels) { - trace::entering("labeling::impl::value_fastest"); + mln_trace("labeling::impl::value_fastest"); // FIXME: HERE @@ -142,7 +142,6 @@ namespace mln nlabels = run.nlabels; // FIXME: Handle run.status - trace::exiting("labeling::impl::value_fastest"); return run.output; } diff --git a/milena/mln/labeling/value_and_compute.hh b/milena/mln/labeling/value_and_compute.hh index b9ec3d3..4619e1a 100644 --- a/milena/mln/labeling/value_and_compute.hh +++ b/milena/mln/labeling/value_and_compute.hh @@ -215,7 +215,7 @@ namespace mln const Neighborhood<N>& nbh, L& nlabels, const Accumulator<A>& accu) { - trace::entering("labeling::value_and_compute"); + mln_trace("labeling::value_and_compute"); internal::value_and_compute_tests(input, val, nbh, nlabels, accu); @@ -229,7 +229,6 @@ namespace mln make::couple(f.result_, f.accus_)); - trace::exiting("labeling::value_and_compute"); return result; } diff --git a/milena/mln/labeling/wrap.hh b/milena/mln/labeling/wrap.hh index eacfb25..76426f2 100644 --- a/milena/mln/labeling/wrap.hh +++ b/milena/mln/labeling/wrap.hh @@ -74,7 +74,7 @@ namespace mln mln_ch_value(I,V) wrap(const V& value_type, const Image<I>& input) { - trace::entering("labeling::wrap"); + mln_trace("labeling::wrap"); // mlc_is_a(mln_value(I), value::Symbolic)::check(); mln_precondition(exact(input).is_valid()); @@ -82,7 +82,6 @@ namespace mln mln_ch_value(I,V) output = data::transform(input, fun::v2v::wrap<V>()); - trace::exiting("labeling::wrap"); return output; } diff --git a/milena/mln/linear/convolve.hh b/milena/mln/linear/convolve.hh index 4be7cbe..26b199f 100644 --- a/milena/mln/linear/convolve.hh +++ b/milena/mln/linear/convolve.hh @@ -97,7 +97,7 @@ namespace mln convolve(const Image<I>& input_, const Weighted_Window<W>& w_win_) { - trace::entering("linear::impl::generic::convolve"); + mln_trace("linear::impl::generic::convolve"); const I& input = exact(input_); const W& w_win = exact(w_win_); @@ -122,7 +122,6 @@ namespace mln output(p) = a.to_result(); } - trace::exiting("linear::impl::generic::convolve"); return output; } @@ -134,7 +133,7 @@ namespace mln convolve_fastest(const Image<I>& input_, const Weighted_Window<W>& w_win_) { - trace::entering("linear::impl::convolve_fastest"); + mln_trace("linear::impl::convolve_fastest"); const I& input = exact(input_); const W& w_win = exact(w_win_); @@ -161,7 +160,6 @@ namespace mln p_out.val() = a.to_result(); } - trace::exiting("linear::impl::convolve_fastest"); return output; } @@ -209,7 +207,7 @@ namespace mln mln_ch_convolve(I, W) convolve(const Image<I>& input, const Weighted_Window<W>& w_win) { - trace::entering("linear::convolve"); + mln_trace("linear::convolve"); internal::convolve_tests(input, w_win); @@ -217,7 +215,6 @@ namespace mln output = internal::convolve_dispatch(mln_trait_image_speed(I)(), input, w_win); - trace::exiting("linear::convolve"); return output; } diff --git a/milena/mln/linear/convolve_2x1d.hh b/milena/mln/linear/convolve_2x1d.hh index 6f59cbe..f49f239 100644 --- a/milena/mln/linear/convolve_2x1d.hh +++ b/milena/mln/linear/convolve_2x1d.hh @@ -70,7 +70,7 @@ namespace mln W (&horizontal_weights)[Sh], W (& vertical_weights)[Sv]) { - trace::entering("linear::convolve_2x1d"); + mln_trace("linear::convolve_2x1d"); mlc_bool(Sh % 2 == 1)::check(); mlc_bool(Sv % 2 == 1)::check(); @@ -84,7 +84,6 @@ namespace mln tmp = linear::convolve_directional(input, 1, horizontal_weights); output = linear::convolve_directional( tmp, 0, vertical_weights); - trace::exiting("linear::convolve_2x1d"); return output; } diff --git a/milena/mln/linear/convolve_directional.hh b/milena/mln/linear/convolve_directional.hh index 0853106..dceeedf 100644 --- a/milena/mln/linear/convolve_directional.hh +++ b/milena/mln/linear/convolve_directional.hh @@ -69,7 +69,7 @@ namespace mln mln_ch_convolve(I, W) convolve_directional(const Image<I>& input, unsigned dir, W (&weights)[S]) { - trace::entering("linear::convolve_directional"); + mln_trace("linear::convolve_directional"); mlc_bool(S % 2 == 1)::check(); @@ -83,7 +83,6 @@ namespace mln w_window<D,W> w_win = make::w_window_directional(dp, weights); mln_ch_convolve(I, W) output = convolve(input, w_win); - trace::exiting("linear::convolve_directional"); return output; } diff --git a/milena/mln/linear/gaussian_1d.hh b/milena/mln/linear/gaussian_1d.hh index 3303e02..dd89acc 100644 --- a/milena/mln/linear/gaussian_1d.hh +++ b/milena/mln/linear/gaussian_1d.hh @@ -64,7 +64,7 @@ namespace mln double sigma, const mln_value(I)& bdr) { - trace::entering("linear::gaussian_1d"); + mln_trace("linear::gaussian_1d"); typedef mln_site(I) P; mlc_bool(P::dim == 1)::check(); @@ -96,7 +96,6 @@ namespace mln dpoint1d(1), bdr); - trace::exiting("linear::gaussian_1d"); return output; } diff --git a/milena/mln/linear/gaussian_directional_2d.hh b/milena/mln/linear/gaussian_directional_2d.hh index 2067d4f..ab1d1c9 100644 --- a/milena/mln/linear/gaussian_directional_2d.hh +++ b/milena/mln/linear/gaussian_directional_2d.hh @@ -469,7 +469,7 @@ namespace mln unsigned dir, double sigma, const mln_value(I)& bdr) { - trace::entering("linear::gaussian_directional_2d"); + mln_trace("linear::gaussian_directional_2d"); typedef mln_site(I) P; mlc_bool(P::dim == 2)::check(); @@ -519,7 +519,6 @@ namespace mln bdr); } - trace::exiting("linear::gaussian_directional_2d"); return output; } diff --git a/milena/mln/linear/lap.hh b/milena/mln/linear/lap.hh index a03ff23..e5f6d2b 100644 --- a/milena/mln/linear/lap.hh +++ b/milena/mln/linear/lap.hh @@ -75,13 +75,12 @@ namespace mln mln_ch_convolve(I, int) lap_4(const Image<I>& input) { - trace::entering("linear::lap_4"); + mln_trace("linear::lap_4"); mln_precondition(exact(input).is_valid()); int ws[] = { 0, 1, 0, 1, -4, 1, 0, 1, 0 }; mln_ch_convolve(I, int) output = convolve(input, make::w_window2d(ws)); - trace::exiting("linear::lap_4"); return output; } @@ -90,13 +89,12 @@ namespace mln mln_ch_convolve(I, int) lap_8(const Image<I>& input) { - trace::entering("linear::lap_8"); + mln_trace("linear::lap_8"); mln_precondition(exact(input).is_valid()); int ws[] = { 1, 1, 1, 1, -8, 1, 1, 1, 1 }; mln_ch_convolve(I, int) output = convolve(input, make::w_window2d(ws)); - trace::exiting("linear::lap_8"); return output; } @@ -105,13 +103,12 @@ namespace mln mln_ch_convolve(I, int) lap_x(const Image<I>& input) { - trace::entering("linear::lap_x"); + mln_trace("linear::lap_x"); mln_precondition(exact(input).is_valid()); int ws[] = { +2, -1, +2, -1, -4, -1, +2, -1, +2 }; mln_ch_convolve(I, int) output = convolve(input, make::w_window2d(ws)); - trace::exiting("linear::lap_x"); return output; } @@ -120,13 +117,12 @@ namespace mln mln_ch_convolve(I, int) lap_o(const Image<I>& input) { - trace::entering("linear::lap_o"); + mln_trace("linear::lap_o"); mln_precondition(exact(input).is_valid()); int ws[] = { -1, +2, -1, +2, -4, +2, -1, +2, -1 }; mln_ch_convolve(I, int) output = convolve(input, make::w_window2d(ws)); - trace::exiting("linear::lap_o"); return output; } diff --git a/milena/mln/linear/log.hh b/milena/mln/linear/log.hh index 852c123..2e5e950 100644 --- a/milena/mln/linear/log.hh +++ b/milena/mln/linear/log.hh @@ -75,7 +75,7 @@ namespace mln mln_ch_convolve(I, int) LoG_5x5(const Image<I>& input) { - trace::entering("linear::LoG_5x5"); + mln_trace("linear::LoG_5x5"); mln_precondition(exact(input).is_valid()); int ws[] = { +0, 0, -1, 0, 0, +0, -1, -2, -1, 0, @@ -83,7 +83,6 @@ namespace mln +0, -1, -2, -1, 0, +0, 0, -1, 0, 0 }; mln_ch_convolve(I, int) output = convolve(input, make::w_window2d(ws)); - trace::exiting("linear::LoG_5x5"); return output; } @@ -94,7 +93,7 @@ namespace mln mln_ch_convolve(I, int) LoG_7x7(const Image<I>& input) { - trace::entering("linear::LoG_7x7"); + mln_trace("linear::LoG_7x7"); mln_precondition(exact(input).is_valid()); int ws[] = { +0, 0, -1, -1, -1, 0, 0, +0, -1, -3, -3, -3, -1, 0, @@ -104,7 +103,6 @@ namespace mln +0, -1, -3, -3, -3, -1, 0, +0, 0, -1, -1, -1, 0, 0 }; mln_ch_convolve(I, int) output = convolve(input, make::w_window2d(ws)); - trace::exiting("linear::LoG_7x7"); return output; } @@ -115,7 +113,7 @@ namespace mln mln_ch_convolve(I, int) LoG_13x13(const Image<I>& input) { - trace::entering("linear::LoG_13x13"); + mln_trace("linear::LoG_13x13"); mln_precondition(exact(input).is_valid()); int ws[] = { +0, 0, 0, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0, +0, 0, 0, -1, -1, -2, -2, -2, -1, -1, 0, 0, 0, @@ -142,7 +140,7 @@ namespace mln mln_ch_convolve(I, int) LoG_17x17(const Image<I>& input) { - trace::entering("linear::LoG_17x17"); + mln_trace("linear::LoG_17x17"); mln_precondition(exact(input).is_valid()); int ws[] = { +0, 0, 0, 0, 0, 0,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, @@ -162,7 +160,6 @@ namespace mln +0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 0 }; mln_ch_convolve(I, int) output = convolve(input, make::w_window2d(ws)); - trace::exiting("linear::LoG_17x17"); return output; } diff --git a/milena/mln/linear/sobel_2d.hh b/milena/mln/linear/sobel_2d.hh index ac2da9a..359a761 100644 --- a/milena/mln/linear/sobel_2d.hh +++ b/milena/mln/linear/sobel_2d.hh @@ -88,7 +88,7 @@ namespace mln mln_ch_convolve(I, int) sobel_2d_h(const Image<I>& input) { - trace::entering("linear::sobel_2d_h"); + mln_trace("linear::sobel_2d_h"); mln_precondition(exact(input).is_valid()); int wh[] = { -1, 0, 1 }; @@ -97,7 +97,6 @@ namespace mln 1 }; mln_ch_convolve(I, int) output = convolve_2x1d(input, wh, wv); - trace::exiting("linear::sobel_2d_h"); return output; } @@ -107,7 +106,7 @@ namespace mln mln_ch_convolve(I, int) sobel_2d_v(const Image<I>& input) { - trace::entering("linear::sobel_2d_v"); + mln_trace("linear::sobel_2d_v"); mln_precondition(exact(input).is_valid()); int wh[] = { 1, 2, 1 }; @@ -116,7 +115,6 @@ namespace mln +1 }; mln_ch_convolve(I, int) output = convolve_2x1d(input, wh, wv); - trace::exiting("linear::sobel_2d_v"); return output; } @@ -125,7 +123,7 @@ namespace mln mln_ch_convolve_grad(I, int) sobel_2d(const Image<I>& input) { - trace::entering("linear::sobel_2d"); + mln_trace("linear::sobel_2d"); mln_precondition(exact(input).is_valid()); typedef mln_ch_convolve(I, int) J; @@ -134,7 +132,6 @@ namespace mln fun::vv2v::vec<mln_value(J)> f; mln_ch_convolve_grad(I, int) output = data::transform(h, v, f); - trace::exiting("linear::sobel_2d"); return output; } @@ -143,7 +140,7 @@ namespace mln mln_ch_convolve(I, int) sobel_2d_l1_norm(const Image<I>& input) { - trace::entering("linear::sobel_2d_norm_l1"); + mln_trace("linear::sobel_2d_norm_l1"); mln_precondition(exact(input).is_valid()); typedef mln_ch_convolve_grad(I, int) G; @@ -151,7 +148,6 @@ namespace mln fun::x2v::l1_norm<mln_value(G)> f; mln_ch_convolve(I, int) output = data::transform(grad, f); - trace::exiting("linear::sobel_2d"); return output; } diff --git a/milena/mln/logical/and.hh b/milena/mln/logical/and.hh index 84c3c03..78940f9 100644 --- a/milena/mln/logical/and.hh +++ b/milena/mln/logical/and.hh @@ -80,14 +80,13 @@ namespace mln mln_ch_fun_vv2v(land, L, R) and_(const Image<L>& lhs, const Image<R>& rhs) { - trace::entering("logical::and_"); + mln_trace("logical::and_"); internal::tests(lhs, rhs); mln_fun_vv2v(land, L, R) f; mln_ch_fun_vv2v(land, L, R) output = data::transform(lhs, rhs, f); - trace::exiting("logical::and_"); return output; } @@ -95,7 +94,7 @@ namespace mln inline void and_inplace(Image<L>& lhs, const Image<R>& rhs) { - trace::entering("logical::and_inplace"); + mln_trace("logical::and_inplace"); mlc_converts_to(mln_fun_vv2v_result(land, L, R), mln_value(L))::check(); @@ -105,7 +104,6 @@ namespace mln mln_fun_vv2v(land, L, R) f; data::transform_inplace(lhs, rhs, f); - trace::exiting("logical::and_inplace"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/logical/and_not.hh b/milena/mln/logical/and_not.hh index 293d465..c37b696 100644 --- a/milena/mln/logical/and_not.hh +++ b/milena/mln/logical/and_not.hh @@ -82,14 +82,13 @@ namespace mln mln_ch_fun_vv2v(land_not, L, R) and_not(const Image<L>& lhs, const Image<R>& rhs) { - trace::entering("logical::and_not"); + mln_trace("logical::and_not"); internal::tests(lhs, rhs); mln_fun_vv2v(land_not, L, R) f; mln_ch_fun_vv2v(land_not, L, R) output = data::transform(lhs, rhs, f); - trace::exiting("logical::and_not"); return output; } @@ -97,7 +96,7 @@ namespace mln inline void and_not_inplace(Image<L>& lhs, const Image<R>& rhs) { - trace::entering("logical::and_not_inplace"); + mln_trace("logical::and_not_inplace"); mlc_converts_to(mln_fun_vv2v_result(land_not, L, R), mln_value(L))::check(); @@ -107,7 +106,6 @@ namespace mln mln_fun_vv2v(land_not, L, R) f; data::transform_inplace(lhs, rhs, f); - trace::exiting("logical::and_not_inplace"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/logical/not.hh b/milena/mln/logical/not.hh index e3f41c6..7d55e40 100644 --- a/milena/mln/logical/not.hh +++ b/milena/mln/logical/not.hh @@ -77,14 +77,13 @@ namespace mln inline mln_concrete(I) not_(const Image<I>& input) { - trace::entering("logical::not_"); + mln_trace("logical::not_"); mln_precondition(exact(input).is_valid()); fun::v2b::lnot<mln_value(I)> f; mln_concrete(I) output = data::transform(input, f); - trace::exiting("logical::not_"); return output; } @@ -92,14 +91,13 @@ namespace mln inline void not_inplace(Image<I>& input) { - trace::entering("logical::not_inplace"); + mln_trace("logical::not_inplace"); mln_precondition(exact(input).is_valid()); fun::v2b::lnot<mln_value(I)> f; data::transform_inplace(input, f); - trace::exiting("logical::not_inplace"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/logical/not.spe.hh b/milena/mln/logical/not.spe.hh index 723e81a..69656be 100644 --- a/milena/mln/logical/not.spe.hh +++ b/milena/mln/logical/not.spe.hh @@ -77,27 +77,25 @@ namespace mln inline void not_(trait::image::speed::fastest, const I& input, O& output) { - trace::entering("logical::impl::not_"); + mln_trace("logical::impl::not_"); mln_pixter(const I) ip(input); mln_pixter(O) op(output); for_all_2(ip, op) op.val() = ! ip.val(); - trace::exiting("logical::impl::not_"); } template <typename I> inline void not_inplace(trait::image::speed::fastest, I& inout) { - trace::entering("logical::impl::not_inplace"); + mln_trace("logical::impl::not_inplace"); mln_pixter(I) p(inout); for_all(p) p.val() = ! p.val(); - trace::exiting("logical::impl::not_inplace"); } } // end of namespace mln::logical::impl diff --git a/milena/mln/logical/or.hh b/milena/mln/logical/or.hh index 6b46750..ea7eb59 100644 --- a/milena/mln/logical/or.hh +++ b/milena/mln/logical/or.hh @@ -82,14 +82,13 @@ namespace mln mln_ch_fun_vv2v(lor, L, R) or_(const Image<L>& lhs, const Image<R>& rhs) { - trace::entering("logical::or_"); + mln_trace("logical::or_"); internal::tests(lhs, rhs); mln_fun_vv2v(lor, L, R) f; mln_ch_fun_vv2v(lor, L, R) output = data::transform(lhs, rhs, f); - trace::exiting("logical::or_"); return output; } @@ -97,7 +96,7 @@ namespace mln inline void or_inplace(Image<L>& lhs, const Image<R>& rhs) { - trace::entering("logical::or_inplace"); + mln_trace("logical::or_inplace"); mlc_converts_to(mln_fun_vv2v_result(lor, L, R), mln_value(L))::check(); @@ -107,7 +106,6 @@ namespace mln mln_fun_vv2v(lor, L, R) f; data::transform_inplace(lhs, rhs, f); - trace::exiting("logical::or_inplace"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/logical/xor.hh b/milena/mln/logical/xor.hh index fcee52b..85dabc8 100644 --- a/milena/mln/logical/xor.hh +++ b/milena/mln/logical/xor.hh @@ -82,14 +82,13 @@ namespace mln mln_ch_fun_vv2v(lxor, L, R) xor_(const Image<L>& lhs, const Image<R>& rhs) { - trace::entering("logical::xor_"); + mln_trace("logical::xor_"); internal::tests(lhs, rhs); mln_fun_vv2v(lxor, L, R) f; mln_ch_fun_vv2v(lxor, L, R) output = data::transform(lhs, rhs, f); - trace::exiting("logical::xor_"); return output; } @@ -97,7 +96,7 @@ namespace mln inline void xor_inplace(Image<L>& lhs, const Image<R>& rhs) { - trace::entering("logical::xor_inplace"); + mln_trace("logical::xor_inplace"); mlc_converts_to(mln_fun_vv2v_result(lxor, L, R), mln_value(L))::check(); @@ -107,7 +106,6 @@ namespace mln mln_fun_vv2v(lxor, L, R) f; data::transform_inplace(lhs, rhs, f); - trace::exiting("logical::xor_inplace"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/make/dual_neighb.hh b/milena/mln/make/dual_neighb.hh index 8969da0..d16bc48 100644 --- a/milena/mln/make/dual_neighb.hh +++ b/milena/mln/make/dual_neighb.hh @@ -61,7 +61,7 @@ namespace mln const Neighborhood<N>& nbh_true_, const Neighborhood<N>& nbh_false_) { - trace::entering("make::dual_neighb"); + mln_trace("make::dual_neighb"); mlc_is(mln_trait_image_kind(I), trait::image::kind::logic)::check(); @@ -77,7 +77,6 @@ namespace mln neighb<W> nbh(win); - trace::exiting("make::dual_neighb"); return nbh; } diff --git a/milena/mln/make/dummy_p_edges.hh b/milena/mln/make/dummy_p_edges.hh index 86cec54..56360af 100644 --- a/milena/mln/make/dummy_p_edges.hh +++ b/milena/mln/make/dummy_p_edges.hh @@ -76,14 +76,13 @@ namespace mln p_edges<G,pw::cst_<P> > dummy_p_edges(const Graph<G>& g_, const P& dummy_site) { - trace::entering("dummy_p_edges"); + mln_trace("dummy_p_edges"); const G& g = exact(g_); mln_precondition(g.is_valid()); p_edges< G, pw::cst_<P> > pe(g, pw::cst(dummy_site)); - trace::exiting("dummy_p_edges"); return pe; } diff --git a/milena/mln/make/dummy_p_vertices.hh b/milena/mln/make/dummy_p_vertices.hh index e00cae0..5224051 100644 --- a/milena/mln/make/dummy_p_vertices.hh +++ b/milena/mln/make/dummy_p_vertices.hh @@ -76,14 +76,13 @@ namespace mln p_vertices<G,pw::cst_<P> > dummy_p_vertices(const Graph<G>& g_, const P& dummy_site) { - trace::entering("dummy_p_vertices"); + mln_trace("dummy_p_vertices"); const G& g = exact(g_); mln_precondition(g.is_valid()); p_vertices< G, pw::cst_<P> > pe(g, pw::cst(dummy_site)); - trace::exiting("dummy_p_vertices"); return pe; } diff --git a/milena/mln/make/edge_image.hh b/milena/mln/make/edge_image.hh index e964aab..a1d2d70 100644 --- a/milena/mln/make/edge_image.hh +++ b/milena/mln/make/edge_image.hh @@ -140,13 +140,12 @@ namespace mln mln::edge_image<void,V,G> edge_image(const Graph<G>& g, const fun::i2v::array<V>& fv) { - trace::entering("make::edge_image"); + mln_trace("make::edge_image"); mln_precondition(exact(g).is_valid()); p_edges<G> pe(g); mln::edge_image<void,V,G> ima(pe, fv); - trace::exiting("make::edge_image"); return ima; } @@ -155,7 +154,7 @@ namespace mln edge_image(const Graph<G>& g_, const Function_v2v<FV>& fv) { - trace::entering("make::edge_image"); + mln_trace("make::edge_image"); const G& g = exact(g_); const FV& f = exact(fv); mln_precondition(g.is_valid()); @@ -168,7 +167,6 @@ namespace mln for_all(e) ima(e) = f(e.id()); - trace::exiting("make::edge_image"); return ima; } @@ -180,14 +178,13 @@ namespace mln const Function_v2v<FP>& fp, const Function_v2v<FV>& fv) { - trace::entering("make::edge_image"); + mln_trace("make::edge_image"); const G& g = exact(g_); mln_precondition(g.is_valid()); p_edges<G,FP> pe(g,fp); mln::edge_image<mln_result(FP),mln_result(FV),G> ima(pe, fv); - trace::exiting("make::edge_image"); return ima; } @@ -200,7 +197,7 @@ namespace mln const p_edges<G,FP> pe, const Function_vv2v<FV>& fv_) { - trace::entering("make::edge_image"); + mln_trace("make::edge_image"); const FV& fv = exact(fv_); const mln::vertex_image<P,V,G>& v_ima = exact(v_ima_); @@ -213,7 +210,6 @@ namespace mln for_all(e) ima_e(e) = fv(e.element().v1(), e.element().v2()); - trace::exiting("make::edge_image"); return ima_e; } @@ -225,7 +221,7 @@ namespace mln edge_image(const mln::vertex_image<P,V,G>& v_ima_, const Function_vv2v<FV>& fv_) { - trace::entering("make::edge_image"); + mln_trace("make::edge_image"); const FV& fv = exact(fv_); const mln::vertex_image<P,V,G>& v_ima = exact(v_ima_); @@ -239,7 +235,6 @@ namespace mln for_all(e) ima_e(e) = fv(v_ima(e.element().v1()), v_ima(e.element().v2())); - trace::exiting("make::edge_image"); return ima_e; } @@ -250,7 +245,7 @@ namespace mln edge_image(const mln::vertex_image<P,V,G>& v_ima_, const Function_v2b<F>& fv_) { - trace::entering("make::edge_image"); + mln_trace("make::edge_image"); const F& fv = exact(fv_); typedef mln::vertex_image<P,V,G> v_ima_t; @@ -272,7 +267,6 @@ namespace mln ima_e(q) = false; } - trace::exiting("make::edge_image"); return ima_e; } diff --git a/milena/mln/make/influence_zone_adjacency_graph.hh b/milena/mln/make/influence_zone_adjacency_graph.hh index fff2ae3..6a2ced0 100644 --- a/milena/mln/make/influence_zone_adjacency_graph.hh +++ b/milena/mln/make/influence_zone_adjacency_graph.hh @@ -107,7 +107,7 @@ namespace mln const Neighborhood<N>& nbh_, const mln_value(I)& nlabels) { - trace::entering("make::impl::generic::influence_zone_adjacency_graph"); + mln_trace("make::impl::generic::influence_zone_adjacency_graph"); internal::influence_zone_adjacency_graph_tests(iz_, nbh_, nlabels); const I& iz = exact(iz_); @@ -141,7 +141,6 @@ namespace mln if (adj.are_adjacent(i, j)) g.add_edge(i, j); - trace::exiting("make::impl::generic::influence_zone_adjacency_graph"); return g; } @@ -176,13 +175,12 @@ namespace mln const Neighborhood<N>& nbh, const mln_value(I)& nlabels) { - trace::entering("make::influence_zone_adjacency_graph"); + mln_trace("make::influence_zone_adjacency_graph"); internal::influence_zone_adjacency_graph_tests(iz, nbh, nlabels); util::graph g = internal::influence_zone_adjacency_graph_dispatch(iz, nbh, nlabels); - trace::exiting("make::influence_zone_adjacency_graph"); return g; } diff --git a/milena/mln/make/p_edges_with_mass_centers.hh b/milena/mln/make/p_edges_with_mass_centers.hh index fc050f3..a597d93 100644 --- a/milena/mln/make/p_edges_with_mass_centers.hh +++ b/milena/mln/make/p_edges_with_mass_centers.hh @@ -81,7 +81,7 @@ namespace mln p_edges_with_mass_centers(const Image<W>& wst_, const Graph<G>& g_) { - trace::entering("make::p_edges_with_mass_centers"); + mln_trace("make::p_edges_with_mass_centers"); const W& wst = exact(wst_); const G& g = exact(g_); @@ -105,7 +105,6 @@ namespace mln p_edges<G, edge_sites_t> pe(g, edge_sites); - trace::exiting("make::p_edges_with_mass_centers"); return pe; } diff --git a/milena/mln/make/p_vertices_with_mass_centers.hh b/milena/mln/make/p_vertices_with_mass_centers.hh index cb861f4..ce6c089 100644 --- a/milena/mln/make/p_vertices_with_mass_centers.hh +++ b/milena/mln/make/p_vertices_with_mass_centers.hh @@ -77,7 +77,7 @@ namespace mln p_vertices_with_mass_centers(const Image<W>& wst_, const Graph<G>& g_) { - trace::entering("make::p_vertices_with_mass_centers"); + mln_trace("make::p_vertices_with_mass_centers"); const W& wst = exact(wst_); const G& g = exact(g_); @@ -95,7 +95,6 @@ namespace mln p_vertices<G, vertex_sites_t> pv(g, vertex_sites); - trace::exiting("make::p_vertices_with_mass_centers"); return pv; } diff --git a/milena/mln/make/rag_and_labeled_wsl.hh b/milena/mln/make/rag_and_labeled_wsl.hh index e3bd117..dd4c76a 100644 --- a/milena/mln/make/rag_and_labeled_wsl.hh +++ b/milena/mln/make/rag_and_labeled_wsl.hh @@ -131,7 +131,7 @@ namespace mln const Neighborhood<N>& nbh_, const mln_value(I)& nbasins) { - trace::entering("make::impl::generic::rag_and_labeled_wsl"); + mln_trace("make::impl::generic::rag_and_labeled_wsl"); internal::rag_and_labeled_wsl_tests(wshd_, nbh_, nbasins); const I& wshd = exact(wshd_); @@ -194,7 +194,6 @@ namespace mln for (unsigned i = 0; i < la2c.nelements(); ++i) g.add_edge(la2c[i].first(), la2c[i].second()); - trace::exiting("make::impl::generic::rag_and_labeled_wsl"); return make::couple(g, output); } @@ -230,14 +229,13 @@ namespace mln const Neighborhood<N>& nbh, const mln_value(I)& nbasins) { - trace::entering("make::rag_and_labeled_wsl"); + mln_trace("make::rag_and_labeled_wsl"); internal::rag_and_labeled_wsl_tests(wshd, nbh, nbasins); util::couple<util::graph,mln_concrete(I)> result = internal::rag_and_labeled_wsl_dispatch(wshd, nbh, nbasins); - trace::exiting("make::rag_and_labeled_wsl"); return result; } diff --git a/milena/mln/make/region_adjacency_graph.hh b/milena/mln/make/region_adjacency_graph.hh index 5efbd06..a8f6358 100644 --- a/milena/mln/make/region_adjacency_graph.hh +++ b/milena/mln/make/region_adjacency_graph.hh @@ -97,7 +97,7 @@ namespace mln const Neighborhood<N>& nbh_, const mln_value(I)& nbasins) { - trace::entering("make::impl::generic::region_adjacency_graph"); + mln_trace("make::impl::generic::region_adjacency_graph"); internal::region_adjacency_graph_tests(wshd_, nbh_, nbasins); const I& wshd = exact(wshd_); @@ -145,7 +145,6 @@ namespace mln g.add_edge(i, j); - trace::exiting("make::impl::generic::region_adjacency_graph"); return g; } @@ -180,13 +179,12 @@ namespace mln const Neighborhood<N>& nbh, const mln_value(I)& nbasins) { - trace::entering("make::region_adjacency_graph"); + mln_trace("make::region_adjacency_graph"); internal::region_adjacency_graph_tests(wshd, nbh, nbasins); util::graph g = internal::region_adjacency_graph_dispatch(wshd, nbh, nbasins); - trace::exiting("make::region_adjacency_graph"); return g; } diff --git a/milena/mln/make/relabelfun.hh b/milena/mln/make/relabelfun.hh index bc423fb..dfc9608 100644 --- a/milena/mln/make/relabelfun.hh +++ b/milena/mln/make/relabelfun.hh @@ -84,7 +84,7 @@ namespace mln const V& nlabels, V& new_nlabels) { - trace::entering("make::relabelfun"); + mln_trace("make::relabelfun"); const F& fv2b = exact(fv2b_); @@ -95,7 +95,6 @@ namespace mln if (fv2b(i)) fi2v(i) = ++tmp_nlabels; new_nlabels = tmp_nlabels; - trace::exiting("make::relabelfun"); return fi2v; } @@ -107,7 +106,7 @@ namespace mln const V& nlabels, V& new_nlabels) { - trace::entering("make::relabelfun"); + mln_trace("make::relabelfun"); const F& fv2v = exact(fv2v_); @@ -131,7 +130,6 @@ namespace mln fi2v(i) = new_labels(fv2v(i)); } new_nlabels = tmp_nlabels; - trace::exiting("make::relabelfun"); return fi2v; } diff --git a/milena/mln/make/vertex_image.hh b/milena/mln/make/vertex_image.hh index 748094b..3bcac60 100644 --- a/milena/mln/make/vertex_image.hh +++ b/milena/mln/make/vertex_image.hh @@ -76,13 +76,12 @@ namespace mln mln::vertex_image<void,mln_result(FV),G> vertex_image(const Graph<G>& g, const Function_v2v<FV>& fv) { - trace::entering("make::vertex_image"); + mln_trace("make::vertex_image"); mln_precondition(exact(g).is_valid()); p_vertices<G> pv(g); mln::vertex_image<void,mln_result(FV),G> ima(pv, fv); - trace::exiting("make::vertex_image"); return ima; } @@ -93,14 +92,13 @@ namespace mln const Function_v2v<FP>& fp, const Function_v2v<FV>& fv) { - trace::entering("make::vertex_image"); + mln_trace("make::vertex_image"); const G& g = exact(g_); mln_precondition(g.is_valid()); p_vertices<G,FP> pv(g,fp); mln::vertex_image<mln_result(FP),mln_result(FV),G> ima(pv, fv); - trace::exiting("make::vertex_image"); return ima; } diff --git a/milena/mln/make/w_window.hh b/milena/mln/make/w_window.hh index f58cae3..25ee03c 100644 --- a/milena/mln/make/w_window.hh +++ b/milena/mln/make/w_window.hh @@ -62,7 +62,7 @@ namespace mln mln::w_window<mln_dpsite(W), mln_result(F)> w_window(const Window<W>& win_, const Function_v2v<F>& wei_) { - trace::entering("make::w_window"); + mln_trace("make::w_window"); mln_is_simple_window(W)::check(); @@ -79,7 +79,6 @@ namespace mln for_all(q) w_win.insert(wei(q), q - O); - trace::exiting("make::w_window"); return w_win; } diff --git a/milena/mln/morpho/algebraic_filter.hh b/milena/mln/morpho/algebraic_filter.hh index e7522f7..7f04342 100644 --- a/milena/mln/morpho/algebraic_filter.hh +++ b/milena/mln/morpho/algebraic_filter.hh @@ -71,7 +71,7 @@ namespace mln const typename A::result& lambda, bool increasing) { - trace::entering("morpho::opening::algebraic_filter"); + mln_trace("morpho::opening::algebraic_filter"); mln_precondition(exact(input).is_valid()); @@ -87,7 +87,6 @@ namespace mln lambda, increasing); - trace::exiting("morpho::opening::algebraic_filter"); return output; } diff --git a/milena/mln/morpho/approx/dilation.hh b/milena/mln/morpho/approx/dilation.hh index 9a4d15d..2b8c222 100644 --- a/milena/mln/morpho/approx/dilation.hh +++ b/milena/mln/morpho/approx/dilation.hh @@ -84,7 +84,7 @@ namespace mln dilation_by_distance_thresholding_2d(const Image<I>& input_, const Window< win::disk2d >& win_) { - trace::entering("morpho::approx::impl::dilation_by_distance_thresholding_2d"); + mln_trace("morpho::approx::impl::dilation_by_distance_thresholding_2d"); const I& input = exact(input_); const win::disk2d& win = exact(win_); @@ -109,7 +109,6 @@ namespace mln mln_concrete(I) output; output = duplicate((pw::value(dmap) <= pw::cst(radius)) | input.domain()); - trace::exiting("morpho::approx::impl::dilation_by_distance_thresholding_2d"); return output; } @@ -120,7 +119,7 @@ namespace mln dilation_by_distance_thresholding_3d(const Image<I>& input_, const Window< win::sphere3d >& win_) { - trace::entering("morpho::approx::impl::dilation_by_distance_thresholding_3d"); + mln_trace("morpho::approx::impl::dilation_by_distance_thresholding_3d"); const I& input = exact(input_); const win::sphere3d& win = exact(win_); @@ -151,7 +150,6 @@ namespace mln mln_concrete(I) output; output = duplicate((pw::value(dmap) <= pw::cst(radius)) | input.domain()); - trace::exiting("morpho::approx::impl::dilation_by_distance_thresholding_3d"); return output; } @@ -203,7 +201,7 @@ namespace mln mln_concrete(I) dilation(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::approx::dilation"); + mln_trace("morpho::approx::dilation"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(win).is_valid()); @@ -214,7 +212,6 @@ namespace mln if (exact(win).is_centered()) mln_postcondition(output >= input); - trace::exiting("morpho::approx::dilation"); return output; } diff --git a/milena/mln/morpho/approx/erosion.hh b/milena/mln/morpho/approx/erosion.hh index 4a87de6..a4f8543 100644 --- a/milena/mln/morpho/approx/erosion.hh +++ b/milena/mln/morpho/approx/erosion.hh @@ -71,7 +71,7 @@ namespace mln erosion_by_distance_thresholding_2d(const Image<I>& input_, const Window< win::disk2d >& win_) { - trace::entering("morpho::approx::impl::erosion_by_distance_thresholding_2d"); + mln_trace("morpho::approx::impl::erosion_by_distance_thresholding_2d"); const I& input = exact(input_); const win::disk2d& win = exact(win_); @@ -98,7 +98,6 @@ namespace mln mln_concrete(I) output; output = duplicate((pw::value(dmap) > pw::cst(radius)) | input.domain()); - trace::exiting("morpho::approx::impl::erosion_by_distance_thresholding_2d"); return output; } @@ -109,7 +108,7 @@ namespace mln erosion_by_distance_thresholding_3d(const Image<I>& input_, const Window< win::sphere3d >& win_) { - trace::entering("morpho::approx::impl::erosion_by_distance_thresholding_3d"); + mln_trace("morpho::approx::impl::erosion_by_distance_thresholding_3d"); const I& input = exact(input_); const win::sphere3d& win = exact(win_); @@ -141,7 +140,6 @@ namespace mln mln_concrete(I) output; output = duplicate((pw::value(dmap) > pw::cst(radius)) | input.domain()); - trace::exiting("morpho::approx::impl::erosion_by_distance_thresholding_3d"); return output; } @@ -193,7 +191,7 @@ namespace mln mln_concrete(I) erosion(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::approx::erosion"); + mln_trace("morpho::approx::erosion"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(win).is_valid()); @@ -204,7 +202,6 @@ namespace mln if (exact(win).is_centered()) mln_postcondition(output <= input); - trace::exiting("morpho::approx::erosion"); return output; } diff --git a/milena/mln/morpho/closing/algebraic.hh b/milena/mln/morpho/closing/algebraic.hh index ddc7bfa..efce6d2 100644 --- a/milena/mln/morpho/closing/algebraic.hh +++ b/milena/mln/morpho/closing/algebraic.hh @@ -65,7 +65,7 @@ namespace mln algebraic(const Image<I>& input, const Neighborhood<N>& nbh, const Accumulator<A>& accu, const mln_result(A)& lambda) { - trace::entering("morpho::closing::algebraic"); + mln_trace("morpho::closing::algebraic"); mln_precondition(exact(input).is_valid()); mln_precondition(mlc_not_equal(mln_trait_accumulator_when_pix(A), @@ -77,7 +77,6 @@ namespace mln mln_postcondition(output >= input); - trace::exiting("morpho::closing::algebraic"); return output; } diff --git a/milena/mln/morpho/closing/approx/structural.hh b/milena/mln/morpho/closing/approx/structural.hh index d3eea54..7c6971b 100644 --- a/milena/mln/morpho/closing/approx/structural.hh +++ b/milena/mln/morpho/closing/approx/structural.hh @@ -64,7 +64,7 @@ namespace mln mln_concrete(I) structural(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::closing::approx::structural"); + mln_trace("morpho::closing::approx::structural"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); @@ -78,7 +78,6 @@ namespace mln mln_postcondition(output >= input); - trace::exiting("morpho::closing::approx::structural"); return output; } diff --git a/milena/mln/morpho/closing/area.hh b/milena/mln/morpho/closing/area.hh index 45cad24..a718204 100644 --- a/milena/mln/morpho/closing/area.hh +++ b/milena/mln/morpho/closing/area.hh @@ -62,14 +62,13 @@ namespace mln area(const Image<I>& input, const Neighborhood<N>& nbh, unsigned lambda) { - trace::entering("morpho::closing::area"); + mln_trace("morpho::closing::area"); mln_precondition(exact(input).is_valid()); mln_concrete(I) output; output = closing::algebraic(input, nbh, attribute::card<I>(), lambda); - trace::exiting("morpho::closing::area"); return output; } diff --git a/milena/mln/morpho/closing/area_on_vertices.hh b/milena/mln/morpho/closing/area_on_vertices.hh index c839285..2cafae0 100644 --- a/milena/mln/morpho/closing/area_on_vertices.hh +++ b/milena/mln/morpho/closing/area_on_vertices.hh @@ -73,7 +73,7 @@ namespace mln const Neighborhood<N>& nbh, unsigned lambda) { - trace::entering("morpho::closing::area_on_vertices"); + mln_trace("morpho::closing::area_on_vertices"); mln_precondition(exact(input).is_valid()); typedef attribute::count_adjacent_vertices< edge_image<P,V,G> > attribute_t; @@ -81,7 +81,6 @@ namespace mln edge_image<P,V,G> output = closing::algebraic(input, nbh, attribute_t(), lambda); - trace::exiting("morpho::closing::area_on_vertices"); return output; } diff --git a/milena/mln/morpho/closing/height.hh b/milena/mln/morpho/closing/height.hh index f9e930b..ffb7076 100644 --- a/milena/mln/morpho/closing/height.hh +++ b/milena/mln/morpho/closing/height.hh @@ -63,14 +63,13 @@ namespace mln height(const Image<I>& input, const Neighborhood<N>& nbh, unsigned lambda) { - trace::entering("morpho::closing::height"); + mln_trace("morpho::closing::height"); mln_precondition(exact(input).is_valid()); mln_concrete(I) output; output = closing::leveling(input, nbh, attribute::height<I>(), lambda); - trace::exiting("morpho::closing::height"); return output; } diff --git a/milena/mln/morpho/closing/leveling.hh b/milena/mln/morpho/closing/leveling.hh index 93a9752..9ed750c 100644 --- a/milena/mln/morpho/closing/leveling.hh +++ b/milena/mln/morpho/closing/leveling.hh @@ -65,7 +65,7 @@ namespace mln leveling(const Image<I>& input, const Neighborhood<N>& nbh, const Accumulator<A>& accu, const mln_result(A)& lambda) { - trace::entering("morpho::closing::leveling"); + mln_trace("morpho::closing::leveling"); mln_precondition(exact(input).is_valid()); mln_precondition(mlc_not_equal(mln_trait_accumulator_when_pix(A), @@ -77,7 +77,6 @@ namespace mln mln_postcondition(output >= input); - trace::exiting("morpho::closing::leveling"); return output; } diff --git a/milena/mln/morpho/closing/structural.hh b/milena/mln/morpho/closing/structural.hh index 76b2039..0131a49 100644 --- a/milena/mln/morpho/closing/structural.hh +++ b/milena/mln/morpho/closing/structural.hh @@ -63,7 +63,7 @@ namespace mln mln_concrete(I) structural(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::closing::structural"); + mln_trace("morpho::closing::structural"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); @@ -72,7 +72,6 @@ namespace mln mln_postcondition(output >= input); - trace::exiting("morpho::closing::structural"); return output; } diff --git a/milena/mln/morpho/closing/sum.hh b/milena/mln/morpho/closing/sum.hh index c9ceadf..b226cc1 100644 --- a/milena/mln/morpho/closing/sum.hh +++ b/milena/mln/morpho/closing/sum.hh @@ -62,14 +62,13 @@ namespace mln sum(const Image<I>& input, const Neighborhood<N>& nbh, unsigned lambda) { - trace::entering("morpho::closing::sum"); + mln_trace("morpho::closing::sum"); mln_precondition(exact(input).is_valid()); mln_concrete(I) output; output = closing::leveling(input, nbh, attribute::sum<I, float>(), lambda); - trace::exiting("morpho::closing::sum"); return output; } diff --git a/milena/mln/morpho/closing/volume.hh b/milena/mln/morpho/closing/volume.hh index d471483..03a0593 100644 --- a/milena/mln/morpho/closing/volume.hh +++ b/milena/mln/morpho/closing/volume.hh @@ -62,14 +62,13 @@ namespace mln volume(const Image<I>& input, const Neighborhood<N>& nbh, unsigned lambda) { - trace::entering("morpho::closing::volume"); + mln_trace("morpho::closing::volume"); mln_precondition(exact(input).is_valid()); mln_concrete(I) output; output = closing::leveling(input, nbh, attribute::volume<I>(), lambda); - trace::exiting("morpho::closing::volume"); return output; } diff --git a/milena/mln/morpho/complementation.hh b/milena/mln/morpho/complementation.hh index bb4548b..f447ea2 100644 --- a/milena/mln/morpho/complementation.hh +++ b/milena/mln/morpho/complementation.hh @@ -120,13 +120,12 @@ namespace mln inline mln_concrete(I) complementation(const Image<I>& input) { - trace::entering("morpho::complementation"); + mln_trace("morpho::complementation"); mln_precondition(exact(input).is_valid()); mln_concrete(I) output = impl::complementation_(mln_trait_image_kind(I)(), input); - trace::exiting("morpho::complementation"); return output; } @@ -134,13 +133,12 @@ namespace mln inline void complementation_inplace(Image<I>& input) { - trace::entering("morpho::complementation_inplace"); + mln_trace("morpho::complementation_inplace"); mln_precondition(exact(input).is_valid()); impl::complementation_inplace_(mln_trait_image_kind(I)(), input); - trace::exiting("morpho::complementation_inplace"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/morpho/contrast.hh b/milena/mln/morpho/contrast.hh index e2fd47e..1ed1873 100644 --- a/milena/mln/morpho/contrast.hh +++ b/milena/mln/morpho/contrast.hh @@ -59,7 +59,7 @@ namespace mln inline mln_concrete(I) contrast(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::contrast"); + mln_trace("morpho::contrast"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); @@ -68,7 +68,6 @@ namespace mln top_hat_white(input, win) - top_hat_black(input, win), fun::v2v::saturate<mln_value(I)>() ); - trace::exiting("morpho::contrast"); return output; } diff --git a/milena/mln/morpho/dilation.hh b/milena/mln/morpho/dilation.hh index 25b3cbb..c741c3d 100644 --- a/milena/mln/morpho/dilation.hh +++ b/milena/mln/morpho/dilation.hh @@ -98,7 +98,7 @@ namespace mln general_on_set_centered(const dilation_op&, const Image<I>& input_, const Window<W>& win_) { - trace::entering("morpho::impl::general_on_set_centered__dilation"); + mln_trace("morpho::impl::general_on_set_centered__dilation"); typedef mln_concrete(I) O; const I& input = exact(input_); @@ -120,7 +120,6 @@ namespace mln break; } - trace::exiting("morpho::impl::general_on_set_centered__dilation"); return output; } @@ -130,7 +129,7 @@ namespace mln general_on_set_centered_fastest(const dilation_op&, const Image<I>& input_, const Window<W>& win_) { - trace::entering("morpho::impl::general_on_set_centered_fastest__dilation"); + mln_trace("morpho::impl::general_on_set_centered_fastest__dilation"); typedef mln_concrete(I) O; const I& input = exact(input_); @@ -153,7 +152,6 @@ namespace mln break; } - trace::exiting("morpho::impl::general_on_set_centered_fastest__dilation"); return output; } @@ -165,7 +163,7 @@ namespace mln mln_concrete(I) dilation(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::dilation"); + mln_trace("morpho::dilation"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); @@ -174,7 +172,6 @@ namespace mln if (exact(win).is_centered()) mln_postcondition(output >= input); - trace::exiting("morpho::dilation"); return output; } diff --git a/milena/mln/morpho/elementary/closing.hh b/milena/mln/morpho/elementary/closing.hh index 5dcdbbb..c151c0b 100644 --- a/milena/mln/morpho/elementary/closing.hh +++ b/milena/mln/morpho/elementary/closing.hh @@ -57,7 +57,7 @@ namespace mln inline mln_concrete(I) closing(const Image<I>& input, const Neighborhood<N>& nbh) { - trace::entering("morpho::elementary::closing"); + mln_trace("morpho::elementary::closing"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -66,7 +66,6 @@ namespace mln mln_postcondition(output >= input); - trace::exiting("morpho::elementary::closing"); return output; } diff --git a/milena/mln/morpho/elementary/dilation.hh b/milena/mln/morpho/elementary/dilation.hh index ed5bbc0..0ab99ea 100644 --- a/milena/mln/morpho/elementary/dilation.hh +++ b/milena/mln/morpho/elementary/dilation.hh @@ -95,7 +95,7 @@ namespace mln mln_concrete(I) dilation(const Image<I>& input, const Neighborhood<N>& nbh) { - trace::entering("morpho::elementary::dilation"); + mln_trace("morpho::elementary::dilation"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -103,7 +103,6 @@ namespace mln mln_concrete(I) output = internal::dilation_dispatch(input, nbh); mln_postcondition(output >= input); - trace::exiting("morpho::elementary::dilation"); return output; } diff --git a/milena/mln/morpho/elementary/erosion.hh b/milena/mln/morpho/elementary/erosion.hh index 8a94e0f..210bd6e 100644 --- a/milena/mln/morpho/elementary/erosion.hh +++ b/milena/mln/morpho/elementary/erosion.hh @@ -95,7 +95,7 @@ namespace mln mln_concrete(I) erosion(const Image<I>& input, const Neighborhood<N>& nbh) { - trace::entering("morpho::elementary::erosion"); + mln_trace("morpho::elementary::erosion"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -103,7 +103,6 @@ namespace mln mln_concrete(I) output = internal::erosion_dispatch(input, nbh); mln_postcondition(output <= input); - trace::exiting("morpho::elementary::erosion"); return output; } diff --git a/milena/mln/morpho/elementary/gradient.hh b/milena/mln/morpho/elementary/gradient.hh index ff1b3a0..b5f8147 100644 --- a/milena/mln/morpho/elementary/gradient.hh +++ b/milena/mln/morpho/elementary/gradient.hh @@ -74,7 +74,7 @@ namespace mln mln_concrete(I) gradient_on_function(const Image<I>& input_, const Neighborhood<N>& nbh_) { - trace::entering("morpho::elementary::impl::gradient_on_function"); + mln_trace("morpho::elementary::impl::gradient_on_function"); const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -97,7 +97,6 @@ namespace mln output(p) = a.second() - a.first(); } - trace::exiting("morpho::elementary::impl::gradient_on_function"); return output; } @@ -105,7 +104,7 @@ namespace mln mln_concrete(I) gradient_on_set(const Image<I>& input_, const Neighborhood<N>& nbh_) { - trace::entering("morpho::elementary::impl::gradient_on_set"); + mln_trace("morpho::elementary::impl::gradient_on_set"); const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -139,7 +138,6 @@ namespace mln } } - trace::exiting("morpho::elementary::impl::gradient_on_set"); return output; } @@ -148,7 +146,7 @@ namespace mln mln_concrete(I) gradient_on_function_fastest(const Image<I>& input_, const Neighborhood<N>& nbh_) { - trace::entering("morpho::elementary::impl::gradient_on_function_fastest"); + mln_trace("morpho::elementary::impl::gradient_on_function_fastest"); const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -172,7 +170,6 @@ namespace mln p_out.val() = a.second() - a.first(); } - trace::exiting("morpho::elementary::impl::gradient_on_function_fastest"); return output; } @@ -240,12 +237,11 @@ namespace mln mln_concrete(I) gradient(const Image<I>& input, const Neighborhood<N>& nbh) { - trace::entering("morpho::elementary::gradient"); + mln_trace("morpho::elementary::gradient"); internal::gradient_tests(input, nbh); mln_concrete(I) output = internal::gradient_dispatch(input, nbh); - trace::exiting("morpho::elementary::gradient"); return output; } diff --git a/milena/mln/morpho/elementary/gradient_external.hh b/milena/mln/morpho/elementary/gradient_external.hh index 1b25f2c..7e2a0c1 100644 --- a/milena/mln/morpho/elementary/gradient_external.hh +++ b/milena/mln/morpho/elementary/gradient_external.hh @@ -106,14 +106,13 @@ namespace mln mln_concrete(I) gradient_external(const Image<I>& input, const Neighborhood<N>& nbh) { - trace::entering("morpho::elementary::gradient_external"); + mln_trace("morpho::elementary::gradient_external"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); mln_concrete(I) output = internal::gradient_external_dispatch(input, nbh); - trace::exiting("morpho::elementary::gradient_external"); return output; } diff --git a/milena/mln/morpho/elementary/gradient_internal.hh b/milena/mln/morpho/elementary/gradient_internal.hh index 4a565a7..f8783fb 100644 --- a/milena/mln/morpho/elementary/gradient_internal.hh +++ b/milena/mln/morpho/elementary/gradient_internal.hh @@ -106,7 +106,7 @@ namespace mln mln_concrete(I) gradient_internal(const Image<I>& input, const Neighborhood<N>& nbh) { - trace::entering("morpho::elementary::gradient_internal"); + mln_trace("morpho::elementary::gradient_internal"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -114,7 +114,6 @@ namespace mln mln_concrete(I) output = internal::gradient_internal_dispatch(input, nbh); mln_postcondition(output <= input); - trace::exiting("morpho::elementary::gradient_internal"); return output; } diff --git a/milena/mln/morpho/elementary/laplacian.hh b/milena/mln/morpho/elementary/laplacian.hh index f878dc7..ea80c9d 100644 --- a/milena/mln/morpho/elementary/laplacian.hh +++ b/milena/mln/morpho/elementary/laplacian.hh @@ -60,7 +60,7 @@ namespace mln mln_trait_op_minus_twice(mln_concrete(I)) laplacian(const Image<I>& input, const Neighborhood<N>& nbh) { - trace::entering("morpho::elementary::laplacian"); + mln_trace("morpho::elementary::laplacian"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -68,7 +68,6 @@ namespace mln mln_trait_op_minus_twice(mln_concrete(I)) output; output = gradient_external(input, nbh) - gradient_internal(input, nbh); - trace::exiting("morpho::elementary::laplacian"); return output; } diff --git a/milena/mln/morpho/elementary/like_ero_fun.hh b/milena/mln/morpho/elementary/like_ero_fun.hh index 77136c5..61c8a82 100644 --- a/milena/mln/morpho/elementary/like_ero_fun.hh +++ b/milena/mln/morpho/elementary/like_ero_fun.hh @@ -80,7 +80,7 @@ namespace mln like_ero_fun(const Meta_Accumulator<A>& a_, const F& f, const Image<I>& input_, const Neighborhood<N>& nbh_) { - trace::entering("morpho::elementary::impl::generic::like_ero_fun"); + mln_trace("morpho::elementary::impl::generic::like_ero_fun"); const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -101,7 +101,6 @@ namespace mln output(p) = f(input(p), a); } - trace::exiting("morpho::elementary::impl::generic::like_ero_fun"); return output; } @@ -114,7 +113,7 @@ namespace mln like_ero_fun_fastest(const Meta_Accumulator<A>& a_, const F& f, const Image<I>& input_, const Neighborhood<N>& nbh_) { - trace::entering("morpho::elementary::impl::like_ero_fun_fastest"); + mln_trace("morpho::elementary::impl::like_ero_fun_fastest"); const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -136,7 +135,6 @@ namespace mln p_out.val() = f(p_in.val(), a); } - trace::exiting("morpho::elementary::impl::like_ero_fun_fastest"); return output; } diff --git a/milena/mln/morpho/elementary/like_ero_set.hh b/milena/mln/morpho/elementary/like_ero_set.hh index aaa8bbb..85cfc71 100644 --- a/milena/mln/morpho/elementary/like_ero_set.hh +++ b/milena/mln/morpho/elementary/like_ero_set.hh @@ -61,7 +61,7 @@ namespace mln like_ero_set(bool val[5], const Image<I>& input_, const Neighborhood<N>& nbh_) { - trace::entering("morpho::elementary::impl::generic::like_ero_set"); + mln_trace("morpho::elementary::impl::generic::like_ero_set"); bool ext_value = val[0], @@ -92,7 +92,6 @@ namespace mln if (input.has(n) && input(n) == on_input_n) output(p) = output_p; - trace::exiting("morpho::elementary::impl::generic::like_ero_set"); return output; } @@ -104,7 +103,7 @@ namespace mln like_ero_set_fastest(bool val[5], const Image<I>& input_, const Neighborhood<N>& nbh_) { - trace::entering("morpho::elementary::impl::like_ero_set_fastest"); + mln_trace("morpho::elementary::impl::like_ero_set_fastest"); bool ext_value = val[0], @@ -136,7 +135,6 @@ namespace mln if (n.val() == on_input_n) p_out.val() = output_p; - trace::exiting("morpho::elementary::impl::like_ero_set_fastest"); return output; } diff --git a/milena/mln/morpho/elementary/opening.hh b/milena/mln/morpho/elementary/opening.hh index d8acca1..a632931 100644 --- a/milena/mln/morpho/elementary/opening.hh +++ b/milena/mln/morpho/elementary/opening.hh @@ -57,7 +57,7 @@ namespace mln inline mln_concrete(I) opening(const Image<I>& input, const Neighborhood<N>& nbh) { - trace::entering("morpho::elementary::opening"); + mln_trace("morpho::elementary::opening"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -66,7 +66,6 @@ namespace mln mln_postcondition(output <= input); - trace::exiting("morpho::elementary::opening"); return output; } diff --git a/milena/mln/morpho/elementary/top_hat.hh b/milena/mln/morpho/elementary/top_hat.hh index ce9bc4a..d14f10f 100644 --- a/milena/mln/morpho/elementary/top_hat.hh +++ b/milena/mln/morpho/elementary/top_hat.hh @@ -84,7 +84,7 @@ namespace mln mln_concrete(I) top_hat_white(const Image<I>& input, const Neighborhood<N>& nbh) { - trace::entering("morpho::elementary::top_hat_white"); + mln_trace("morpho::elementary::top_hat_white"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -94,7 +94,6 @@ namespace mln mln_postcondition(test::positive(output)); - trace::exiting("morpho::elementary::top_hat_white"); return output; } @@ -104,7 +103,7 @@ namespace mln mln_concrete(I) top_hat_black(const Image<I>& input, const Neighborhood<N>& nbh) { - trace::entering("morpho::elementary::top_hat_black"); + mln_trace("morpho::elementary::top_hat_black"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -114,7 +113,6 @@ namespace mln mln_postcondition(test::positive(output)); - trace::exiting("morpho::elementary::top_hat_black"); return output; } @@ -124,7 +122,7 @@ namespace mln mln_concrete(I) top_hat_self_complementary(const Image<I>& input, const Neighborhood<N>& nbh) { - trace::entering("morpho::elementary::top_hat_self_complementary"); + mln_trace("morpho::elementary::top_hat_self_complementary"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -134,7 +132,6 @@ namespace mln mln_postcondition(test::positive(output)); // mln_postcondition(output == white + black); - trace::exiting("morpho::elementary::top_hat_self_complementary"); return output; } diff --git a/milena/mln/morpho/erosion.hh b/milena/mln/morpho/erosion.hh index 111a350..41ac515 100644 --- a/milena/mln/morpho/erosion.hh +++ b/milena/mln/morpho/erosion.hh @@ -97,7 +97,7 @@ namespace mln general_on_set_centered(const erosion_op&, const Image<I>& input_, const Window<W>& win_) { - trace::entering("morpho::impl::general_on_set_centered__erosion"); + mln_trace("morpho::impl::general_on_set_centered__erosion"); typedef mln_concrete(I) O; const I& input = exact(input_); @@ -119,7 +119,6 @@ namespace mln break; } - trace::exiting("morpho::impl::general_on_set_centered__erosion"); return output; } @@ -129,7 +128,7 @@ namespace mln general_on_set_centered_fastest(const erosion_op&, const Image<I>& input_, const Window<W>& win_) { - trace::entering("morpho::impl::general_on_set_centered_fastest__erosion"); + mln_trace("morpho::impl::general_on_set_centered_fastest__erosion"); typedef mln_concrete(I) O; const I& input = exact(input_); @@ -152,7 +151,6 @@ namespace mln break; } - trace::exiting("morpho::impl::general_on_set_centered_fastest__erosion"); return output; } @@ -165,7 +163,7 @@ namespace mln mln_concrete(I) erosion(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::erosion"); + mln_trace("morpho::erosion"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); @@ -174,7 +172,6 @@ namespace mln if (exact(win).is_centered()) mln_postcondition(output <= input); - trace::exiting("morpho::erosion"); return output; } diff --git a/milena/mln/morpho/general.hh b/milena/mln/morpho/general.hh index 8339fdf..cff061a 100644 --- a/milena/mln/morpho/general.hh +++ b/milena/mln/morpho/general.hh @@ -123,7 +123,7 @@ namespace mln mln_concrete(I) general_on_function(const Op& op, const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::impl::generic::general_on_function"); + mln_trace("morpho::impl::generic::general_on_function"); internal::general_tests(op, input, win); @@ -131,7 +131,6 @@ namespace mln mln_concrete(I) output; output = accu::transform(input, op.accu(input), win); - trace::exiting("morpho::impl::generic::general_on_function"); return output; } @@ -142,7 +141,7 @@ namespace mln mln_concrete(I) general_on_set(const Op& op, const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::impl::generic::general_on_set"); + mln_trace("morpho::impl::generic::general_on_set"); internal::general_tests(op, input, win); @@ -150,7 +149,6 @@ namespace mln mln_concrete(I) output; output = accu::transform_stop(input, op.accu(input), win); - trace::exiting("morpho::impl::generic::general_on_set"); return output; } @@ -167,14 +165,13 @@ namespace mln mln_concrete(I) general(const Op& op, const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::general"); + mln_trace("morpho::general"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); internal::general_tests(op, input, win); mln_concrete(I) output = internal::general_dispatch(op, input, win); - trace::exiting("morpho::general"); return output; } diff --git a/milena/mln/morpho/general.spe.hh b/milena/mln/morpho/general.spe.hh index 77c4de9..00376ae 100644 --- a/milena/mln/morpho/general.spe.hh +++ b/milena/mln/morpho/general.spe.hh @@ -121,7 +121,7 @@ namespace mln mln_concrete(I) general_line_on_function(const Op& op, const Image<I>& input_, const win::line<G,Dir,C>& win) { - trace::entering("morpho::impl::general_line"); + mln_trace("morpho::impl::general_line"); typedef mln_site(I) P; enum { dim = P::dim }; @@ -160,7 +160,6 @@ namespace mln } while (p != pmin); - trace::exiting("morpho::impl::general_line"); return output; } @@ -175,7 +174,7 @@ namespace mln mln_concrete(I) general_rectangle2d(const Op& op, const Image<I>& input_, const win::rectangle2d& win) { - trace::entering("morpho::impl::general_rectangle2d"); + mln_trace("morpho::impl::general_rectangle2d"); const I& input = exact(input_); @@ -183,7 +182,6 @@ namespace mln temp = morpho::general(op, input, win::hline2d(win.width())); output = morpho::general(op, temp, win::vline2d(win.height())); - trace::exiting("morpho::impl::general_rectangle2d"); return output; } @@ -193,7 +191,7 @@ namespace mln mln_concrete(I) general_octagon2d(const Op& op, const Image<I>& input_, const win::octagon2d& win) { - trace::entering("morpho::impl::general_octagon2d"); + mln_trace("morpho::impl::general_octagon2d"); const I& input = exact(input_); @@ -205,7 +203,6 @@ namespace mln output = morpho::general(op, output, win::diag2d(len)); output = morpho::general(op, output, win::backdiag2d(len)); - trace::exiting("morpho::impl::general_(win::octagon2d)"); return output; } @@ -215,13 +212,12 @@ namespace mln mln_concrete(I) general_arbitrary_2d(const Op& op, const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::impl:general_arbitrary_2d"); + mln_trace("morpho::impl:general_arbitrary_2d"); extension::adjust_fill(input, geom::delta(win) + 1, op.neutral(input)); mln_concrete(I) output; output = accu::transform_snake(op.accu_incr(input), input, win); - trace::exiting("morpho::impl:general_arbitrary_2d"); return output; } @@ -231,13 +227,12 @@ namespace mln mln_concrete(I) general_directional(const Op& op, const Image<I>& input, const Window<W>& win, unsigned dir) { - trace::entering("morpho::impl:general_directional"); + mln_trace("morpho::impl:general_directional"); extension::adjust_fill(input, geom::delta(win) + 1, op.neutral(input)); mln_concrete(I) output; output = accu::transform_directional(op.accu_incr(input), input, win, dir); - trace::exiting("morpho::impl:general_directional"); return output; } @@ -247,7 +242,7 @@ namespace mln mln_concrete(I) general_line(const Op& op, const Image<I>& input, const Window<W>& win_) { - trace::entering("morpho::impl:general_line"); + mln_trace("morpho::impl:general_line"); const W& win = exact(win_); @@ -257,7 +252,6 @@ namespace mln output = accu::transform_line(op.accu_incr(input), input, win.length(), win.dir); - trace::exiting("morpho::impl:general_line"); return output; } @@ -267,13 +261,12 @@ namespace mln mln_concrete(I) general_diagonal_2d(const Op& op, const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::impl:general_diagonal_2d"); + mln_trace("morpho::impl:general_diagonal_2d"); extension::adjust_fill(input, geom::delta(win) + 1, op.neutral(input)); mln_concrete(I) output; output = accu::transform_diagonal(op.accu_incr(input), input, win); - trace::exiting("morpho::impl:general_diagonal_2d"); return output; } diff --git a/milena/mln/morpho/gradient.hh b/milena/mln/morpho/gradient.hh index c54cf62..06f1ae4 100644 --- a/milena/mln/morpho/gradient.hh +++ b/milena/mln/morpho/gradient.hh @@ -85,7 +85,7 @@ namespace mln inline mln_concrete(I) gradient(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::gradient"); + mln_trace("morpho::gradient"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); @@ -93,7 +93,6 @@ namespace mln erosion(input, win)); mln_postcondition(test::positive(output)); - trace::exiting("morpho::gradient"); return output; } @@ -102,7 +101,7 @@ namespace mln inline mln_concrete(I) gradient_internal(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::gradient_internal"); + mln_trace("morpho::gradient_internal"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); @@ -110,7 +109,6 @@ namespace mln erosion(input, win)); mln_postcondition(test::positive(output)); - trace::exiting("morpho::gradient_internal"); return output; } @@ -119,7 +117,7 @@ namespace mln inline mln_concrete(I) gradient_external(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::gradient_external"); + mln_trace("morpho::gradient_external"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); @@ -127,7 +125,6 @@ namespace mln input); mln_postcondition(test::positive(output)); - trace::exiting("morpho::gradient_external"); return output; } diff --git a/milena/mln/morpho/hit_or_miss.hh b/milena/mln/morpho/hit_or_miss.hh index 2910ab1..657d223 100644 --- a/milena/mln/morpho/hit_or_miss.hh +++ b/milena/mln/morpho/hit_or_miss.hh @@ -153,14 +153,13 @@ namespace mln const Window<Wh>& win_hit, const Window<Wm>& win_miss) { - trace::entering("morpho::impl::hit_or_miss_logic"); + mln_trace("morpho::impl::hit_or_miss_logic"); internal::hit_or_miss_tests(input, win_hit, win_miss); mln_concrete(I) output = logical::and_(erosion(input, win_hit), erosion(complementation(input), win_miss)); - trace::exiting("morpho::impl::hit_or_miss_logic"); return output; } @@ -178,7 +177,7 @@ namespace mln const Window<Wh>& win_hit_, const Window<Wm>& win_miss_) { - trace::entering("morpho::impl::generic::hit_or_miss"); + mln_trace("morpho::impl::generic::hit_or_miss"); internal::hit_or_miss_tests(input_, win_hit_, win_miss_); const I& input = exact(input_); @@ -229,7 +228,6 @@ namespace mln pw::cst(zero_V))); } - trace::exiting("morpho::impl::generic::hit_or_miss"); return output; } @@ -287,13 +285,12 @@ namespace mln const Window<Wh>& win_hit, const Window<Wm>& win_miss) { - trace::entering("morpho::hit_or_miss"); + mln_trace("morpho::hit_or_miss"); internal::hit_or_miss_tests(input, win_hit, win_miss); mln_concrete(I) output = internal::hit_or_miss_dispatch(input, win_hit, win_miss); - trace::exiting("morpho::hit_or_miss"); return output; } @@ -305,7 +302,7 @@ namespace mln const Window<Wh>& win_hit, const Window<Wm>& win_miss) { - trace::entering("morpho::hit_or_miss_opening"); + mln_trace("morpho::hit_or_miss_opening"); internal::hit_or_miss_tests(input, win_hit, win_miss); mln_concrete(I) output = dilation(internal::hit_or_miss_dispatch(input, @@ -313,7 +310,6 @@ namespace mln win_miss), win::sym(win_hit)); - trace::exiting("morpho::hit_or_miss_opening"); return output; } @@ -325,7 +321,7 @@ namespace mln const Window<Wh>& win_hit, const Window<Wm>& win_miss) { - trace::entering("morpho::hit_or_miss_background_opening"); + mln_trace("morpho::hit_or_miss_background_opening"); internal::hit_or_miss_tests(input, win_hit, win_miss); mln_concrete(I) output = hit_or_miss_opening(complementation(input), @@ -336,7 +332,6 @@ namespace mln win_hit, win_miss), win::sym(win_miss)) == output); - trace::exiting("morpho::hit_or_miss_background_opening"); return output; } @@ -348,7 +343,7 @@ namespace mln const Window<Wh>& win_hit, const Window<Wm>& win_miss) { - trace::entering("morpho::hit_or_miss_closing"); + mln_trace("morpho::hit_or_miss_closing"); internal::hit_or_miss_tests(input, win_hit, win_miss); mln_concrete(I) output = @@ -356,7 +351,6 @@ namespace mln win_hit, win_miss)); // FIXME: Postcondition. - trace::exiting("morpho::hit_or_miss_closing"); return output; } @@ -368,7 +362,7 @@ namespace mln const Window<Wh>& win_hit, const Window<Wm>& win_miss) { - trace::entering("morpho::hit_or_miss_background_closing"); + mln_trace("morpho::hit_or_miss_background_closing"); internal::hit_or_miss_tests(input, win_hit, win_miss); mln_concrete(I) output = hit_or_miss_closing(input, win_miss, win_hit); @@ -376,7 +370,6 @@ namespace mln mln_postcondition(complementation(hit_or_miss_background_opening( complementation(input), win_hit, win_miss)) == output); - trace::exiting("morpho::hit_or_miss_background_closing"); return output; } diff --git a/milena/mln/morpho/laplacian.hh b/milena/mln/morpho/laplacian.hh index 8bc43e3..0bccbb5 100644 --- a/milena/mln/morpho/laplacian.hh +++ b/milena/mln/morpho/laplacian.hh @@ -68,7 +68,7 @@ namespace mln inline void laplacian(const Image<I>& input, const Window<W>& win, Image<O>& output) { - trace::entering("morpho::laplacian"); + mln_trace("morpho::laplacian"); mln_precondition(exact(output).domain() == exact(input).domain()); mln_precondition(! exact(win).is_empty()); @@ -77,7 +77,6 @@ namespace mln e_I = morpho::minus(input, erosion(input, win)); data::fill(output, d_I - e_I); - trace::exiting("morpho::laplacian"); } template <typename I, typename W> @@ -85,7 +84,7 @@ namespace mln mln_trait_op_minus_twice(mln_concrete(I)) laplacian(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::laplacian"); + mln_trace("morpho::laplacian"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); @@ -93,7 +92,6 @@ namespace mln initialize(output, input); laplacian(input, win, output); // Calls previous version. - trace::exiting("morpho::laplacian"); return output; } diff --git a/milena/mln/morpho/leveling_filter.hh b/milena/mln/morpho/leveling_filter.hh index e10090c..5d77bfe 100644 --- a/milena/mln/morpho/leveling_filter.hh +++ b/milena/mln/morpho/leveling_filter.hh @@ -73,7 +73,7 @@ namespace mln const typename A::result& lambda, bool increasing) { - trace::entering("morpho::leveling_filter"); + mln_trace("morpho::leveling_filter"); mln_precondition(exact(input).is_valid()); @@ -85,7 +85,6 @@ namespace mln mln_concrete(I) output; output = canvas::morpho::attribute_filter(input, nbh, a, lambda, increasing); - trace::exiting("morpho::leveling_filter"); return output; } diff --git a/milena/mln/morpho/line_gradient.hh b/milena/mln/morpho/line_gradient.hh index 40f89c2..2ee1f09 100644 --- a/milena/mln/morpho/line_gradient.hh +++ b/milena/mln/morpho/line_gradient.hh @@ -73,7 +73,7 @@ namespace mln edge_image<util::site_pair<point2d>, V, util::graph> line_gradient(const mln::image2d<V>& ima) { - trace::entering("morpho::line_gradient"); + mln_trace("morpho::line_gradient"); mln_precondition(ima.is_valid()); // FIXME: Precondition: Ensure the image is scalar. @@ -115,7 +115,6 @@ namespace mln edge_image<util::site_pair<point2d>, V, util::graph> lg_ima(g, edge_sites, edge_values); - trace::exiting("morpho::line_gradient"); return lg_ima; } diff --git a/milena/mln/morpho/meyer_wst.hh b/milena/mln/morpho/meyer_wst.hh index d616755..cf24b2e 100644 --- a/milena/mln/morpho/meyer_wst.hh +++ b/milena/mln/morpho/meyer_wst.hh @@ -115,7 +115,7 @@ namespace mln meyer_wst(const Image<I>& input_, const Neighborhood<N>& nbh_, L& nbasins) { - trace::entering("morpho::meyer_wst"); + mln_trace("morpho::meyer_wst"); /* FIXME: Ensure the input image has scalar values. */ const I input = exact(input_); @@ -200,7 +200,6 @@ namespace mln } } } - trace::exiting("morpho::meyer_wst"); return output; } diff --git a/milena/mln/morpho/min.hh b/milena/mln/morpho/min.hh index 1fcd232..77f3d5f 100644 --- a/milena/mln/morpho/min.hh +++ b/milena/mln/morpho/min.hh @@ -116,12 +116,11 @@ namespace mln mln_concrete(I) min(const Image<I>& lhs, const Image<J>& rhs) { - trace::entering("morpho::min"); + mln_trace("morpho::min"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); mln_concrete(I) output = impl::min_(mln_trait_image_kind(I)(), exact(lhs), exact(rhs)); - trace::exiting("morpho::min"); return output; } @@ -129,12 +128,11 @@ namespace mln inline void min_inplace(Image<I>& lhs, const Image<J>& rhs) { - trace::entering("morpho::min_inplace"); + mln_trace("morpho::min_inplace"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); impl::min_inplace_(mln_trait_image_kind(I)(), exact(lhs), exact(rhs)); - trace::exiting("morpho::min_inplace_"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/morpho/minus.hh b/milena/mln/morpho/minus.hh index ff6c13b..fe8088e 100644 --- a/milena/mln/morpho/minus.hh +++ b/milena/mln/morpho/minus.hh @@ -90,13 +90,12 @@ namespace mln mln_concrete(I) minus(const Image<I>& lhs, const Image<J>& rhs) { - trace::entering("morpho::minus"); + mln_trace("morpho::minus"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); mln_concrete(I) output = impl::minus_(mln_trait_image_kind(I)(), exact(lhs), exact(rhs)); - trace::exiting("morpho::minus"); return output; } diff --git a/milena/mln/morpho/opening/algebraic.hh b/milena/mln/morpho/opening/algebraic.hh index 9eb8973..20c6c83 100644 --- a/milena/mln/morpho/opening/algebraic.hh +++ b/milena/mln/morpho/opening/algebraic.hh @@ -63,7 +63,7 @@ namespace mln algebraic(const Image<I>& input, const Neighborhood<N>& nbh, const Accumulator<A>& accu, const mln_result(A)& lambda) { - trace::entering("morpho::opening::algebraic"); + mln_trace("morpho::opening::algebraic"); mln_precondition(exact(input).is_valid()); mln_precondition(mlc_not_equal(mln_trait_accumulator_when_pix(A), @@ -75,7 +75,6 @@ namespace mln mln_postcondition(output <= input); - trace::exiting("morpho::opening::algebraic"); return output; } diff --git a/milena/mln/morpho/opening/approx/structural.hh b/milena/mln/morpho/opening/approx/structural.hh index 87f6bc1..96a5c46 100644 --- a/milena/mln/morpho/opening/approx/structural.hh +++ b/milena/mln/morpho/opening/approx/structural.hh @@ -67,7 +67,7 @@ namespace mln mln_concrete(I) structural(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::opening::approx::structural"); + mln_trace("morpho::opening::approx::structural"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); @@ -81,7 +81,6 @@ namespace mln mln_postcondition(output <= input); - trace::exiting("morpho::opening::approx::structural"); return output; } diff --git a/milena/mln/morpho/opening/area.hh b/milena/mln/morpho/opening/area.hh index 848727e..526ccc9 100644 --- a/milena/mln/morpho/opening/area.hh +++ b/milena/mln/morpho/opening/area.hh @@ -62,14 +62,13 @@ namespace mln area(const Image<I>& input, const Neighborhood<N>& nbh, unsigned lambda) { - trace::entering("morpho::opening::area"); + mln_trace("morpho::opening::area"); mln_precondition(exact(input).is_valid()); mln_concrete(I) output; output = opening::algebraic(input, nbh, attribute::card<I>(), lambda); - trace::exiting("morpho::opening::area"); return output; } diff --git a/milena/mln/morpho/opening/area_on_vertices.hh b/milena/mln/morpho/opening/area_on_vertices.hh index 6f52921..764b987 100644 --- a/milena/mln/morpho/opening/area_on_vertices.hh +++ b/milena/mln/morpho/opening/area_on_vertices.hh @@ -73,7 +73,7 @@ namespace mln const Neighborhood<N>& nbh, unsigned lambda) { - trace::entering("morpho::opening::area_on_vertices"); + mln_trace("morpho::opening::area_on_vertices"); mln_precondition(exact(input).is_valid()); typedef attribute::count_adjacent_vertices< edge_image<P,V,G> > attribute_t; @@ -81,7 +81,6 @@ namespace mln edge_image<P,V,G> output = opening::algebraic(input, nbh, attribute_t(), lambda); - trace::exiting("morpho::opening::area_on_vertices"); return output; } diff --git a/milena/mln/morpho/opening/height.hh b/milena/mln/morpho/opening/height.hh index b10aff5..1ddc594 100644 --- a/milena/mln/morpho/opening/height.hh +++ b/milena/mln/morpho/opening/height.hh @@ -62,13 +62,12 @@ namespace mln height(const Image<I>& input, const Neighborhood<N>& nbh, unsigned lambda) { - trace::entering("morpho::opening::height"); + mln_trace("morpho::opening::height"); mln_precondition(exact(input).is_valid()); mln_concrete(I) output; output = opening::leveling(input, nbh, attribute::height<I>(), lambda); - trace::exiting("morpho::opening::height"); return output; } diff --git a/milena/mln/morpho/opening/leveling.hh b/milena/mln/morpho/opening/leveling.hh index ff48879..8a7ddb0 100644 --- a/milena/mln/morpho/opening/leveling.hh +++ b/milena/mln/morpho/opening/leveling.hh @@ -65,7 +65,7 @@ namespace mln leveling(const Image<I>& input, const Neighborhood<N>& nbh, const Accumulator<A>& accu, const mln_result(A)& lambda) { - trace::entering("morpho::opening::leveling"); + mln_trace("morpho::opening::leveling"); mln_precondition(exact(input).is_valid()); mln_precondition(mlc_not_equal(mln_trait_accumulator_when_pix(A), @@ -77,7 +77,6 @@ namespace mln mln_postcondition(output <= input); - trace::exiting("morpho::opening::leveling"); return output; } diff --git a/milena/mln/morpho/opening/structural.hh b/milena/mln/morpho/opening/structural.hh index 2a7a0d6..a61f53e 100644 --- a/milena/mln/morpho/opening/structural.hh +++ b/milena/mln/morpho/opening/structural.hh @@ -63,7 +63,7 @@ namespace mln mln_concrete(I) structural(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::opening::structural"); + mln_trace("morpho::opening::structural"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); @@ -72,7 +72,6 @@ namespace mln mln_postcondition(output <= input); - trace::exiting("morpho::opening::structural"); return output; } diff --git a/milena/mln/morpho/opening/volume.hh b/milena/mln/morpho/opening/volume.hh index 49bb87b..194be41 100644 --- a/milena/mln/morpho/opening/volume.hh +++ b/milena/mln/morpho/opening/volume.hh @@ -60,13 +60,12 @@ namespace mln volume(const Image<I>& input, const Neighborhood<N>& nbh, unsigned lambda) { - trace::entering("morpho::opening::volume"); + mln_trace("morpho::opening::volume"); mln_precondition(exact(input).is_valid()); mln_concrete(I) output; output = opening::leveling(input, nbh, attribute::volume<I>(), lambda); - trace::exiting("morpho::opening::volume"); return output; } diff --git a/milena/mln/morpho/plus.hh b/milena/mln/morpho/plus.hh index 26e9c01..bd1fe6f 100644 --- a/milena/mln/morpho/plus.hh +++ b/milena/mln/morpho/plus.hh @@ -88,13 +88,12 @@ namespace mln inline mln_concrete(I) plus(const Image<I>& lhs, const Image<J>& rhs) { - trace::entering("morpho::plus"); + mln_trace("morpho::plus"); mln_precondition(exact(rhs).domain() == exact(lhs).domain()); mln_concrete(I) output = impl::plus_(mln_trait_image_kind(I)(), exact(lhs), exact(rhs)); - trace::exiting("morpho::plus"); return output; } diff --git a/milena/mln/morpho/rank_filter.hh b/milena/mln/morpho/rank_filter.hh index fa4d923..4b50ba1 100644 --- a/milena/mln/morpho/rank_filter.hh +++ b/milena/mln/morpho/rank_filter.hh @@ -96,7 +96,7 @@ namespace mln mln_concrete(I) rank_filter(const Image<I>& input_, const Window<W>& win_, unsigned k) { - trace::entering("morpho::impl::generic::rank_filter"); + mln_trace("morpho::impl::generic::rank_filter"); internal::rank_filter_tests(input_, win_, k); @@ -121,7 +121,6 @@ namespace mln output(p) = accu; } - trace::exiting("morpho::impl::generic::rank_filter"); return output; } @@ -133,7 +132,7 @@ namespace mln mln_concrete(I) rank_filter_line(const Image<I>& input, const Window<W>& win, unsigned k, unsigned dir) { - trace::entering("morpho::impl::rank_filter_line"); + mln_trace("morpho::impl::rank_filter_line"); internal::rank_filter_tests(input, win, k); @@ -141,7 +140,6 @@ namespace mln extension::adjust_fill(input, geom::delta(win) + 1, accu); mln_concrete(I) output = accu::transform_line(accu, input, exact(win).length(), dir); - trace::exiting("morpho::impl::rank_filter_line"); return output; } @@ -151,7 +149,7 @@ namespace mln mln_concrete(I) rank_filter_directional(const Image<I>& input, const Window<W>& win, unsigned k, unsigned dir) { - trace::entering("morpho::impl::rank_filter_directional"); + mln_trace("morpho::impl::rank_filter_directional"); internal::rank_filter_tests(input, win, k); @@ -159,7 +157,6 @@ namespace mln extension::adjust_fill(input, geom::delta(win) + 1, accu); mln_concrete(I) output = accu::transform_directional(accu, input, win, dir); - trace::exiting("morpho::impl::rank_filter_directional"); return output; } @@ -216,14 +213,13 @@ namespace mln mln_concrete(I) rank_filter(const Image<I>& input, const Window<W>& win, unsigned k) { - trace::entering("morpho::rank_filter"); + mln_trace("morpho::rank_filter"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); mln_concrete(I) output = internal::rank_filter_dispatch(exact(input), exact(win), k); - trace::exiting("morpho::rank_filter"); return output; } diff --git a/milena/mln/morpho/reconstruction/by_dilation/union_find.hh b/milena/mln/morpho/reconstruction/by_dilation/union_find.hh index 35ec2ae..072d668 100644 --- a/milena/mln/morpho/reconstruction/by_dilation/union_find.hh +++ b/milena/mln/morpho/reconstruction/by_dilation/union_find.hh @@ -121,7 +121,7 @@ namespace mln union_find(const Image<I>& f_, const Image<J>& g_, const Neighborhood<N>& nbh_) { - trace::entering("morpho::reconstruction::by_dilation::impl::generic::union_find"); + mln_trace("morpho::reconstruction::by_dilation::impl::generic::union_find"); const I& f = exact(f_); const J& g = exact(g_); @@ -203,7 +203,6 @@ namespace mln mln_postcondition(output >= f); mln_postcondition(output <= g); - trace::exiting("morpho::reconstruction::by_dilation::impl::generic::union_find"); return output; } @@ -273,14 +272,13 @@ namespace mln union_find(const Image<I>& f, const Image<J>& g, const Neighborhood<N>& nbh) { - trace::entering("morpho::reconstruction::by_dilation::union_find"); + mln_trace("morpho::reconstruction::by_dilation::union_find"); internal::union_find_tests(f, g, nbh); mln_concrete(I) output; output = internal::union_find_dispatch(f, g, nbh); - trace::exiting("morpho::reconstruction::by_dilation::union_find"); return output; } diff --git a/milena/mln/morpho/reconstruction/by_erosion/union_find.hh b/milena/mln/morpho/reconstruction/by_erosion/union_find.hh index b367f7b..9c781f1 100644 --- a/milena/mln/morpho/reconstruction/by_erosion/union_find.hh +++ b/milena/mln/morpho/reconstruction/by_erosion/union_find.hh @@ -121,7 +121,7 @@ namespace mln union_find(const Image<I>& f_, const Image<J>& g_, const Neighborhood<N>& nbh_) { - trace::entering("morpho::reconstruction::by_erosion::impl::generic::union_find"); + mln_trace("morpho::reconstruction::by_erosion::impl::generic::union_find"); const I& f = exact(f_); const J& g = exact(g_); @@ -202,7 +202,6 @@ namespace mln mln_postcondition(output >= f); mln_postcondition(output >= g); - trace::exiting("morpho::reconstruction::by_erosion::impl::generic::union_find"); return output; } @@ -268,14 +267,13 @@ namespace mln union_find(const Image<I>& f, const Image<J>& g, const Neighborhood<N>& nbh) { - trace::entering("morpho::reconstruction::by_erosion::union_find"); + mln_trace("morpho::reconstruction::by_erosion::union_find"); internal::union_find_tests(f, g, nbh); mln_concrete(I) output; output = internal::union_find_dispatch(f, g, nbh); - trace::exiting("morpho::reconstruction::by_erosion::union_find"); return output; } diff --git a/milena/mln/morpho/skeleton_constrained.hh b/milena/mln/morpho/skeleton_constrained.hh index fd28950..55e0e0b 100644 --- a/milena/mln/morpho/skeleton_constrained.hh +++ b/milena/mln/morpho/skeleton_constrained.hh @@ -82,7 +82,7 @@ namespace mln const Neighborhood<N>& nbh_, const F& is_simple, const Image<K>& constraint_, const Image<R>& priority_) { - trace::entering("morpho::skeleton_constrained"); + mln_trace("morpho::skeleton_constrained"); const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -144,7 +144,6 @@ namespace mln } } - trace::exiting("morpho::skeleton_constrained"); return output; } @@ -162,7 +161,7 @@ namespace mln const Image<K>& constraint_, const Image<R>& priority_) { - trace::entering("morpho::skeleton_constrained_fast"); + mln_trace("morpho::skeleton_constrained_fast"); const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -230,7 +229,6 @@ namespace mln } } - trace::exiting("morpho::skeleton_constrained_fast"); return output; } @@ -294,7 +292,7 @@ namespace mln const Neighborhood<N>& nbh, const F& is_simple, const Image<K>& constraint, const Image<R>& priority) { - trace::entering("morpho::skeleton_constrained"); + mln_trace("morpho::skeleton_constrained"); mln_ch_value(I, bool) output = internal::skeleton_constrained_dispatch( @@ -302,7 +300,6 @@ namespace mln mln_trait_image_value_storage(I)(), input, nbh, is_simple, constraint, priority); - trace::exiting("morpho::skeleton_constrained"); return output; } diff --git a/milena/mln/morpho/thick_miss.hh b/milena/mln/morpho/thick_miss.hh index ffa0a99..882dbc8 100644 --- a/milena/mln/morpho/thick_miss.hh +++ b/milena/mln/morpho/thick_miss.hh @@ -62,7 +62,7 @@ namespace mln thick_miss(const Image<I>& input, const Window<Wfg>& win_fg, const Window<Wbg>& win_bg) { - trace::entering("morpho::thick_miss"); + mln_trace("morpho::thick_miss"); // FIXME: Fix the following line (win_miss ??) // mln_precondition(exact(win_miss).is_centered()); mln_precondition((exact(win_fg) && exact(win_bg)).is_empty()); @@ -72,7 +72,6 @@ namespace mln hit_or_miss_background_opening(input, win_fg, win_bg) ); - trace::exiting("morpho::thick_miss"); return output; } diff --git a/milena/mln/morpho/thickening.hh b/milena/mln/morpho/thickening.hh index 27fe909..8a32efb 100644 --- a/milena/mln/morpho/thickening.hh +++ b/milena/mln/morpho/thickening.hh @@ -91,14 +91,13 @@ namespace mln thickening(const Image<I>& input, const Window<Wfg>& win_fg, const Window<Wbg>& win_bg) { - trace::entering("morpho::thickening"); + mln_trace("morpho::thickening"); internal::thickening_tests(input, win_fg, win_bg); mln_concrete(I) output = morpho::plus( input, hit_or_miss(input, win_fg, win_bg) ); - trace::exiting("morpho::thickening"); return output; } diff --git a/milena/mln/morpho/thin_fit.hh b/milena/mln/morpho/thin_fit.hh index df0b82b..5177f75 100644 --- a/milena/mln/morpho/thin_fit.hh +++ b/milena/mln/morpho/thin_fit.hh @@ -90,7 +90,7 @@ namespace mln thin_fit(const Image<I>& input, const Window<Wfg>& win_fg, const Window<Wbg>& win_bg) { - trace::entering("morpho::thin_fit"); + mln_trace("morpho::thin_fit"); internal::thin_fit_tests(input, win_fg, win_bg); @@ -99,7 +99,6 @@ namespace mln hit_or_miss_opening(input, win_fg, win_bg) ); - trace::exiting("morpho::thin_fit"); return output; } diff --git a/milena/mln/morpho/thinning.hh b/milena/mln/morpho/thinning.hh index 8f56e37..955a261 100644 --- a/milena/mln/morpho/thinning.hh +++ b/milena/mln/morpho/thinning.hh @@ -93,7 +93,7 @@ namespace mln thinning(const Image<I>& input, const Window<Wfg>& win_fg, const Window<Wbg>& win_bg) { - trace::entering("morpho::thinning"); + mln_trace("morpho::thinning"); internal::thinning_tests(input, win_fg, win_bg); @@ -103,7 +103,6 @@ namespace mln mln_postcondition( complementation( thickening( complementation(input), win_bg, win_fg ) ) == output); - trace::exiting("morpho::thinning"); return output; } diff --git a/milena/mln/morpho/top_hat.hh b/milena/mln/morpho/top_hat.hh index 6b4b8f3..27ebeb0 100644 --- a/milena/mln/morpho/top_hat.hh +++ b/milena/mln/morpho/top_hat.hh @@ -90,7 +90,7 @@ namespace mln mln_concrete(I) top_hat_white(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::top_hat_white"); + mln_trace("morpho::top_hat_white"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); @@ -100,7 +100,6 @@ namespace mln mln_postcondition(test::positive(output)); - trace::exiting("morpho::top_hat_white"); return output; } @@ -109,7 +108,7 @@ namespace mln inline mln_concrete(I) top_hat_black(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::top_hat_black"); + mln_trace("morpho::top_hat_black"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); @@ -119,7 +118,6 @@ namespace mln mln_postcondition(test::positive(output)); - trace::exiting("morpho::top_hat_black"); return output; } @@ -128,7 +126,7 @@ namespace mln inline mln_concrete(I) top_hat_self_complementary(const Image<I>& input, const Window<W>& win) { - trace::entering("morpho::top_hat_self_complementary"); + mln_trace("morpho::top_hat_self_complementary"); mln_precondition(exact(input).is_valid()); mln_precondition(! exact(win).is_empty()); @@ -138,7 +136,6 @@ namespace mln mln_postcondition(test::positive(output)); - trace::exiting("morpho::top_hat_self_complementary"); return output; } diff --git a/milena/mln/morpho/tree/component_tree.hh b/milena/mln/morpho/tree/component_tree.hh index f45986d..d628e98 100644 --- a/milena/mln/morpho/tree/component_tree.hh +++ b/milena/mln/morpho/tree/component_tree.hh @@ -76,7 +76,7 @@ namespace mln data< I, p_array<mln_psite(I)> > min_tree(const Image<I>& f_, const Neighborhood<N>& nbh_) { - trace::entering("morpho::tree::min_tree"); + mln_trace("morpho::tree::min_tree"); const I& f = exact(f_); const N& nbh = exact(nbh_); @@ -90,7 +90,6 @@ namespace mln S s = mln::data::sort_psites_decreasing(f); tree_t tree(f, s, nbh); - trace::exiting("morpho::tree::min_tree"); return tree; } @@ -99,7 +98,7 @@ namespace mln data< I, p_array<mln_psite(I)> > max_tree(const Image<I>& f_, const Neighborhood<N>& nbh_) { - trace::entering("morpho::tree::max_tree"); + mln_trace("morpho::tree::max_tree"); const I& f = exact(f_); const N& nbh = exact(nbh_); @@ -113,7 +112,6 @@ namespace mln S s = mln::data::sort_psites_increasing(f); tree_t tree(f, s, nbh); - trace::exiting("morpho::tree::max_tree"); return tree; } diff --git a/milena/mln/morpho/tree/compute_attribute_image.hh b/milena/mln/morpho/tree/compute_attribute_image.hh index e028084..308a0e2 100644 --- a/milena/mln/morpho/tree/compute_attribute_image.hh +++ b/milena/mln/morpho/tree/compute_attribute_image.hh @@ -218,13 +218,12 @@ namespace mln const T& t, mln_ch_value(typename T::function, A)* accu_image) { - trace::entering("morpho::tree::compute_attribute_image"); + mln_trace("morpho::tree::compute_attribute_image"); mln_ch_value(typename T::function, mln_result(A)) output; output = internal::compute_attribute_image(exact(a_), t, t.f(), accu_image); - trace::exiting("morpho::tree::compute_attribute_image"); return (output); } @@ -236,14 +235,13 @@ namespace mln const Image<V>& values, mln_ch_value(typename T::function, A)* accu_image) { - trace::entering("morpho::tree::compute_attribute_image_from"); + mln_trace("morpho::tree::compute_attribute_image_from"); mln_ch_value(typename T::function, mln_result(A)) output; output = internal::compute_attribute_image(exact(a_), t, exact(values), accu_image); - trace::exiting("morpho::tree::compute_attribute_image_from"); return output; } diff --git a/milena/mln/morpho/tree/compute_parent.hh b/milena/mln/morpho/tree/compute_parent.hh index 9732127..32887b2 100644 --- a/milena/mln/morpho/tree/compute_parent.hh +++ b/milena/mln/morpho/tree/compute_parent.hh @@ -194,7 +194,7 @@ namespace mln const Neighborhood<N>& nbh_, const Site_Set<S>& s_) { - trace::entering("morpho::tree::impl::generic::compute_parent"); + mln_trace("morpho::tree::impl::generic::compute_parent"); typedef mln_psite(I) P; @@ -251,7 +251,6 @@ namespace mln } } - trace::exiting("morpho::tree::impl::generic::compute_parent"); return parent; } @@ -286,14 +285,13 @@ namespace mln compute_parent(const Image<I>& f, const Neighborhood<N>& nbh, const Site_Set<S>& s) { - trace::entering("morpho::tree::compute_parent"); + mln_trace("morpho::tree::compute_parent"); internal::compute_parent_tests(f, nbh, s); mln_ch_value(I, mln_psite(I)) output; output = internal::compute_parent_dispatch(f, nbh, s); - trace::exiting("morpho::tree::compute_parent"); return output; } diff --git a/milena/mln/morpho/tree/dual_input_tree.hh b/milena/mln/morpho/tree/dual_input_tree.hh index 08e6553..9692a75 100644 --- a/milena/mln/morpho/tree/dual_input_tree.hh +++ b/milena/mln/morpho/tree/dual_input_tree.hh @@ -110,7 +110,7 @@ namespace mln const Image<I>& m_, const Neighborhood<N>& nbh_) { - trace::entering("morpho::tree::dual_input_max_tree"); + mln_trace("morpho::tree::dual_input_max_tree"); const I& f = exact(f_); const I& m = exact(m_); @@ -126,7 +126,6 @@ namespace mln tree_t tree = internal::dual_input_max_tree_dispatch(mln_trait_image_quant(I)(), f, m, nbh); - trace::exiting("morpho::tree::dual_input_max_tree"); return tree; } diff --git a/milena/mln/morpho/tree/filter/direct.hh b/milena/mln/morpho/tree/filter/direct.hh index 1835e07..953a06c 100644 --- a/milena/mln/morpho/tree/filter/direct.hh +++ b/milena/mln/morpho/tree/filter/direct.hh @@ -75,14 +75,13 @@ namespace mln F& f = exact(f_); const P& pred = exact(pred_); - trace::entering("mln::morpho::tree::filter::direct"); + mln_trace("mln::morpho::tree::filter::direct"); mln_dn_node_piter(T) n(tree); for_all(n) if (!pred(n)) f(n) = f(tree.parent(n)); - trace::exiting("mln::morpho::tree::filter::direct"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/morpho/tree/filter/filter.hh b/milena/mln/morpho/tree/filter/filter.hh index 6778466..33209d0 100644 --- a/milena/mln/morpho/tree/filter/filter.hh +++ b/milena/mln/morpho/tree/filter/filter.hh @@ -75,7 +75,7 @@ namespace mln F& f = exact(f_); const P& pred = exact(pred_); - trace::entering("mln::morpho::tree::filter::filter"); + mln_trace("mln::morpho::tree::filter::filter"); mln_ch_value(F, bool) mark; initialize(mark, f); @@ -89,7 +89,6 @@ namespace mln mark(n) = true; } - trace::exiting("mln::morpho::tree::filter::filter"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/morpho/tree/filter/max.hh b/milena/mln/morpho/tree/filter/max.hh index fb0c580..7feed02 100644 --- a/milena/mln/morpho/tree/filter/max.hh +++ b/milena/mln/morpho/tree/filter/max.hh @@ -76,7 +76,7 @@ namespace mln F& f = exact(f_); const P& pred = exact(pred_); - trace::entering("mln::morpho::tree::filter::max"); + mln_trace("mln::morpho::tree::filter::max"); mln_ch_value(F, bool) mark; initialize(mark, f); @@ -101,7 +101,6 @@ namespace mln f(n) = f(tree.parent(n)); } - trace::exiting("mln::morpho::tree::filter::max"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/morpho/tree/filter/min.hh b/milena/mln/morpho/tree/filter/min.hh index db46243..14e7ee1 100644 --- a/milena/mln/morpho/tree/filter/min.hh +++ b/milena/mln/morpho/tree/filter/min.hh @@ -77,7 +77,7 @@ namespace mln F& f = exact(f_); const P& pred = exact(pred_); - trace::entering("mln::morpho::tree::filter::min"); + mln_trace("mln::morpho::tree::filter::min"); mln_ch_value(F, bool) mark; initialize(mark, f); @@ -91,7 +91,6 @@ namespace mln mark(n) = true; } - trace::exiting("mln::morpho::tree::filter::min"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/morpho/tree/filter/subtractive.hh b/milena/mln/morpho/tree/filter/subtractive.hh index 10d3043..8ab2eb8 100644 --- a/milena/mln/morpho/tree/filter/subtractive.hh +++ b/milena/mln/morpho/tree/filter/subtractive.hh @@ -79,7 +79,7 @@ namespace mln F& f = exact(f_); const P& pred = exact(pred_); - trace::entering("mln::morpho::tree::filter::subtractive"); + mln_trace("mln::morpho::tree::filter::subtractive"); morpho::tree::propagate_if(tree, f, morpho::tree::desc_propagation (), !pred); @@ -88,7 +88,6 @@ namespace mln if (!pred(n)) f(n) = f(tree.parent(n)); - trace::exiting("mln::morpho::tree::filter::subtractive"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/morpho/tree/impl/dual_hqueue.hh b/milena/mln/morpho/tree/impl/dual_hqueue.hh index 41334f0..ed07aa3 100644 --- a/milena/mln/morpho/tree/impl/dual_hqueue.hh +++ b/milena/mln/morpho/tree/impl/dual_hqueue.hh @@ -277,7 +277,7 @@ namespace mln const Image<I>& m_, const Neighborhood<N>& neibh_) { - trace::entering("mln::morpho::tree::impl::dual_hqueue"); + mln_trace("mln::morpho::tree::impl::dual_hqueue"); const I& f = exact(f_); const I& m = exact(m_); @@ -387,7 +387,6 @@ namespace mln data<I, S> tree(fext, parent, s); - trace::exiting("mln::morpho::tree::impl::dual_hqueue"); return tree; } diff --git a/milena/mln/morpho/tree/impl/dual_union_find.hh b/milena/mln/morpho/tree/impl/dual_union_find.hh index 4c28d39..cdb5ab8 100644 --- a/milena/mln/morpho/tree/impl/dual_union_find.hh +++ b/milena/mln/morpho/tree/impl/dual_union_find.hh @@ -190,7 +190,7 @@ namespace mln const Site_Set<S>& s_m_, const Neighborhood<N>& nbh_) { - trace::entering("morpho::tree::impl::generic::dual_union_find"); + mln_trace("morpho::tree::impl::generic::dual_union_find"); util::timer tm; tm.start(); @@ -341,7 +341,6 @@ namespace mln //mln_postcondition(internal::compute_parent_postconditions(fext, s, parent)); tree::data<I, p_array<mln_psite(I)> > tree(fext, parent, s); - trace::exiting("morpho::tree::impl::generic::dual_union_find"); return tree; } diff --git a/milena/mln/morpho/tree/max.hh b/milena/mln/morpho/tree/max.hh index 3f4933d..b6e5491 100644 --- a/milena/mln/morpho/tree/max.hh +++ b/milena/mln/morpho/tree/max.hh @@ -61,7 +61,7 @@ namespace mln mln_ch_value(I, mln_psite(I)) max(const Image<I>& f_, const Neighborhood<N>& nbh_) { - trace::entering("morpho::tree::max"); + mln_trace("morpho::tree::max"); const I& f = exact(f_); const N& nbh = exact(nbh_); @@ -73,7 +73,6 @@ namespace mln p_array<mln_psite(I)> s = mln::data::sort_psites_increasing(f); mln_ch_value(I, mln_psite(I)) output = compute_parent(f, nbh, s); - trace::exiting("morpho::tree::max"); return output; } diff --git a/milena/mln/morpho/watershed/flooding.hh b/milena/mln/morpho/watershed/flooding.hh index 936db32..70ce2a9 100644 --- a/milena/mln/morpho/watershed/flooding.hh +++ b/milena/mln/morpho/watershed/flooding.hh @@ -120,7 +120,7 @@ namespace mln flooding(const Image<I>& input_, const Neighborhood<N>& nbh_, L& n_basins) { - trace::entering("morpho::watershed::impl::generic::flooding"); + mln_trace("morpho::watershed::impl::generic::flooding"); /* FIXME: Ensure the input image has scalar values. */ const I input = exact(input_); @@ -207,7 +207,6 @@ namespace mln } } - trace::exiting("morpho::watershed::impl::generic::flooding"); return output; } @@ -222,7 +221,7 @@ namespace mln flooding_fastest(const Image<I>& input_, const Neighborhood<N>& nbh_, L& n_basins) { - trace::entering("morpho::watershed::impl::flooding_fastest"); + mln_trace("morpho::watershed::impl::flooding_fastest"); /* FIXME: Ensure the input image has scalar values. */ const I input = exact(input_); @@ -325,7 +324,6 @@ namespace mln } } - trace::exiting("morpho::watershed::impl::flooding_fastest"); return output; } @@ -386,14 +384,13 @@ namespace mln mln_ch_value(I, L) flooding(const Image<I>& input, const Neighborhood<N>& nbh, L& n_basins) { - trace::entering("morpho::watershed::flooding"); + mln_trace("morpho::watershed::flooding"); // FIXME: internal::flooding_tests(input, nbh, n_basins); mln_ch_value(I, L) output = internal::flooding_dispatch(input, nbh, n_basins); - trace::exiting("morpho::watershed::flooding"); return output; } diff --git a/milena/mln/morpho/watershed/superpose.hh b/milena/mln/morpho/watershed/superpose.hh index bda43d5..d1ceb09 100644 --- a/milena/mln/morpho/watershed/superpose.hh +++ b/milena/mln/morpho/watershed/superpose.hh @@ -86,7 +86,7 @@ namespace mln const Image<J>& ws_ima_, const value::rgb8& wsl_color) { - trace::entering("morpho::watershed::superpose"); + mln_trace("morpho::watershed::superpose"); const I& input = exact(input_); const J& ws_ima = exact(ws_ima_); @@ -98,7 +98,6 @@ namespace mln data::fill((output | (pw::value(ws_ima) == pw::cst(literal::zero))).rw(), wsl_color); - trace::exiting("morpho::watershed::superpose"); return output; } diff --git a/milena/mln/opt/at.hh b/milena/mln/opt/at.hh index 2d75a7b..8c06dda 100644 --- a/milena/mln/opt/at.hh +++ b/milena/mln/opt/at.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2008, 2009, 2013 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -32,7 +33,7 @@ # include <mln/core/concept/image.hh> # include <mln/trait/images.hh> -# include <mln/trace/all.hh> +# include <mln/debug/trace.hh> # include <mln/core/alias/point1d.hh> # include <mln/core/alias/point2d.hh> diff --git a/milena/mln/registration/icp.hh b/milena/mln/registration/icp.hh index 72efecc..72b3d84 100644 --- a/milena/mln/registration/icp.hh +++ b/milena/mln/registration/icp.hh @@ -621,7 +621,7 @@ namespace mln const algebra::quat& initial_rot, const mln_vec(P)& initial_translation) { - trace::entering("registration::icp"); + mln_trace("registration::icp"); (void) X; mln_precondition(P::dim == 3); @@ -714,7 +714,6 @@ namespace mln } while ((k < 3) || norm::l2((qT - qT_old)) + norm::l2((qR - qR_old).to_vec()) > 1e-3); - trace::exiting("registration::icp"); return std::make_pair(qR, qT); } diff --git a/milena/mln/set/card.hh b/milena/mln/set/card.hh index a2aaa1f..707af44 100644 --- a/milena/mln/set/card.hh +++ b/milena/mln/set/card.hh @@ -60,7 +60,7 @@ namespace mln template <typename S> unsigned card(const Site_Set<S>& s_) { - trace::entering("set::impl::generic::card"); + mln_trace("set::impl::generic::card"); const S& s = exact(s_); mln_precondition(s.is_valid()); @@ -69,7 +69,6 @@ namespace mln for_all(p) ++n; - trace::exiting("set::impl::generic::card"); return n; } @@ -82,9 +81,8 @@ namespace mln inline unsigned card_from_method(const Site_Set<S>& s) { - trace::entering("set::impl::card_from_method"); + mln_trace("set::impl::card_from_method"); unsigned n = exact(s).nsites(); - trace::exiting("set::impl::card_from_method"); return n; } @@ -133,12 +131,11 @@ namespace mln inline unsigned card(const Site_Set<S>& s) { - trace::entering("set::card"); + mln_trace("set::card"); mln_precondition(exact(s).is_valid()); unsigned n = internal::card_dispatch(s); - trace::exiting("set::card"); return n; } diff --git a/milena/mln/set/compute.hh b/milena/mln/set/compute.hh index 39c0164..33fac6e 100644 --- a/milena/mln/set/compute.hh +++ b/milena/mln/set/compute.hh @@ -81,7 +81,7 @@ namespace mln mln_result(A) compute(const Accumulator<A>& a_, const Site_Set<S>& s_) { - trace::entering("set::impl::generic::compute"); + mln_trace("set::impl::generic::compute"); mlc_converts_to(mln_site(S), mln_argument(A))::check(); @@ -93,7 +93,6 @@ namespace mln for_all(p) a.take(p); - trace::exiting("set::impl::generic::compute"); return a.to_result(); } @@ -111,13 +110,12 @@ namespace mln mln_result(A) compute(const Accumulator<A>& a, const Site_Set<S>& s) { - trace::entering("set::compute"); + mln_trace("set::compute"); mlc_converts_to(mln_site(S), mln_argument(A))::check(); mln_result(A) r = impl::generic::compute(a, s); - trace::exiting("set::compute"); return r; } @@ -126,14 +124,13 @@ namespace mln mln_meta_accu_result(A, mln_site(S)) compute(const Meta_Accumulator<A>& a, const Site_Set<S>& s) { - trace::entering("set::compute"); + mln_trace("set::compute"); typedef mln_accu_with(A, mln_site(S)) A_; A_ a_ = accu::unmeta(exact(a), mln_site(S)()); mln_result(A_) r = impl::generic::compute(a_, s); - trace::exiting("set::compute"); return r; } diff --git a/milena/mln/set/compute_with_weights.hh b/milena/mln/set/compute_with_weights.hh index 24da256..840e190 100644 --- a/milena/mln/set/compute_with_weights.hh +++ b/milena/mln/set/compute_with_weights.hh @@ -141,7 +141,7 @@ namespace mln mln_result(A) compute_with_weights(const Accumulator<A>& a_, const Image<I>& w_) { - trace::entering("set::impl::generic::compute_with_weights"); + mln_trace("set::impl::generic::compute_with_weights"); mlc_converts_to(mln_site(I), mln_argument(A))::check(); mlc_converts_to(mln_value(I), unsigned)::check(); @@ -154,7 +154,6 @@ namespace mln for_all(p) a.take_n_times(w(p), p); - trace::exiting("set::impl::generic::compute_with_weights"); return a.to_result(); } @@ -177,7 +176,7 @@ namespace mln const Image<L>& label_, const mln_value(L)& nlabels) { - trace::entering("set::impl::generic::compute_with_weights"); + mln_trace("set::impl::generic::compute_with_weights"); mlc_equal(mln_site(I), mln_site(L))::check(); mlc_converts_to(mln_site(I), mln_argument(A))::check(); @@ -198,7 +197,6 @@ namespace mln util::array<mln_result(A)> r; convert::from_to(accus, r); - trace::exiting("set::impl::generic::compute_with_weights"); return r; } @@ -216,7 +214,7 @@ namespace mln mln_result(A) compute_with_weights(const Accumulator<A>& a, const Image<I>& w) { - trace::entering("set::compute_with_weights"); + mln_trace("set::compute_with_weights"); mlc_converts_to(mln_site(I), mln_argument(A))::check(); mlc_converts_to(mln_value(I), unsigned)::check(); @@ -224,7 +222,6 @@ namespace mln mln_result(A) r = impl::generic::compute_with_weights(a, w); - trace::exiting("set::compute_with_weights"); return r; } @@ -236,7 +233,7 @@ namespace mln const Image<L>& label, const mln_value(L)& nlabels) { - trace::entering("set::compute_with_weights"); + mln_trace("set::compute_with_weights"); mlc_equal(mln_site(I), mln_site(L))::check(); mlc_converts_to(mln_site(I), mln_argument(A))::check(); @@ -247,7 +244,6 @@ namespace mln util::array<mln_result(A)> r; r = impl::generic::compute_with_weights(a, w, label, nlabels); - trace::exiting("set::compute_with_weights"); return r; } @@ -257,7 +253,7 @@ namespace mln mln_meta_accu_result(A, mln_site(I)) compute_with_weights(const Meta_Accumulator<A>& a, const Image<I>& w) { - trace::entering("set::compute_with_weights"); + mln_trace("set::compute_with_weights"); mlc_converts_to(mln_value(I), unsigned)::check(); @@ -269,7 +265,6 @@ namespace mln mln_result(A_) r = impl::generic::compute_with_weights(a_, w); - trace::exiting("set::compute_with_weights"); return r; } diff --git a/milena/mln/set/diff.hh b/milena/mln/set/diff.hh index fb99423..52f52e8 100644 --- a/milena/mln/set/diff.hh +++ b/milena/mln/set/diff.hh @@ -65,7 +65,7 @@ namespace mln p_set<mln_site(Sl)> diff(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs) { - trace::entering("set::diff"); + mln_trace("set::diff"); typedef mln_site(Sl) P; mlc_converts_to(mln_psite(Sr), P)::check(); @@ -79,7 +79,6 @@ namespace mln p_set<P> s; convert::from_to(sd, s); - trace::exiting("set::diff"); return s; } diff --git a/milena/mln/set/get.hh b/milena/mln/set/get.hh index 727ab31..2a0f85d 100644 --- a/milena/mln/set/get.hh +++ b/milena/mln/set/get.hh @@ -55,7 +55,7 @@ namespace mln mln_site(S) get(const Site_Set<S>& s_, size_t index) { - trace::entering("set::get"); + mln_trace("set::get"); const S& s = exact(s_); mln_precondition(s.is_valid()); @@ -68,7 +68,6 @@ namespace mln else --index; - trace::exiting("set::get"); return p; } diff --git a/milena/mln/set/has.hh b/milena/mln/set/has.hh index ea9dc7f..78a0994 100644 --- a/milena/mln/set/has.hh +++ b/milena/mln/set/has.hh @@ -55,7 +55,7 @@ namespace mln bool has(const Site_Set<S>& s_, const mln_site(S)& e) { - trace::entering("set::has"); + mln_trace("set::has"); const S& s = exact(s_); mln_precondition(s.is_valid()); @@ -69,7 +69,6 @@ namespace mln break; } - trace::exiting("set::has"); return found; } diff --git a/milena/mln/set/inter.hh b/milena/mln/set/inter.hh index 87a967d..078849b 100644 --- a/milena/mln/set/inter.hh +++ b/milena/mln/set/inter.hh @@ -61,7 +61,7 @@ namespace mln p_set<mln_site(Sl)> inter(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs) { - trace::entering("set::inter"); + mln_trace("set::inter"); typedef mln_site(Sl) P; mlc_converts_to(mln_psite(Sr), P)::check(); @@ -75,7 +75,6 @@ namespace mln p_set<P> s; convert::from_to(si, s); - trace::exiting("set::inter"); return s; } diff --git a/milena/mln/set/sym_diff.hh b/milena/mln/set/sym_diff.hh index 57101b8..6776d0f 100644 --- a/milena/mln/set/sym_diff.hh +++ b/milena/mln/set/sym_diff.hh @@ -64,7 +64,7 @@ namespace mln p_set<mln_site(Sl)> sym_diff(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs) { - trace::entering("set::sym_diff"); + mln_trace("set::sym_diff"); typedef mln_site(Sl) P; mlc_converts_to(mln_psite(Sr), P)::check(); @@ -78,7 +78,6 @@ namespace mln p_set<P> s; convert::from_to(sd, s); - trace::exiting("set::sym_diff"); return s; } diff --git a/milena/mln/set/uni.hh b/milena/mln/set/uni.hh index 2e82981..0e2f8ff 100644 --- a/milena/mln/set/uni.hh +++ b/milena/mln/set/uni.hh @@ -60,7 +60,7 @@ namespace mln p_set<mln_site(Sl)> uni(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs) { - trace::entering("set::uni"); + mln_trace("set::uni"); typedef mln_site(Sl) P; mlc_converts_to(mln_psite(Sr), P)::check(); @@ -74,7 +74,6 @@ namespace mln p_set<P> s; convert::from_to(su, s); - trace::exiting("set::uni"); return s; } diff --git a/milena/mln/set/unique.hh b/milena/mln/set/unique.hh index 5de0e26..882b761 100644 --- a/milena/mln/set/unique.hh +++ b/milena/mln/set/unique.hh @@ -60,7 +60,7 @@ namespace mln p_set<mln_site(S)> unique(const Site_Set<S>& s) { - trace::entering("set::unique"); + mln_trace("set::unique"); typedef mln_site(S) P; std::set< P, util::ord<P> > s_; @@ -68,7 +68,6 @@ namespace mln p_set<P> su; convert::from_to(s_, su); - trace::exiting("set::unique"); return su; } diff --git a/milena/mln/subsampling/antialiased.hh b/milena/mln/subsampling/antialiased.hh index 8ce6721..169eb0b 100644 --- a/milena/mln/subsampling/antialiased.hh +++ b/milena/mln/subsampling/antialiased.hh @@ -145,7 +145,7 @@ namespace mln const mln_domain(I)& output_domain, unsigned border_thickness) { - trace::entering("subsampling::impl::antialiased_2d_fastest"); + mln_trace("subsampling::impl::antialiased_2d_fastest"); internal::antialiased_tests(input_, factor, output_domain, border_thickness); @@ -155,7 +155,6 @@ namespace mln // No reduction. if (factor == 1) { - trace::exiting("subsampling::impl::antialiased_2d_fastest"); return duplicate(input); } @@ -210,7 +209,6 @@ namespace mln ptrs[j] += offset; } - trace::exiting("subsampling::impl::antialiased_2d_fastest"); return output; } @@ -224,7 +222,7 @@ namespace mln const mln_domain(I)& output_domain, unsigned border_thickness) { - trace::entering("subsampling::impl::antialiased_2d_rgb"); + mln_trace("subsampling::impl::antialiased_2d_rgb"); internal::antialiased_tests(input_, factor, output_domain, border_thickness); @@ -235,7 +233,6 @@ namespace mln // No reduction. if (factor == 1) { - trace::exiting("subsampling::impl::antialiased_2d_rgb"); return duplicate(input); } @@ -296,7 +293,6 @@ namespace mln ptrs[j] += offset; } - trace::exiting("subsampling::impl::antialiased_2d_rgb"); return output; } @@ -413,7 +409,7 @@ namespace mln output_domain, border_thickness); else - trace::warning("Not implemented yet."); + debug::trace::warning("Not implemented yet."); mln_concrete(I) output; return output; @@ -433,7 +429,7 @@ namespace mln const mln_domain(I)& output_domain, unsigned border_thickness) { - trace::entering("subsampling::antialiased"); + mln_trace("subsampling::antialiased"); typedef mln_site(I) P; @@ -445,7 +441,6 @@ namespace mln output_domain, border_thickness); - trace::exiting("subsampling::antialiased"); return output; } diff --git a/milena/mln/test/positive.hh b/milena/mln/test/positive.hh index 327971e..0c48849 100644 --- a/milena/mln/test/positive.hh +++ b/milena/mln/test/positive.hh @@ -53,7 +53,7 @@ namespace mln inline bool positive(const Image<I>& input_) { - trace::entering("test::positive"); + mln_trace("test::positive"); const I& input = exact(input_); mln_precondition(input.is_valid()); @@ -67,7 +67,6 @@ namespace mln // return test::predicate(input, // fun::v2v::id<mln_value(I)>() >= pw::cst(0)); - trace::exiting("test::positive"); return res; } diff --git a/milena/mln/test/predicate.hh b/milena/mln/test/predicate.hh index 0cc587e..cb12a1f 100644 --- a/milena/mln/test/predicate.hh +++ b/milena/mln/test/predicate.hh @@ -206,13 +206,12 @@ namespace mln inline bool predicate(const Image<I>& ima, const Function_v2b<F>& f) { - trace::entering("test::predicate"); + mln_trace("test::predicate"); internal::predicate_tests(ima, f); bool res = impl::predicate_(mln_trait_image_speed(I)(), exact(ima), exact(f)); - trace::exiting("test::predicate"); return res; } @@ -221,7 +220,7 @@ namespace mln inline bool predicate(const Image<I>& lhs_, const Image<J>& rhs_, const Function_vv2b<F>& f) { - trace::entering("test::predicate"); + mln_trace("test::predicate"); const I& lhs = exact(lhs_); const J& rhs = exact(rhs_); @@ -233,7 +232,6 @@ namespace mln lhs, rhs, exact(f)); - trace::exiting("test::predicate"); return res; } @@ -241,13 +239,12 @@ namespace mln inline bool predicate(const Site_Set<S>& pset, const Function_v2b<F>& f) { - trace::entering("test::predicate"); + mln_trace("test::predicate"); internal::predicate_tests(pset, f); bool res = impl::predicate_(exact(pset), exact(f)); - trace::exiting("test::predicate"); return res; } diff --git a/milena/mln/topo/skeleton/crest.hh b/milena/mln/topo/skeleton/crest.hh index b4b7b27..351ec66 100644 --- a/milena/mln/topo/skeleton/crest.hh +++ b/milena/mln/topo/skeleton/crest.hh @@ -118,7 +118,7 @@ namespace mln crest(const Image<I>& input_, const Image<D>& dist_map_, const Neighborhood<N>& nbh_, unsigned psi_threshold) { - trace::entering("topo::skeleton::impl::generic::crest"); + mln_trace("topo::skeleton::impl::generic::crest"); const I& input = exact(input_); const D& dist_map = exact(dist_map_); const N& nbh = exact(nbh_); @@ -159,7 +159,6 @@ namespace mln is_crest(p) = true; } - trace::exiting("topo::skeleton::impl::generic::crest"); return is_crest; } @@ -173,7 +172,7 @@ namespace mln crest_fastest_2d(const Image<I>& input_, const Image<D>& dist_map_, const Neighborhood<N>& nbh_, unsigned psi_threshold) { - trace::entering("topo::skeleton::impl::crest_fastest_2d"); + mln_trace("topo::skeleton::impl::crest_fastest_2d"); const I& input = exact(input_); const D& dist_map = exact(dist_map_); @@ -225,7 +224,6 @@ namespace mln } - trace::exiting("topo::skeleton::impl::crest_fastest_2d"); return is_crest; } @@ -291,7 +289,7 @@ namespace mln crest(const Image<I>& input, const Image<D>& dist_map, const Neighborhood<N>& nbh, unsigned psi_threshold) { - trace::entering("topo::skeleton::crest"); + mln_trace("topo::skeleton::crest"); mlc_equal(mln_value(I), bool)::check(); mln_precondition(exact(input).is_valid()); @@ -302,7 +300,6 @@ namespace mln output = internal::crest_dispatch(input, dist_map, nbh, psi_threshold); - trace::exiting("topo::skeleton::crest"); return output; } diff --git a/milena/mln/transform/distance_and_closest_point_geodesic.hh b/milena/mln/transform/distance_and_closest_point_geodesic.hh index 73605b0..654217f 100644 --- a/milena/mln/transform/distance_and_closest_point_geodesic.hh +++ b/milena/mln/transform/distance_and_closest_point_geodesic.hh @@ -98,7 +98,7 @@ namespace mln const Neighborhood<N>& nbh, D max) { - trace::entering("transform::distance_closest_point_geodesic"); + mln_trace("transform::distance_closest_point_geodesic"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -107,7 +107,6 @@ namespace mln mln_ch_value(I,D) dmap = mln::canvas::distance_geodesic(input, nbh, max, f); - trace::exiting("transform::distance_and_closest_point_geodesic"); return make::couple(dmap, f.cp_ima); } @@ -119,7 +118,7 @@ namespace mln const Neighborhood<N>& nbh, D max) { - trace::entering("transform::distance_and_closest_point_geodesic"); + mln_trace("transform::distance_and_closest_point_geodesic"); mln_precondition(closest_point_domain.is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -134,7 +133,6 @@ namespace mln mln_ch_value(I,D) dmap = mln::canvas::distance_geodesic(ima, nbh, max, f); - trace::exiting("transform::distance_and_closest_point_geodesic"); return make::couple(dmap, f.cp_ima); } diff --git a/milena/mln/transform/distance_and_influence_zone_geodesic.hh b/milena/mln/transform/distance_and_influence_zone_geodesic.hh index c240fc4..b5902b1 100644 --- a/milena/mln/transform/distance_and_influence_zone_geodesic.hh +++ b/milena/mln/transform/distance_and_influence_zone_geodesic.hh @@ -74,7 +74,7 @@ namespace mln const Neighborhood<N>& nbh, D max) { - trace::entering("transform::distance_influence_zone_geodesic"); + mln_trace("transform::distance_influence_zone_geodesic"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -83,7 +83,6 @@ namespace mln mln_ch_value(I,D) dmap = mln::canvas::distance_geodesic(input, nbh, max, f); - trace::exiting("transform::distance_and_influence_zone_geodesic"); return make::couple(dmap, f.output); } diff --git a/milena/mln/transform/distance_front.hh b/milena/mln/transform/distance_front.hh index 4989b77..5ccaeb6 100644 --- a/milena/mln/transform/distance_front.hh +++ b/milena/mln/transform/distance_front.hh @@ -59,7 +59,7 @@ namespace mln distance_front(const Image<I>& input, const Neighborhood<N>& nbh, const Weighted_Window<W>& w_win, D max) { - trace::entering("transform::distance_front"); + mln_trace("transform::distance_front"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -69,7 +69,6 @@ namespace mln internal::distance_functor<I> f; output = mln::canvas::distance_front(input, nbh, w_win, max, f); - trace::exiting("transform::distance_front"); return output; } diff --git a/milena/mln/transform/distance_geodesic.hh b/milena/mln/transform/distance_geodesic.hh index b67a2f8..a37955a 100644 --- a/milena/mln/transform/distance_geodesic.hh +++ b/milena/mln/transform/distance_geodesic.hh @@ -57,7 +57,7 @@ namespace mln mln_ch_value(I, D) distance_geodesic(const Image<I>& input, const Neighborhood<N>& nbh, D max) { - trace::entering("transform::distance_geodesic"); + mln_trace("transform::distance_geodesic"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -66,7 +66,6 @@ namespace mln internal::distance_functor<I> f; output = mln::canvas::distance_geodesic(input, nbh, max, f); - trace::exiting("transform::distance_geodesic"); return output; } diff --git a/milena/mln/transform/hough.hh b/milena/mln/transform/hough.hh index 87775da..bf13adb 100644 --- a/milena/mln/transform/hough.hh +++ b/milena/mln/transform/hough.hh @@ -101,7 +101,7 @@ namespace mln image2d<float> hough(const Image<I>& input_) { - trace::entering("mln::transform::hough"); + mln_trace("mln::transform::hough"); const I& input = exact(input_); mlc_equal(mln_value(I), bool)::check(); @@ -136,7 +136,6 @@ namespace mln ++opt::at(accu, indexAngle, indexRho); } - trace::exiting("mln::transform::hough"); return accu; } diff --git a/milena/mln/transform/influence_zone_front.hh b/milena/mln/transform/influence_zone_front.hh index 7bc804b..d1ddff1 100644 --- a/milena/mln/transform/influence_zone_front.hh +++ b/milena/mln/transform/influence_zone_front.hh @@ -65,7 +65,7 @@ namespace mln influence_zone_front(const Image<I>& input, const Neighborhood<N>& nbh, const Weighted_Window<W>& w_win, D max) { - trace::entering("transform::influence_zone_front"); + mln_trace("transform::influence_zone_front"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -74,7 +74,6 @@ namespace mln internal::influence_zone_functor<I> f; (void) mln::canvas::distance_front(input, nbh, w_win, max, f); - trace::exiting("transform::influence_zone_front"); return f.output; } diff --git a/milena/mln/transform/influence_zone_geodesic.hh b/milena/mln/transform/influence_zone_geodesic.hh index 0b07e18..9b58ee0 100644 --- a/milena/mln/transform/influence_zone_geodesic.hh +++ b/milena/mln/transform/influence_zone_geodesic.hh @@ -104,7 +104,7 @@ namespace mln influence_zone_geodesic_fastest(const Image<I>& input_, const Neighborhood<N>& nbh_) { - trace::entering("transform::impl::influence_zone_geodesic_fastest"); + mln_trace("transform::impl::influence_zone_geodesic_fastest"); const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -166,7 +166,6 @@ namespace mln } } - trace::exiting("transform::impl::influence_zone_geodesic_fastest"); return output; } @@ -220,14 +219,13 @@ namespace mln mln_concrete(I) influence_zone_geodesic(const Image<I>& input, const Neighborhood<N>& nbh) { - trace::entering("transform::influence_zone_geodesic"); + mln_trace("transform::influence_zone_geodesic"); internal::influence_zone_geodesic_tests(input, nbh); mln_concrete(I) output = internal::influence_zone_geodesic_dispatch(input, nbh); - trace::exiting("transform::influence_zone_geodesic"); return output; } diff --git a/milena/mln/transform/influence_zone_geodesic_saturated.hh b/milena/mln/transform/influence_zone_geodesic_saturated.hh index 8d64331..198169c 100644 --- a/milena/mln/transform/influence_zone_geodesic_saturated.hh +++ b/milena/mln/transform/influence_zone_geodesic_saturated.hh @@ -80,7 +80,7 @@ namespace mln const D& max, const mln_value(I)& background_value) { - trace::entering("transform::influence_zone_geodesic_saturated"); + mln_trace("transform::influence_zone_geodesic_saturated"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid()); @@ -88,7 +88,6 @@ namespace mln internal::influence_zone_functor<I> f(background_value); (void) mln::canvas::distance_geodesic(input, nbh, max, f); - trace::exiting("transform::influence_zone_geodesic_saturated"); return f.output; } diff --git a/milena/mln/upscaling/art/scale2x.hh b/milena/mln/upscaling/art/scale2x.hh index 258438e..e4a5ae8 100644 --- a/milena/mln/upscaling/art/scale2x.hh +++ b/milena/mln/upscaling/art/scale2x.hh @@ -73,7 +73,7 @@ namespace mln mln_concrete(I) scale2x(const Image<I>& input_) { - trace::entering("mln::upscaling::art::scale2x"); + mln_trace("mln::upscaling::art::scale2x"); const I& input = exact(input_); mln_precondition(input.is_valid()); @@ -135,7 +135,6 @@ namespace mln } - trace::exiting("mln::upscaling::art::scale2x"); return output; } diff --git a/milena/mln/upscaling/art/scale3x.hh b/milena/mln/upscaling/art/scale3x.hh index 9213c4a..5bd94b6 100644 --- a/milena/mln/upscaling/art/scale3x.hh +++ b/milena/mln/upscaling/art/scale3x.hh @@ -73,7 +73,7 @@ namespace mln mln_concrete(I) scale3x(const Image<I>& input_) { - trace::entering("mln::upscaling::art::scale3x"); + mln_trace("mln::upscaling::art::scale3x"); const I& input = exact(input_); mln_precondition(input.is_valid()); @@ -202,7 +202,6 @@ namespace mln } - trace::exiting("mln::upscaling::art::scale3x"); return output; } diff --git a/milena/mln/util/tree_fast_to_image.hh b/milena/mln/util/tree_fast_to_image.hh index 73cdd1a..ec540d3 100644 --- a/milena/mln/util/tree_fast_to_image.hh +++ b/milena/mln/util/tree_fast_to_image.hh @@ -65,7 +65,7 @@ namespace mln void tree_fast_to_image(tree_fast<T>& tree, Image<I>& output_) { - trace::entering("util::impl::tree_fast_to_image"); + mln_trace("util::impl::tree_fast_to_image"); I& output = exact(output_); std::list<unsigned> l; @@ -86,7 +86,6 @@ namespace mln l.pop_front(); } - trace::exiting("util::impl::tree_fast_to_image"); } } // end of namespace mln::util::impl @@ -98,11 +97,10 @@ namespace mln void tree_fast_to_image(tree_fast<T>& tree, Image<I>& output_) { - trace::entering("util::tree_fast_to_image"); + mln_trace("util::tree_fast_to_image"); impl::tree_fast_to_image(tree, output_); - trace::exiting("util::tree_fast_to_image"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/util/tree_to_fast.hh b/milena/mln/util/tree_to_fast.hh index d2df1b1..ca69205 100644 --- a/milena/mln/util/tree_to_fast.hh +++ b/milena/mln/util/tree_to_fast.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -35,7 +36,7 @@ # include <mln/util/tree.hh> # include <mln/util/tree_fast.hh> -# include <mln/trace/all.hh> +# include <mln/debug/trace.hh> namespace mln @@ -89,14 +90,13 @@ namespace mln tree_fast<T> tree_to_fast(tree<T>& input) { - trace::entering("util::tree_to_fast"); + mln_trace("util::tree_to_fast"); unsigned i = 0; tree_fast<T> tree (input.root ()->elt ()); impl::tree_to_fast_(input.root (), tree, 0, i); - trace::exiting("util::tree_to_fast"); return tree; } diff --git a/milena/mln/util/tree_to_image.hh b/milena/mln/util/tree_to_image.hh index 1249c67..ec3ffad 100644 --- a/milena/mln/util/tree_to_image.hh +++ b/milena/mln/util/tree_to_image.hh @@ -88,7 +88,7 @@ namespace mln void tree_to_image_rec(tree_node<T>* tree_node, Image<I>& output_) { - trace::entering("util::impl::tree_to_image_rec"); + mln_trace("util::impl::tree_to_image_rec"); I& output = exact(output_); @@ -106,7 +106,6 @@ namespace mln if (*it) tree_to_image_rec((*it), output); } - trace::exiting("util::impl::tree_to_image_rec"); } template <typename T, typename J> @@ -114,7 +113,7 @@ namespace mln void display_tree_rec(const Image<J>& ima_, tree_node<T>* tree_node, int level) { - trace::entering("util::impl::display_tree_rec"); + mln_trace("util::impl::display_tree_rec"); const J& ima = exact(ima_); display_set(ima, tree_node->elt().points); @@ -123,7 +122,6 @@ namespace mln it != tree_node->children().end(); ++it) display_tree_rec(ima, (*it), level + 1); - trace::exiting("util::impl::display_tree_rec"); } @@ -132,7 +130,7 @@ namespace mln void display_branch_rec(const Image<J>& ima_, tree_node<T>* tree_node, Image<K>& output_) { - trace::entering("util::impl::display_branch_rec"); + mln_trace("util::impl::display_branch_rec"); K& output = exact(output_); const J& ima = exact(ima_); @@ -145,7 +143,6 @@ namespace mln it != tree_node->children().end(); ++it) display_branch_rec(ima, (*it), output); - trace::exiting("util::impl::display_branch_rec"); } @@ -154,7 +151,7 @@ namespace mln void display_set(const Image<J>& ima_, p_set<P>& s) { - trace::entering("util::impl::display_set"); + mln_trace("util::impl::display_set"); const J& ima = exact(ima_); image2d<bool> out(ima.bbox()); @@ -164,7 +161,6 @@ namespace mln for_all(p) out(p) = true; - trace::exiting("util::impl::display_set"); } @@ -177,12 +173,11 @@ namespace mln void tree_to_image(tree<T>& tree, Image<I>& output_) { - trace::entering("util::tree_to_image"); + mln_trace("util::tree_to_image"); I& output = exact(output_); impl::tree_to_image_rec(tree.root(), output); - trace::exiting("util::tree_to_image"); } @@ -191,7 +186,7 @@ namespace mln void display_tree(const Image<J>& ima_, tree<I>& tree) { - trace::entering("util::display_tree"); + mln_trace("util::display_tree"); mln_precondition(tree.root()); @@ -200,7 +195,6 @@ namespace mln impl::display_tree_rec(ima, tree.root(), level); - trace::exiting("util::display_tree"); } @@ -209,7 +203,7 @@ namespace mln void display_branch(const Image<J>& ima_, tree_node<I>* tree_node) { - trace::entering("util::display_branch"); + mln_trace("util::display_branch"); mln_assertion(tree_node); @@ -219,7 +213,6 @@ namespace mln data::fill(output, false); impl::display_branch_rec(ima, tree_node, output); - trace::exiting("util::display_branch"); } diff --git a/milena/mln/win/diff.hh b/milena/mln/win/diff.hh index 3c08dda..0e5e054 100644 --- a/milena/mln/win/diff.hh +++ b/milena/mln/win/diff.hh @@ -106,7 +106,7 @@ namespace mln mln_regular(W1) diff(const Window<W1>& win1_, const Window<W2>& win2_) { - trace::entering("win::diff"); + mln_trace("win::diff"); mln_is_simple_window(W1)::check(); mln_is_simple_window(W2)::check(); @@ -123,7 +123,6 @@ namespace mln tmp.insert(win1.dp(i)); } - trace::exiting("win::diff"); return tmp; } diff --git a/milena/mln/win/inter.hh b/milena/mln/win/inter.hh index d1a2ed7..e99919b 100644 --- a/milena/mln/win/inter.hh +++ b/milena/mln/win/inter.hh @@ -97,7 +97,7 @@ namespace mln mln_regular(W1) operator && (const Window<W1>& win1, const Window<W2>& win2) { - trace::entering("win::inter"); + mln_trace("win::inter"); // Compatibility checks. mlc_equal(mln_regular(W1), mln_regular(W2))::check(); @@ -119,7 +119,6 @@ namespace mln mln_regular(W1) tmp = win::impl::inter(mln_trait_window_definition(W1)(), exact(win1), exact(win2)); - trace::exiting("win::inter"); return tmp; } diff --git a/milena/mln/win/shift.hh b/milena/mln/win/shift.hh index 8033cdc..3ecaec4 100644 --- a/milena/mln/win/shift.hh +++ b/milena/mln/win/shift.hh @@ -88,7 +88,7 @@ namespace mln mln_regular(W) shift(const Window<W>& win, const mln_dpsite(W)& dp) { - trace::entering("win::shift"); + mln_trace("win::shift"); mlc_is(mln_trait_window_support(W), trait::window::support::regular)::check(); @@ -98,7 +98,6 @@ namespace mln mln_regular(W) tmp = impl::shift_(mln_trait_window_definition(W)(), exact(win), dp); - trace::exiting("win::shift"); return tmp; } diff --git a/milena/mln/win/sym.hh b/milena/mln/win/sym.hh index db14941..2b83e1c 100644 --- a/milena/mln/win/sym.hh +++ b/milena/mln/win/sym.hh @@ -58,11 +58,10 @@ namespace mln inline W sym(const Window<W>& win) { - trace::entering("win::sym"); + mln_trace("win::sym"); mln_precondition(exact(win).is_valid()); W tmp = exact(win); tmp.sym(); - trace::exiting("win::sym"); return tmp; } @@ -70,11 +69,10 @@ namespace mln inline W sym(const Weighted_Window<W>& w_win) { - trace::entering("win::sym"); + mln_trace("win::sym"); mln_precondition(exact(w_win).is_valid()); W tmp = exact(w_win); tmp.sym(); - trace::exiting("win::sym"); return tmp; } diff --git a/milena/mln/world/binary_2d/enlarge.hh b/milena/mln/world/binary_2d/enlarge.hh index 4381eb4..c7b4d6b 100644 --- a/milena/mln/world/binary_2d/enlarge.hh +++ b/milena/mln/world/binary_2d/enlarge.hh @@ -357,7 +357,7 @@ namespace mln mln_concrete(I) enlarge(const Image<I>& input, unsigned n) { - trace::entering("mln::world::binary_2d::enlarge"); + mln_trace("mln::world::binary_2d::enlarge"); mln_precondition(exact(input).is_valid()); typedef mln_site(I) S; @@ -369,7 +369,6 @@ namespace mln else output = internal::enlarge_dispatch(input, n); - trace::exiting("mln::world::binary_2d::enlarge"); return output; } diff --git a/milena/mln/world/binary_2d/subsample.hh b/milena/mln/world/binary_2d/subsample.hh index 70c9c9e..b8bee40 100644 --- a/milena/mln/world/binary_2d/subsample.hh +++ b/milena/mln/world/binary_2d/subsample.hh @@ -65,7 +65,7 @@ namespace mln image2d<value::int_u8> subsample(image2d<bool>& input, unsigned n) { - trace::entering("world::binary_2d::subsample"); + mln_trace("world::binary_2d::subsample"); mln_precondition(input.is_valid()); @@ -76,7 +76,6 @@ namespace mln image2d<value::int_u8> output = data::convert(int_u8(), input); - trace::exiting("world::binary_2d::subsample"); return output; } @@ -117,7 +116,6 @@ namespace mln } } - trace::exiting("world::binary_2d::subsample"); return output; } diff --git a/milena/mln/world/inter_pixel/compute.hh b/milena/mln/world/inter_pixel/compute.hh index 0d7ad12..73705ae 100644 --- a/milena/mln/world/inter_pixel/compute.hh +++ b/milena/mln/world/inter_pixel/compute.hh @@ -63,7 +63,7 @@ namespace mln image_if<mln_ch_value(mln_unmorph(I), mln_result(F)), is_separator> compute(const Image<I>& input_, const Function_vv2v<F>& f_) { - trace::entering("world::inter_pixel::compute"); + mln_trace("world::inter_pixel::compute"); const I& input = exact(input_); const F& f = exact(f_); @@ -86,7 +86,6 @@ namespace mln output(e) = f(input(p1), input(p2)); } - trace::exiting("world::inter_pixel::compute"); return output; } diff --git a/milena/mln/world/inter_pixel/dim2/make_edge_image.hh b/milena/mln/world/inter_pixel/dim2/make_edge_image.hh index 68593bd..d3a1de3 100644 --- a/milena/mln/world/inter_pixel/dim2/make_edge_image.hh +++ b/milena/mln/world/inter_pixel/dim2/make_edge_image.hh @@ -56,7 +56,7 @@ namespace mln mln_concrete(I) make_edge_image(const Image<I>& input_, const Function_vv2v<F>& f_) { - trace::entering("world::inter_pixel::dim2::make_edge_image"); + mln_trace("world::inter_pixel::dim2::make_edge_image"); const I& input = exact(input_); const F& f = exact(f_); @@ -88,7 +88,6 @@ namespace mln output(p) = f(vs[0], vs[1]); } - trace::exiting("world::inter_pixel::dim2::make_edge_image"); return output; } diff --git a/milena/mln/world/inter_pixel/full2image.hh b/milena/mln/world/inter_pixel/full2image.hh index db3bcf3..168dcf8 100644 --- a/milena/mln/world/inter_pixel/full2image.hh +++ b/milena/mln/world/inter_pixel/full2image.hh @@ -63,7 +63,7 @@ namespace mln mln_concrete(I) full2image(const Image<I>& input_) { - trace::entering("world::inter_pixel::full2image"); + mln_trace("world::inter_pixel::full2image"); mlc_is_a(mln_domain(I), Box)::check(); @@ -77,7 +77,6 @@ namespace mln data::paste_without_localization(input | is_pixel(), output); - trace::exiting("world::inter_pixel::full2image"); return output; } diff --git a/milena/mln/world/inter_pixel/immerse.hh b/milena/mln/world/inter_pixel/immerse.hh index 7714f5d..7f15bd5 100644 --- a/milena/mln/world/inter_pixel/immerse.hh +++ b/milena/mln/world/inter_pixel/immerse.hh @@ -63,7 +63,7 @@ namespace mln image_if<mln_concrete(I), is_pixel> immerse(const Image<I>& input_) { - trace::entering("world::inter_pixel::immerse"); + mln_trace("world::inter_pixel::immerse"); mlc_is_a(mln_domain(I), Box)::check(); @@ -77,7 +77,6 @@ namespace mln data::paste_without_localization(input, (output | is_pixel()).rw()); - trace::exiting("world::inter_pixel::immerse"); return output | is_pixel(); } diff --git a/milena/mln/world/rgb/invert.hh b/milena/mln/world/rgb/invert.hh index b3bf12b..9777aaa 100644 --- a/milena/mln/world/rgb/invert.hh +++ b/milena/mln/world/rgb/invert.hh @@ -99,7 +99,7 @@ namespace mln inline void invert(const Image<I>& input_, Image<O>& output_) { - trace::entering("world::rgb::impl::generic::invert"); + mln_trace("world::rgb::impl::generic::invert"); const I& input = exact(input_); O& output = exact(output_); @@ -112,7 +112,6 @@ namespace mln for_all(p) output(p) = mln_min(V) + (mln_max(V) - input(p)); - trace::exiting("world::rgb::impl::generic::invert"); } } // end of namespace mln::world::rgb::impl::generic @@ -180,7 +179,7 @@ namespace mln inline mln_concrete(I) invert(const Image<I>& input) { - trace::entering("world::rgb::invert"); + mln_trace("world::rgb::invert"); mln_precondition(exact(input).is_valid()); @@ -188,7 +187,6 @@ namespace mln initialize(output, input); internal::invert_dispatch(input, output); - trace::exiting("world::rgb::invert"); return output; } @@ -196,13 +194,12 @@ namespace mln inline void invert_inplace(Image<I>& input) { - trace::entering("world::rgb::invert_inplace"); + mln_trace("world::rgb::invert_inplace"); mln_precondition(exact(input).is_valid()); internal::invert_dispatch(input, input); - trace::exiting("world::rgb::invert_inplace"); } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/world/rgb/invert.spe.hh b/milena/mln/world/rgb/invert.spe.hh index 978563a..a63c996 100644 --- a/milena/mln/world/rgb/invert.spe.hh +++ b/milena/mln/world/rgb/invert.spe.hh @@ -56,7 +56,7 @@ namespace mln inline void invert_rgb_fastest(const Image<I>& input_, Image<O>& output_) { - trace::entering("world::rgb::impl::invert_rgb_fastest"); + mln_trace("world::rgb::impl::invert_rgb_fastest"); const I& input = exact(input_); O& output = exact(output_); @@ -78,7 +78,7 @@ namespace mln op.val().blue() = mln_min(Blue) + (mln_max(Blue) - ip.val().blue()); } - trace::entering("world::rgb::impl::invert_rgb_fastest"); + mln_trace("world::rgb::impl::invert_rgb_fastest"); } @@ -86,7 +86,7 @@ namespace mln inline void invert_rgb(const Image<I>& input_, Image<O>& output_) { - trace::entering("world::rgb::impl::invert_rgb"); + mln_trace("world::rgb::impl::invert_rgb"); const I& input = exact(input_); O& output = exact(output_); @@ -107,7 +107,6 @@ namespace mln output(p).blue() = mln_min(Blue) + (mln_max(Blue) - input(p).blue()); } - trace::exiting("world::rgb::impl::invert_rgb"); } diff --git a/milena/tests/arith/diff_abs.cc b/milena/tests/arith/diff_abs.cc index d10adfe..bd3083f 100644 --- a/milena/tests/arith/diff_abs.cc +++ b/milena/tests/arith/diff_abs.cc @@ -32,7 +32,7 @@ int main() { using namespace mln; - trace::quiet = false; + debug::trace::quiet = false; { image2d<int> ima(3,3); diff --git a/milena/tests/arith/minus.cc b/milena/tests/arith/minus.cc index fd5860d..d04ff70 100644 --- a/milena/tests/arith/minus.cc +++ b/milena/tests/arith/minus.cc @@ -32,7 +32,7 @@ int main() { using namespace mln; - // trace::quiet = false; + // debug::trace::quiet = false; { image2d<int> ima(3,3); diff --git a/milena/tests/arith/plus.cc b/milena/tests/arith/plus.cc index b71a537..c9a86d3 100644 --- a/milena/tests/arith/plus.cc +++ b/milena/tests/arith/plus.cc @@ -32,7 +32,7 @@ int main() { using namespace mln; - // trace::quiet = false; + // debug::trace::quiet = false; { image2d<int> ima(3,3); @@ -72,7 +72,7 @@ int main() // { // using namespace mln; -// // trace::quiet = false; +// // debug::trace::quiet = false; // { // image2d<int> ref(3,3); diff --git a/milena/tests/arith/revert.cc b/milena/tests/arith/revert.cc index dd4aefa..827e15a 100644 --- a/milena/tests/arith/revert.cc +++ b/milena/tests/arith/revert.cc @@ -33,7 +33,7 @@ int main() { using namespace mln; - // trace::quiet = false; + // debug::trace::quiet = false; { image2d<int> ima(3,3); diff --git a/milena/tests/arith/times.cc b/milena/tests/arith/times.cc index a00a8ee..e582c5a 100644 --- a/milena/tests/arith/times.cc +++ b/milena/tests/arith/times.cc @@ -32,7 +32,7 @@ int main() { using namespace mln; - // trace::quiet = false; + // debug::trace::quiet = false; { image2d<int> ima(3,3); diff --git a/milena/tests/geom/nsites.cc b/milena/tests/geom/nsites.cc index 8bf09d9..1e999b9 100644 --- a/milena/tests/geom/nsites.cc +++ b/milena/tests/geom/nsites.cc @@ -31,7 +31,7 @@ int main() { using namespace mln; - // trace::quiet = false; + // debug::trace::quiet = false; image2d<int> ima(make::box2d(-1,-4, 2,6)); mln_assertion(geom::nsites(ima) == ((2 - (-1) + 1) * (6 - (-4) + 1))); } diff --git a/milena/tests/morpho/closing/algebraic.cc b/milena/tests/morpho/closing/algebraic.cc index 4853b81..d5e726d 100644 --- a/milena/tests/morpho/closing/algebraic.cc +++ b/milena/tests/morpho/closing/algebraic.cc @@ -42,7 +42,7 @@ int main() using namespace mln; using value::int_u8; - trace::quiet = true; + debug::trace::quiet = true; typedef image2d<int_u8> I; I lena; diff --git a/milena/tests/morpho/elementary/closing.cc b/milena/tests/morpho/elementary/closing.cc index 1aa098a..226b369 100644 --- a/milena/tests/morpho/elementary/closing.cc +++ b/milena/tests/morpho/elementary/closing.cc @@ -38,7 +38,7 @@ int main() using namespace mln; using value::int_u8; -// trace::quiet = false; +// debug::trace::quiet = false; image2d<int_u8> ima(3, 3, 0); debug::iota(ima); diff --git a/milena/tests/morpho/elementary/dilation.cc b/milena/tests/morpho/elementary/dilation.cc index fecd0ab..ef3a596 100644 --- a/milena/tests/morpho/elementary/dilation.cc +++ b/milena/tests/morpho/elementary/dilation.cc @@ -38,7 +38,7 @@ int main() using namespace mln; using value::int_u8; -// trace::quiet = false; +// debug::trace::quiet = false; image2d<int_u8> ima(3, 3, 0); debug::iota(ima); diff --git a/milena/tests/morpho/elementary/erosion.cc b/milena/tests/morpho/elementary/erosion.cc index 1db92c9..eb4e112 100644 --- a/milena/tests/morpho/elementary/erosion.cc +++ b/milena/tests/morpho/elementary/erosion.cc @@ -38,7 +38,7 @@ int main() using namespace mln; using value::int_u8; -// trace::quiet = false; +// debug::trace::quiet = false; image2d<int_u8> ima(3, 3, 0); debug::iota(ima); diff --git a/milena/tests/morpho/elementary/opening.cc b/milena/tests/morpho/elementary/opening.cc index e9dd219..28f6d69 100644 --- a/milena/tests/morpho/elementary/opening.cc +++ b/milena/tests/morpho/elementary/opening.cc @@ -38,7 +38,7 @@ int main() using namespace mln; using value::int_u8; -// trace::quiet = false; +// debug::trace::quiet = false; image2d<int_u8> ima(3, 3, 0); debug::iota(ima); diff --git a/milena/tests/morpho/elementary/top_hat.cc b/milena/tests/morpho/elementary/top_hat.cc index ae9ee29..f65329d 100644 --- a/milena/tests/morpho/elementary/top_hat.cc +++ b/milena/tests/morpho/elementary/top_hat.cc @@ -38,7 +38,7 @@ int main() using namespace mln; using value::int_u8; -// trace::quiet = false; +// debug::trace::quiet = false; image2d<int_u8> ima(3, 3, 0); debug::iota(ima); diff --git a/milena/tests/morpho/general.cc b/milena/tests/morpho/general.cc index d0e935a..4d4cb1c 100644 --- a/milena/tests/morpho/general.cc +++ b/milena/tests/morpho/general.cc @@ -130,7 +130,7 @@ int main() /* { - trace::quiet = false; + debug::trace::quiet = false; image2d<bool> pic; io::pbm::load(pic, MLN_IMG_DIR "/small.pbm"); @@ -139,7 +139,7 @@ int main() morpho::general(ero, pic, win::rectangle2d(3,3)); morpho::general(dil, pic, win::rectangle2d(3,3)); - trace::quiet = true; + debug::trace::quiet = true; } */ diff --git a/milena/tests/morpho/opening/algebraic.cc b/milena/tests/morpho/opening/algebraic.cc index 1cabec1..16e3947 100644 --- a/milena/tests/morpho/opening/algebraic.cc +++ b/milena/tests/morpho/opening/algebraic.cc @@ -42,7 +42,7 @@ int main() using namespace mln; using value::int_u8; - trace::quiet = false; + debug::trace::quiet = false; typedef image2d<int_u8> I; I lena; diff --git a/milena/tests/morpho/top_hat.cc b/milena/tests/morpho/top_hat.cc index 9288c0a..965d94d 100644 --- a/milena/tests/morpho/top_hat.cc +++ b/milena/tests/morpho/top_hat.cc @@ -38,7 +38,7 @@ int main() using namespace mln; using value::int_u8; -// trace::quiet = false; +// debug::trace::quiet = false; image2d<int_u8> ima(3, 3, 0); debug::iota(ima); -- 1.7.2.5
participants (1)
-
Guillaume Lazzara