Namespaces | Functions

mln::draw Namespace Reference

Namespace of drawing routines. More...

Namespaces

namespace  internal

Functions

template<typename I , typename B >
void box (Image< I > &ima, const Box< B > &b, const typename I::value &v)
template<typename I , typename B >
void box_plain (Image< I > &ima, const Box< B > &b, const typename I::value &v)
template<typename I >
void dashed_line (Image< I > &ima, const typename I::psite &beg, const typename I::psite &end, const typename I::value &v)
template<typename I >
void line (Image< I > &ima, const typename I::psite &beg, const typename I::psite &end, const typename I::value &v)
template<typename I >
void plot (Image< I > &ima, const typename I::point &p, const typename I::value &v)
template<typename I >
void plot (Image< I > &ima, const typename I::psite &p, const typename I::value &v)
template<typename I >
void polygon (Image< I > &ima, const p_array< typename I::site > &par, const typename I::value &v)
template<typename I >
void polygon (Image< I > &ima, const p_array< typename I::site > &par, const typename I::value &v, unsigned output_ratio)
template<typename I , typename S >
void site_set (Image< I > &ima, const Site_Set< S > &s, const typename I::value &v, unsigned output_ratio=1)

Detailed Description

Namespace of drawing routines.


Function Documentation

template<typename I , typename B >
void mln::draw::box ( Image< I > &  ima,
const Box< B > &  b,
const typename I::value &  v 
) [inline]

Draw a box at value v in image ima

Parameters:
[in,out] ima The image to be drawn.
[in] b the boxto draw.
[in] v The value to assign to all drawn pixels.
Precondition:
ima has to be initialized.
ima has beg.
ima has end.

Definition at line 72 of file draw/box.hh.

References mln::exact(), and line().

template<typename I , typename B >
void mln::draw::box_plain ( Image< I > &  ima,
const Box< B > &  b,
const typename I::value &  v 
) [inline]

Draw a plain box at value v in image ima

Parameters:
[in,out] ima The image to be drawn.
[in] b the box to draw.
[in] v The value to assign to all drawn pixels.
Precondition:
ima has to be initialized.
ima has beg.
ima has end.

Definition at line 71 of file box_plain.hh.

References mln::exact(), and mln::data::fill().

Referenced by mln::debug::draw_graph().

template<typename I >
void mln::draw::dashed_line ( Image< I > &  ima,
const typename I::psite &  beg,
const typename I::psite &  end,
const typename I::value &  v 
) [inline]

Draw a dashed line at level v in image ima between the points beg and end.

Parameters:
[in,out] ima The image to be drawn.
[in] beg The start point to drawn dashed_line.
[in] end The end point to drawn dashed_line.
[in] v The value to assign to all drawn pixels.
Precondition:
ima has to be initialized.
ima has beg.
ima has end.

Definition at line 91 of file dashed_line.hh.

References mln::exact(), mln::data::fill(), and mln::trace::warning().

template<typename I >
void mln::draw::line ( Image< I > &  ima,
const typename I::psite &  beg,
const typename I::psite &  end,
const typename I::value &  v 
) [inline]

Draw a line at level v in image ima between the points beg and end.

Parameters:
[in,out] ima The image to be drawn.
[in] beg The start point to drawn line.
[in] end The end point to drawn line.
[in] v The value to assign to all drawn pixels.
Precondition:
ima has to be initialized.
ima has beg.
ima has end.

Definition at line 72 of file draw/line.hh.

References mln::pw::cst(), mln::exact(), mln::data::paste(), mln::safe(), and mln::trace::warning().

Referenced by box(), mln::debug::draw_graph(), and polygon().

template<typename I >
void mln::draw::plot ( Image< I > &  ima,
const typename I::point &  p,
const typename I::value &  v 
)

Plot a point at level v in image ima

Parameters:
[in,out] ima The image to be drawn.
[in] p The point to be plotted.
[in] v The value to assign to all drawn pixels.
Precondition:
ima has to be initialized.
ima has p.
template<typename I >
void mln::draw::plot ( Image< I > &  ima,
const typename I::psite &  p,
const typename I::value &  v 
) [inline]

Definition at line 67 of file plot.hh.

References mln::pw::cst(), mln::exact(), and mln::data::paste().

template<typename I >
void mln::draw::polygon ( Image< I > &  ima,
const p_array< typename I::site > &  par,
const typename I::value &  v 
)

Definition at line 91 of file polygon.hh.

References polygon().

template<typename I >
void mln::draw::polygon ( Image< I > &  ima,
const p_array< typename I::site > &  par,
const typename I::value &  v,
unsigned  output_ratio 
)

Draw a polygon at level v in image ima.

Parameters:
[in,out] ima The image to be drawn.
[in] par The polygon site set.
[in] v The value to assign to all drawn pixels.
Precondition:
ima has to be initialized.

Definition at line 70 of file polygon.hh.

References mln::exact(), and line().

Referenced by polygon().

template<typename I , typename S >
void mln::draw::site_set ( Image< I > &  ima,
const Site_Set< S > &  s,
const typename I::value &  v,
unsigned  output_ratio = 1 
)

Draw a sites with value v in image ima

Parameters:
[in,out] ima The image to be drawn.
[in] b the site set to draw.
[in] v The value to assign to all drawn pixels.
[in] output_ratio size ratio between output image and the image from which the bboxes were calculated.
Precondition:
s is included in ima domain.

Definition at line 65 of file mln/draw/site_set.hh.

References mln::exact().