IOLink  IOL_v1.2.0_release
TilingInfoExtension.h
1 #pragma once
2 
3 #include <memory>
4 
5 #include <iolink/ArrayX.h>
6 #include <iolink/IOLinkAPI.h>
7 #include <iolink/RegionX.h>
8 #include <iolink/VectorX.h>
9 #include <iolink/view/Extension.h>
10 
11 namespace iolink
12 {
13 
14 class ImageView;
15 
27 class IOLINK_API TilingInfoExtension : public Extension
28 {
29 public:
33  static constexpr size_t EXTENSION_ID = 0x1;
34 
38  static constexpr size_t INVALID_TILE_INDEX = 0xFFFFFFFF;
39 
43  virtual const VectorXu64& maxTileSize() const = 0;
44 
48  virtual size_t tileCount() const = 0;
49 
56  virtual RegionXu64 tileRegion(size_t tileIndex) const = 0;
57 
64  virtual const ArrayXu64& tilingGrid() const = 0;
65 
78  virtual void readTile(size_t tileIndex, void* dst);
79 
92  virtual void writeTile(size_t tileIndex, const void* src);
93 
94 protected:
100  virtual ImageView* image() const = 0;
101 };
102 
103 } // end namespace iolink