27 #ifndef SCRIBO_DEBUG_LINKS_IMAGE_HH
28 # define SCRIBO_DEBUG_LINKS_IMAGE_HH
34 # include <mln/core/concept/image.hh>
35 # include <mln/accu/center.hh>
36 # include <mln/data/convert.hh>
37 # include <mln/value/rgb8.hh>
38 # include <mln/literal/colors.hh>
39 # include <mln/draw/line.hh>
41 # include <scribo/core/object_links.hh>
42 # include <scribo/draw/bounding_boxes.hh>
43 # include <scribo/primitive/link/internal/compute_anchor.hh>
58 template <
typename I,
typename L>
61 const object_links<L>& links,
63 bool draw_bboxes = true);
66 # ifndef MLN_INCLUDE_ONLY
69 template <
typename I,
typename L>
72 const object_links<L>& links,
76 mln_trace(
"scribo::debug::links_image");
77 const I& input =
exact(input_);
79 mln_precondition(input.is_valid());
80 mln_precondition(links.is_valid());
82 const component_set<L>& comps = links.components();
88 scribo::draw::bounding_boxes(
links_image, comps, literal::blue);
90 for_all_links(l, links)
91 if (links.is_linked(l))
92 mln::draw::
line(links_image,
93 primitive::link::internal::compute_anchor(comps,
96 primitive::link::internal::compute_anchor(comps,
105 # endif // ! MLN_INCLUDE_ONLY
112 #endif // ! SCRIBO_DEBUG_LINKS_IMAGE_HH