MeVisLab Toolbox Reference
mlTileIterator.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2009, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef ML_TILE_ITERATOR_H
14 #define ML_TILE_ITERATOR_H
15 
16 // Local includes
18 #include <mlSubImage.h>
19 
20 ML_START_NAMESPACE
21 
25 {
26 public:
28 
30  void init(const SubImageBox& region, const ImageVector& tileExtent);
31 
33  void setClipTiles(bool clip) { _clip = clip; }
34 
36  MLint getNumTiles() const { return _numTiles; }
37 
41 
42 private:
43  SubImageBox _region;
44  ImageVector _currentTilePosition;
45  ImageVector _tileExtent;
46  MLint _numTiles;
47  bool _clip;
48 };
49 
50 
51 ML_END_NAMESPACE
52 
53 #endif
54 
55 
#define MLBACKGROUNDTASKS_EXPORT
Iterator that takes a region and a tile extent, and returns subsequent tiles that cover the region st...
void init(const SubImageBox &region, const ImageVector &tileExtent)
Initializes the iterator with the region and the desired tileExtent.
MLint getNumTiles() const
Returns the total number of tiles that are going to be generated.
void setClipTiles(bool clip)
Sets whether tiles are clipped.
SubImageBox getNextTile()
Returns the next tile.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
Definition: mlTypeDefs.h:490