Metadata

enum hv_interleave

Data interleave mode.

Defines the memory layout of the file. To achieve good performance, as suitable interleave mode should be used for a given application.

  • BSQ: The full image for each spectral band is stored consecutively in memory. This format is effective for spatial access.

  • BIP: All spectral bands for each pixel is stored consecutively, followed by a line of pixels. This format is effective for spectral access.

  • BIL: Each line of pixels is stored consecutively for each band. This format achieves improved spatial access along the width of the image while retaining good performance for spectral access as well.

A good default for images is the BIL format which is balanced between spatial and spectral access.

Remark: Has the same ABI as

Values:

enumerator HV_INTERLEAVE_B_S_Q

Band sequential.

Samples fully contiguous.

enumerator HV_INTERLEAVE_B_I_P

Lines sequential.

Bands fully contiguous.

enumerator HV_INTERLEAVE_B_I_L

Lines sequential.

Samples fully contiguous.

enum hv_wavelength_unit

Wavelength units.

Remark: Has the same ABI as

Values:

enumerator HV_WAVELENGTH_UNIT_MICROMETER

<No documentation available>

enumerator HV_WAVELENGTH_UNIT_NANOMETER

<No documentation available>

enumerator HV_WAVELENGTH_UNIT_MILLIMETER

<No documentation available>

enumerator HV_WAVELENGTH_UNIT_CENTIMETER

<No documentation available>

enumerator HV_WAVELENGTH_UNIT_METER

<No documentation available>

enumerator HV_WAVELENGTH_UNIT_WAVE_NUMBER

<No documentation available>

enumerator HV_WAVELENGTH_UNIT_ANGSTROMS

<No documentation available>

enumerator HV_WAVELENGTH_UNIT_G_HZ

<No documentation available>

enumerator HV_WAVELENGTH_UNIT_M_HZ

<No documentation available>

enumerator HV_WAVELENGTH_UNIT_INDEX

<No documentation available>

enumerator HV_WAVELENGTH_UNIT_UNKNOWN

<No documentation available>

enum hv_measurement_unit

Radiometric unit of measurement for pixel values.

Remark: Has the same ABI as

Values:

enumerator HV_MEASUREMENT_UNIT_UNKNOWN

<No documentation available>

enumerator HV_MEASUREMENT_UNIT_REFLECTANCE

<No documentation available>

enumerator HV_MEASUREMENT_UNIT_ABSORBANCE

<No documentation available>

enumerator HV_MEASUREMENT_UNIT_RAW

<No documentation available>

enumerator HV_MEASUREMENT_UNIT_ARBITRARY

<No documentation available>

enum hv_trigger_mode

Trigger mode for temporal acquisition (P4001 §7, Temporal section).

Remark: Has the same ABI as

Values:

enumerator HV_TRIGGER_MODE_INTERNAL_CLOCK

<No documentation available>

enumerator HV_TRIGGER_MODE_EXTERNAL_SIGNAL

<No documentation available>

enumerator HV_TRIGGER_MODE_SOFTWARE_TRIGGER

<No documentation available>

enum hv_endianness

Specifies the byte-ordering of multi-byte types in files.

Remark: Has the same ABI as

Values:

enumerator HV_ENDIANNESS_LITTLE

Little Endian.

enumerator HV_ENDIANNESS_BIG

Big Endian.

enum hv_axis

Named axes, independent of memory ordering.

Remark: Has the same ABI as

Values:

enumerator HV_AXIS_BANDS

<No documentation available>

enumerator HV_AXIS_LINES

<No documentation available>

enumerator HV_AXIS_SAMPLES

<No documentation available>

typedef struct hv_calibration_meta_private hv_calibration_meta_private_t

Calibration provenance metadata.

typedef struct hv_calibration_meta hv_calibration_meta_t

Calibration provenance metadata.

typedef struct hv_camera_meta hv_camera_meta_t

Camera identification and optics metadata.

typedef struct hv_shape_meta hv_shape_meta_t

Shape and memory layout metadata.

typedef struct hv_wavelength_meta hv_wavelength_meta_t

Specification of image wavelengths.

typedef struct hv_spectral_meta hv_spectral_meta_t

