107 inline Vector3 getPos ()
const {
return _pathPoints->getPosAt(_pointIndex); }
111 inline double getValue ()
const {
return _pathPoints->getValueAt(_pointIndex); }
114 inline void setPos(
const Vector3& p) { _pathPoints->setPosAt(p, _pointIndex); }
118 inline void setValue(
const double& v) { _pathPoints->setValueAt(
static_cast<float>(v), _pointIndex); }
121 inline unsigned int numPoints ()
const {
return _numPoints; }
127 inline unsigned int numTotalProcessedPoints ()
const {
return isEnd() ? _pointCounterInc+_pointCounterDec : _pointCounterInc+_pointCounterDec+1; }
157 bool _findValidPathPointList();
165 unsigned int _pathIndex;
167 unsigned int _pointIndex;
170 unsigned int _numPathPointLists;
172 unsigned int _numPoints;
175 unsigned int _startPathIndex;
177 unsigned int _startPointIndex;
180 unsigned int _pointCounterInc;
183 unsigned int _pointCounterDec;
264 inline Vector3 getPos ()
const {
return _pathPoints->getPosAt(_pointIndex); }
268 inline double getValue ()
const {
return _pathPoints->getValueAt(_pointIndex); }
271 inline unsigned int numPoints ()
const {
return _numPoints; }
277 inline unsigned int numTotalProcessedPoints ()
const {
return isEnd() ? _pointCounterInc+_pointCounterDec : _pointCounterInc+_pointCounterDec+1; }
307 bool _findValidPathPointList();
315 unsigned int _pathIndex;
317 unsigned int _pointIndex;
320 unsigned int _numPathPointLists;
322 unsigned int _numPoints;
325 unsigned int _startPathIndex;
327 unsigned int _startPointIndex;
330 unsigned int _pointCounterInc;
333 unsigned int _pointCounterDec;
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
void makeEnd()
Makes this iterator pointing to the "end" of the CSO.
bool isEnd() const
Returns whether this iterator points to the end of the CSO.
unsigned int numTotalProcessedPoints() const
Returns the total number of processed points (i.e.
const Vector4 & getPosValue() const
Returns the current point including its value.
CSOPathPointConstIterator prev() const
Returns an iterator to the prev path point if available and otherwise a CSOPathPointIteratorEnd.
CSOPathPointConstIterator(const CSO *cso, const CSOPathPoints *pathPoints, unsigned int startPointIndex=0)
Constructor.
unsigned int getPointIndex() const
Returns the index of the current point.
Vector3 getPos() const
Returns the current point.
CSOPathPointConstIterator(const CSO *cso, unsigned int startPathIndex=0, unsigned int startPointIndex=0)
Constructor.
~CSOPathPointConstIterator()=default
Default destructor.
unsigned int numPoints() const
Returns the total number of points of the CSO.
const CSOPathPoints * getPathPoints() const
CSOPathPointConstIterator(const CSOPathPointConstIterator &rhs)
Copy constructor.
CSOPathPointConstIterator()
Default constructor.
static const unsigned int INVALID_INDEX
unsigned int numProcessedPoints() const
Returns the number of processed points (relative to the start).
unsigned int getPathIndex() const
Returns the index of the current path.
void resetCounters()
Resets the internal counters that define the number of processed points.
CSOPathPointConstIterator(const CSO *cso, const CSOSeedPoint *startSeedPoint)
Constructor.
const CSO * getCSO() const
Returns the CSO.
CSOPathPointConstIterator next() const
Returns an iterator to the next path point if available and otherwise a CSOPathPointIteratorEnd.
CSOPathPointConstIterator(const CSO *cso, const CSOPathPoints *pathPoints, unsigned int startPathIndex, unsigned int startPointIndex=0)
Constructor.
double getValue() const
Returns the value of the current point.
void setPos(const Vector3 &p)
Sets the current point to the given value.
double getValue() const
Returns the value of the current point.
CSOPathPointIterator(const CSOPathPointIterator &rhs)
Copy constructor.
unsigned int getPathIndex() const
Returns the index of the current path.
bool isEnd() const
Returns if this iterator points to the end of the cso.
void setPosValue(const Vector4 &p)
Sets the current point and its value to the given value.
CSO * getCSO()
Returns the cso.
CSOPathPointIterator next() const
Returns an iterator to the next path point if available and otherwise a CSOPathPointIteratorEnd.
CSOPathPointIterator(CSO *cso, CSOSeedPoint *startSeedPoint)
Constructor.
const CSO * getCSO() const
Returns the cso.
static const unsigned int INVALID_INDEX
CSOPathPointIterator(CSO *cso, CSOPathPoints *pathPoints, unsigned int startPathIndex, unsigned int startPointIndex)
Constructor.
CSOPathPoints * getPathPoints()
~CSOPathPointIterator()=default
Default destructor.
void resetCounters()
Resets the internal counters that define the number of processed points.
unsigned int numProcessedPoints() const
Returns the number of processed points (relative to the start).
const Vector4 & getPosValue() const
Returns the current point including its value.
void makeEnd()
Makes this iterator pointing to the "end" of the cso.
CSOPathPointIterator prev() const
Returns an iterator to the prev path point if available and otherwise a CSOPathPointIteratorEnd.
unsigned int getPointIndex() const
Returns the index of the current point.
CSOPathPointIterator(CSO *cso, CSOPathPoints *pathPoints, unsigned int startPointIndex)
Constructor.
CSOPathPointIterator(CSO *cso, unsigned int startPathIndex=0, unsigned int startPointIndex=0)
Constructor.
Vector3 getPos() const
Returns the current point.
unsigned int numTotalProcessedPoints() const
Returns the total number of processed points (i.e.
CSOPathPointIterator()
Default constructor.
void setValue(const double &v)
Sets the value of the current point to the given value.
unsigned int numPoints() const
Returns the total number of points of the cso.
const CSOPathPoints * getPathPoints() const
The CSOPathPoints is a list of world coordinates which are interpolated by a certain interpolation sc...
The CSOSeedPoint can be interactively set and modified and is the framework for contours.
The CSO represents a contour segmentation object.
const unsigned int INVALID_INDEX
A symbolic value that indicates an invalid index (-1).
ScopeGuard< Functor > operator+(ScopeGuardOnExit, Functor &&fn)
T mlAbs(T a)
Defines ML specific abs template since only type-dependent library functions exists.
const CSOPathPointIterator CSOPathPointIteratorEnd
A symbolic iterator that indicates that a CSOPathPointIterator has reached the end of a cso.
FloatingPointVector< T, size, DataContainer > & operator-=(FloatingPointVector< T, size, DataContainer > &op1, const FloatingPointVector< T, size, DataContainer > &buffer)
Arithmetic assignment: Component-wise subtraction of buffer from *this.
const CSOPathPointConstIterator CSOPathPointConstIteratorEnd
A symbolic iterator that indicates that a CSOPathPointConstIterator has reached the end of a cso.
bool operator==(const Tmat2< DT > &a, const Tmat2< DT > &b)
a == b ? Returns true if yes.
bool operator!=(const Tmat2< DT > &a, const Tmat2< DT > &b)
a != b ? Returns true if yes.
FloatingPointVector< T, size, DataContainer > & operator+=(FloatingPointVector< T, size, DataContainer > &op1, const FloatingPointVector< T, size, DataContainer > &buffer)
Arithmetic assignment: Component-wise addition.
FloatingPointVector< T, size, DataContainer > operator-(FloatingPointVector< T, size, DataContainer > lhs, const FloatingPointVector< T, size, DataContainer > &rhs)
Return value is the component-wise subtraction of rhs from lhs.