DGtal 1.4.0
Loading...
Searching...
No Matches
demo-kernel-1.cpp File Reference
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/kernel/SpaceND.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/kernel/domains/HyperRectDomain.h"
#include "DGtal/io/boards/Board2D.h"
Include dependency graph for demo-kernel-1.cpp:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
Jacques-Olivier Lachaud (jacqu.nosp@m.es-o.nosp@m.livie.nosp@m.r.la.nosp@m.chaud.nosp@m.@uni.nosp@m.v-sav.nosp@m.oie..nosp@m.fr ) Laboratory of Mathematics (CNRS, UMR 5807), University of Savoie, France
Date
2011/03/05

An example file named demo-kernel-1.

This file is part of the DGtal library.

Definition in file demo-kernel-1.cpp.

Function Documentation

◆ main()

int main ( void )

Definition at line 50 of file demo-kernel-1.cpp.

51{
52 // define digital space and domain
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}
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Definition Board2D.h:71
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition Board.cpp:804
void saveSVG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition Board.cpp:1011
Domain domain

References domain, LibBoard::Board::saveEPS(), and LibBoard::Board::saveSVG().