Example of DGtal kernel and export with Board2D.
Display 2D points in its domain and export woth Board2D.
#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"
{
typedef MySpace::Point MyPoint;
MyPoint p1(-3,-4);
MyPoint p2(10,4);
MyPoint p3(5,1);
board << p1 << p2 << p3;
board.
saveSVG(
"demo-kernel-1.svg");
board.
saveEPS(
"demo-kernel-1.eps");
return 0;
}
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
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
void saveSVG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
DGtal is the top-level namespace which contains all DGtal functions and types.