32#include "ConfigExamples.h"
33#include "DGtal/helpers/StdDefs.h"
34#include "DGtal/base/Common.h"
35#include "DGtal/geometry/surfaces/estimation/MaximalSegmentSliceEstimation.h"
36#include "DGtal/helpers/Shortcuts.h"
37#include "DGtal/io/viewers/PolyscopeViewer.h"
54 Point p =
K.uCoords(pointels[0]),
55 u =
K.uCoords(pointels[1]) - p,
56 v =
K.uCoords(pointels[3]) - p;
58 static const RealPoint shift(-0.5, -0.5, -0.5);
60 return p + 0.5 * u + 0.5 * v + shift;
65int main(
int argc,
char** argv)
68 params(
"polynomial",
"ellipsoid")(
"gridstep",
"1.0");
76 double gridstep = params[
"gridstep"].as<
double>();
84 estimator.init(gridstep, surfels.begin(), surfels.end());
88 std::vector<Estimator::Quantity> quantities;
89 estimator.eval(surfels.begin(), surfels.end(), std::back_inserter(quantities));
94 for (std::size_t i = 0; i < surfels.size(); ++i)
96 const Surfel& s = surfels[i];
99 const RealPoint& n = normal.getNormalized();
102 viewer.drawColor(fillColor);
106 viewer.drawLine(origin, origin + 1.5 * n);
65int main(
int argc,
char** argv) {
…}
Structure representing an RGB triple with alpha component.
DigitalSurfaceContainer::Surfel Surfel
typename TetrahedronEstimator::Quantity Quantity
Aim: This class is used to simplify shape and surface creation. With it, you can create new shapes an...
Space::RealPoint RealPoint
static KSpace getKSpace(const Point &low, const Point &up, Parameters params=parametersKSpace())
static CountedPtr< DigitizedImplicitShape3D > makeDigitizedImplicitShape3D(CountedPtr< ImplicitShape3D > shape, Parameters params=parametersDigitizedImplicitShape3D())
static CellRange getPrimalVertices(const KSpace &K, const SCell &s)
static SurfelRange getSurfelRange(CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > surface, const Parameters ¶ms=parametersDigitalSurface())
static CountedPtr< DigitalSurface > makeDigitalSurface(CountedPtr< TPointPredicate > bimage, const KSpace &K, const Parameters ¶ms=parametersDigitalSurface())
::DGtal::DigitalSurface< ExplicitSurfaceContainer > DigitalSurface
static Parameters defaultParameters()
LightDigitalSurface::SCell SCell
static CountedPtr< BinaryImage > makeBinaryImage(Domain shapeDomain)
static CountedPtr< ImplicitShape3D > makeImplicitShape3D(const Parameters ¶ms=parametersImplicitShape3D())
CountedPtr< SH3::DigitalSurface > surface
CountedPtr< SH3::BinaryImage > binary_image
SH3::DigitalSurface Surface
RealPoint centerSurfel(KSpace const &K, SH3::SCell const &s)
PlaneProbingParallelepipedEstimator< DigitalPlane, ProbingMode::R1 > Estimator
KhalimskySpaceND< 3, Integer > KSpace
DGtal is the top-level namespace which contains all DGtal functions and types.
PointVector< 3, double > RealPoint