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 
40 
41 private:
42  SubImageBox _region;
43  ImageVector _currentTilePosition;
44  ImageVector _tileExtent;
45  MLint _numTiles;
46  bool _clip;
47 };
48 
49 
50 ML_END_NAMESPACE
51 
52 #endif
53 
54 
#define MLBACKGROUNDTASKS_EXPORT
Project global and OS specific declarations.
Iterator that takes a region and a tile extent and returns subsequent tiles that cover the region,...
void init(const SubImageBox &region, const ImageVector &tileExtent)
Init the iterator with the region, the desired tileExtent.
MLint getNumTiles() const
Get the total number of tiles that are going to be generated.
void setClipTiles(bool clip)
Set if tiles are clipped.
SubImageBox getNextTile()
Get the next tile (requesting more than getNumTiles() results in an undefined result!...
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
Definition: mlTypeDefs.h:578