29 #include "DGtal/shapes/parametric/Ball3D.h" 31 #include "DGtal/helpers/StdDefs.h" 33 #include "DGtal/shapes/GaussDigitizer.h" 34 #include "DGtal/io/Color.h" 35 #include "DGtal/topology/SurfelAdjacency.h" 36 #include "DGtal/topology/DigitalSurface.h" 37 #include "DGtal/topology/helpers/BoundaryPredicate.h" 38 #include "DGtal/topology/SetOfSurfels.h" 39 #include "DGtal/io/colormaps/GradientColorMap.h" 40 #include "DGtal/topology/SCellsFunctors.h" 41 #include "DGtal/io/viewers/Viewer3D.h" 45 using namespace DGtal;
52 int main(
int argc,
char** argv)
64 RealPoint c1(0, 0, 0 );
65 EuclideanShape ball1( c1, 12.2 );
70 RealPoint p1 =RealPoint( -15.0, -15.0, -15.0 );
71 RealPoint p2 =RealPoint( 15.0, 15.0, 15.0 );
72 dshape.
init( RealPoint( p1 ), RealPoint( p2 ), 1.0);
93 MySurfelAdjacency surfAdj(
true );
94 MySetOfSurfels theSetOfSurfels( K, surfAdj );
100 QApplication application(argc,argv);
115 for ( std::set<SCell>::iterator it = theSetOfSurfels.begin(), it_end = theSetOfSurfels.end();
119 RealPoint A = midpoint( *it );
121 double a =ball1.meanCurvature(Angles);
147 unsigned int nbSurfels = 0;
150 for ( std::set<SCell>::iterator it = theSetOfSurfels.begin(), it_end = theSetOfSurfels.end();
151 it != it_end; ++it, ++nbSurfels )
153 RealPoint A = midpoint( *it );
156 double curvature =ball1.meanCurvature(Angles);
164 viewer << Viewer3D<>::updateDisplay;
166 return application.exec();
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
MyDigitalSurface::SurfelSet SurfelSet
int main(int argc, char **argv)
std::pair< double, double > AngularCoordinates
const Domain domain(Point(1, 2), Point(6, 5))
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
Aim: A utility class for constructing surfaces (i.e. set of (n-1)-cells).
std::set< SCell > SurfelSet
Preferred type for defining a set of surfels (always signed cells).
void addColor(const Color &color)
const Point & upperBound() const
Aim: Implements basic operations that will be used in Point and Vector classes.
void attach(const EuclideanShape &shape)
void init(const RealPoint &xLow, const RealPoint &xUp, typename RealVector::Component gridStep)
bool init(const Point &lower, const Point &upper, bool isClosed)
Aim: A class for computing the Gauss digitization of some Euclidean shape, i.e. its intersection with...
std::string className() const
DGtal is the top-level namespace which contains all DGtal functions and types.
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value...
const Point & lowerBound() const
Aim: A model of CDigitalSurfaceContainer which defines the digital surface as connected surfels...
Structure representing an RGB triple with alpha component.
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex...
Modifier class in a Display3D stream. Useful to choose your own mode for a given class. Realizes the concept CDrawableWithDisplay3D.
Aim: Model of the concept StarShaped3D represents any Sphere in the space.