uploading an image from a dir with annotations using python
Posted: Wed Jul 09, 2014 2:52 pm
Hi - it was great meeting many of you in Paris recently
Is there a "basic" example of how to load an image from a local file into omero using python?
I can get an ImageI object using the following below but not from scratch/a file?
imageb = conn.getQueryService().get("Image", image.getId())
print type(imageb)
and then save it using:
conn.getUpdateService().saveObject(imageb)
Maybe it's because I'm new to python but I can't find anything in the python APIs to help me. In the examples I see they get images from omero and maybe add a text file as annotation - I would like to add a number of tagName=tagValue type annotations? How can I do that?
I guess the alternative is using the python cli wrapper using the import command which I've tried - but I have two issues:
1) if I run the import again it duplicates the images in omero - how would I stop that?
2) I can't add annotations or further info.
This is using omero 5.0.2 and appropriate apis.
Another question: I presume if I use any other method than the In-place import described at https://www.openmicroscopy.org/site/sup ... mport.html
I will be duplicating data on the server somewhere?
Many thanks in advance
Jonathan.
Is there a "basic" example of how to load an image from a local file into omero using python?
I can get an ImageI object using the following below but not from scratch/a file?
imageb = conn.getQueryService().get("Image", image.getId())
print type(imageb)
and then save it using:
conn.getUpdateService().saveObject(imageb)
Maybe it's because I'm new to python but I can't find anything in the python APIs to help me. In the examples I see they get images from omero and maybe add a text file as annotation - I would like to add a number of tagName=tagValue type annotations? How can I do that?
I guess the alternative is using the python cli wrapper using the import command which I've tried - but I have two issues:
1) if I run the import again it duplicates the images in omero - how would I stop that?
2) I can't add annotations or further info.
This is using omero 5.0.2 and appropriate apis.
Another question: I presume if I use any other method than the In-place import described at https://www.openmicroscopy.org/site/sup ... mport.html
I will be duplicating data on the server somewhere?
Many thanks in advance
Jonathan.