[ome-devel] Python import API

Niko Ehrenfeuchter nikolaus.ehrenfeuchter at unibas.ch
Tue Mar 1 14:03:34 GMT 2016


Hi Mark,

On 01.03.2016 09:50, Mark Carroll wrote:
> On 02/29/2016 05:56 PM, Colin Blackburn (Staff) wrote:
> (snip)
>>> I do have one small question though: as discussed with J-M and
>>> Sebastien during last year's meeting in Paris, it would be extremely
>>> helpful if the Python API call for importing an image into OMERO would
>>> report the ID of the new image after a successful import.
> (snip)
>> Here we capture the stdout and stderr. The Pixels IDs are in stdout
>> (just the IDs each on a new line), for example:
>>
>>>> 9
>> 10
>> 11
>> 12
>> "
>>
>> And the Image IDs can be parsed from stderr
>
> They're also readily available via HQL, e.g., for Pixels ID 12345,
>
> echo Image ID is `bin/omero hql --style plain "SELECT image.id FROM
> Pixels WHERE id = 12345" | cut -f 2 -d ,`

isn't this some kind of chicken-egg-problem then? If I knew the Pixels 
ID already, I was basically fine. But how do I get it from uploading via 
Python?

Thanks,
~Niko


More information about the ome-devel mailing list