$extrastylesheet
Olena
User documentation 2.1
An Image Processing Platform
Milena
Getting started
API Reference Manual
All Classes
Examples
Demos
Publications
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
parray-bbox.cc
1
#include <mln/core/alias/point2d.hh>
2
#include <mln/core/alias/box2d.hh>
3
#include <mln/geom/bbox.hh>
4
#include <mln/core/site_set/p_array.hh>
5
int
main()
6
{
7
using namespace
mln;
8
9
// \{
10
p_array<point2d>
arr;
11
arr.
insert
(
point2d
(1,0));
12
arr.insert(
point2d
(1,1));
13
14
// The bbox is computed thanks to bbox() algorithm.
15
box2d
box
=
geom::bbox
(arr);
16
std::cout <<
box
<< std::endl;
17
18
// p_array provides nsites(),
19
// it can be retrieved in constant time.
20
std::cout <<
"nsites = "
<< arr.
nsites
() << std::endl;
21
// \}
22
}
doc
examples
parray-bbox.cc
Copyright (C) 2012 EPITA Research and Development Laboratory (LRDE)