33#include "ConfigExamples.h"
34#include "DGtal/helpers/StdDefs.h"
35#include "DGtal/helpers/Shortcuts.h"
36#include "DGtal/helpers/ShortcutsGeometry.h"
38#include "DGtal/io/viewers/PolyscopeViewer.h"
44int main(
int argc,
char** argv) {
50 params(
"polynomial",
"3*x^2+2*y^2+z^2-90" )(
"gridstep", 0.25 );
70 surfels,
"Mean Curv", mean_curvs
72 "Gauss Curve", gauss_curvs
81 std::string objectName =
"Surfels 1";
82 viewer.
draw(surfels, objectName);
83 viewer.
addQuantity(objectName,
"Mean Curv", mean_curvs);
84 viewer.
addQuantity(objectName,
"Gauss Curv", gauss_curvs);
93 std::string objectName2 =
"Surfels 3";
97 auto surfIt = surfels.begin();
98 auto mcurveIt = mean_curvs.begin();
99 auto gcurveIt = gauss_curvs.begin();
100 auto ncurveIt = normals.begin();
102 for (; surfIt != surfels.end(); ++surfIt, ++mcurveIt, ++gcurveIt, ++ncurveIt) {
104 viewer <<
WithQuantity(*surfIt,
"Mean Curv", *mcurveIt);
105 viewer.
addQuantity(objectName2,
"Gauss Curve", *gcurveIt);
106 viewer.
addQuantity(objectName2,
"Normals", *ncurveIt);
std::string draw(const Point &p, const std::string &uname="Point_{i}")
void addQuantity(const std::string &oName, const std::string &qName, const Type &value, QuantityScale scale=QuantityScale::UNKNOWN)
std::string newVolumetricList(const std::string &name)
void show() override
Starts the event loop and display of elements.
Aim: This class is used to simplify shape and surface creation. With it, you can create new shapes an...
static Scalars getMeanCurvatures(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersShapeGeometry())
static RealPoints getPositions(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersShapeGeometry())
static RealVectors getNormalVectors(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersShapeGeometry())
static Parameters defaultParameters()
static Scalars getGaussianCurvatures(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersShapeGeometry())
Aim: This class is used to simplify shape and surface creation. With it, you can create new shapes an...
static KSpace getKSpace(const Point &low, const Point &up, Parameters params=parametersKSpace())
static CountedPtr< DigitizedImplicitShape3D > makeDigitizedImplicitShape3D(CountedPtr< ImplicitShape3D > shape, Parameters params=parametersDigitizedImplicitShape3D())
static SurfelRange getSurfelRange(CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > surface, const Parameters ¶ms=parametersDigitalSurface())
static CountedPtr< LightDigitalSurface > makeLightDigitalSurface(CountedPtr< BinaryImage > bimage, const KSpace &K, const Parameters ¶ms=parametersDigitalSurface())
static Parameters defaultParameters()
static CountedPtr< BinaryImage > makeBinaryImage(Domain shapeDomain)
static CountedPtr< ImplicitShape3D > makeImplicitShape3D(const Parameters ¶ms=parametersImplicitShape3D())
CountedPtr< SH3::DigitalSurface > surface
CountedPtr< SH3::BinaryImage > binary_image
Z3i this namespace gathers the standard of types for 3D imagery.
DGtal is the top-level namespace which contains all DGtal functions and types.
Attach a property to an element.
ShortcutsGeometry< Z3i::KSpace > SHG3