![]() |
IOLink Python 1.11.0
|
Public Member Functions | |
| __init__ (self, *args, **kwargs) | |
| max_tile_size (self) | |
| tile_count (self) | |
| tile_region (self, tileIndex) | |
| tiling_grid (self) | |
| read_tile (self, tileIndex, dst) | |
| write_tile (self, tileIndex, src) | |
Static Public Member Functions | |
| cast (extension) | |
Static Public Attributes | |
| EXTENSION_ID = _iolink.TilingInfoExtension_EXTENSION_ID | |
| INVALID_TILE_INDEX = _iolink.TilingInfoExtension_INVALID_TILE_INDEX | |
Properties | |
| thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") | |
Properties inherited from iolink.iolink.Extension | |
| thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") | |
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.
| iolink.iolink.TilingInfoExtension.__init__ | ( | self, | |
| * | args, | ||
| ** | kwargs | ||
| ) |
Reimplemented from iolink.iolink.Extension.
|
static |
Upcast a generic extension to this specific type.
:type extension: :py:class:`Extension`
:param extension: The extension to cast.
:rtype: :py:class:`TilingInfoExtension`
:return: The upcasted extension. This will be null if no upcasting is possible.
| iolink.iolink.TilingInfoExtension.max_tile_size | ( | self | ) |
Return the maximum tile size used for the image.
| iolink.iolink.TilingInfoExtension.read_tile | ( | self, | |
| tileIndex, | |||
| dst | |||
| ) |
Read data from a tile into a memory buffer.
In order to get the size of the destination buffer, you must use the
tile_region method, and multiply the element count of that region by
the byte count of the datatype of the image.
:type tileIndex: int
:param tileIndex: The index of the tile to read.
:type dst: uint8_t
:param dst: The buffer where read data will be put.
:raises: Error When tileIndex is out of range.
| iolink.iolink.TilingInfoExtension.tile_count | ( | self | ) |
Get the number of tiles in the image.
| iolink.iolink.TilingInfoExtension.tile_region | ( | self, | |
| tileIndex | |||
| ) |
Return the region of the chosen tile.
:type tileIndex: int
:param tileIndex: the index of the tile.
:raises: Error If tileIndex is out of range.
| iolink.iolink.TilingInfoExtension.tiling_grid | ( | self | ) |
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.
| iolink.iolink.TilingInfoExtension.write_tile | ( | self, | |
| tileIndex, | |||
| src | |||
| ) |
Write data from a memory buffer into a tile.
In order to get the size of the source buffer, you must use the
tile_region method, and multiply the element count of that region by
the byte count of the datatype of the image.
:type tileIndex: int
:param tileIndex: The index of the tile to write.
:type src: uint8_t
:param src: The buffer that contains data to write.
:raises: Error When tileIndex is out of range.