Skip to content

File acquire.zarr.h

FileList > acquire-zarr > include > acquire.zarr.h

Go to the source code of this file

  • #include "zarr.types.h"

Classes

Type Name
struct ZarrStreamSettings
The settings for a Zarr stream.

Public Types

Type Name
typedef struct ZarrStream_s ZarrStream

Public Functions

Type Name
ZarrStatusCode ZarrArraySettings_create_dimension_array (ZarrArraySettings * settings, size_t dimension_count)
Allocate memory for the dimension array in the Zarr array settings struct.
void ZarrArraySettings_destroy_dimension_array (ZarrArraySettings * settings)
Free memory for the dimension array in the Zarr array settings struct.
ZarrStatusCode ZarrHCSPlate_create_acquisition_array (ZarrHCSPlate * plate, size_t acquisition_count)
Allocate memory for the acquisitions array in the ZarrHCSPlate struct.
ZarrStatusCode ZarrHCSPlate_create_column_name_array (ZarrHCSPlate * plate, size_t column_count)
Allocate memory for the column names array in the ZarrHCSPlate struct.
ZarrStatusCode ZarrHCSPlate_create_row_name_array (ZarrHCSPlate * plate, size_t row_count)
Allocate memory for the row names array in the ZarrHCSPlate struct.
ZarrStatusCode ZarrHCSPlate_create_well_array (ZarrHCSPlate * plate, size_t well_count)
Allocate memory for the wells array in the ZarrHCSPlate struct.
void ZarrHCSPlate_destroy_acquisition_array (ZarrHCSPlate * plate)
Free memory for the acquisitions array in the ZarrHCSPlate struct.
void ZarrHCSPlate_destroy_column_name_array (ZarrHCSPlate * plate)
Free memory for the column names array in the ZarrHCSPlate struct.
void ZarrHCSPlate_destroy_row_name_array (ZarrHCSPlate * plate)
Free memory for the row names array in the ZarrHCSPlate struct.
void ZarrHCSPlate_destroy_well_array (ZarrHCSPlate * plate)
Free memory for the wells array in the ZarrHCSPlate struct.
ZarrStatusCode ZarrHCSSettings_create_plate_array (ZarrHCSSettings * settings, size_t plate_count)
Allocate memory for the ZarrHCSSettings struct in the Zarr stream settings.
void ZarrHCSSettings_destroy_plate_array (ZarrHCSSettings * settings)
Free memory for the plates array in the ZarrHCSSettings struct.
ZarrStatusCode ZarrHCSWell_create_image_array (ZarrHCSWell * well, size_t image_count)
Allocate memory for the images array in the ZarrHCSWell struct.
void ZarrHCSWell_destroy_image_array (ZarrHCSWell * well)
Free memory for the images array in the ZarrHCSWell struct.
ZarrStatusCode ZarrStreamSettings_create_arrays (ZarrStreamSettings * settings, size_t array_count)
Allocate memory for the ZarrArraySettings array in the Zarr stream settings struct.
void ZarrStreamSettings_destroy_arrays (ZarrStreamSettings * settings)
Free memory for the ZarrArraySettings array in the Zarr stream.
ZarrStatusCode ZarrStreamSettings_estimate_max_memory_usage (const ZarrStreamSettings * settings, size_t * usage)
Estimate the maximum memory usage of the Zarr stream.
size_t ZarrStreamSettings_get_array_count (const ZarrStreamSettings * settings)
Get the number of arrays configured in the Zarr stream settings, including both flat arrays and arrays in HCS plates.
ZarrStatusCode ZarrStreamSettings_get_array_key (const ZarrStreamSettings * settings, size_t index, char ** key)
Get the i th array key configured in the Zarr stream settings. The caller is responsible for freeing the memory allocated for the path in the array of paths. C++ callers should usefree to free the memory.
ZarrStatusCode ZarrStream_append (ZarrStream * stream, const void * data, size_t bytes_in, size_t * bytes_out, const char * key)
Append data to the Zarr stream.
ZarrStream * ZarrStream_create (ZarrStreamSettings * settings)
Create a Zarr stream.
void ZarrStream_destroy (ZarrStream * stream)
Destroy a Zarr stream.
ZarrStatusCode ZarrStream_get_current_memory_usage (const ZarrStream * stream, size_t * usage)
Get the current memory usage of the Zarr stream.
ZarrStatusCode ZarrStream_write_custom_metadata (ZarrStream * stream, const char * custom_metadata, bool overwrite)
Write custom metadata to the Zarr stream.
const char * Zarr_get_api_version ()
Get the version of the Zarr API.
ZarrLogLevel Zarr_get_log_level ()
Get the log level for the Zarr API.
const char * Zarr_get_status_message (ZarrStatusCode code)
Get the message for the given status code.
ZarrStatusCode Zarr_set_log_level (ZarrLogLevel level)
Set the log level for the Zarr API.

Public Types Documentation

typedef ZarrStream

typedef struct ZarrStream_s ZarrStream;

Public Functions Documentation

