Hi Andrew,<br><br>From a technical perspective, I really like the first proposed "MultiPart" solution. Of course, I don't have a real use case like Rubén doesat LOCI we generally use one OME-TIFF file per time point (storing all Z and C positions for that time point in one file), and we aren't doing HCS.<br>
<br>I also agree that MultiPart should be used only in extreme cases like Rubén's, since it greatly increases the chance of metadata loss.<br><br>One thing we could consider is recommending a different file extension for OME-TIFF "slave" files versus the master... though off the top of my head I can't think of a good alternate extension (something like ".ome-nometa.tif" is pretty unwieldy). If we did that, then users could more easily tell which file is the master based on the filename.<br>
<br>-Curtis<br><br><div class="gmail_quote">On Wed, Oct 20, 2010 at 2:52 PM, Andrew Patterson <span dir="ltr"><<a href="mailto:ajpatterson@lifesci.dundee.ac.uk">ajpatterson@lifesci.dundee.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello Ruben,<br>
<br>
Thanks for you work with us and all the sample data you have provided over the past few months. It is always very useful to see the kind of data people wish to store as, while we can think about what data people will have, there is nothing like real data to test our model with.<br>
<br>
In my reply I hope you do not mind if I open out the discussions to the general case. Some of this will reply to your problem, other areas, I believe from your mails with Melissa and Curtis, are solutions you have already rejected for your own reasons. This is understandable as what we are aiming to provide a general solution so it cannot be the ideal solution in all cases.<br>
<br>
The growth of imaging systems and dataset sizes since our first OME-XML model in 2003 has been impressive and we have been expanding OME-XML as we have gone along to encompass new meta-data like the Screen/Plate/Well extension. This has in turn allowed the image collections to grow and grow. In theory the size of an OME-XML file is mainly limited by the size of the underlying file system it is stored on, but OME-XML is not the most efficient way of representing binary data.<br>
<br>
A alternative storage solution for the binary part of the data is desirable, in this case our solution was OME-TIFF. This had two key advantages, it can be viewed as "just a tiff", making it familiar, useful and acceptable to many people. The second key feature is like OME-XML a TIFF file can contain multiple image planes in one file. This allowed us to continue the "everything in one place" approach of keeping an image and its metadata together.<br>
<br>
OME-TIFF does have a problem however, the TIFF file format uses 32bit offsets and, as such, a file is limited to 4 gigabytes. A massive file when the format was designed in the late 1980s.<br>
<br>
To get round this limitations we introduced the idea of multi-part OME-TIFFs. This allows the binary image plane data to be stored in 2 or more OME-TIFF files. Each of these files contains the full metadata and pointers to the location of all the files containing the rest of the rest of the image planes. This allows any file to be opened and the completeness of the data detected and absent parts hopefully located.<br>
<br>
(Another solution to the 4 gigabytes limit is a BigTIFF variant of OME-TIFF but I will not deal with that here.)<br>
<br>
As is often the case as soon as you introduce flexibility into a solution, in this case number of files, different use cases will pull the best solution in different directions. The way our solution was designed we favour multiple image planes stored in each OME-TIFF producing a smaller number of larger files. The reasons for this are varied but are based on our experience and the problems people can have managing vast numbers of files on the file system.<br>
<br>
While it is proper and VALID to store a single plane in each OME-TIFF if can make for an unwieldy dataset, and as you have noticed, is not the most space efficient way to store the data. The reason for this is two-fold. Firstly if a file is used for each plane the location of every single plane has to be listed individually in a TiffData node. The way this node is designed to work is to point to the location of the first image plane and use the "PlaneCount" attribute (old name "NumPlanes") to say how many planes to read in sequence from that starting point in the TIFF structure. The use of multi-plane TIFFs allows for a much smaller number of TiffData nodes. Secondly because of our approach of always keeping matadata with its image data this metadata gets duplicated in each file. This was a decision we have taken as a general principle, of course anything can be up for review.<br>
<br>
So what can be done to reduce the size of your data if you need for some reason to use single plane TIFFs?<br>
Well under the current schema your options are limited. You can tinker with the exact structure of the "TiffData" nodes and "UUID" nodes. For example instead of having 'IFD="0"' in every "TiffData" node it can be omitted as the attribute defaults to 0. A more drastic change is to omit the FileName attribute from the "UUID" node. This still produces valid files as the key value for piecing a file together on import should be the UUID, the FileName is just a hint where to look first. An importer should scan the other files in the same folder looking for missing parts based on the UUID - this approach allows file sets to survive renaming. This file size optimisation does of course make import of the dataset less efficient.<br>
<br>
So what changes could be made to the schema to increase the efficiency of storage using only single plane OME-TIFF files?<br>
First I must say these suggestions largely go against our goal of always keeping the metadata with the binary image date. But this is something that may need to be revised.<br>
<br>
One possible solution is to add a multi-part attribute to the top level OME node and strip almost all of the OME-XML from all the single plane TIFFs. This metadata would then reside in a master file and look much as it does now. The new attribute MultiPart if set would be the UUID of the master file set the file is part of.<br>
<br>
This would reduce the OME-XML in the TIFF header of each single plane file to a single empty OME node:<br>
<OME xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"<br>
UUID="urn:uuid:707e7b82-155a-43db-9f3d-1af4e6a212f8"<br>
MultiPart="urn:uuid:4062f7ac-dc41-11df-abaf-774b41a01549"<br>
xsi:schemaLocation="<a href="http://www.openmicroscopy.org/Schemas/OME/20??-" target="_blank">http://www.openmicroscopy.org/Schemas/OME/20??-</a>?? <a href="http://www.openmicroscopy.org/Schemas/OME/20??-??/ome.xsd" target="_blank">http://www.openmicroscopy.org/Schemas/OME/20??-??/ome.xsd</a>"<br>
xmlns="<a href="http://www.openmicroscopy.org/Schemas/OME/20??-?" target="_blank">http://www.openmicroscopy.org/Schemas/OME/20??-?</a>?"/><br>
<br>
The Master file would start:<br>
<OME xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"<br>
UUID="urn:uuid:4062f7ac-dc41-11df-abaf-774b41a01549"<br>
MultiPart="urn:uuid:4062f7ac-dc41-11df-abaf-774b41a01549"<br>
xsi:schemaLocation="<a href="http://www.openmicroscopy.org/Schemas/OME/20??-" target="_blank">http://www.openmicroscopy.org/Schemas/OME/20??-</a>?? <a href="http://www.openmicroscopy.org/Schemas/OME/20??-??/ome.xsd" target="_blank">http://www.openmicroscopy.org/Schemas/OME/20??-??/ome.xsd</a>"<br>
xmlns="<a href="http://www.openmicroscopy.org/Schemas/OME/20??-?" target="_blank">http://www.openmicroscopy.org/Schemas/OME/20??-?</a>?"><br>
<Plate...<br>
Followed by the rest of the metadata as it is now. You can tell it is the master as the UUID of the file and the UUID of the MultiPart are the same.<br>
<br>
This is a clean and ruthless culling of all the metadata in the individual files. The resulting single files in isolation do not have even enough metadata to display the image properly.<br>
<br>
<br>
A second possible solution is to split the data on an Image basis. This would not be as space efficient as the above solution but would at least leave some of the metadata intact in the files.<br>
<br>
Think of the metadata as belonging to a few distinct types.<br>
Screen/Plate/Well description<br>
Project/Dataset description<br>
Instrument description<br>
Image description<br>
<br>
In the sample Plate data you sent there are 260 Images. The data for all of these images is in each file in the set. What we could do is alter the structure so there is a master file containing:<br>
Screen/Plate/Well description<br>
Project/Dataset description<br>
Instrument description<br>
Image description<br>
This master file would be largely identical to the example above.<br>
<br>
Each single plane TIFF file would be marked as MultiPart as above but would have some metadata. It would contain the 'Image description' metadata for only the Image it is part of. This is of course a more complex set of files for an application to read and write. You would also end up with the problem that you need to have contestant IDs across all the files and you may have the problem of the metadata in individual single plane TIFFs referring to IDs that are not present in there own metadata, for example, a lightsource only define in the Master file.<br>
<br>
This is just two possible suggestions. I would like to gage the feeling of the community on this matter.<br>
It is a departure from our current position. While we have had the idea of a separate MetadataOnly file it was not something we have encouraged.<br>
<br>
How import is this kind of storage across a vast number of single plane files?<br>
<br>
Thanks again for letting us look at you data and raising your use case with us. I would love to hear other peoples thoughts and suggestions on this.<br>
<br>
Cheers,<br>
<font color="#888888"><br>
Andrew<br>
<br>
<br>
<br>
<br>
</font></blockquote></div><br>