32#include "DGtal/base/Common.h"
33#include "DGtal/io/viewers/PolyscopeViewer.h"
34#include "DGtal/io/Color.h"
35#include "DGtal/helpers/StdDefs.h"
36#include "DGtal/shapes/Shapes.h"
37#include "DGtal/io/readers/PGMReader.h"
38#include "DGtal/io/readers/GenericReader.h"
39#include "DGtal/io/writers/GenericWriter.h"
40#include "DGtal/math/BasicMathFunctions.h"
42#include "ConfigTest.h"
54int main(
int argc,
char** argv )
61 trace.beginBlock(
"Testing Viewer with 3D Image View ");
64 Point p2( 125, 188, 0 );
65 Point p3( 30, 30, 30 );
67 std::string filename = testPath +
"samples/church-small.pgm";
68 std::string filename3 = testPath +
"samples/color64.ppm";
74 viewer.
draw(image2,
"Image 2");
76 viewer.
draw(image3,
"Image 3");
78 viewer.
data[
"Image 2"].transform.translate(Eigen::Vector3d{50, 50, 50});
79 viewer.
data[
"Image 3"].transform.rotate(Eigen::AngleAxisd(M_PI/2, Eigen::Vector3d{0, 1, 0}));
81 viewer << p1 << p2 << p3;
83 trace.emphase() <<
"Passed." << endl;
54int main(
int argc,
char** argv ) {
…}
std::string draw(const Point &p, const std::string &uname="Point_{i}")
std::map< std::string, DisplayData< RealPoint > > data
void show() override
Starts the event loop and display of elements.
Z3i this namespace gathers the standard of types for 3D imagery.
DGtal is the top-level namespace which contains all DGtal functions and types.
static TContainer import(const std::string &filename, std::vector< unsigned int > dimSpace=std::vector< unsigned int >())
static ImageContainer importPGM(const std::string &aFilename, const Functor &aFunctor=Functor(), bool topbotomOrder=true)