33#include "DGtal/base/Common.h"
34#include "DGtal/helpers/StdDefs.h"
35#include "DGtal/io/viewers/PolyscopeViewer.h"
36#include "DGtal/geometry/tools/SphericalAccumulator.h"
46void testSphericalViewer()
55 for(
unsigned int i=0; i< 10000; i++)
56 accumulator.addDirection(
Vector (1+10.0*(rand()-RAND_MAX/2)/(
double)RAND_MAX,
57 (1+10.0*(rand()-RAND_MAX/2))/(
double)RAND_MAX,
58 (1+10.0*(rand()-RAND_MAX/2))/(
double)RAND_MAX));
62 viewer << accumulator;
77void testSphericalViewerInteger()
79 trace.
beginBlock (
"Testing Spherical Accumulator Viewer with Integer numbers..." );
86 for(
unsigned int i=0; i< 10000; i++)
87 accumulator.addDirection(
Vector (1+(rand()-RAND_MAX/2),
88 (1+(rand()-RAND_MAX/2)),
89 (1+(rand()-RAND_MAX/2))));
92 viewer << accumulator;
111int main(
int argc,
char** argv )
115 for (
int i = 0; i < argc; ++i )
119 testSphericalViewer();
120 testSphericalViewerInteger();
Aim: Implements basic operations that will be used in Point and Vector classes.
void show() override
Starts the event loop and display of elements.
Aim: implements an accumulator (as histograms for 1D scalars) adapted to spherical point samples.
std::vector< Quantity >::const_iterator ConstIterator
Type to iterate on bin values.
void beginBlock(const std::string &keyword="")
DGtal is the top-level namespace which contains all DGtal functions and types.