1 #ifndef PixelIterator_H
2 #define PixelIterator_H
10 typedef std::shared_ptr<Tranquilizer> SPTranquilizer;
61 class KERNELSHARED_EXPORT
PixelIterator :
public std::iterator<std::random_access_iterator_tag, double> {
67 enum Flow { fXYZ, fYXZ, fXZY, fYZX, fZXY, fZYX};
188 _yChanged = _xChanged = _zChanged =
true;
191 return this->operator *();
211 _yChanged = _xChanged = _zChanged =
true;
239 return operator ()(pix);
289 return _grid->value(_currentBlock, _localOffset );
297 return _grid->value(_currentBlock, _localOffset);
305 return &(_grid->value(_currentBlock, _localOffset ));
326 void setFlow(Flow flw);
334 bool contains(
const Pixel& pix) ;
341 bool xchanged()
const;
348 bool ychanged()
const;
355 bool zchanged()
const;
362 return _x == _endx &&
371 Pixel position()
const;
384 quint32 linearPosition()
const;
428 _linearposition(endpos),
429 _endposition(endpos),
440 void copy(
const PixelIterator& iter);
442 IRasterCoverage _raster;
448 qint32 _localOffset = 0;
449 qint32 _currentBlock = 0;
455 quint64 _linearposition;
456 quint64 _endposition;
457 bool _xChanged =
false;
458 bool _yChanged =
false;
459 bool _zChanged =
false;
467 _linearposition = _endposition;
470 if ( _flow == fXYZ) {
473 else if ( _flow == fYXZ){
481 bool moveXYZ(
int delta) {
483 _linearposition += delta;
484 _localOffset += delta;
486 _yChanged = _zChanged =
false;
489 return moveYZ(delta);
494 bool moveYZ(
int delta);
498 return PixelIterator(raster);
502 PixelIterator iter(raster);
507 #endif // PixelIterator_H