DGtal
0.6.devel
Main Page
Related Pages
Modules
Namespaces
Data Structures
Examples
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
examples
tutorial-examples
fileGridCurveRanges.cpp
1
30
31
#include <iostream>
32
#include <fstream>
33
#include <algorithm>
35
37
#include "DGtal/base/Common.h"
38
#include "DGtal/helpers/StdDefs.h"
39
#include "ConfigExamples.h"
41
43
#include "DGtal/io/boards/Board2D.h"
45
46
47
48
50
51
int
main()
52
{
53
55
Z2i::Curve
c;
57
59
string
square = examplesPath +
"samples/smallSquare.dat"
;
61
63
fstream inputStream;
64
inputStream.open (square.c_str(), ios::in);
65
c.
initFromVectorStream
(inputStream);
66
inputStream.close();
68
70
DGtal::Board2D
aBoard;
72
73
//displaying domain
74
Z2i::Point
low(-1,-1);
75
Z2i::Point
up(3,3);
76
Z2i::Domain
aDomain( low,up );
77
aBoard <<
SetMode
(aDomain.className(),
"Paving"
) << aDomain;
78
80
aBoard << c;
81
aBoard.
saveEPS
(
"DisplayGridCurveTuto.eps"
);
83
85
Z2i::Curve::InnerPointsRange
r1 = c.getInnerPointsRange();
86
aBoard << r1;
88
aBoard.
saveEPS
(
"DisplayInnerPointsTuto.eps"
);
89
91
Z2i::Curve::IncidentPointsRange
r2 = c.getIncidentPointsRange();
92
aBoard << r2;
94
aBoard.
saveEPS
(
"DisplayIncidentPointsTuto.eps"
);
95
96
97
return
0;
98
99
}
100
Generated on Wed Dec 19 2012 19:10:23 for DGtal by
1.8.1.1