microscope-cockpit / cockpit

Cockpit is a microscope graphical user interface. It is a flexible and easy to extend platform aimed at life scientists using bespoke microscopes.
https://microscope-cockpit.org
GNU General Public License v3.0
37 stars 26 forks source link

Alternative file formats #881

Open iandobbie opened 1 year ago

iandobbie commented 1 year ago

Cockoit only currently deals with .dv files, pretty obscure. We should consider alternative file formats, the most promising I think is the ngff which has a python library implementation and will store the relevant metadata.

This should be linked up with the expansion of metadata in non-experiment image files, like snaps or mosaic images. This is an ongoing effort see issues #676 and #391.

juliomateoslangerak commented 1 year ago

A recent post of Josh Moore in image.sc on the status of NGFF https://forum.image.sc/t/ngff-updates-oct-2023/86957

iandobbie commented 1 year ago

So I have implemented a function to save snaps from the camera views as a zarr file. So far contains no metadata as I couldn't work out how we were meant to add it. However it does save the data into a zarr file which can then be loaded in napari via the open folder menu item.

Code is in my zarr-snap-save branch at the moment. I will research the metadata to see how to get that stored with the file.

juliomateoslangerak commented 1 year ago

The OME metadata is stored as a ome.xml file in the group level https://ngff.openmicroscopy.org/latest/#bf2raw-details There is a library to easily produce these ome xml files that might be worth considering… I’ll look for it.

iandobbie commented 1 year ago

I asked on image.sc (thread at https://forum.image.sc/t/microscopy-metadata-in-zarr-files/87399) and was pointed at:

https://github.com/ome/ngff/issues/104 and https://github.com/tlambert03/ome-types

I plan to explore the python libraray and try to get as much metadata as we can into the ome-xml format for storage into the zarr.

juliomateoslangerak commented 2 weeks ago

This post points to BioIO, a replacement of AICSImageIO that can save in ome-tiff and ome-zarr. Maybe a way to go... https://forum.image.sc/t/announcing-bioio-successor-to-aicsimageio/103964

iandobbie commented 2 weeks ago

Definitely looks possible. A quick trawl of the README etc found that the zarr writer might well be in development rather than a finished project. I will take a look when I have some time.