[ome-users] Batch import of images AND attachments
Josh Moore
josh at glencoesoftware.com
Thu Jan 16 16:29:13 GMT 2014
On Dec 25, 2013, at 1:02 AM, Graeme Ball wrote:
> Hi,
Hi Graeme,
> as promised, I tidied up the script I was talking about, and it is now
> available here:-
> https://github.com/graemeball/omero_scripts/blob/master/iomero.py
Thanks for this.
> It can be used as a command-line importer with options including file
> attachments; or alternatively, from a server-side python script or
> interactive python shell. It should be quite easy to modify to add
> additional features from the Blitz gateway.
>
> Also, I incorporated the advice from this thread to retrieve the image Id
> from omero.cli.CLI rather than comparing all images before and after an
> upload.
I can certainly see a use in adding a "import_image" method (or similar)
to the gateway. Do you have any other example code (say output from
IPython) to see what else you're using here in anger?
> Feel free to use, modify, and let me know if I could do something better.
> Best Regards & Merry Christmas :-)
> Graeme
Cheers,
~Josh
> On Tue, Dec 10, 2013 at 2:35 PM, Josh Moore <josh at glencoesoftware.com>wrote:
>
>> Hi Graeme,
>>
>> On Dec 10, 2013, at 3:32 PM, Graeme Ball wrote:
>>
>>> The biggest problem is that the importer does not seem to return the ID
>> of
>>> the image after completing the upload, and you need this ID to add your
>>> attachments etc.
>>
>> The stdout from the CLI importer is the ID of the Pixels objects (as
>> opposed
>> to the Image objects). You can also pipe these values to a file for later
>> consumption.
>>
>>
>>> we wanted to do the same thing, and ended up writing a python script that
>>> performs the upload in 2 steps:-
>>> 1. upload the images using the command line importer (you can invoke it
>>> from python)
>>> 2. use the Blitz gateway to add attachments and annotations
>>
>>
>> Would you be up for sharing the script?
>>
>> Cheers,
>> ~Josh
>>
>>
>>> Regards,
>>>
>>> Graeme
>>>
>>>
>>> On Tue, Dec 10, 2013 at 10:26 AM, John Webber (NBI)
>>> <John.Webber at nbi.ac.uk>wrote:
>>>
>>>> Hi all,
>>>>
>>>>
>>>>
>>>> I have been using the command line importer to import images into an
>> Omero
>>>> instance as follows:
>>>>
>>>>
>>>>
>>>> bin/omero -s $RemoteHost -u "$User" -w "$Password" -p $Port import -d
>>>> $Dataset $File
>>>>
>>>>
>>>>
>>>> Can anyone let me know if I can also use this format of command to
>> import
>>>> ATTACHMENTS to specific images and, if so, please can you advise me of
>> the
>>>> correct syntax?
>>>>
>>>>
>>>>
>>>> If it is not possible to import attachments to specific images, is
>> anyone
>>>> able to recommend how we can do a batch upload of images AND their
>>>> attachments, into Omero?
>>>>
>>>>
>>>> Thanks
>>>>
>>>> John
>>>>
>>
>>
More information about the ome-users
mailing list