openmicroscopy/bioformats — pull request #1181 by sbesson (2014-06-27 15:05:28+00:00)
Title: bfsave: metadata improvements (rebased onto develop)

This is the same as gh-1146 but rebased onto develop.

----

This PR should improve the extension of `bfsave` to save customized metadata into OME-TIFF files. These commits refactor the metadata creation into a standalone `createMinimalMetadata` function and allow to pass a metadata object as a parameter/value pair to `bfsave`.

Saving OME-TIFFs with sspecific metadata should now be achievable via the following workflow without rewriting all the metadata initialization/saving logic:

```
metadata = createMinimalMetadata(I);
metadata.setImageDescription('some description', 0:
... % additional metatada addition
bfsave(I, '/tmp/test.ome.tiff', 'metadata', metadata);
```

Additional tests have been added to check for metadata and the corresponding CI job is expected to pass.

/cc @yalexand