Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageJ exporter: save original metadata #4219

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

melissalinkert
Copy link
Member

Fixes #4201.

I tested with https://downloads.openmicroscopy.org/images/ND2/karl/sample_image.nd2 since it has lots of original metadata, but pretty much any other test data would work as well.

Without this change, open in ImageJ with Plugins > Bio-Formats > Bio-Formats Importer and the Display metadata box checked. Export to OME-TIFF with Plugins > Bio-Formats > Bio-Formats Exporter, and default options (no boxes checked). Open the exported OME-TIFF as with the original file, and note that most of the original metadata is no longer available.

With this change, the same test should show that the original metadata window is more or less the same for the original file and the exported OME-TIFF.

cc @joshmoore, @tischi

@sbesson sbesson self-requested a review November 4, 2024 14:09
@sbesson sbesson added this to the 8.0.1 milestone Nov 4, 2024
Copy link
Member

@sbesson sbesson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that up to Bio-Formats 8, the OME-TIFF generated by the ImageJ Bio-Formats exporter lacks any original metadata.

With this change included, the same export workflow now generates an OME-TIFF with original metadata as can be confirmed both by introspecting the TIFF using tiffinfo as well as opening the exported OME-TIFF using the Bio-Formats Importer and selecting Display metadata option.

It is worth noting the checkboxes in the Bio-Formats Import Options window only affect the display of the metadata. In all cases, the original metadata is populated at reader initialization and exported to the format if applicable. I believe this is consistent with the expectation highlighted in the original issue i.e. the exporter should preserver all metadata but in case there is a use case for skipping the original metadata export (e.g. due to the size of the annotation), I assume it would need to be implemented as an additional export option.

In the meantime, I think including this in the upcoming 8.0.1 patch release of Bio-Formats makes complete sense.

@sbesson sbesson merged commit 783bb54 into ome:develop Nov 8, 2024
18 checks passed
@joshmoore
Copy link
Member

Thanks both!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug(?): IJ exported OME-TIFFs lack original metadata
3 participants