$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
logical-not.cc
1 #include <mln/core/image/image2d.hh>
2 
3 #include <mln/make/image.hh>
4 
5 #include <mln/logical/not.hh>
6 
7 #include <doc/tools/sample_utils.hh>
8 int main()
9 {
10  using namespace mln;
11 
12  // \{
13  bool vals[5][5] = {
14  {1, 0, 1, 0, 0},
15  {0, 1, 0, 1, 0},
16  {1, 0, 1, 0, 0},
17  {0, 1, 0, 1, 0},
18  {0, 1, 0, 1, 0}
19  };
20  image2d<bool> ima = make::image(vals);
21  // \}
22  doc::pbmsave(ima, "logical-not");
23 
24 
25  // \{
26  image2d<bool> ima_neg = logical::not_(ima);
27  // \}
28 
29  doc::pbmsave(ima_neg, "logical-not");
30 
31  // \{
33  // \}
34 
35  doc::pbmsave(ima, "logical-not");
36 }