27 #ifndef SCRIBO_DEBUG_LINKED_BBOXES_IMAGE_HH
28 # define SCRIBO_DEBUG_LINKED_BBOXES_IMAGE_HH
34 # include <mln/core/concept/image.hh>
35 # include <mln/core/concept/graph.hh>
36 # include <mln/labeling/compute.hh>
37 # include <mln/accu/center.hh>
38 # include <mln/data/convert.hh>
39 # include <mln/value/rgb8.hh>
40 # include <mln/util/array.hh>
41 # include <mln/io/ppm/save.hh>
42 # include <mln/literal/colors.hh>
44 # include <scribo/core/object_links.hh>
45 # include <scribo/core/component_set.hh>
46 # include <scribo/draw/bounding_boxes.hh>
47 # include <scribo/draw/bounding_box_links.hh>
69 template <
typename I,
typename L>
72 const object_links<L>& array,
73 const
value::rgb8& box_value,
74 const
value::rgb8& link_value,
82 template <typename I, typename L>
83 mln_ch_value(I,
value::rgb8)
85 const object_links<L>& array,
86 const
value::rgb8& box_value,
87 const
value::rgb8& link_value);
100 template <typename I, typename L>
101 mln_ch_value(I,
value::rgb8)
103 const object_links<L>& left_link,
104 const object_links<L>& right_link,
105 const
value::rgb8& box_value,
106 const
value::rgb8& link_value,
107 anchor::Type anchor);
123 template <typename I, typename L>
125 mln_ch_value(I,
value::rgb8)
127 const object_links<L>& left_link,
128 const object_links<L>& right_link,
129 const
value::rgb8& box_value,
130 const
value::rgb8& left_link_value,
131 const
value::rgb8& right_link_value,
132 const
value::rgb8& validated_link_value,
133 anchor::Type anchor);
146 template <typename I, typename L, typename G>
147 mln_ch_value(I,
value::rgb8)
150 const
value::rgb8& box_value,
151 const
value::rgb8& link_value,
152 anchor::Type anchor);
155 # ifndef MLN_INCLUDE_ONLY
158 template <
typename I,
typename L>
162 const object_links<L>& links,
163 const
value::rgb8& box_value,
164 const
value::rgb8& link_value,
167 mln_trace(
"scribo::debug::linked_bboxes_image");
168 mln_precondition(
exact(input).is_valid());
172 draw::bounding_boxes(tmp, links.
components(), box_value);
173 draw::bounding_box_links(tmp, links, link_value, anchor);
179 template <typename I, typename L>
181 mln_ch_value(I,
value::rgb8)
183 const object_links<L>& links,
184 const
value::rgb8& box_value,
185 const
value::rgb8& link_value)
188 link_value, anchor::Center);
193 template <
typename I,
typename L>
197 const object_links<L>& left_link,
198 const object_links<L>& right_link,
199 const
value::rgb8& box_value,
213 template <
typename I,
typename L>
217 const object_links<L>& left_link,
218 const object_links<L>& right_link,
219 const
value::rgb8& box_value,
220 const
value::rgb8& left_link_value,
221 const
value::rgb8& right_link_value,
222 const
value::rgb8& validated_link_value,
225 mln_trace(
"scribo::debug::linked_bboxes_image");
226 mln_precondition(
exact(input).is_valid());
230 draw::bounding_boxes(tmp, left_link.
components(), box_value);
231 draw::bounding_box_links(tmp,
232 left_link, right_link,
233 left_link_value, right_link_value,
234 validated_link_value,
242 template <typename I, typename L, typename G>
244 mln_ch_value(I,
value::rgb8)
247 const
value::rgb8& box_value,
248 const
value::rgb8& link_value,
251 mln_trace(
"scribo::debug::linked_bboxes_image");
252 mln_precondition(
exact(g).is_valid());
253 mln_precondition(
exact(input).is_valid());
257 draw::bounding_boxes(tmp, exact(g).components(), box_value);
258 draw::bounding_box_links(tmp, exact(g).components(), g, link_value,
265 # endif // ! MLN_INCLUDE_ONLY
272 #endif // ! SCRIBO_DEBUG_LINKED_BBOXES_IMAGE_HH