<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi All,</div><div><br></div><div>Yes - pixel IDs are returned from the CLI</div><div>(doc string confusingly labels this as ImageID in <a href="https://github.com/openmicroscopy/openmicroscopy/blob/develop/components/tools/OmeroPy/test/integration/library.py#L197">https://github.com/openmicroscopy/openmicroscopy/blob/develop/components/tools/OmeroPy/test/integration/library.py#L197</a> )</div><div><br></div><div>Once you have the pixelsId, you can get the imageId and Image like this:</div><div>imageId =  conn.getQueryService().get("Pixels", pixelsId).image.id.val</div><div>image = conn.getObject("Image", imageId)</div><div><br></div><div>  Cheers,</div><div><br></div><div>   Will.</div><div><br></div><div><br></div><div><div>On 10 Dec 2013, at 14:35, Josh Moore wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Graeme,<br><br>On Dec 10, 2013, at 3:32 PM, Graeme Ball wrote:<br><br><blockquote type="cite">The biggest problem is that the importer does not seem to return the ID of<br></blockquote><blockquote type="cite">the image after completing the upload, and you need this ID to add your<br></blockquote><blockquote type="cite">attachments etc.<br></blockquote><br>The stdout from the CLI importer is the ID of the Pixels objects (as opposed<br>to the Image objects). You can also pipe these values to a file for later<br>consumption.<br><br><br><blockquote type="cite">we wanted to do the same thing, and ended up writing a python script that<br></blockquote><blockquote type="cite">performs the upload in 2 steps:-<br></blockquote><blockquote type="cite">1. upload the images using the command line importer (you can invoke it<br></blockquote><blockquote type="cite">from python)<br></blockquote><blockquote type="cite">2. use the Blitz gateway to add attachments and annotations<br></blockquote><br><br>Would you be up for sharing the script?<br><br>Cheers,<br>~Josh<br><br><br><blockquote type="cite">Regards,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Graeme<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Tue, Dec 10, 2013 at 10:26 AM, John Webber (NBI)<br></blockquote><blockquote type="cite"><<a href="mailto:John.Webber@nbi.ac.uk">John.Webber@nbi.ac.uk</a>>wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Hi all,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I have been using the command line importer to import images into an Omero<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">instance as follows:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">bin/omero -s $RemoteHost -u "$User" -w "$Password" -p $Port import -d<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">$Dataset $File<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Can anyone let me know if I can also use this format of command to import<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">ATTACHMENTS to specific images and, if so, please can you advise me of the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">correct syntax?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">If it is not possible to import attachments to specific images, is anyone<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">able to recommend how we can do a batch upload of images AND their<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">attachments, into Omero?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Thanks<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">John<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><br>_______________________________________________<br>ome-users mailing list<br><a href="mailto:ome-users@lists.openmicroscopy.org.uk">ome-users@lists.openmicroscopy.org.uk</a><br>http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users<br></div></blockquote></div><br></body></html>