Spectral characteristics metadata.

typedef struct hv_spatial_roi hv_spatial_roi_t

Spatial region of interest.

typedef struct hv_spatial_meta hv_spatial_meta_t

Spatial characteristics metadata.

typedef struct hv_measurement_limits hv_measurement_limits_t

Valid or expected measurement limits for pixel values.

typedef struct hv_radiometric_meta hv_radiometric_meta_t

Radiometric characteristics metadata.

typedef struct hv_temporal_meta hv_temporal_meta_t

Temporal acquisition metadata.

typedef struct hv_sensor_meta hv_sensor_meta_t

Sensor artifact metadata.

typedef struct hv_encoding_meta_private hv_encoding_meta_private_t

Pixel encoding metadata.

typedef struct hv_encoding_meta hv_encoding_meta_t

Pixel encoding metadata.

typedef struct hv_display_meta hv_display_meta_t

Display hint metadata.

typedef struct hv_image_meta_private hv_image_meta_private_t

Private (opaque) part of the image metadata.

typedef struct hv_image_meta hv_image_meta_t

Image metadata.

typedef size_t *hv_dimension_t

Represents a finite integer-numbered dimension or an infinite dimension.

  • NULL values indicate an infinite-sized dimension.

  • Any other value indicates a finite-sized dimension.

typedef struct hv_shape hv_shape_t

Represents the dimensions of an image.

hv_calibration_meta_t *hv_calibration_meta_default(void)

Returns default calibration_meta_t.

void hv_calibration_meta_free(hv_calibration_meta_t **meta)

Frees calibration_meta_t.

hv_camera_meta_t *hv_camera_meta_default(void)

Returns default camera_meta_t.

void hv_camera_meta_free(hv_camera_meta_t **meta)

Frees camera_meta_t.

void hv_dimension_free(hv_dimension_t dimension)

Frees the memory associated with a HVDimension.

Parameters:

dimension – HVDimension to free.

hv_display_meta_t *hv_display_meta_default(void)

Returns default display_meta_t.

void hv_display_meta_free(hv_display_meta_t **meta)

Frees display_meta_t.

hv_encoding_meta_t *hv_encoding_meta_default(void)

Returns default encoding_meta_t.

void hv_encoding_meta_free(hv_encoding_meta_t **meta)

Frees encoding_meta_t.

hv_image_meta_t *hv_image_meta_default(void)

Returns default image metadata.

Returns:

Boxed HVImageMeta.

void hv_image_meta_free(hv_image_meta_t **meta)

Frees the memory associated with boxed image metadata.

Parameters:

meta – Boxed HVImageMeta to free.

Vec_uint8_t hv_image_meta_get(hv_image_meta_t const *meta, slice_ref_uint8_t key)

Get arbitrary metadata from the image metadata.

This function returns the value as a valid json string.

Parameters:
  • meta – Reference to ImageMeta.

  • key – Key of the metadata to retrieve.

Returns:

Value of the metadata as a json string.

int32_t hv_image_meta_set(hv_image_meta_t *meta, slice_ref_uint8_t key, slice_ref_uint8_t value)

Set an arbitrary metadata value on the image metadata.

This function takes a json string as input and sets the metadata value.

Parameters:
  • meta – Reference to ImageMeta.

  • key – Key to set the value to.

  • value – Must be a valid json string.

void hv_measurement_limits_free(hv_measurement_limits_t **limits)

Frees measurement limit metadata.

hv_measurement_limits_t *hv_measurement_limits_new(double min, double max)

Creates measurement limit metadata.

hv_radiometric_meta_t *hv_radiometric_meta_default(void)

Returns default radiometric_meta_t.

void hv_radiometric_meta_free(hv_radiometric_meta_t **meta)

Frees radiometric_meta_t.

hv_sensor_meta_t *hv_sensor_meta_default(void)

Returns default sensor_meta_t.

void hv_sensor_meta_free(hv_sensor_meta_t **meta)

Frees sensor_meta_t.

hv_dimension_t hv_shape_meta_bands(hv_shape_meta_t const *meta)

Returns the bands dimension of the ShapeMeta.

Parameters:

meta – Reference to ShapeMeta.

