IOLink IOL_v1.8.0_release
Loading...
Searching...
No Matches
iolink::TilingInfoExtension Class Referenceabstract

ImageView extension to describe how an image is tiled. More...

#include <iolink/view/TilingInfoExtension.h>

Inheritance diagram for iolink::TilingInfoExtension:
iolink::Extension

Public Member Functions

virtual const VectorXu64maxTileSize () 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 ArrayXu64tilingGrid () 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 ImageViewimage () const =0
 Get the ImageView that is tiled by this instance.
 

Detailed Description

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.

Member Function Documentation

◆ image()

virtual ImageView * iolink::TilingInfoExtension::image ( ) const
protectedpure virtual

Get the ImageView that is tiled by this instance.

Used by readTile and writeTile default implementation.

◆ readTile()

virtual void iolink::TilingInfoExtension::readTile ( size_t  tileIndex,
void *  dst 
)
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.

Parameters
tileIndexThe index of the tile to read.
dstThe buffer where read data will be put.
Exceptions
ErrorWhen tileIndex is out of range.

◆ tileRegion()

virtual RegionXu64 iolink::TilingInfoExtension::tileRegion ( size_t  tileIndex) const
pure virtual

Return the region of the chosen tile.

Parameters
tileIndexthe index of the tile.
Exceptions
ErrorIf tileIndex is out of range.

◆ tilingGrid()

virtual const ArrayXu64 & iolink::TilingInfoExtension::tilingGrid ( ) const
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.

◆ writeTile()

virtual void iolink::TilingInfoExtension::writeTile ( size_t  tileIndex,
const void *  src 
)
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.

Parameters
tileIndexThe index of the tile to write.
srcThe buffer that contains data to write.
Exceptions
ErrorWhen tileIndex is out of range.

The documentation for this class was generated from the following file: