31 #if defined(CurveDigitizer_RECURSES)
32 #error Recursive header files inclusion detected in CurveDigitizer.h
33 #else // defined(CurveDigitizer_RECURSES)
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"
296 #endif // !defined CurveDigitizer_h
298 #undef CurveDigitizer_RECURSES
299 #endif // else defined(CurveDigitizer_RECURSES)
unsigned int setKNext(unsigned int knext)
void digitize(std::back_insert_iterator< DigitalCurve > inserter, std::back_insert_iterator< MetaData > meta_inserter)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
MetaData metaDataContainter
A storage of final meta data (if requested)
bool metaData
A flag used to decided if meta data should be stored and returned to the user.
NaiveParametricCurveDigitizer3D(const NaiveParametricCurveDigitizer3D &other)=delete
void flashBuffers(Buffer &buffer, DataInfo &weights)
std::vector< Point > DigitalCurve
Digital curve type.
bool is26Connected(const Point &x, const Point &y)
A structure used for making iterations over digital curve with respect to K_NEXT.
TParametricCurve::Space::Point Point
Integer point type.
DigitalCurve::const_iterator jt
const TParametricCurve * curve
A pointer to the parameteric curve which is going to be digitized.
long double timeMax
the time when the digitization should stop (has to be bigger than timeMin)
DGtal is the top-level namespace which contains all DGtal functions and types.
~NaiveParametricCurveDigitizer3D()=default
void init(long double tmin, long double tmax, long double timeStep)
DigitalCurve digitalCurve
A storage of final integer points.
std::vector< std::pair< long double, unsigned int > > MetaData
NaiveParametricCurveDigitizer3D & operator=(const NaiveParametricCurveDigitizer3D &other)=delete
Aim: Digitization of 3D parametric curves. This method produces, for good parameters step and k_next,...
A structure used for making iterations over digital curve with respect to K_NEXT.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
NaiveParametricCurveDigitizer3D()
long double step
the time step value
void attach(ConstAlias< TParametricCurve > p_curve)
void updateMetaData(const Point &p, const RealPoint &pc, DataInfo &weights, long double t)
Buffer::const_iterator ConstIterator
void digitize(std::back_insert_iterator< DigitalCurve > inserter)
void syncData(ConstIterator bbegin, ConstIterator bend, DataInfo &weights)
bool initOK
A flag which is set to true if the initial paramters are correct.
DigitalCurve::iterator jt
TParametricCurve::Space::RealPoint RealPoint
Real point type.
void selfDisplay(std::ostream &out) const
std::map< Point, std::pair< long double, unsigned int > > DataInfo
long double timeMin
starting time (has to be lower than timeMax)
BOOST_CONCEPT_ASSERT((concepts::C3DParametricCurve< TParametricCurve >))