Returns:

Bands as HVDimension.

void hv_shape_meta_free(hv_shape_meta_t **meta)

Frees the memory associated with a boxed ShapeMeta.

Parameters:

meta – Boxed ShapeMeta to free.

hv_shape_meta_t *hv_shape_meta_from_raw_dim(size_t width, size_t height, size_t depth, hv_interleave_t interleave)

Creates a ShapeMeta from raw dimensions and interleave.

Parameters:
  • width – Width dimension.

  • height – Height dimension.

  • depth – Depth dimension.

  • interleave – Interleave mode.

Returns:

Boxed ShapeMeta.

hv_shape_meta_t *hv_shape_meta_from_shape_with_interleave(hv_shape_t shape, hv_interleave_t interleave)

Creates a ShapeMeta from a Shape and interleave.

Parameters:
  • shape – HVShape to use.

  • interleave – Interleave mode.

Returns:

Boxed ShapeMeta.

hv_dimension_t hv_shape_meta_get_axis_dim(hv_shape_meta_t const *meta, hv_axis_t axis)

Returns the dimension for the specified axis.

Parameters:
  • meta – Reference to ShapeMeta.

  • axis – Axis to query.

Returns:

Dimension as HVDimension.

hv_shape_t hv_shape_meta_get_shape(hv_shape_meta_t const *meta)

Returns the canonical shape from the ShapeMeta.

Parameters:

meta – Reference to ShapeMeta.

Returns:

HVShape representing the canonical shape.

hv_interleave_t hv_shape_meta_interleave(hv_shape_meta_t const *meta)

Returns the interleave mode of the ShapeMeta.

Parameters:

meta – Reference to ShapeMeta.

Returns:

Interleave mode.

hv_dimension_t hv_shape_meta_lines(hv_shape_meta_t const *meta)

Returns the lines dimension of the ShapeMeta.

Parameters:

meta – Reference to ShapeMeta.

Returns:

Lines as HVDimension.

hv_shape_meta_t *hv_shape_meta_ratio(hv_shape_meta_t *shape, hv_shape_meta_t *other)

Returns the ratio of two ShapeMeta objects.

Parameters:
  • shape – Boxed ShapeMeta.

  • other – Boxed ShapeMeta to divide by.

Returns:

Boxed ShapeMeta representing the ratio.

hv_dimension_t hv_shape_meta_samples(hv_shape_meta_t const *meta)

Returns the samples dimension of the ShapeMeta.

Parameters:

meta – Reference to ShapeMeta.

Returns:

Samples as HVDimension.

int32_t hv_shape_meta_set_axis_dim(hv_shape_meta_t *meta, hv_axis_t axis, hv_dimension_t value)

Sets the dimension for the specified axis.

Parameters:
  • meta – Mutable reference to ShapeMeta.

  • axis – Axis to set.

  • value – Dimension value as HVDimension.

Return values:
  • 0 – Ok

  • nonzero – Error

int32_t hv_shape_meta_set_bands(hv_shape_meta_t *meta, hv_dimension_t bands)

Sets the bands dimension of the ShapeMeta.

Parameters:
  • meta – Mutable reference to ShapeMeta.

  • bands – Bands as HVDimension.

Return values:
  • 0 – Ok

  • nonzero – Error

void hv_shape_meta_set_interleave(hv_shape_meta_t *meta, hv_interleave_t interleave)

Set the interleave mode of the ShapeMeta.

Parameters:
  • meta – Reference to ShapeMeta.

  • interleave – Interleave mode to set.

int32_t hv_shape_meta_set_lines(hv_shape_meta_t *meta, hv_dimension_t lines)

Sets the lines dimension of the ShapeMeta.

Parameters:
  • meta – Mutable reference to ShapeMeta.

  • lines – Lines as HVDimension.

Return values:
  • 0 – Ok

  • nonzero – Error

int32_t hv_shape_meta_set_samples(hv_shape_meta_t *meta, hv_dimension_t samples)

Sets the samples dimension of the ShapeMeta.

Parameters:
  • meta – Mutable reference to ShapeMeta.

  • samples – Samples as HVDimension.

Return values:
  • 0 – Ok

  • nonzero – Error

