| IOLink 1.11.0

Loading...
Searching...
No Matches
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
41 inline static std::shared_ptr<TilingInfoExtension> cast(const std::shared_ptr<Extension>& extension)
42 {
43 return std::dynamic_pointer_cast<TilingInfoExtension>(extension);
44 }
45
49 static constexpr size_t INVALID_TILE_INDEX = 0xFFFFFFFF;
50
54 virtual const VectorXu64& maxTileSize() const = 0;
55
59 virtual size_t tileCount() const = 0;
60
67 virtual RegionXu64 tileRegion(size_t tileIndex) const = 0;
68
75 virtual const ArrayXu64& tilingGrid() const = 0;
76
89 virtual void readTile(size_t tileIndex, void* dst);
90
103 virtual void writeTile(size_t tileIndex, const void* src);
104
105 protected:
111 virtual ImageView* image() const = 0;
112};
113
114} // end namespace iolink
iolink::ArrayX
A multi dimensionnal array.
Definition ArrayX.h:31
iolink::Extension
Parent class for all views extensions.
Definition Extension.h:25
iolink::ImageView
Interface representing an N dimensional image.
Definition ImageView.h:70
iolink::RegionX
A Region using dynamic vectors.
Definition RegionX.h:14
iolink::TilingInfoExtension
ImageView extension to describe how an image is tiled.
Definition TilingInfoExtension.h:28
iolink::TilingInfoExtension::cast
static std::shared_ptr< TilingInfoExtension > cast(const std::shared_ptr< Extension > &extension)
Upcast a generic extension to this specific type.
Definition TilingInfoExtension.h:41
iolink::TilingInfoExtension::tileCount
virtual size_t tileCount() const =0
Get the number of tiles in the image.
iolink::TilingInfoExtension::writeTile
virtual void writeTile(size_t tileIndex, const void *src)
Write data from a memory buffer into a tile.
iolink::TilingInfoExtension::tileRegion
virtual RegionXu64 tileRegion(size_t tileIndex) const =0
Return the region of the chosen tile.
iolink::TilingInfoExtension::readTile
virtual void readTile(size_t tileIndex, void *dst)
Read data from a tile into a memory buffer.
iolink::TilingInfoExtension::image
virtual ImageView * image() const =0
Get the ImageView that is tiled by this instance.
iolink::TilingInfoExtension::tilingGrid
virtual const ArrayXu64 & tilingGrid() const =0
Return A N-dimensional array, with each element being a tile index.
iolink::TilingInfoExtension::maxTileSize
virtual const VectorXu64 & maxTileSize() const =0
Return the maximum tile size used for the image.
iolink::VectorX
A dynamically sized arithmetic vector.
Definition VectorX.h:18
iolink
All IOLink symbols are enclosed in this namespace.
Definition ArrayX.h:8