cbi_toolbox.utils.ome

This module contains tools to read and write ome-tiff files.

cbi_toolbox.utils.ome.load_ome_tiff(file_path)[source]

Load an OME tiff file as a numpy array [ZXY].

Parameters:

file_path (string) – The file to load.

Returns:

The loaded array, and its xml metadata.

Return type:

tuple (array [ZXY], str)

cbi_toolbox.utils.ome.save_ome_tiff(file_path, image, xmlstring=None)[source]

Save numpy array to OME tiff format.

Parameters:
  • file_path (string) – Where to save the data.

  • image (array[ZXY]) – The array to save.

  • xmlstring (str, optional) – Xml metadata, by default None.