int32_t hv_shape_meta_to_array_shape_finite(hv_shape_meta_t const *meta, Vec_size_t *_out)

Converts the ShapeMeta to a finite array shape.

Parameters:
  • meta – Reference to ShapeMeta.

  • _out – Output parameter for the resulting shape vector.

Return values:
  • 0 – Ok

  • nonzero – Error

hv_shape_meta_t *hv_shape_meta_with_slice(hv_shape_meta_t const *shape, hv_slice_desc_t desc)

Returns a sliced ShapeMeta using the provided descriptor.

Parameters:
  • shape – Reference to ShapeMeta.

  • desc – Slice descriptor.

Returns:

Boxed ShapeMeta representing the sliced shape.

hv_spatial_meta_t *hv_spatial_meta_default(void)

Returns default spatial_meta_t.

void hv_spatial_meta_free(hv_spatial_meta_t **meta)

Frees spatial_meta_t.

void hv_spatial_roi_free(hv_spatial_roi_t **roi)

Frees spatial ROI metadata.

hv_spatial_roi_t *hv_spatial_roi_new(uint32_t start, uint32_t end)

Creates a spatial ROI metadata value.

hv_spectral_meta_t *hv_spectral_meta_default(void)

Returns default spectral_meta_t.

void hv_spectral_meta_free(hv_spectral_meta_t **meta)

Frees spectral_meta_t.

hv_temporal_meta_t *hv_temporal_meta_default(void)

Returns default temporal_meta_t.

void hv_temporal_meta_free(hv_temporal_meta_t **meta)

Frees temporal_meta_t.

hv_wavelength_meta_t *hv_wavelength_meta_default(void)

Returns default wavelength_meta_t.

void hv_wavelength_meta_free(hv_wavelength_meta_t **meta)

Frees wavelength_meta_t.

struct hv_calibration_meta
#include <hv-sdk.h>

Calibration provenance metadata.

Public Members

char *calibration_process

Description of the sensor calibration process used for the image.

char *calibration_date

Date and time of the sensor calibration.

hv_calibration_meta_private_t *_priv

<No documentation available>

struct hv_camera_meta
#include <hv-sdk.h>

Camera identification and optics metadata.

Public Members

char *id

Identifier for the camera or camera system used to acquire the image.

char *architecture

Camera architecture, such as line-imaging spectrometer, scanned point spectrometer, array camera, or tunable-filter camera.

char *manufacturer

Camera manufacturer name.

char *model_name

Camera model name.

char *serial

Camera serial number.

char *lens_manufacturer

Lens manufacturer name.

char *lens_model

Lens model name.

char *lens_serial

Lens serial number.

char *configuration

Name, description, or reference for the camera configuration used during acquisition.

float *pixel_pitch_um

Camera pixel pitch in micrometers, when known.

struct hv_wavelength_meta
#include <hv-sdk.h>

Specification of image wavelengths.

Public Members

hv_wavelength_unit_t unit

Unit of the wavelength values.

Vec_double_t band_data

List of wavelength values.

The value at index i corresponds to the wavelength at output band index i.

struct hv_spectral_meta
#include <hv-sdk.h>

Spectral characteristics metadata.

Public Members

size_t *number_of_bands

Number of spectral bands, when not implied by wavelength metadata or image shape.

uint16_t *binning

Spectral binning factor.

Omitted when no spectral binning was applied.

hv_wavelength_meta_t *wavelengths

Center wavelength for each spectral band, including wavelength units.

Vec_double_t *response_fwhm

Spectral response function width per band, typically expressed in the same unit as the wavelengths.

double *coregistration_error

Spectral coregistration error as a percentage.

struct hv_spatial_roi
#include <hv-sdk.h>

Spatial region of interest.

Public Members

uint32_t start

Start pixel position.

uint32_t end

End pixel position.

struct hv_spatial_meta
#include <hv-sdk.h>

Spatial characteristics metadata.

Public Members

double *focal_length_mm

Focal length in millimeters.

double *slit_width_um

Slit width in micrometers.

hv_spatial_roi_t *spatial_roi

Spatial region of interest applied during acquisition, expressed in pixel coordinates.