function ZarrArraySettings_create_dimension_array

Allocate memory for the dimension array in the Zarr array settings struct.

ZarrStatusCode ZarrArraySettings_create_dimension_array (
    ZarrArraySettings * settings,
    size_t dimension_count
) 

Parameters:

  • settings The Zarr array settings struct.
  • dimension_count The number of dimensions in the array to allocate memory for.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function ZarrArraySettings_destroy_dimension_array

Free memory for the dimension array in the Zarr array settings struct.

void ZarrArraySettings_destroy_dimension_array (
    ZarrArraySettings * settings
) 

Parameters:

  • settings The Zarr array settings struct containing the dimension array to free.

function ZarrHCSPlate_create_acquisition_array

Allocate memory for the acquisitions array in the ZarrHCSPlate struct.

ZarrStatusCode ZarrHCSPlate_create_acquisition_array (
    ZarrHCSPlate * plate,
    size_t acquisition_count
) 

Parameters:

  • plate The ZarrHCSPlate struct.
  • acquisition_count The number of acquisitions in the plate to allocate memory for.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function ZarrHCSPlate_create_column_name_array

Allocate memory for the column names array in the ZarrHCSPlate struct.

ZarrStatusCode ZarrHCSPlate_create_column_name_array (
    ZarrHCSPlate * plate,
    size_t column_count
) 

Note:

You must call ZarrHCSPlate_destroy_column_name_array to free the memory allocated by this function.

Note:

The strings in the column names array are not allocated by this function. You must allocate and assign them separately.

Parameters:

  • plate The ZarrHCSPlate struct.
  • column_count The number of column names in the plate to allocate memory for.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function ZarrHCSPlate_create_row_name_array

Allocate memory for the row names array in the ZarrHCSPlate struct.

ZarrStatusCode ZarrHCSPlate_create_row_name_array (
    ZarrHCSPlate * plate,
    size_t row_count
) 

Note:

You must call ZarrHCSPlate_destroy_row_name_array to free the memory allocated by this function.

Note:

The strings in the row names array are not allocated by this function. You must allocate and assign them separately.

Parameters:

  • plate The ZarrHCSPlate struct.
  • row_count The number of row names in the plate to allocate memory for.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function ZarrHCSPlate_create_well_array

Allocate memory for the wells array in the ZarrHCSPlate struct.

ZarrStatusCode ZarrHCSPlate_create_well_array (
    ZarrHCSPlate * plate,
    size_t well_count
) 

Parameters:

  • plate The ZarrHCSPlate struct.
  • well_count The number of wells in the plate to allocate memory for.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function ZarrHCSPlate_destroy_acquisition_array

Free memory for the acquisitions array in the ZarrHCSPlate struct.

void ZarrHCSPlate_destroy_acquisition_array (
    ZarrHCSPlate * plate
) 

Parameters:

  • plate The ZarrHCSPlate struct containing the acquisitions array to

function ZarrHCSPlate_destroy_column_name_array

Free memory for the column names array in the ZarrHCSPlate struct.

void ZarrHCSPlate_destroy_column_name_array (
    ZarrHCSPlate * plate
) 

Parameters:

  • plate The ZarrHCSPlate struct containing the column names array to free.

function ZarrHCSPlate_destroy_row_name_array

Free memory for the row names array in the ZarrHCSPlate struct.

void ZarrHCSPlate_destroy_row_name_array (
    ZarrHCSPlate * plate
) 

Parameters:

  • plate The ZarrHCSPlate struct containing the row names array to free.

function ZarrHCSPlate_destroy_well_array

Free memory for the wells array in the ZarrHCSPlate struct.

void ZarrHCSPlate_destroy_well_array (
    ZarrHCSPlate * plate
) 

Parameters:

  • plate The ZarrHCSPlate struct containing the wells array to free.

function ZarrHCSSettings_create_plate_array

Allocate memory for the ZarrHCSSettings struct in the Zarr stream settings.

ZarrStatusCode ZarrHCSSettings_create_plate_array (
    ZarrHCSSettings * settings,
    size_t plate_count
) 

This function allocates memory for the plates array in the ZarrHCSSettings struct. You must call ZarrHCSSettings_destroy_plate_array to free the memory allocated by this function.

Parameters:

  • settings The Zarr stream settings struct.
  • plate_count The number of plates in the dataset to allocate

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function ZarrHCSSettings_destroy_plate_array

Free memory for the plates array in the ZarrHCSSettings struct.

void ZarrHCSSettings_destroy_plate_array (
    ZarrHCSSettings * settings
) 

Parameters:


function ZarrHCSWell_create_image_array

Allocate memory for the images array in the ZarrHCSWell struct.

ZarrStatusCode ZarrHCSWell_create_image_array (
    ZarrHCSWell * well,
    size_t image_count
) 

Parameters:

  • well The ZarrHCSWell struct.
  • image_count The number of images in the well to allocate memory for.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function ZarrHCSWell_destroy_image_array

Free memory for the images array in the ZarrHCSWell struct.

