By the results of discussion in Paris, the proper place for custom XML metadata and for saving XY-plane filenames (as they go from camera) were proposed (thanks Andy, Melissa).
Custom XML metadata are read from the disk file (it is important to skip the first line - thanks Sebastien)
- Code: Select all
fid = fopen([folder filesep xmlfilename],'r');
fgetl(fid);
description = fscanf(fid,'%c');
fclose(fid);
and added to metadata as XMLAnnotation
- Code: Select all
metadata.setXMLAnnotationID('Annotation:0',0);
metadata.setXMLAnnotationValue(description,0);
this annotation might be then retrieved by the command (r is the reader)
- Code: Select all
OMEXMLdescription = r.getMetadataStore().getXMLAnnotationValue(0);
By that, the problem with custom XML looks like, resolved, - it is saved and retrieved without distortions.
To store camera output XY-plane filenames, the following block of code has been proposed:
- Code: Select all
for i = 1:num_files
...
metadata.setCommentAnnotationID('Annotation:0',i-1);
metadata.setCommentAnnotationValue(char(file_names{i}),i-1);
metadata.setPlaneTheZ(toNNI(z-1),0,i-1);
metadata.setPlaneTheC(toNNI(c-1),0,i-1);
metadata.setPlaneTheT(toNNI(t-1),0,i-1);
metadata.setPlaneAnnotationRef('Annotation:0',0,i-1,0);
...
end
these annotations are then retrieved by the command (r is the reader)
- Code: Select all
..r.getMetadataStore().getCommentAnnotationValue(i)..
This block however, introduces problems to OME-tiff.
First, the attempt of importing OME-tiff created with this option to Omero - fails.
Second, the lifetime OME-tiff (with ModuloAlong according convention) created with this option, becomes unreadable by Ian's new Bioformats FLIMfit. Likely by the same reason.
So for now it isn't clear if it is workable.
Best,
Y.