Create and save OME Tiff files in C++

Dear reader,

Please pardon this beginner question, I am new to Bio Formats.

I’m working on a C++ library which aquires data from FLIM.

Instead of writing the data to histogram files, I would like to write the data to an OME Tiff file and save this file, directly in C++.

Basically, I would like to do the following, but in C++ instead of in MATLAB:

% initialise the plane with 8 channels
plane = zeros(sy, sx, 1,8,1, 'uint8');

% fill the plane with the data from stored images.

% make minimal metadata
metadata = createMinimalOMEXMLMetadata(plane);

% save ome tiff
bfsave(plane, 'testimage.ome.tiff', 'metadata', metadata);

I succeeded in creating the minimal core meta data, and I’m following an approach similar to

Can anyone give me some tips as to how to achieve this?


1 Like

Can anyone from the OME team answer here? @dgault @s.besson ??

Hi @luco, what part in particular had you been struggling with? Were you able to get it working in the end?

As a note the OME-Files library has moved to being a community driven effort (see, largely driven by Roger Leigh who has added the sub resolution support to the library. You can find the latest code at and the docs are at

1 Like

Hi @dgault. Thanks a lot for you support. I have made myself familiar with the library since then and am now using it without issues. For this reason I have actually flagged this topic for deletion. Cheers!