31 #if defined(CurveDigitizer_RECURSES)
32 #error Recursive header files inclusion detected in CurveDigitizer.h
35 #define CurveDigitizer_RECURSES
37 #if !defined CurveDigitizer_h
39 #define CurveDigitizer_h
44 #include "DGtal/helpers/StdDefs.h"
45 #include "DGtal/base/Common.h"
49 #include "DGtal/geometry/curves/parametric/C3DParametricCurve.h"
71 template <
typename TParametricCurve>
89 typedef std::vector< std::pair < long double, unsigned int > >
MetaData;
131 void init (
long double tmin,
long double tmax,
long double timeStep );
143 void digitize ( std::back_insert_iterator < DigitalCurve > inserter );
150 void digitize ( std::back_insert_iterator < DigitalCurve > inserter, std::back_insert_iterator < MetaData > meta_inserter );
182 typedef std::map < Point, std::pair < long double, unsigned int > >
DataInfo;
196 struct KConstIter {
typename DigitalCurve::const_iterator
jt;
unsigned int k; };
198 struct KIter {
typename DigitalCurve::iterator
jt;
unsigned int k; };
278 template <
typename T>
288 #if !defined(BUILD_INLINE)
289 #include "DGtal/geometry/curves/parametric/NaiveParametricCurveDigitizer3D.ih"
298 #undef CurveDigitizer_RECURSES
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Aim: Digitization of 3D parametric curves. This method produces, for good parameters step and k_next,...
void attach(ConstAlias< TParametricCurve > p_curve)
unsigned int setKNext(unsigned int knext)
void syncData(ConstIterator bbegin, ConstIterator bend, DataInfo &weights)
~NaiveParametricCurveDigitizer3D()=default
long double timeMin
starting time (has to be lower than timeMax)
void selfDisplay(std::ostream &out) const
std::vector< std::pair< long double, unsigned int > > MetaData
DigitalCurve digitalCurve
A storage of final integer points.
Buffer::const_iterator ConstIterator
void digitize(std::back_insert_iterator< DigitalCurve > inserter)
void flashBuffers(Buffer &buffer, DataInfo &weights)
long double step
the time step value
bool metaData
A flag used to decided if meta data should be stored and returned to the user.
NaiveParametricCurveDigitizer3D(const NaiveParametricCurveDigitizer3D &other)=delete
NaiveParametricCurveDigitizer3D & operator=(const NaiveParametricCurveDigitizer3D &other)=delete
TParametricCurve::Space::RealPoint RealPoint
Real point type.
long double timeMax
the time when the digitization should stop (has to be bigger than timeMin)
NaiveParametricCurveDigitizer3D()
const TParametricCurve * curve
A pointer to the parameteric curve which is going to be digitized.
void digitize(std::back_insert_iterator< DigitalCurve > inserter, std::back_insert_iterator< MetaData > meta_inserter)
std::map< Point, std::pair< long double, unsigned int > > DataInfo
void init(long double tmin, long double tmax, long double timeStep)
void updateMetaData(const Point &p, const RealPoint &pc, DataInfo &weights, long double t)
std::vector< Point > DigitalCurve
Digital curve type.
MetaData metaDataContainter
A storage of final meta data (if requested)
BOOST_CONCEPT_ASSERT((concepts::C3DParametricCurve< TParametricCurve >))
bool is26Connected(const Point &x, const Point &y)
bool initOK
A flag which is set to true if the initial paramters are correct.
TParametricCurve::Space::Point Point
Integer point type.
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
A structure used for making iterations over digital curve with respect to K_NEXT.
DigitalCurve::const_iterator jt
A structure used for making iterations over digital curve with respect to K_NEXT.
DigitalCurve::iterator jt
PointVector< 3, double > RealPoint