IOLink IOL_v1.8.0_release
|
ImageView extension to describe how an image is tiled. More...
#include <iolink/view/TilingInfoExtension.h>
Public Member Functions | |
virtual const VectorXu64 & | maxTileSize () const =0 |
Return the maximum tile size used for the image. | |
virtual size_t | tileCount () const =0 |
Get the number of tiles in the image. | |
virtual RegionXu64 | tileRegion (size_t tileIndex) const =0 |
Return the region of the chosen tile. | |
virtual const ArrayXu64 & | tilingGrid () const =0 |
Return A N-dimensional array, with each element being a tile index. | |
virtual void | readTile (size_t tileIndex, void *dst) |
Read data from a tile into a memory buffer. | |
virtual void | writeTile (size_t tileIndex, const void *src) |
Write data from a memory buffer into a tile. | |
Static Public Attributes | |
static constexpr size_t | EXTENSION_ID = 0x1 |
Identifier used to load the extension using the View::extension method. | |
static constexpr size_t | INVALID_TILE_INDEX = 0xFFFFFFFF |
Tile index for invalid tiles, used in the tiling grid. | |
Protected Member Functions | |
virtual ImageView * | image () const =0 |
Get the ImageView that is tiled by this instance. | |
ImageView extension to describe how an image is tiled.
The ImageView is tiled with tiles corresponding to the size returned with the method maxTileSize, so the tile can be smaller, when on the limits of the view, they can be cropped for example.
Tiles are indexed from 0 to tileCount() - 1, all indices values out of that range are invalid. It is done so that you can iterate over these indices, so you can process all tiles of the dataset.
|
protectedpure virtual |
Get the ImageView that is tiled by this instance.
Used by readTile and writeTile default implementation.
|
virtual |
Read data from a tile into a memory buffer.
In order to get the size of the destination buffer, you must use the tileRegion method, and multiply the element count of that region by the byte count of the image's data type.
tileIndex | The index of the tile to read. |
dst | The buffer where read data will be put. |
Error | When tileIndex is out of range. |
|
pure virtual |
Return the region of the chosen tile.
tileIndex | the index of the tile. |
Error | If tileIndex is out of range. |
|
pure virtual |
Return A N-dimensional array, with each element being a tile index.
Some tiles can be invalid, because of holes for example. Their index will be INVALID_TILE_INDEX.
|
virtual |
Write data from a memory buffer into a tile.
In order to get the size of the source buffer, you must use the tileRegion method, and multiply the element count of that region by the byte count of the image's data type.
tileIndex | The index of the tile to write. |
src | The buffer that contains data to write. |
Error | When tileIndex is out of range. |