13 #ifndef ML_PAGE_IDITERATOR_H
14 #define ML_PAGE_IDITERATOR_H
48 MLint result = _currentPageId;
51 if (result==_lastPageId) {
58 if (_currentPosition.x >= _pageBoxExtent.x) {
59 _currentPosition.x = 0;
60 _currentPageId -= _pageBoxExtent.x;
62 _currentPageId += _pageStride.y;
64 if (_currentPosition.y >= _pageBoxExtent.y) {
65 _currentPosition.y = 0;
66 _currentPageId -= _pageBoxExtent.y * _pageStride.y;
68 _currentPageId += _pageStride.z;
70 if (_currentPosition.z >= _pageBoxExtent.z) {
71 _currentPosition.z = 0;
72 _currentPageId -= _pageBoxExtent.z * _pageStride.z;
74 _currentPageId += _pageStride.c;
76 if (_currentPosition.c >= _pageBoxExtent.c) {
77 _currentPosition.c = 0;
78 _currentPageId -= _pageBoxExtent.c * _pageStride.c;
80 _currentPageId += _pageStride.t;
82 if (_currentPosition.t >= _pageBoxExtent.t) {
83 _currentPosition.t = 0;
84 _currentPageId -= _pageBoxExtent.t * _pageStride.t;
86 _currentPageId += _pageStride.u;
103 MLint _currentPageId;
105 MLint _numberOfPages;
A class that allows to incrementally iterate over all IDs of pages have an intersection with a given ...
MLint getNumPages() const
Returns the number of pages that are part of the box.
MLint getNextPageID()
Returns the next page ID, may only be called as often as getNumPages() returns.
MLEXPORT PageIDIterator()
Default Constructor.
MLEXPORT PageIDIterator(PagedImage &image, const SubImageBox &box)
Constructor that calls setup() with given parameters.
MLEXPORT ~PageIDIterator()
Destructor.
MLEXPORT void setup(PagedImage &image, const SubImageBox &box)
Sets up the iterator from the given image and box.
The class PagedImage, representing a fragmented image that manages properties and data of an image lo...
#define MLEXPORT
To export symbols from a DLL/shared object, we need to mark them with the MLEXPORT symbol.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...