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 https://docs.openmicroscopy.org/ome-files-cpp/0.5.0/ome-files/manual/html/_downloads/metadata-formatwriter.cpp.

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

Thanks!

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 https://lists.openmicroscopy.org.uk/pipermail/ome-devel/2018-August/004294.html), largely driven by Roger Leigh who has added the sub resolution support to the library. You can find the latest code at https://gitlab.com/codelibre/ome/ome-files-cpp and the docs are at https://codelibre.gitlab.io/ome/ome-files-cpp/doc/tutorial.html

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!