Image

typedef struct hv_image hv_image_t

A generic HS image object.

int32_t hv_image_array_plane(hv_image_t const *image, uint64_t index, hv_axis_t axis, hv_array_t **array)

Retrieves a specific plane along a given axis from the image.

Parameters:
  • image – Reference to the image.

  • index – Plane index.

  • axis – Axis along which to extract the plane.

  • array – Output parameter for the resulting array.

Return values:
  • 0 – Ok

  • nonzero – Error

int32_t hv_image_array_slice(hv_image_t const *image, hv_slice_desc_t desc, hv_array_t **array)

Returns a sliced array from the image as a dynamic array.

Parameters:
  • image – Reference to the image.

  • desc – Slice descriptor specifying the region.

  • array – Output parameter for the resulting array.

Return values:
  • 0 – Ok

  • nonzero – Error

hv_image_t *hv_image_dup(hv_image_t const *image)

Duplicates a image and returns a boxed copy.

Parameters:

image – Reference to the source image.

Returns:

Boxed copy of the input image.

void hv_image_free(hv_image_t **image)

Frees the memory associated with a boxed image.

Parameters:

image – Image to free.

int32_t hv_image_full(hv_image_t const *image, hv_array_t **array)

Retrieves the full image data as a dynamic array.

Parameters:
  • image – Reference to the image.

  • array – Output parameter for the resulting array.

Return values:
  • 0 – Ok

  • nonzero – Error

int32_t hv_image_meta(hv_image_t const *image, hv_image_meta_t **meta)

Retrieves the metadata of an image.

Parameters:
  • image – Reference to the image.

  • meta – Output parameter for the image metadata.

Return values:
  • 0 – Ok

  • nonzero – Error

int32_t hv_image_resolve(hv_image_t const *image_in, hv_image_t **image_out)

Resolves the image to an in-memory cube representation.

Note

This function blocks until all previous operations are resolved, and it may require a significant amount of RAM.

Parameters:
  • image_in – Reference to the image.

  • image_out – Output parameter for the resulting image.

Return values:
  • 0 – Ok

  • nonzero – Error

int32_t hv_image_shape(hv_image_t const *image, hv_shape_meta_t **shape)

Retrieves the shape metadata of a image.

Parameters:
  • image – Reference to the image.

  • shape – Output parameter for the shape metadata.

Return values:
  • 0 – Ok

  • nonzero – Error

int32_t hv_image_stream(hv_image_t const *image, hv_stream_t **stream)

Create a stream of the full image data.

Parameters:
  • image – Reference to the image.

  • stream – Output parameter for the resulting stream.

Return values:
  • 0 – Ok

  • nonzero – Error

int32_t hv_image_stream_slice(hv_image_t const *image, hv_slice_desc_t desc, hv_stream_t **stream)

Create a stream based on the provided slice descriptor.

Parameters:
  • image – Reference to the image.

  • desc – Slice descriptor specifying the region.

  • stream – Output parameter for the resulting stream.

Return values:
  • 0 – Ok

  • nonzero – Error

int32_t hv_image_uuid(hv_image_t const *image, uint8_16_array_t **out_bytes)

Returns the deterministic structural UUID of an image as 16 bytes.

Parameters:
  • image – Reference to the image.

  • out_bytes – Output parameter for the 16-byte UUID (big-endian / RFC 4122 layout).

Return values:
  • 0 – Ok

  • nonzero – Error