Milena (Olena)
User documentation 2.0a Id
Main Page
Related Pages
Modules
Namespaces
Classes
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerator
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.
25
border::thickness = 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
}
doc
examples
ima-has.cc
Generated on Thu Nov 8 2012 10:58:07 for Milena (Olena) by
1.8.2-20120930