[ome-users] OME-XML Annotations
Melissa Linkert
melissa at glencoesoftware.com
Wed Jan 30 10:32:52 GMT 2013
Hi Leandro,
> I need to save numerical and string data in the image OME-TIFF file, so I
> should use annotations. The problem is that documentation is incomplete and
> I don't know how to use the IMetadata.setXMLAnnotation... functions.
Assuming that you have an IMetadata object named 'metadata', this would
create three separate annotations - one that stores a double floating
point value, one that stores a string value, and one that stores XML:
// -- begin --
metadata.setDoubleAnnotationID("Annotation:Double0", 0);
metadata.setDoubleAnnotationDescription("number of example annotations", 0);
metadata.setDoubleAnnotationValue(3.0, 0);
metadata.setCommentAnnotationID("Annotation:Comment0", 0);
metadata.setCommentAnnotationDescription("type of the next annotation", 0);
metadata.setCommentAnnotationValue("XML", 0);
metadata.setXMLAnnotationID("Annotation:XML0", 0);
metadata.setXMLAnnotationDescription("simple XML example", 0);
metadata.setXMLAnnotationValue("<Example/>", 0);
// -- end --
Multiple annotations of each type can be created, just increment the
integer passed as the second parameter for each new annotation and
change the string passed to the set*AnnotationID method.
You may also find it useful to read the descriptions of each of the annotation
types in the OME-XML schema:
http://www.openmicroscopy.org/Schemas/Documentation/Generated/OME-2012-06/ome.html
Hopefully that helps, but if you have any further questions please let
us know.
Regards,
-Melissa
On Tue, Jan 29, 2013 at 02:39:52PM -0300, Leandro Bugnon wrote:
> Dear comunity,
>
> I need to save numerical and string data in the image OME-TIFF file, so I
> should use annotations. The problem is that documentation is incomplete and
> I don't know how to use the IMetadata.setXMLAnnotation... functions.
>
> I need a simple data structure so the easiest solution is fine. Also I use
> Bio-formats importer library in Java, so I need some advice in this way.
>
> Hopping you help me to solve it,
>
> Best regards,
>
> --
> Leandro
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
More information about the ome-users
mailing list