use of loci.formats.meta.ModuloAnnotation in project bioformats by openmicroscopy.
the class OMEXMLServiceImpl method createModulo.
/**
* Create a ModuloAlong* annotation corresponding to the given
* {@link loci.formats.Modulo}.
* @param meta the OMEXMLMetadata in which to create the annotation
* @param modulo the Modulo object that contains the annotation data
* @param annotations the list of existing annotations
* @param image the Image to which the new annotation should be linked
* @param imageIdx the index of the Image
* @param annotationIndex the index to be assigned to the new annotation
* @param imageAnnotation the index to be assigned to the new annotation link
*/
private void createModulo(final OMEXMLMetadata meta, final Modulo modulo, final StructuredAnnotations annotations, final Image image, final int imageIdx, final int annotationIndex, final int imageAnnotation) {
ModuloAnnotation annotation = new ModuloAnnotation();
annotation.setModulo(meta, modulo);
String id = MetadataTools.createLSID("Annotation", annotationIndex);
annotation.setID(id);
annotations.addXMLAnnotation(annotation);
meta.setImageAnnotationRef(id, imageIdx, imageAnnotation);
image.linkAnnotation(annotation);
}
Aggregations