<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size: 11pt; font-family: Arial; vertical-align: baseline;" class="">Hi Lionel,</span></div>
<br class="">
<span style="font-size: 11pt; font-family: Arial; vertical-align: baseline;" class="">A couple of additions to this thread more specific to the C++ library</span>
<div class=""><font face="Arial" class=""><span style="font-size: 15px;" class=""><br class="">
</span></font>
<div>
<blockquote type="cite" class="">
<div class="">On 3 Apr 2017, at 16:03, Simone Leo <<a href="mailto:s.z.leo@dundee.ac.uk" class="">s.z.leo@dundee.ac.uk</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">Hi Lionel,<br class="">
<br class="">
In addition to what Ian suggested for reading the XML metadata out of an<br class="">
OME-TIFF file, since Bio-Formats 5.4.0 you can also write a dataset as<br class="">
binary-only OME-TIFF + companion XML file. The relevant PR is<br class="">
<a href="https://github.com/openmicroscopy/bioformats/pull/2773" class="">https://github.com/openmicroscopy/bioformats/pull/2773</a>, which also<br class="">
contains some command line examples.<br class="">
<br class="">
Regards,<br class="">
<br class="">
Simone<br class="">
<br class="">
On 03/04/2017 15:49, Munro, Ian wrote:<br class="">
<blockquote type="cite" class="">Hi Lionel<br class="">
<br class="">
I’m not sure if this is of use but the command line tools can be<br class="">
downloaded from <a href="http://downloads.openmicroscopy.org/bio-formats/5.4.0/" class="">
http://downloads.openmicroscopy.org/bio-formats/5.4.0/</a><br class="">
“tiffcomment’ can then be used to extract the .xml from a file<br class="">
piping the output to “xmlindent” can be useful for easier reading.<br class="">
<br class="">
Hope that helps.<br class="">
<br class="">
Ian<br class="">
<br class="">
<br class="">
<blockquote type="cite" class="">On 3 Apr 2017, at 14:25, Lionel Fafchamps <<a href="mailto:lionel@fafchamps.com" class="">lionel@fafchamps.com</a><br class="">
<<a href="mailto:lionel@fafchamps.com" class="">mailto:lionel@fafchamps.com</a>>> wrote:<br class="">
<br class="">
* snip *<br class="">
<br class="">
My current strategy is now to split the data into a separate<br class="">
multichannel stack for each xy position and time point. Each one of<br class="">
these files is entirely self-contained with regards to the metadata,<br class="">
so that they can be portable. In addition to these, I would like to<br class="">
write a companion xml file to bring together everything as a dataset.<br class="">
I’m attempting to do this by setting the companion file tiffdata tags<br class="">
manually to the correct filename/ifd, though as yet it does not seem<br class="">
to work if the UUID of the file is not also included in the tag.<br class="">
</blockquote>
</blockquote>
</div>
</blockquote>
<br class="">
<div>
<div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size: 11pt; font-family: Arial; vertical-align: baseline;" class="">Overall, the strategy reads fine. The conditions of usage for the partial OME-XML support of
the OME-TIFF specification are described in the format specification [1]. One current limitation is that each OME-TIFF must contain either the full OME-XML metadata or a minimal metadata referring to a master/companion file. We are looking into relaxing some
of these rules especially for companion files. It might be good to see a public OME-TIFF sample fileset using the strategy you described above so that we can discuss the potential shortcomings.</span></div>
<br class="">
<span style="font-size: 11pt; font-family: Arial; vertical-align: baseline;" class="">[1]
</span><a href="https://www.openmicroscopy.org/site/support/ome-model/ome-tiff/specification.html#partial-ome-xml-metadata" style="text-decoration:none;" class=""><span style="font-size: 11pt; font-family: Arial; color: rgb(17, 85, 204); text-decoration: underline; vertical-align: baseline;" class="">https://www.openmicroscopy.org/site/support/ome-model/ome-tiff/specification.html#partial-ome-xml-metadata</span></a><span style="font-size: 11pt; font-family: Arial; vertical-align: baseline;" class="">
</span></div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">I’ve tried using the OMETIFFReader to get the uuid/xml comment out of<br class="">
the individual stacks but I haven’t been able to find any function<br class="">
that would let me do so. Does anybody have any suggestions?<br class="">
</blockquote>
</blockquote>
</div>
</blockquote>
<div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size: 11pt; font-family: Arial; vertical-align: baseline;" class=""><br class="">
</span></div>
<div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size: 11pt; font-family: Arial; vertical-align: baseline;" class="">In order to access the individual UUIDs, you should be able to use</span><span style="font-size: 11pt; line-height: 1.38; font-family: Arial;" class=""> the
FormatReader API and the MetadataStore to retrieve the individual attributes. Alternatively, you can use</span><span style="font-size: 11pt; line-height: 1.38; font-family: Arial;" class=""> the low-level TIFF API to read the ImageDescription Tag of the first
IFD and extract the raw XML comment [2]</span></div>
<br class="">
<span style="font-size: 11pt; font-family: Arial; vertical-align: baseline;" class="">[2]
</span><span style="text-decoration: underline; font-size: 11pt; font-family: Arial; color: rgb(17, 85, 204); vertical-align: baseline;" class=""><a href="https://github.com/openmicroscopy/ome-files-performance/blob/v0.1.0/src/main/cpp/metadata-performance.cpp#L88" class="">https://github.com/openmicroscopy/ome-files-performance/blob/v0.1.0/src/main/cpp/metadata-performance.cpp#L88</a></span></div>
<div><font color="#1155cc" face="Arial" class=""><span style="font-size: 15px;" class=""><u class=""><br class="">
</u></span></font>
<blockquote type="cite" class="">
<div class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">Additionally, would you consider this a reasonable way to solve this<br class="">
problem? If there is a better way, I’d be happy to hear of it!<br class="">
</blockquote>
</blockquote>
</div>
</blockquote>
<div><br class="">
</div>
<div>
<div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size: 11pt; font-family: Arial; vertical-align: baseline;" class="">As mentioned by Simone, we are working on improving the writing of companion filesets using the
OME-TIFF writer. Bio-Formats 5.4.0 includes a change going into that direction and we aim to include a similar feature in the next release of OME Files. [3]</span></div>
<br class="">
<div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size: 11pt; font-family: Arial; vertical-align: baseline;" class="">[3]
<a href="https://trello.com/b/WFYWCvoV/ome-files-0-4-0" class="">https://trello.com/b/WFYWCvoV/ome-files-0-4-0</a></span></div>
<div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><br class="">
</div>
<div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size: 11pt; font-family: Arial; vertical-align: baseline;" class="">Best,</span></div>
<div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size: 11pt; font-family: Arial; vertical-align: baseline;" class="">Sebastien</span></div>
</div>
<div><br class="">
</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
Thanks for your help,<br class="">
Lionel Fafchamps<br class="">
_______________________________________________<br class="">
ome-devel mailing list<br class="">
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" class="">ome-devel@lists.openmicroscopy.org.uk</a><br class="">
<mailto:ome-devel@lists.openmicroscopy.org.uk><br class="">
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel<br class="">
</blockquote>
<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
ome-devel mailing list<br class="">
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" class="">ome-devel@lists.openmicroscopy.org.uk</a><br class="">
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel<br class="">
<br class="">
</blockquote>
<br class="">
The University of Dundee is a registered Scottish Charity, No: SC015096<br class="">
_______________________________________________<br class="">
ome-devel mailing list<br class="">
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" class="">ome-devel@lists.openmicroscopy.org.uk</a><br class="">
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>