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; }
140 inline bool isEnd()
const {
return (_pathIndex == INVALID_INDEX) && (_pointIndex == INVALID_INDEX); }
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; }
290 inline bool isEnd()
const {
return (_pathIndex == INVALID_INDEX) && (_pointIndex == INVALID_INDEX); }
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.
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.
const Vector4 & getPosValue() const
Returns the current point including its value.
unsigned int numPoints() const
Returns the total number of points of the CSO.
CSOPathPointConstIterator(const CSOPathPointConstIterator &rhs)
Copy constructor.
CSOPathPointConstIterator()
Default constructor.
static const unsigned int INVALID_INDEX
const CSOPathPoints * getPathPoints() const
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.
const CSO * getCSO() const
Returns the CSO.
void resetCounters()
Resets the internal counters that define the number of processed points.
CSOPathPointConstIterator(const CSO *cso, const CSOSeedPoint *startSeedPoint)
Constructor.
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.
const CSOPathPoints * getPathPoints() const
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.
CSOPathPointIterator next() const
Returns an iterator to the next path point if available and otherwise a CSOPathPointIteratorEnd.
CSOPathPointIterator(CSO *cso, CSOSeedPoint *startSeedPoint)
Constructor.
static const unsigned int INVALID_INDEX
CSOPathPointIterator(CSO *cso, CSOPathPoints *pathPoints, unsigned int startPathIndex, unsigned int startPointIndex)
Constructor.
CSO * getCSO()
Returns the cso.
~CSOPathPointIterator()=default
Default destructor.
CSOPathPoints * getPathPoints()
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).
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.
const Vector4 & getPosValue() const
Returns the current point including its value.
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 CSO * getCSO() const
Returns the cso.
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.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
T mlAbs(T a)
Defines ML specific abs template since only type depended library functions exists.
const CSOPathPointIterator CSOPathPointIteratorEnd
A symbolic iterator that indicates that a CSOPathPointIterator has reached the end of a cso.
const CSOPathPointConstIterator CSOPathPointConstIteratorEnd
A symbolic iterator that indicates that a CSOPathPointConstIterator has reached the end of a cso.