IOLink Python 1.11.0
Loading...
Searching...
No Matches
iolink.iolink.TilingInfoExtension Class Reference
Inheritance diagram for iolink.iolink.TilingInfoExtension:
iolink.iolink.Extension

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")
 

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.

Constructor & Destructor Documentation

◆ __init__()

iolink.iolink.TilingInfoExtension.__init__ (   self,
args,
**  kwargs 
)

Reimplemented from iolink.iolink.Extension.

Member Function Documentation

◆ cast()

iolink.iolink.TilingInfoExtension.cast (   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.

◆ max_tile_size()

iolink.iolink.TilingInfoExtension.max_tile_size (   self)
Return the maximum tile size used for the image.

◆ read_tile()

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.

◆ tile_count()

iolink.iolink.TilingInfoExtension.tile_count (   self)
Get the number of tiles in the image.

◆ tile_region()

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.

◆ tiling_grid()

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.

◆ write_tile()

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.

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