DGtal
1.3.0
Loading...
Searching...
No Matches
examples
doc-examples
demo-kernel-1.cpp
Go to the documentation of this file.
1
36
#include <iostream>
37
#include "DGtal/base/Common.h"
38
#include "DGtal/kernel/SpaceND.h"
39
#include "DGtal/helpers/StdDefs.h"
40
#include "DGtal/kernel/domains/HyperRectDomain.h"
41
#include "DGtal/io/boards/Board2D.h"
42
44
45
using namespace
std
;
46
using namespace
DGtal
;
47
49
50
int
main
()
51
{
52
// define digital space and domain
53
typedef
DGtal::SpaceND<2, DGtal::int32_t>
MySpace;
54
typedef
MySpace::Point MyPoint;
55
typedef
HyperRectDomain<MySpace>
MyDomain;
56
// define points in this domain
57
MyPoint p1(-3,-4);
58
MyPoint p2(10,4);
59
MyPoint p3(5,1);
60
MyDomain
domain
(p1,p2);
61
// 2D display
62
Board2D
board;
63
board <<
domain
;
64
board << p1 << p2 << p3;
65
board.
saveSVG
(
"demo-kernel-1.svg"
);
66
board.
saveEPS
(
"demo-kernel-1.eps"
);
67
return
0;
68
}
69
// //
DGtal::Board2D
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Definition:
Board2D.h:71
DGtal::HyperRectDomain
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
Definition:
HyperRectDomain.h:100
DGtal::SpaceND
Definition:
SpaceND.h:96
LibBoard::Board::saveEPS
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition:
Board.cpp:805
LibBoard::Board::saveSVG
void saveSVG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition:
Board.cpp:1012
main
int main()
Definition:
demo-kernel-1.cpp:50
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition:
ClosedIntegerHalfPlane.h:49
std
STL namespace.
domain
Domain domain
Definition:
testProjection.cpp:88
Generated on Sun Nov 27 2022 15:15:31 for DGtal by
1.9.5