00001 #include <mln/core/image/image2d.hh>
00002 #include <mln/core/var.hh>
00003 #include <mln/core/site_set/p_array.hh>
00004
00005 #include <mln/value/int_u8.hh>
00006 #include <mln/value/label_8.hh>
00007
00008 #include <mln/make/image.hh>
00009
00010 #include <mln/data/fill.hh>
00011
00012 #include <mln/debug/println.hh>
00013
00014 int main()
00015 {
00016 using namespace mln;
00017 using value::int_u8;
00018 using value::label_8;
00019
00020
00021
00022 bool vals[6][5] = {
00023 {0, 1, 1, 0, 0},
00024 {0, 1, 1, 0, 0},
00025 {0, 0, 0, 0, 0},
00026 {1, 1, 0, 1, 0},
00027 {1, 0, 1, 1, 1},
00028 {1, 0, 0, 0, 0}
00029 };
00030 image2d<bool> ima = make::image(vals);
00031
00032
00033
00034 p_array<point2d> arr;
00035
00036
00037 arr.append(point2d(0, 1));
00038 arr.append(point2d(4, 0));
00039
00040
00041
00042
00043
00044 data::fill((ima | arr).rw(), 0);
00045
00046 debug::println((ima | arr));
00047
00048 mln_VAR(ima2, ima | arr);
00049
00050 data::fill(ima2, 0);
00051
00052
00053 debug::println(ima2);
00054 }