DGtal
0.9.2
Main Page
Related Pages
Modules
Namespaces
Data Structures
Examples
examples
doc-examples
demo-kernel-1.cpp
1
29
#include <iostream>
31
#include "DGtal/base/Common.h"
32
#include "DGtal/kernel/SpaceND.h"
33
#include "DGtal/helpers/StdDefs.h"
34
#include "DGtal/kernel/domains/HyperRectDomain.h"
35
#include "DGtal/io/boards/Board2D.h"
36
38
39
using namespace
std
;
40
using namespace
DGtal
;
41
43
44
int
main()
45
{
46
// define digital space and domain
47
typedef
DGtal::SpaceND<2, DGtal::int32_t>
MySpace;
48
typedef
MySpace::Point MyPoint;
49
typedef
HyperRectDomain<MySpace>
MyDomain;
50
// define points in this domain
51
MyPoint p1(-3,-4);
52
MyPoint p2(10,4);
53
MyPoint p3(5,1);
54
MyDomain domain(p1,p2);
55
// 2D display
56
Board2D
board;
57
board << domain;
58
board << p1 << p2 << p3;
59
board.
saveSVG
(
"demo-kernel-1.svg"
);
60
board.
saveEPS
(
"demo-kernel-1.eps"
);
61
return
0;
62
}
63
// //
DGtal::SpaceND
Aim: SpaceND is a utility class that defines the fundamental structure of a Digital Space in ND...
Definition:
SpaceND.h:95
DGtal::HyperRectDomain
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
Definition:
HyperRectDomain.h:92
std
STL namespace.
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition:
ClosedIntegerHalfPlane.h:48
LibBoard::Board::saveSVG
void saveSVG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition:
Board.cpp:1012
LibBoard::Board::saveEPS
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition:
Board.cpp:805
DGtal::Board2D
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)...
Definition:
Board2D.h:70
Generated on Mon Jun 27 2016 09:38:09 for DGtal by
1.8.10