| IOLink 1.11.0

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
iolink::TilingInfoExtension Class Referenceabstract

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

`#include <iolink/view/TilingInfoExtension.h>`

Inheritance diagram for iolink::TilingInfoExtension:

## 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 Member Functions
static std::shared_ptr< TilingInfoExtension > | cast (const std::shared_ptr< Extension > &extension)
| Upcast a generic extension to this specific type.

## 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.

## 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

## ◆ cast()

static std::shared_ptr< TilingInfoExtension > iolink::TilingInfoExtension::cast | ( | const std::shared_ptr< Extension > & | extension | ) |
| inline static

Upcast a generic extension to this specific type.

Parameters

  extension | The extension to cast.

Returns
  The upcasted extension. This will be null if no upcasting is possible.

## ◆ image()

virtual ImageView * iolink::TilingInfoExtension::image | ( |  | ) | const
| protected pure 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

  tileIndex | The index of the tile to read.
  dst | The buffer where read data will be put.

Exceptions

  Error | When 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

  tileIndex | the index of the tile.

Exceptions

  Error | If 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

  tileIndex | The index of the tile to write.
  src | The buffer that contains data to write.

Exceptions

  Error | When tileIndex is out of range.

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

- iolink/public/include/iolink/view/TilingInfoExtension.h