ome / bioformats

Bio-Formats is a Java library for reading and writing data in life sciences image file formats. It is developed by the Open Microscopy Environment. Bio-Formats is released under the GNU General Public License (GPL); commercial licenses are available from Glencoe Software.
https://www.openmicroscopy.org/bio-formats
GNU General Public License v2.0
381 stars 241 forks source link

TIFF: Add warning for missing metadata such as physical size Z #3523

Open dgault opened 4 years ago

dgault commented 4 years ago

This request comes from forum thread https://forum.image.sc/t/saving-tiff-using-bioformats/34932/2

For OME-TIFF physical size is populated for X, Y, Z. However for standard TIFF it is only available for X and Y. It was suggested that a warning such as below to notify the user of the missing field would be helpful.

[WARNING] PhysicalPixelSizeZ was set but cannot be represented by Tiff files. Consider saving as ome.tif instead.

melissalinkert commented 4 years ago

Is an explicit check for PhysicalPixelSizeZ necessary, or is a more generic warning to the effect of Some metadata may be lost when converting to TIFF; consider saving as OME-TIFF instead sufficient?

A lot of what can be set via MetadataStore won't be preserved when saving as TIFF, so my concern is that checking for a value in each lost field will quickly get to be complicated.

imagesc-bot commented 1 month ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/loss-of-z-calibration-when-writing-reading-bigtiff-with-bioformats/101842/6