void ZarrHCSWell_destroy_image_array (
    ZarrHCSWell * well
) 

Parameters:

  • well The ZarrHCSWell struct containing the images array to free.

function ZarrStreamSettings_create_arrays

Allocate memory for the ZarrArraySettings array in the Zarr stream settings struct.

ZarrStatusCode ZarrStreamSettings_create_arrays (
    ZarrStreamSettings * settings,
    size_t array_count
) 

Parameters:

  • settings The Zarr stream settings struct.
  • array_count The number of Zarr arrays in the dataset to allocate memory for.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function ZarrStreamSettings_destroy_arrays

Free memory for the ZarrArraySettings array in the Zarr stream.

void ZarrStreamSettings_destroy_arrays (
    ZarrStreamSettings * settings
) 

Parameters:

  • settings The Zarr stream settings struct containing the ZarrArraySettings array to free.

function ZarrStreamSettings_estimate_max_memory_usage

Estimate the maximum memory usage of the Zarr stream.

ZarrStatusCode ZarrStreamSettings_estimate_max_memory_usage (
    const ZarrStreamSettings * settings,
    size_t * usage
) 

Parameters:

  • settings The Zarr stream settings struct.
  • usage The estimated maximum memory usage in bytes.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function ZarrStreamSettings_get_array_count

Get the number of arrays configured in the Zarr stream settings, including both flat arrays and arrays in HCS plates.

size_t ZarrStreamSettings_get_array_count (
    const ZarrStreamSettings * settings
) 

Parameters:

  • settings The Zarr stream settings struct.

Returns:

The number of array paths configured in the settings.


function ZarrStreamSettings_get_array_key

Get the i th array key configured in the Zarr stream settings. The caller is responsible for freeing the memory allocated for the path in the array of paths. C++ callers should usefree to free the memory.

ZarrStatusCode ZarrStreamSettings_get_array_key (
    const ZarrStreamSettings * settings,
    size_t index,
    char ** key
) 

Parameters:

  • settings The Zarr stream settings struct.
  • index The index .
  • key Pointer to a string to be allocated and filled with the @i th array key. The caller is responsible for freeing the memory allocated for key.

Returns:

ZarrStatusCode_Success on success, ZarrStatusCode_InvalidIndex if the index is out of range, or an error code on failure.


function ZarrStream_append

Append data to the Zarr stream.

ZarrStatusCode ZarrStream_append (
    ZarrStream * stream,
    const void * data,
    size_t bytes_in,
    size_t * bytes_out,
    const char * key
) 

This function will block while chunks are compressed and written to the store. It will return when all data has been written. Multiple frames can be appended in a single call.

Parameters:

  • stream The Zarr stream struct.
  • data The data to append.
  • bytes_in The number of bytes in data. This can be any nonnegative integer. On a value of 0, this function will immediately return.
  • bytes_out The number of bytes written to the stream.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function ZarrStream_create

Create a Zarr stream.

ZarrStream * ZarrStream_create (
    ZarrStreamSettings * settings
) 

Parameters:

  • settings The settings for the Zarr stream.

Returns:

A pointer to the Zarr stream struct, or NULL on failure.


function ZarrStream_destroy

Destroy a Zarr stream.

void ZarrStream_destroy (
    ZarrStream * stream
) 

This function waits for all pending writes to complete and frees the memory allocated for the Zarr stream.

Parameters:

  • stream The Zarr stream struct to destroy.

function ZarrStream_get_current_memory_usage

Get the current memory usage of the Zarr stream.

ZarrStatusCode ZarrStream_get_current_memory_usage (
    const ZarrStream * stream,
    size_t * usage
) 

Parameters:

  • stream The Zarr stream struct.
  • usage The current memory usage in bytes.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function ZarrStream_write_custom_metadata

Write custom metadata to the Zarr stream.

ZarrStatusCode ZarrStream_write_custom_metadata (
    ZarrStream * stream,
    const char * custom_metadata,
    bool overwrite
) 

Parameters:

  • stream The Zarr stream struct.
  • custom_metadata JSON-formatted custom metadata to be written to the dataset.
  • overwrite If true, overwrite any existing custom metadata. Otherwise, if custom_metadata is not empty and the stream has already written custom metadata, this function will return an error.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function Zarr_get_api_version

Get the version of the Zarr API.

const char * Zarr_get_api_version () 

Returns:

Semver formatted version of the Zarr API.


function Zarr_get_log_level

Get the log level for the Zarr API.

ZarrLogLevel Zarr_get_log_level () 

Returns:

The log level for the Zarr API.


function Zarr_get_status_message

Get the message for the given status code.

const char * Zarr_get_status_message (
    ZarrStatusCode code
) 

Parameters:

  • code The status code.

Returns:

A human-readable status message.


function Zarr_set_log_level

Set the log level for the Zarr API.

ZarrStatusCode Zarr_set_log_level (
    ZarrLogLevel level
) 

Parameters:

  • level The log level.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.



The documentation for this class was generated from the following file C:/repos/acquire-zarr/include/acquire.zarr.h