[ome-users] Batch import of images AND attachments

Graeme Ball graemeball at googlemail.com
Wed Dec 11 20:51:57 GMT 2013


Hi Josh,

sure, I can make the script available. Can I tidy it up a little over
Christmas and send it to you in the new year? At the moment it is a little
tangled up with some other code and not very well tested or documented.

When I invoke the cli from my python script I see several lines of output
(are they being sent to stdout?), e.g. see attached. So you suggest I
capture that and pick out the pixel Id from these two lines, right?:-
  Imported pixels:
  53

What I really wanted was to have import functionality available via the
blitz gateway and get a reference to the new image back: using cli + blitz
for imports seems a bit awkward.

Cheers,

Graeme


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
> >>
>
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20131211/cb4873f5/attachment.html>
-------------- next part --------------
Created session 8c6fb724-21d7-4705-a61a-6b67286f1571 (root at localhost:4064). Idle timeout: 10.0 min. Current group: system
connected as root (uid=0)
uploading Lena.tif
importing with args: import -s localhost -d 1 Lena.tif
Using session 8c6fb724-21d7-4705-a61a-6b67286f1571 (root at localhost:4064). Idle timeout: 10.0 min. Current group: system
2013-12-11 20:29:02,449 0          [      main] INFO          ome.formats.importer.ImportConfig  - OMERO Version: 4.4.8p1-ice34-b304
2013-12-11 20:29:02,453 4          [      main] INFO          ome.formats.importer.ImportConfig  - Bioformats version: 4.4.8 revision: 660f607 date: 17 July 2013
2013-12-11 20:29:02,464 15         [      main] INFO   formats.importer.cli.CommandLineImporter  - Log levels -- Bio-Formats: ERROR OMERO.importer: INFO
2013-12-11 20:29:02,731 282        [      main] INFO      ome.formats.importer.ImportCandidates  - Depth: 4 Metadata Level: MINIMUM
2013-12-11 20:29:02,895 446        [      main] INFO      ome.formats.importer.ImportCandidates  - 1 file(s) parsed into 1 group(s) with 1 call(s) to setId in 162ms. (164ms total) [0 unknowns]
2013-12-11 20:29:06,053 3604       [      main] WARN                    ome.system.UpgradeCheck  - UPGRADE AVAILABLE:Please upgrade to 4.4.9 See http://trac.openmicroscopy.org.uk/omero for the latest version
2013-12-11 20:29:06,118 3669       [      main] INFO       ome.formats.OMEROMetadataStoreClient  - Attempting initial SSL connection to localhost:4064
2013-12-11 20:29:06,869 4420       [      main] INFO       ome.formats.OMEROMetadataStoreClient  - Insecure connection requested, falling back
2013-12-11 20:29:07,168 4719       [      main] INFO       ome.formats.OMEROMetadataStoreClient  - Server: 4.4.8
2013-12-11 20:29:07,168 4719       [      main] INFO       ome.formats.OMEROMetadataStoreClient  - Client: 4.4.8p1-ice34-b304
2013-12-11 20:29:07,168 4719       [      main] INFO       ome.formats.OMEROMetadataStoreClient  - Java Version: 1.6.0_51
2013-12-11 20:29:07,168 4719       [      main] INFO       ome.formats.OMEROMetadataStoreClient  - OS Name: Mac OS X
2013-12-11 20:29:07,168 4719       [      main] INFO       ome.formats.OMEROMetadataStoreClient  - OS Arch: x86_64
2013-12-11 20:29:07,168 4719       [      main] INFO       ome.formats.OMEROMetadataStoreClient  - OS Version: 10.7.5
2013-12-11 20:29:07,278 4829       [      main] INFO       ome.formats.OMEROMetadataStoreClient  - Call context: {omero.group:0}
2013-12-11 20:29:07,342 4893       [      main] INFO       ome.formats.OMEROMetadataStoreClient  - Call context: {omero.group:0}
2013-12-11 20:29:07,402 4953       [      main] INFO       ome.formats.OMEROMetadataStoreClient  - Call context: {omero.group:0}
2013-12-11 20:29:07,570 5121       [      main] INFO         ome.formats.importer.ImportLibrary  - File format: Tagged Image File Format
2013-12-11 20:29:07,570 5121       [      main] INFO         ome.formats.importer.ImportLibrary  - Base reader: loci.formats.in.TiffDelegateReader
2013-12-11 20:29:07,570 5121       [      main] INFO         ome.formats.importer.ImportLibrary  - Metadata only import? false
2013-12-11 20:29:07,570 5121       [      main] INFO         ome.formats.importer.ImportLibrary  - Archiving enabled? false
2013-12-11 20:29:07,570 5121       [      main] INFO         ome.formats.importer.ImportLibrary  - Container metadata only import? false
2013-12-11 20:29:07,571 5122       [      main] INFO         ome.formats.importer.ImportLibrary  - Reader is not of HCS domain, use metafile: true
2013-12-11 20:29:07,606 5157       [      main] WARN       ome.formats.model.ReferenceProcessor  - Unknown target class for LSID: Image:0
2013-12-11 20:29:08,190 5741       [      main] INFO   ormats.importer.cli.LoggingImportMonitor  - IMPORT_DONE
Imported pixels:
53
2013-12-11 20:29:08,190 5741       [      main] INFO      ome.formats.importer.cli.ErrorHandler  - Number of errors: 0


More information about the ome-users mailing list