IOLink C# 1.11.0
Loading...
Searching...
No Matches
IOLink.TilingInfoExtension Class Reference

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

Inheritance diagram for IOLink.TilingInfoExtension:
IOLink.Extension

Public Member Functions

 TilingInfoExtension (global::System.IntPtr cPtr, bool cMemoryOwn)
 
virtual VectorXu64 MaxTileSize ()
 Return the maximum tile size used for the image.
 
virtual uint TileCount ()
 Get the number of tiles in the image.
 
virtual RegionXu64 TileRegion (uint tileIndex)
 Return the region of the chosen tile.
 
virtual ArrayXu64 TilingGrid ()
 Return A N-dimensional array, with each element being a tile index.
 
unsafe void ReadTile (uint tileIndex, byte[] dst)
 Read data from a tile into a memory buffer.
 
unsafe void WriteTile (uint tileIndex, byte[] src)
 Write data from a memory buffer into a tile.
 

Static Public Member Functions

static global::System.Runtime.InteropServices.HandleRef getCPtr (TilingInfoExtension obj)
 
static TilingInfoExtension Cast (Extension extension)
 

Static Public Attributes

static readonly uint EXTENSION_ID = IOLinkPINVOKE.TilingInfoExtension_EXTENSION_ID_get()
 
static readonly uint INVALID_TILE_INDEX = IOLinkPINVOKE.TilingInfoExtension_INVALID_TILE_INDEX_get()
 

Protected Member Functions

override void Dispose (bool disposing)
 

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 TilingInfoExtension IOLink.TilingInfoExtension.Cast ( Extension  extension)
inlinestatic

Upcast a generic extension to this specific type.

Parameters
extensionThe extension to cast.
Returns
The upcasted extension. This will be null if no upcasting is possible.

◆ Dispose()

override void IOLink.TilingInfoExtension.Dispose ( bool  disposing)
inlineprotectedvirtual

Reimplemented from IOLink.Extension.

◆ ReadTile()

unsafe void IOLink.TilingInfoExtension.ReadTile ( uint  tileIndex,
byte[]  dst 
)
inline

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 ( uint  tileIndex)
inlinevirtual

Return the region of the chosen tile.

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

◆ TilingGrid()

virtual ArrayXu64 IOLink.TilingInfoExtension.TilingGrid ( )
inlinevirtual

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

unsafe void IOLink.TilingInfoExtension.WriteTile ( uint  tileIndex,
byte[]  src 
)
inline

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: