$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ima-has.cc
1 #include <mln/core/image/image2d.hh>
2 int main()
3 {
4  using namespace mln;
5 
6  // \{
7  // Default border size is set to 0.
8 
9  // Image defined on a box2d from
10  // (0, 0) to (2, 2)
11  image2d<int> ima1(2, 3);
12 
13  std::cout << "ima1.has(0, 0) : "
14  << ima1.has(point2d(0, 0)) << std::endl;
15 
16  std::cout << "ima1.has(-3, 0) : "
17  << ima1.has(point2d(-3, 0)) << std::endl;
18 
19  std::cout << "ima1.has(2, 5) : "
20  << ima1.has(point2d(2, 5)) << std::endl;
21 
22  std::cout << "=========" << std::endl;
23 
24  // Set default border size to 0.
26 
27  // Image defined on a box2d from
28  // (0, 0) to (2, 2)
29  image2d<int> ima2(2, 3);
30 
31  std::cout << "ima2.has(0, 0) : "
32  << ima2.has(point2d(0, 0)) << std::endl;
33 
34  std::cout << "ima2.has(-3, 0) : "
35  << ima2.has(point2d(-3, 0)) << std::endl;
36 
37  std::cout << "ima2.has(2, 5) : "
38  << ima2.has(point2d(2, 5)) << std::endl;
39  // \}
40 }