Namespaces | |
namespace | impl |
Implementation namespace of debug namespace. | |
namespace | internal |
Functions | |
template<typename I, typename G, typename F> | |
void | draw_graph (Image< I > &ima, const p_edges< G, F > &pe, typename I::value vcolor, typename I::value ecolor) |
template<typename I, typename G, typename F, typename V, typename E> | |
void | draw_graph (Image< I > &ima, const p_vertices< util::line_graph< G >, F > &pv, const Function< V > &vcolor_f_, const Function< E > &ecolor_f_) |
Draw an image ima from a mln::p_vertices pv . | |
template<typename I, typename G, typename F, typename V, typename E> | |
void | draw_graph (Image< I > &ima, const p_vertices< G, F > &pv, const Function< V > &vcolor_f_, const Function< E > &ecolor_f_) |
Draw an image ima from a mln::p_vertices pv . | |
template<typename I, typename G, typename F> | |
void | draw_graph (Image< I > &ima, const p_vertices< G, F > &pv, typename I::value vcolor, typename I::value ecolor) |
Draw an image ima from a mln::p_vertices pv , with value vcolor for vertices, value ecolor for edges and 0 for the background. | |
std::string | filename (const std::string &filename, int id) |
Constructs and returns a formatted output file name. | |
unsigned short | format (unsigned char v) |
Format an unsigned char to print it properly, i.e., like an integer value. | |
signed short | format (signed char v) |
Format a signed char to print it properly, i.e., like an integer value. | |
char | format (bool v) |
Format a Boolean to print it nicely: "|" for true and "-" for false. | |
template<typename T> | |
const T & | format (const T &v) |
Default version for formatting a value is a no-op. | |
template<typename T> | |
void | histo (const mln::histo::array< T > &h, const std::string &filename) |
template<typename I> | |
void | iota (Image< I > &input) |
template<typename I> | |
void | println (const std::string &msg, const Image< I > &input) |
Print the message msg and the image input on the standard output. | |
template<typename I> | |
void | println (const Image< I > &input) |
Print the image input on the standard output. | |
template<typename I> | |
void | println_with_border (const Image< I > &input) |
Print the image input on the standard output. | |
void | put_word (image2d< char > &inout, const point2d &word_start, const std::string &word) |
Put the word starting at location word_start in the image inout . | |
template<typename I> | |
image2d< typename I::value > | slices_2d (const Image< I > &input, float ratio_hv, const typename I::value &bg) |
Create a 2D image of the slices of the 3D image input . | |
template<typename I> | |
image2d< typename I::value > | slices_2d (const Image< I > &input, unsigned n_horizontal, unsigned n_vertical, const typename I::value &bg) |
Create a 2D image of the slices of the 3D image input . | |
template<typename I, typename J> | |
mln::trait::ch_value< I, value::rgb8 >::ret | superpose (const Image< I > &input, const Image< J > &object) |
template<typename I, typename J> | |
mln::trait::ch_value< I, value::rgb8 >::ret | superpose (const Image< I > &input_, const Image< J > &object_, const value::rgb8 &object_color) |
Superpose two images. | |
Variables | |
bool | quiet = false |
void mln::debug::draw_graph | ( | Image< I > & | ima, | |
const p_edges< G, F > & | pe, | |||
typename I::value | vcolor, | |||
typename I::value | ecolor | |||
) | [inline] |
Definition at line 110 of file draw_graph.hh.
References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and mln::draw::line().
void mln::debug::draw_graph | ( | Image< I > & | ima, | |
const p_vertices< util::line_graph< G >, F > & | pv, | |||
const Function< V > & | vcolor_f_, | |||
const Function< E > & | ecolor_f_ | |||
) | [inline] |
Draw an image ima
from a mln::p_vertices pv
.
Colors for vertices are defined through vcolor_f_
. Colors for edges are defined though ecolor_f_
.
Definition at line 195 of file draw_graph.hh.
References mln::p_line2d::begin(), mln::p_line2d::end(), mln::trace::entering(), mln::exact(), mln::trace::exiting(), mln::p_vertices< G, F >::graph(), and mln::draw::line().
void mln::debug::draw_graph | ( | Image< I > & | ima, | |
const p_vertices< G, F > & | pv, | |||
const Function< V > & | vcolor_f_, | |||
const Function< E > & | ecolor_f_ | |||
) | [inline] |
Draw an image ima
from a mln::p_vertices pv
.
Colors for vertices are defined through vcolor_f_
. Colors for edges are defined though ecolor_f_
.
Definition at line 165 of file draw_graph.hh.
References mln::trace::entering(), mln::exact(), mln::trace::exiting(), mln::p_vertices< G, F >::graph(), and mln::draw::line().
void mln::debug::draw_graph | ( | Image< I > & | ima, | |
const p_vertices< G, F > & | pv, | |||
typename I::value | vcolor, | |||
typename I::value | ecolor | |||
) | [inline] |
Draw an image ima
from a mln::p_vertices pv
, with value vcolor
for vertices, value ecolor
for edges and 0 for the background.
Definition at line 137 of file draw_graph.hh.
References mln::trace::entering(), mln::exact(), mln::trace::exiting(), mln::p_vertices< G, F >::graph(), and mln::draw::line().
Referenced by mln::make_debug_graph_image().
std::string mln::debug::filename | ( | const std::string & | filename, | |
int | id = -1 | |||
) | [inline] |
Constructs and returns a formatted output file name.
The file name is formatted as follow:
`filename_prefix`_`id`_`filename`
Where:
`postfix_id` is autoincremented by default. Its value can be forced.
Definition at line 73 of file filename.hh.
References mln::debug::internal::filename_prefix, and mln::id().
unsigned short mln::debug::format | ( | unsigned char | v | ) | [inline] |
signed short mln::debug::format | ( | signed char | v | ) | [inline] |
char mln::debug::format | ( | bool | v | ) | [inline] |
const T & mln::debug::format | ( | const T & | v | ) | [inline] |
Default version for formatting a value is a no-op.
Definition at line 64 of file format.hh.
Referenced by mln::metal::operator<<(), mln::algebra::operator<<(), mln::value::operator<<(), mln::operator<<(), mln::debug::impl::println(), and mln::debug::impl::println_with_border().
void mln::debug::histo | ( | const mln::histo::array< T > & | h, | |
const std::string & | filename | |||
) | [inline] |
void mln::debug::iota | ( | Image< I > & | input | ) | [inline] |
Fill the image input
with successive values.
[in,out] | input | The image in which values are assigned. |
Definition at line 77 of file debug/iota.hh.
References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and mln::debug::impl::iota().
Referenced by mln::chck1d(), mln::chck2d(), mln::chk(), mln::chk1d(), mln::chk2d(), and mln::chk3d().
void mln::debug::println | ( | const std::string & | msg, | |
const Image< I > & | input | |||
) | [inline] |
Print the message msg
and the image input
on the standard output.
Definition at line 98 of file println.hh.
void mln::debug::println | ( | const Image< I > & | input | ) | [inline] |
Print the image input
on the standard output.
Definition at line 87 of file println.hh.
References mln::geom::bbox(), mln::trace::entering(), mln::exact(), mln::trace::exiting(), mln::debug::impl::println(), and quiet.
Referenced by mln::util::internal::adjacency_matrix_impl_selector< V, Q >::print_data_(), println(), and debug::println_graph().
void mln::debug::println_with_border | ( | const Image< I > & | input | ) | [inline] |
Print the image input
on the standard output.
Definition at line 79 of file println_with_border.hh.
References mln::geom::bbox(), mln::exact(), and mln::debug::impl::println_with_border().
void mln::debug::put_word | ( | image2d< char > & | inout, | |
const point2d & | word_start, | |||
const std::string & | word | |||
) | [inline] |
Put the word
starting at location word_start
in the image inout
.
Definition at line 55 of file put_word.hh.
References mln::image2d< T >::has(), mln::point< G, C >::last_coord(), mln::right, and mln::trace::warning().
image2d< typename I::value > mln::debug::slices_2d | ( | const Image< I > & | input, | |
float | ratio_hv, | |||
const typename I::value & | bg | |||
) | [inline] |
Create a 2D image of the slices of the 3D image input
.
Definition at line 161 of file slices_2d.hh.
References mln::trace::entering(), mln::exact(), mln::trace::exiting(), mln::debug::internal::slices2d_helper(), and slices_2d().
image2d< typename I::value > mln::debug::slices_2d | ( | const Image< I > & | input, | |
unsigned | n_horizontal, | |||
unsigned | n_vertical, | |||
const typename I::value & | bg | |||
) | [inline] |
Create a 2D image of the slices of the 3D image input
.
Definition at line 78 of file slices_2d.hh.
References mln::apply_p2p(), mln::trace::entering(), mln::exact(), mln::trace::exiting(), mln::data::fill(), mln::data::paste(), mln::slice(), and mln::fun::p2p::translation().
Referenced by slices_2d().
mln::trait::ch_value< I, value::rgb8 >::ret mln::debug::superpose | ( | const Image< I > & | input, | |
const Image< J > & | object | |||
) | [inline] |
mln::trait::ch_value< I, value::rgb8 >::ret mln::debug::superpose | ( | const Image< I > & | input_, | |
const Image< J > & | object_, | |||
const value::rgb8 & | object_color | |||
) | [inline] |
Superpose two images.
[in] | input_ | An image. Its value type must be convertible toward value::rgb8 thanks to a conversion operator or convert::from_to. |
[in] | object_ | A scalar or labeled image. Objects used for superposition. have their pixel values different from 0. |
[in] | object_color | The color used to draw the objects in object_ . |
input_
and object_
must have the same domain.Definition at line 79 of file debug/superpose.hh.
References mln::data::convert(), mln::pw::cst(), mln::trace::entering(), mln::exact(), mln::trace::exiting(), mln::data::fill(), mln::pw::value(), and mln::literal::zero.
Referenced by superpose().
bool mln::debug::quiet = false |