DGtal
2.1.0
Loading...
Searching...
No Matches
fileGridCurveRanges.cpp
Go to the documentation of this file.
1
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
using namespace
DGtal
;
48
50
51
int
main
()
52
{
53
55
Z2i::Curve
c;
57
59
std::string square = examplesPath +
"samples/smallSquare.dat"
;
61
63
std::fstream inputStream;
64
inputStream.open (square.c_str(), std::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
DGtal::Board2D
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Definition
Board2D.h:71
DGtal::ConstRangeAdapter
Aim: model of CConstBidirectionalRange that adapts any range of elements bounded by two iterators [it...
Definition
ConstRangeAdapter.h:87
DGtal::GridCurve
Aim: describes, in a cellular space of dimension n, a closed or open sequence of signed d-cells (or d...
Definition
GridCurve.h:173
DGtal::GridCurve::initFromVectorStream
bool initFromVectorStream(std::istream &in)
DGtal::GridCurve::getIncidentPointsRange
IncidentPointsRange getIncidentPointsRange() const
Definition
GridCurve.h:478
DGtal::GridCurve::getInnerPointsRange
InnerPointsRange getInnerPointsRange() const
Definition
GridCurve.h:454
DGtal::HyperRectDomain< Space >
DGtal::HyperRectDomain::className
std::string className() const
DGtal::PointVector< dim, Integer >
LibBoard::Board::saveEPS
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition
Board.cpp:804
main
int main()
Definition
fileGridCurveRanges.cpp:51
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::SetMode
Modifier class in a Board2D stream. Useful to choose your own mode for a given class....
Definition
Board2D.h:247
examples
tutorial-examples
fileGridCurveRanges.cpp
Generated on Tue Aug 26 2025 14:27:43 for DGtal by
1.9.8