$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln_var.cc
1 #include <mln/core/image/image2d.hh>
2 #include <mln/core/image/dmorph/image_if.hh>
3 #include <mln/core/concept/function.hh>
4 #include <mln/pw/all.hh>
5 #include <mln/core/var.hh>
6 
7 struct my_values_t : mln::Function_v2v<my_values_t>
8 {
9  typedef int result;
10 
11  int operator()(const mln::point2d&) const
12  {
13  return 0;
14  }
15 };
16 
17 int main()
18 {
19  using namespace mln;
20 
21  box2d arr(4, 2);
22  my_values_t my_values;
23 
24  // \{
25  mln_VAR(ima, my_values | arr);
26  // \}
27 
28  (void) ima;
29 
30  // \{
31  mln_VAR(imab1, ima | (pw::value(ima) == pw::cst(1u)));
32  // \}
33 
34  (void) imab1;
35 
36  // \{
37  box2d b2(1, 2);
38 //FIXME: enable these lines.
39 // mln_VAR(imad, imab1 / b2);
40 
41 // debug::println(imad);
42  // \}
43 
44 }