uint16_t *binning

Spatial binning factor.

Omitted when no spatial binning was applied.

double *fov

Field of view angle.

double *psf_width

Sampling point spread function width.

double *coregistration_error

Spatial coregistration error as a percentage.

struct hv_measurement_limits
#include <hv-sdk.h>

Valid or expected measurement limits for pixel values.

Public Members

double min

Minimum allowed pixel value.

double max

Maximum allowed pixel value.

struct hv_radiometric_meta
#include <hv-sdk.h>

Radiometric characteristics metadata.

Public Members

hv_measurement_unit_t unit

Radiometric unit of measurement for pixel values.

bool *dark_corrected

Whether dark correction has been applied to the image data.

bool *negative_truncated

Whether negative values were clipped or truncated to zero.

double *linearity_error

Mean linearity error as a percentage.

double *aperture

Aperture setting used for acquisition.

double *read_noise

Read noise in electrons.

Vec_double_t *effective_throughput

Effective throughput per band, used for radiometric noise estimation.

double *adc_gain

ADC gain in electrons per digital number for raw or uncalibrated data.

hv_measurement_limits_t *limits

Valid or expected measurement limits for pixel values.

double *scaling

Scale factor applied to values before storage.

struct hv_temporal_meta
#include <hv-sdk.h>

Temporal acquisition metadata.

Public Members

double *exposure_time_ms

Integration or exposure time in milliseconds.

double *frame_time_ms

Acquisition frame period in milliseconds.

uint16_t *n_averages

Number of acquisitions averaged into each output frame.

hv_trigger_mode_t *trigger_mode

Triggering mode used during acquisition.

char *start_time

Start time of the collection.

char *end_time

End time of the collection.

struct hv_sensor_meta
#include <hv-sdk.h>

Sensor artifact metadata.

Public Members

Vec_size_t *bad_pixels

Indices of pixels known to be bad or unreliable.

Vec_size_t *bad_bands

Indices of spectral bands known to be bad or unreliable.

Vec_size_t *repaired_pixels

Indices of pixels where artifact repair has been applied.

struct hv_encoding_meta
#include <hv-sdk.h>

Pixel encoding metadata.

Public Members

hv_endianness_t byte_order

Byte ordering used for multi-byte pixel values.

double *scale_factor

Scale factor applied to the data in its measurement unit before storage.

double *zero_point

Numerical offset added to scaled output values before storage.

uint16_t *bits_per_pixel

Number of significant bits per pixel, for example ADC bit depth.

hv_encoding_meta_private_t *_priv

<No documentation available>

struct hv_display_meta
#include <hv-sdk.h>

Display hint metadata.

Public Members

Vec_size_t *default_bands

Band indices suggested for quick RGB visualization.

Vec_char_ptr_t *band_names

Human-readable names for spectral bands.

struct hv_image_meta
#include <hv-sdk.h>

Image metadata.

Public Members

hv_shape_meta_t *shape

Raw shape information.

hv_dtype_t dtype

Image data type.

char *description

Optional image description.

hv_camera_meta_t *camera

Camera identification and optics metadata.

hv_spectral_meta_t *spectral

Spectral characteristics metadata.

hv_spatial_meta_t *spatial

Spatial characteristics metadata.

hv_radiometric_meta_t *radiometric

Radiometric characteristics metadata.

hv_temporal_meta_t *temporal

Temporal acquisition metadata.

hv_calibration_meta_t *calibration

Calibration provenance metadata.

hv_sensor_meta_t *sensor

Sensor artifact metadata.

hv_encoding_meta_t *encoding

Pixel encoding metadata.

hv_display_meta_t *display

Display hint metadata.

size_t *data_offset

Optional data offset (only used for PAM/ENVI).

hv_image_meta_private_t *_priv

<No documentation available>

struct hv_shape
#include <hv-sdk.h>

Represents the dimensions of an image.

Public Members

hv_dimension_t bands

The spectral bands of the image.

hv_dimension_t samples

This is usually the height of the image.

If the image was captured using a line-scan hyper-spectral camera, this is also the number of line images captured.

hv_dimension_t lines

This is the width of the image.

For line-scan cameras, it is the length of a single line.