Image

typedef struct hv_hs_image hv_hs_image_t

A generic HS image object.

int32_t hv_hs_image_array_plane(hv_hs_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_hs_image_array_plane_crop(hv_hs_image_t const *image, uint64_t index, hv_axis_t axis, hv_rect_t crop, hv_array_t **array)

Retrieves a cropped region of a specific plane along a given axis.

Parameters:
  • image – Reference to the image.

  • index – Plane index.

  • axis – Axis along which to extract the plane.

  • crop – Rectangle specifying the crop region.

  • array – Output parameter for the resulting array.

Return values:
  • 0 – Ok

  • nonzero – Error

int32_t hv_hs_image_array_slice(hv_hs_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_hs_image_t *hv_hs_image_dup(hv_hs_image_t const *image)

Duplicates a DynamicHSImage and returns a boxed copy.

Parameters:

image – Reference to the source DynamicHSImage.

Returns:

Boxed copy of the input image.

void hv_hs_image_free(hv_hs_image_t **image)

Frees the memory associated with a boxed DynamicHSImage.

Parameters:

image – Image to free.

int32_t hv_hs_image_full(hv_hs_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_hs_image_header(hv_hs_image_t const *image, hv_hsi_header_t **header)

Retrieves the header of a DynamicHSImage.

Parameters:
  • image – Reference to the image.

  • header – Output parameter for the header.

Return values:
  • 0 – Ok

  • nonzero – Error

int32_t hv_hs_image_resolve(hv_hs_image_t const *image_in, hv_hs_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 DynamicHSImage.

Return values:
  • 0 – Ok

  • nonzero – Error

int32_t hv_hs_image_shape(hv_hs_image_t const *image, hv_shape_meta_t **shape)

Retrieves the shape metadata of a DynamicHSImage.

Parameters:
  • image – Reference to the image.

  • shape – Output parameter for the shape metadata.

Return values:
  • 0 – Ok

  • nonzero – Error

int32_t hv_hs_image_stream(hv_hs_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_hs_image_stream_slice(hv_hs_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